Skip to content

Commit ab11ebb

Browse files
authored
chore: bump @wyw-in-js to 1.x (major) (#1461)
* chore: bump wyw-in-js to 1.x * docs: note rollup serializeTransform default
1 parent c372128 commit ab11ebb

File tree

21 files changed

+716
-300
lines changed

21 files changed

+716
-300
lines changed

.changeset/bump-wyw-1-0-x.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
'@linaria/atomic': major
3+
'@linaria/babel-plugin-interop': major
4+
'@linaria/core': major
5+
'@linaria/postcss-linaria': major
6+
'@linaria/react': major
7+
'@linaria/server': major
8+
'@linaria/stylelint': major
9+
'@linaria/stylelint-config-standard-linaria': major
10+
'@linaria/testkit': major
11+
linaria: major
12+
---
13+
14+
BREAKING: bump `@wyw-in-js/*` dependencies to `^1.0.0` (stable).
15+
16+
This release updates Linaria's build-time evaluation engine (WyW). See https://wyw-in-js.dev/stability for practical guidance and common pitfalls.
17+
18+
Notes:
19+
20+
- If you import JSON from code that is evaluated by WyW, add `.json` to `extensions` and ensure `.json` is ignored by evaluation rules (so it's parsed as JSON, not by Babel).
21+
- Rollup users: WyW 1.x serializes `transform()` by default (`serializeTransform: true`). If you hit Rollup "Unexpected early exit" (unresolved plugin promises / deadlock during resolve), set `serializeTransform: false` (see `examples/rollup/rollup.config.mjs`).
22+
- WyW 1.x promotes fully-statically-evaluatable modules to `only: ['*']` and can re-evaluate modules when cached exports are incomplete (cached export values might not be reused).

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ Linaria is now built on top of [wyw-in-js.dev](https://wyw-in-js.dev/). It suppo
6161

6262
See [Configuration](https://wyw-in-js.dev/configuration) to customize how Linaria processes your files.
6363

64+
## Stability
65+
66+
Linaria relies on WyW (`@wyw-in-js/*`) to evaluate your modules at build time and extract CSS. If you hit issues like slow builds, invalidation storms, or unexpected code being executed during the build, it’s usually related to the WyW evaluation model and how your modules are structured.
67+
68+
See https://wyw-in-js.dev/stability for practical guidance and common pitfalls.
69+
6470
## Syntax
6571

6672
Linaria can be used with any framework, with additional helpers for React. The basic syntax looks like this:

docs/MIGRATION_GUIDE.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Migration Guide
22

3+
# 7.x from 6.x
4+
5+
## For Users
6+
7+
Linaria 7 updates the WyW toolchain (`@wyw-in-js/*`) to `^1.0.0` (stable). This affects build-time evaluation (CSS extraction) and can surface previously hidden issues in evaluated modules.
8+
9+
- Review https://wyw-in-js.dev/stability for the evaluation model, common pitfalls, and performance guidance.
10+
- If you rely on WyW cache internals, note that WyW 1.x can promote fully-statically-evaluatable modules to `only: ['*']` and may re-evaluate modules when cached exports are incomplete.
11+
- If you import JSON from code that is evaluated by WyW, add `.json` to `extensions` and ensure `.json` is ignored by evaluation rules (so it's parsed as JSON, not by Babel).
12+
- Rollup users on WyW 1.0.6: WyW serializes `transform()` by default; if you hit Rollup "Unexpected early exit" (unresolved plugin promises), try `serializeTransform: false` in the WyW Rollup plugin config.
13+
314
# 6.x from 5.x, 4.x, 3.x
415

516
## For Users

examples/astro-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"@astrojs/solid-js": "^1.2.3",
99
"@babel/core": "^7.23.5",
1010
"@linaria/core": "workspace:^",
11-
"@wyw-in-js/vite": "^0.6.0",
11+
"@wyw-in-js/vite": "^1.0.6",
1212
"astro": "^1.6.10",
1313
"solid-js": "^1.6.2",
1414
"vite": "^3",

examples/esbuild/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"linaria-website": "workspace:^"
88
},
99
"devDependencies": {
10-
"@wyw-in-js/esbuild": "^0.6.0",
10+
"@wyw-in-js/esbuild": "^1.0.6",
1111
"esbuild": "^0.15.16"
1212
},
1313
"scripts": {

examples/rollup/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
"@rollup/plugin-commonjs": "^25.0.4",
1414
"@rollup/plugin-image": "^3.0.2",
1515
"@rollup/plugin-node-resolve": "^15.2.1",
16-
"@wyw-in-js/rollup": "^0.6.0",
17-
"rollup": "^3.29.5",
16+
"@wyw-in-js/rollup": "^1.0.6",
17+
"rollup": "^4.0.0",
1818
"rollup-plugin-css-only": "^4.3.0"
1919
},
2020
"scripts": {

examples/rollup/rollup.config.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ export default {
1515
image(),
1616
wyw({
1717
sourceMap: process.env.NODE_ENV !== 'production',
18+
// Rollup can deadlock when WyW resolves imports during transform.
19+
serializeTransform: false,
1820
}),
1921
css({
2022
output: 'styles.css',

examples/vite/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"devDependencies": {
1212
"@rollup/plugin-node-resolve": "^15.2.1",
1313
"@vitejs/plugin-react": "^2.1.0",
14-
"@wyw-in-js/vite": "^0.6.0",
14+
"@wyw-in-js/vite": "^1.0.6",
1515
"vite": "^3.2.10"
1616
},
1717
"scripts": {

examples/vpssr-linaria-solid/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"license": "ISC",
1212
"dependencies": {
1313
"@linaria/core": "workspace:^",
14-
"@wyw-in-js/vite": "^0.6.0",
14+
"@wyw-in-js/vite": "^1.0.6",
1515
"babel-preset-solid": "^1.6.2",
1616
"compression": "^1.7.4",
1717
"express": "^4.20.0",

examples/webpack5/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
},
1010
"devDependencies": {
1111
"@babel/core": "^7.23.5",
12-
"@wyw-in-js/webpack-loader": "^0.6.0",
12+
"@wyw-in-js/webpack-loader": "^1.0.6",
1313
"babel-loader": "^9.1.0",
1414
"cross-env": "^7.0.3",
1515
"css-hot-loader": "^1.4.4",

0 commit comments

Comments
 (0)