Commit graph

8 commits

Author SHA1 Message Date
Jiachi Liu
8d28d5954e
test: rename node_modules_bak to node_modules (#62066)
We switched to `pnpm` for testing instead of `yarn` for e2e tests
containing customized node_modules packages, it works with
`node_modules` folder before. Rename the existing `node_modules_bak`
hack to make it easy to test with.

Previously we use `yarn` but it will clean `node_modules` folder so we
have to use another script to copy packages, it's not a required thing
now so we can test package from node_modules directly without renaming
folders locally

Closes NEXT-2496
2024-02-15 00:42:35 +01:00
Steven
d894303a02
chore(test): switch a few tests from yarn to pnpm (#61793)
Since yarn@1 is no longer maintained, we shouldn't use it for tests that
are not designed specifically for yarn@1

Closes NEXT-2397
2024-02-09 15:11:52 +01:00
OJ Kwon
4f1be5d999
test(next-dev): migrate styled-jsx integration test (#55079)
### What?

There are tests under `next-dev-tests` which used native binary to run tests for Turbopack. This should belong to next.js integration tests, and also indeed there are overlaps.

As a first step, PR removes duplicated styled-jsx test and mark existing test under turbopack test filter as enabled.


Closes WEB-1510
2023-09-07 02:51:20 +00:00
JJ Kasper
070239e666
Revert "Merge e2e test node_modules (#40926)" (#40974)
This reverts commit b508fef218.

Fixes: https://github.com/vercel/next.js/actions/runs/3139454323/jobs/5100342131

We aren't able to modify the filesystem for E2E deployments so this reverts the change introduced in the above PR to ensure deployment tests are able to run correctly with custom `node_modules`.
2022-09-28 08:08:46 +00:00
Jiachi Liu
b508fef218
Merge e2e test node_modules (#40926)
Merge e2e tests customized `node_modules` with installed `node_modules`,
to let you debug easily locally without moving folder between
`node_modules` and `node_modules_bak`

Also add `optoutServerComponentsBundle` to config schema.
2022-09-27 15:18:08 +02:00
Jiachi Liu
71f5f258ab
Setup require hook in next-server for styled-jsx resolving (#39305)
* Use require hook and alias to resolve styled-jsx

* re-export styled-jsx types from compiled

* fix lint

* add test for styled-jsx css

* setup require hook in server

* compile import path to styled-jsx/style

* revert require hook

* add test for server styled-jsx resolving

* update test

* pre copy styled-jsx assets

* fix styled-jsx dts

* add npmrc for styled-jsx e2e test

* load require hook directly

* rm legacy test

* fix lint

* fix pnpm install error

* split require hook

* only alias styled-jsx

* make styled-jsx resolving statically analyzable

* update test

Co-authored-by: JJ Kasper <jj@jjsweb.site>
2022-08-08 20:27:42 -05:00
Jiachi Liu
fcec758779
Flush initial styled-jsx in gIP first in concurrent rendering (#36594)
* Use flushed effects to generate styled-jsx styles insted of gIP by default

* ensure styles are flushed inside the default getInitialProps

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
Co-authored-by: Shu Ding <g@shud.in>
2022-05-02 22:52:46 +02:00
Jiachi Liu
7a09f88d14
Reexports styled-jsx JSXStyle in nextjs (#36585)
When using pnpm / yarnPnP to install next.js, styled-jsx as dependency is not hoisted in the top level node_modules, it will fail when nodejs is trying to resolve `styled-jsx/style` from project directory. Re-export `styled-jsx/style` in next.js and let swc/babel plugin compile the import path it to `next/dist/shared/lib/styled-jsx`

Resolves #10149
Closes #21320
Closes #9325



Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2022-04-30 20:25:05 +00:00