diff --git a/package-lock.json b/package-lock.json index 36513ea75b63fd..5f476bcf7cbd1f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -45575,8 +45575,8 @@ "react-autosize-textarea": "^7.1.0" }, "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" + "node": "^20.19.0 || >=22.13.0", + "npm": ">=10.2.3" }, "peerDependencies": { "react": "^18 || ^19", @@ -48006,8 +48006,8 @@ "stylelint": "^16.26.1" }, "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" + "node": "^20.19.0 || >=22.13.0", + "npm": ">=10.2.3" }, "peerDependencies": { "@types/react": "^18 || ^19", @@ -48087,7 +48087,7 @@ "storybook": "^10.4.3" }, "engines": { - "node": ">=20.10.0", + "node": "^20.19.0 || >=22.13.0", "npm": ">=10.2.3" }, "peerDependencies": { diff --git a/packages/edit-site/CHANGELOG.md b/packages/edit-site/CHANGELOG.md index 062c7dc4c54edb..3fbc9724f6171a 100644 --- a/packages/edit-site/CHANGELOG.md +++ b/packages/edit-site/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Raise the required Node.js version to `^20.19.0` or `>=22.13.0`. ([#80063](https://github.com/WordPress/gutenberg/pull/80063)) + ### Enhancements - Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)). diff --git a/packages/edit-site/package.json b/packages/edit-site/package.json index 43c2c47103c3bf..d9e1fab2738fd1 100644 --- a/packages/edit-site/package.json +++ b/packages/edit-site/package.json @@ -20,8 +20,8 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" + "node": "^20.19.0 || >=22.13.0", + "npm": ">=10.2.3" }, "files": [ "src", diff --git a/packages/theme/CHANGELOG.md b/packages/theme/CHANGELOG.md index adf7b6650ebdc8..4b092c965133cb 100644 --- a/packages/theme/CHANGELOG.md +++ b/packages/theme/CHANGELOG.md @@ -4,6 +4,7 @@ ### Breaking Changes +- Make the package ESM-only by removing the published CommonJS entrypoints and requiring Node.js `^20.19.0` or `>=22.13.0`. ([#80063](https://github.com/WordPress/gutenberg/pull/80063)) - Rename `--wpds-color-background-thumb-neutral-disabled` to `--wpds-color-background-thumb-neutral-weak-disabled` so the disabled token belongs to the existing neutral weak thumb family ([#79770](https://github.com/WordPress/gutenberg/pull/79770)). - `ThemeProvider`: reject partially transparent and `transparent` seed colors. `color.primary` and `color.background` now only accept fully opaque seed colors ([#79773](https://github.com/WordPress/gutenberg/pull/79773)). diff --git a/packages/theme/README.md b/packages/theme/README.md index 029305d8cfdda5..5a8d32cb22650a 100644 --- a/packages/theme/README.md +++ b/packages/theme/README.md @@ -52,6 +52,8 @@ npm install @wordpress/theme import '@wordpress/theme/design-tokens.css'; ``` +The package's JavaScript entrypoints are ESM-only and require Node.js `^20.19.0` or `>=22.13.0`. Use `import` syntax from ESM or TypeScript configuration files. + This stylesheet is universal and does not have a separate RTL version. If your application renders React content into additional documents (an iframe, a popup window, etc.), each of those documents needs the same stylesheet loaded in its own ``. See [Across documents (iframes and other portals)](#across-documents-iframes-and-other-portals). diff --git a/packages/theme/package.json b/packages/theme/package.json index f912455df83ac2..907a9a081f003c 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -19,59 +19,50 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": ">=18.12.0", - "npm": ">=8.19.2" + "node": "^20.19.0 || >=22.13.0", + "npm": ">=10.2.3" }, "files": [ "src", - "build", "build-module", "build-types", "*.md" ], - "main": "build/index.cjs", + "type": "module", "module": "build-module/index.mjs", "exports": { ".": { "types": "./build-types/index.d.ts", - "import": "./build-module/index.mjs", - "default": "./build/index.cjs" + "default": "./build-module/index.mjs" }, "./design-tokens.css": "./src/prebuilt/css/design-tokens.css", "./design-tokens.js": { - "types": "./build-types/prebuilt/js/design-tokens.d.ts", - "import": "./build-module/prebuilt/js/design-tokens.mjs", - "default": "./build/prebuilt/js/design-tokens.cjs" + "types": "./build-types/prebuilt/js/design-tokens.d.mts", + "default": "./src/prebuilt/js/design-tokens.mjs" }, "./postcss-plugins/postcss-ds-token-fallbacks": { "types": "./src/postcss-plugins/postcss-ds-token-fallbacks.d.mts", - "import": "./src/postcss-plugins/postcss-ds-token-fallbacks.mjs", "default": "./src/postcss-plugins/postcss-ds-token-fallbacks.mjs" }, "./esbuild-plugins/esbuild-ds-token-fallbacks": { "types": "./src/esbuild-plugins/esbuild-ds-token-fallbacks.d.mts", - "import": "./src/esbuild-plugins/esbuild-ds-token-fallbacks.mjs", "default": "./src/esbuild-plugins/esbuild-ds-token-fallbacks.mjs" }, "./vite-plugins/vite-ds-token-fallbacks": { "types": "./src/vite-plugins/vite-ds-token-fallbacks.d.mts", - "import": "./src/vite-plugins/vite-ds-token-fallbacks.mjs", "default": "./src/vite-plugins/vite-ds-token-fallbacks.mjs" }, "./stylelint-plugins/no-unknown-ds-tokens": { - "types": "./build-types/stylelint-plugins/no-unknown-ds-tokens.d.ts", - "import": "./src/stylelint-plugins/no-unknown-ds-tokens.mjs", - "default": "./build/stylelint-plugins/no-unknown-ds-tokens.cjs" + "types": "./build-types/stylelint-plugins/no-unknown-ds-tokens.d.mts", + "default": "./src/stylelint-plugins/no-unknown-ds-tokens.mjs" }, "./stylelint-plugins/no-setting-wpds-custom-properties": { - "types": "./build-types/stylelint-plugins/no-setting-wpds-custom-properties.d.ts", - "import": "./src/stylelint-plugins/no-setting-wpds-custom-properties.mjs", - "default": "./build/stylelint-plugins/no-setting-wpds-custom-properties.cjs" + "types": "./build-types/stylelint-plugins/no-setting-wpds-custom-properties.d.mts", + "default": "./src/stylelint-plugins/no-setting-wpds-custom-properties.mjs" }, "./stylelint-plugins/no-token-fallback-values": { - "types": "./build-types/stylelint-plugins/no-token-fallback-values.d.ts", - "import": "./src/stylelint-plugins/no-token-fallback-values.mjs", - "default": "./build/stylelint-plugins/no-token-fallback-values.cjs" + "types": "./build-types/stylelint-plugins/no-token-fallback-values.d.mts", + "default": "./src/stylelint-plugins/no-token-fallback-values.mjs" }, "./package.json": "./package.json" }, @@ -135,10 +126,9 @@ "access": "public" }, "scripts": { - "prelint:js": "npx esbuild src/prebuilt/js/design-tokens.mjs --format=cjs --outfile=build/prebuilt/js/design-tokens.cjs && node -e \"\"", "build:default-ramps": "node --import=esbuild-esm-loader/register bin/generate-default-ramps/index.ts", "build:tokens": "node --import=esbuild-esm-loader/register bin/generate-primitive-tokens/index.ts && node --import=esbuild-esm-loader/register bin/build-design-tokens/index.ts", - "build": "npm run build:tokens && npm run build:default-ramps && npm run prelint:js", + "build": "npm run build:tokens && npm run build:default-ramps", "postbuild": "prettier --write tokens/color.json tokens/modes src/prebuilt src/color-ramps/lib/default-ramps.ts docs ../base-styles/internal/_wpds-token-fallbacks.scss" } } diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md index 1a4338cb3f4cd5..1270f699cf62f9 100644 --- a/packages/ui/CHANGELOG.md +++ b/packages/ui/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +### Breaking Changes + +- Raise the required Node.js version to `^20.19.0` or `>=22.13.0`. ([#80063](https://github.com/WordPress/gutenberg/pull/80063)) + ### New Features - Add `Skeleton` component ([#79671](https://github.com/WordPress/gutenberg/pull/79671)). diff --git a/packages/ui/package.json b/packages/ui/package.json index a545e912c22ad3..6e985a92af88e4 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -19,7 +19,7 @@ "url": "https://github.com/WordPress/gutenberg/issues" }, "engines": { - "node": ">=20.10.0", + "node": "^20.19.0 || >=22.13.0", "npm": ">=10.2.3" }, "files": [