Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Tooling: Update development tools to work with PostCSS (try 2) #30347

Merged
merged 12 commits into from
Apr 9, 2021
32,434 changes: 19,421 additions & 13,013 deletions package-lock.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@
"@babel/traverse": "7.13.0",
"@octokit/rest": "16.26.0",
"@octokit/webhooks": "7.1.0",
"@storybook/addon-a11y": "6.1.11",
"@storybook/addon-docs": "6.1.11",
"@storybook/addon-knobs": "6.1.11",
"@storybook/addon-storysource": "6.1.11",
"@storybook/addon-viewport": "6.1.11",
"@storybook/react": "6.1.11",
"@storybook/addon-a11y": "6.2.5",
"@storybook/addon-docs": "6.2.5",
"@storybook/addon-knobs": "6.2.5",
"@storybook/addon-storysource": "6.2.5",
"@storybook/addon-viewport": "6.2.5",
"@storybook/react": "6.2.5",
"@testing-library/jest-dom": "5.11.9",
"@testing-library/react": "11.2.2",
"@types/classnames": "2.2.10",
Expand Down Expand Up @@ -155,7 +155,7 @@
"concurrently": "3.5.0",
"copy-webpack-plugin": "5.1.2",
"cross-env": "3.2.4",
"css-loader": "3.5.2",
"css-loader": "5.1.3",
"cssnano": "4.1.10",
"deep-freeze": "0.0.1",
"enzyme": "3.11.0",
Expand Down Expand Up @@ -183,8 +183,8 @@
"nock": "12.0.3",
"node-watch": "0.7.0",
"patch-package": "6.2.2",
"postcss": "7.0.32",
"postcss-loader": "3.0.0",
"postcss": "8.2.2",
"postcss-loader": "4.2.0",
"prettier": "npm:wp-prettier@2.2.1-beta-1",
"progress": "2.0.3",
"react": "16.13.1",
Expand All @@ -194,18 +194,18 @@
"rimraf": "3.0.2",
"rtlcss": "2.6.2",
"sass": "1.26.12",
"sass-loader": "8.0.2",
"sass-loader": "10.1.1",
"semver": "7.3.2",
"simple-git": "^2.35.0",
"snapshot-diff": "0.8.1",
"source-map-loader": "0.2.4",
"sprintf-js": "1.1.1",
"style-loader": "1.0.0",
"style-loader": "2.0.0",
"terser-webpack-plugin": "3.0.3",
"typescript": "4.1.3",
"uuid": "8.3.0",
"wd": "1.12.1",
"webpack": "4.42.0",
"webpack": "4.46.0",
"webpack-bundle-analyzer": "4.2.0",
"worker-farm": "1.7.0"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/postcss-plugins-preset/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

## Unreleased

### Breaking Changes

- The bundled `autoprefixer` dependency has been updated from requiring `^9.8.6` to requiring `^10.2.5` (see [Breaking Changes](https://github.com/postcss/autoprefixer/releases/tag/10.0.0), [#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `postcss-custom-properties` dependency has been updated from requiring `^10.0.0` to requiring `^11.0.0` (see [Breaking Changes](https://github.com/postcss/postcss-custom-properties/releases/tag/11.0.0), [#27821](https://github.com/WordPress/gutenberg/pull/27821)).

## 2.0.0 (2021-01-21)

### Breaking Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/postcss-plugins-preset/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
"dependencies": {
"@wordpress/base-styles": "file:../base-styles",
"@wordpress/postcss-themes": "file:../postcss-themes",
"autoprefixer": "^9.8.6",
"postcss-custom-properties": "^10.0.0"
"autoprefixer": "^10.2.5",
"postcss-custom-properties": "^11.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
4 changes: 4 additions & 0 deletions packages/postcss-themes/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Breaking Changes

- The bundled `postcss` dependency requiring `^7.0.32` has been replaced with a peer dependency requiring `^8.0.0` (see [Breaking Changes](https://github.com/postcss/postcss/releases/tag/8.0.0), [#27821](https://github.com/WordPress/gutenberg/pull/27821)).

## 3.0.0 (2021-01-21)

### Breaking Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/postcss-themes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"index.js"
],
"main": "index.js",
"dependencies": {
"postcss": "^7.0.32"
"peerDependencies": {
"postcss": "^8.0.0"
},
"publishConfig": {
"access": "public"
Expand Down
13 changes: 13 additions & 0 deletions packages/scripts/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@

## Unreleased

### Breaking Changes

- The bundled `css-loader` dependency has been updated from requiring `^3.5.2` to requiring `^5.1.3` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `mini-css-extract-plugin` dependency has been updated from requiring `^0.9.0` to requiring `^1.3.9` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `postcss-loader` dependency has been updated from requiring `^3.0.0` to requiring `^4.2.0` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `sass-loader` dependency has been updated from requiring `^8.0.2` to requiring `^10.1.1` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `thread-loader` dependency has been updated from requiring `^2.1.3` to requiring `^3.0.1` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).
- The bundled `url-loader` dependency has been updated from requiring `^3.0.0` to requiring `^4.1.1` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).

### New Features

- `build` and `start` command now bundle files ending with `.module.css` as CSS modules and extracts `style.module.css` ([#29182](https://github.com/WordPress/gutenberg/pull/29182)).

### Enhancements

- The bundled `webpack` dependency has been updated from requiring `4.42.0` to requiring `^4.46.0` ([#27821](https://github.com/WordPress/gutenberg/pull/27821)).

## 14.1.0 (2021-04-06)

### Enhancements
Expand Down
8 changes: 5 additions & 3 deletions packages/scripts/config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,10 @@ const cssLoaders = [
// Provide a fallback configuration if there's not
// one explicitly available in the project.
...( ! hasPostCSSConfig() && {
ident: 'postcss',
plugins: postcssPlugins,
postcssOptions: {
ident: 'postcss',
plugins: postcssPlugins,
},
} ),
},
},
Expand Down Expand Up @@ -221,7 +223,7 @@ const config = {
// bundle content as a convenient interactive zoomable treemap.
process.env.WP_BUNDLE_ANALYZER && new BundleAnalyzerPlugin(),
// MiniCSSExtractPlugin to extract the CSS thats gets imported into JavaScript.
new MiniCSSExtractPlugin( { esModule: false, filename: '[name].css' } ),
new MiniCSSExtractPlugin( { filename: '[name].css' } ),
// MiniCSSExtractPlugin creates JavaScript assets for CSS that are
// obsolete and should be removed. Related webpack issue:
// https://github.com/webpack-contrib/mini-css-extract-plugin/issues/85
Expand Down
14 changes: 7 additions & 7 deletions packages/scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"check-node-version": "^4.1.0",
"clean-webpack-plugin": "^3.0.0",
"cross-spawn": "^5.1.0",
"css-loader": "^3.5.2",
"css-loader": "^5.1.3",
"cwd": "^0.10.0",
"dir-glob": "^3.0.1",
"eslint": "^7.17.0",
Expand All @@ -61,22 +61,22 @@
"markdownlint": "^0.18.0",
"markdownlint-cli": "^0.21.0",
"merge-deep": "^3.0.3",
"mini-css-extract-plugin": "^0.9.0",
"mini-css-extract-plugin": "^1.3.9",
"minimist": "^1.2.0",
"npm-package-json-lint": "^5.0.0",
"postcss-loader": "^3.0.0",
"postcss-loader": "^4.2.0",
"prettier": "npm:wp-prettier@2.2.1-beta-1",
"puppeteer-core": "^5.5.0",
"read-pkg-up": "^1.0.1",
"resolve-bin": "^0.4.0",
"sass": "^1.26.11",
"sass-loader": "^8.0.2",
"sass-loader": "^10.1.1",
"source-map-loader": "^0.2.4",
"stylelint": "^13.8.0",
"terser-webpack-plugin": "^3.0.3",
"thread-loader": "^2.1.3",
"url-loader": "^3.0.0",
"webpack": "^4.42.0",
"thread-loader": "^3.0.1",
"url-loader": "^4.1.1",
"webpack": "^4.46.0",
"webpack-bundle-analyzer": "^4.2.0",
"webpack-cli": "^3.3.11",
"webpack-livereload-plugin": "^2.3.0",
Expand Down
6 changes: 4 additions & 2 deletions storybook/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@ module.exports = ( { config } ) => {
{
loader: 'postcss-loader',
options: {
ident: 'postcss',
plugins: postcssPlugins,
postcssOptions: {
ident: 'postcss',
plugins: postcssPlugins,
},
},
},
'sass-loader',
Expand Down
2 changes: 1 addition & 1 deletion webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ module.exports = {
new DependencyExtractionWebpackPlugin( { injectPolyfill: true } ),
].filter( Boolean ),
watchOptions: {
ignored: '!packages/*/build-module/**/*',
ignored: [ '**/node_modules', '**/packages/*/src' ],
kevin940726 marked this conversation as resolved.
Show resolved Hide resolved
aggregateTimeout: 500,
},
devtool,
Expand Down