[1.19.0] `@parcel/css` and Typescript 4.6
Highlights
- Replace
postcss-cssoand other PostCSS plugins with@parcel/css - Added new Stylelint rule
swissquote/no-variable-in-transpiled-functionto warn when unsupported - Support for TypeScript 4.6
Introducing @parcel/css
@parcel/css is a transpiler and minifier for CSS it natively supports many features and is now included in @swissquote/postcss-preset-swissquote
You can find a page that explains all the features that are supported here.
- Support both the legacy
color()(nowcolor-mod()) and the W3Ccolor()function - Added many tests to cover all the features and prevent regressions
- Some PostCSS plugins we included before are now no longer needed
- autoprefixer
- postcss-color-hsl
- postcss-color-rgb
- postcss-color-rgba-fallback
- postcss-csso
- postcss-calc
- postcss-color-hex-alpha
- postcss-color-rebeccapurple
- postcss-custom-media
- postcss-logical
- postcss-media-minmax
- postcss-selector-not
- Removed some plugins that were needed only for old IE versions
- pixrem
- pleeease-filters
- postcss-pseudoelements
New stylelint rule swissquote/no-variable-in-transpiled-function
CSS Custom properties (variables) allow you to create CSS that can dynamically change values at runtime, but what happens when you are using custom properties on something that will be transpiled ?
The answer is that the transpiled function will not be dynamically updated anymore.
If you take the following : color: color-mod(var(--color) contrast(50%)); the output will be color: rgb(128, 128, 255);; the custom property is gone and your CSS is no longer dynamic.
This rule will warn you about these cases.
TypeScript 4.6
https://devblogs.microsoft.com/typescript/announcing-typescript-4-6/
Other changes
- remove
gulp-stylelintfork, replace with@ronilaukkarinen/gulp-stylelint - support any Jest option when using
crafty test#1514 - replace
xml2jswithfast-xml-parser - make sure the react test setup for jest works for React 18
- fix reference to to
postcss-scssto refer to the resolved module - allow to override
@babel/preset-envand@babel/preset-reactoptions in@swissquote/babel-preset-swissquote#1500
Updates
postcssfrom 8.4.6 to 8.4.12@babel/*from 7.17.7 to 7.17.9@swc/corefrom 1.2.143 to 1.2.170rollupfrom 2.67.3 to 2.70.2webpackfrom 5.69.1 to 5.72.0globfrom 7.2.0 to 8.0.1gulp-eslint-newfrom 1.4.0 to 1.4.2big.jsfrom 5.2.2 to 6.1.1json5from 2.2.0 to 2.2.1browserslistfrom 4.19.3 to 4.20.2debugfrom 4.3.3 to 4.3.4micromatchfrom 4.0.4 to 4.0.5minimatchfrom 5.0.0 to 5.0.1semverfrom 7.3.5 to 7.3.7@rollup/plugin-babelfrom 5.3.0 to 5.3.1babel-loaderfrom 8.2.3 to 8.2.5eslintfrom 8.9.0 to 8.13.0mini-css-extract-pluginfrom 2.5.3 to 2.6.0css-loaderfrom 6.6.0 to 6.7.1stylelintfrom 14.5.2 to 14.7.1@swc/helpersfrom 0.3.3 to 0.3.8@swc/jestfrom 0.2.17 to 0.2.20swc-loaderfrom 0.1.15 to 0.2.0@rollup/plugin-babelfrom 5.3.0 to 5.3.1fork-ts-checker-webpack-pluginfrom 7.2.1 to 7.2.6ts-jestfrom 27.1.3 to 27.1.4ts-loaderfrom 9.2.6 to 9.2.8@rollup/plugin-commonjsfrom 21.0.1 to 21.1.0@rollup/plugin-node-resolvefrom 13.1.3 to 13.2.1@rollup/plugin-replacefrom 3.1.0 to 4.0.0@rollup/pluginutilsfrom 4.1.2 to 4.3.2webpack-dev-server4.7.4 to 4.8.1enhanced-resolvefrom 5.9.0 to 5.9.3yargs-parserfrom 21.0.0 to 21.0.1@typescript-eslint/*from 5.12.1 to 5.20.0eslint-config-prettierfrom 8.4.0 to 8.5.0eslint-import-resolver-typescriptfrom 2.5.0 to 2.7.1eslint-plugin-importfrom 2.25.4 to 2.26.0eslint-plugin-reactfrom 7.28.0 to 7.29.4eslint-plugin-react-hooksfrom 4.3.0 to 4.4.0postcss-importfrom 14.0.2 to 14.1.0postcss-pseudo-class-any-linkfrom 7.1.1 to 7.1.2stylelint-scssfrom 4.1.0 to 4.2.0