chartist-js / chartist

Simple responsive charts
https://chartist.dev
MIT License
13.33k stars 2.54k forks source link

chore(deps): update dependency postcss to v8 #1341

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
postcss (source) ^7.0.39 -> ^8.0.0 age adoption passing confidence

Release Notes

postcss/postcss ### [`v8.4.18`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8418) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.17...8.4.18) - Fixed an error on `absolute: true` with empty `sourceContent` (by Rene Haas). ### [`v8.4.17`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8417) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.16...8.4.17) - Fixed `Node.before()` unexpected behavior (by Romain Menke). - Added TOC to docs (by Mikhail Dedov). ### [`v8.4.16`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8416) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.15...8.4.16) - Fixed `Root` AST migration. ### [`v8.4.15`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8415) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.14...8.4.15) - Fixed AST normalization after using custom parser with old PostCSS AST. ### [`v8.4.14`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8414) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.13...8.4.14) - Print “old plugin API” warning only if plugin was used (by [@​zardoy](https://togithub.com/zardoy)). ### [`v8.4.13`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8413) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.12...8.4.13) - Fixed `append()` error after using `.parent` (by Jordan Pittman). ### [`v8.4.12`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8412) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.11...8.4.12) - Fixed `package.funding` to have same value between all PostCSS packages. ### [`v8.4.11`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8411) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.10...8.4.11) - Fixed `Declaration#raws.value` type. ### [`v8.4.10`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8410) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.9...8.4.10) - Fixed `package.funding` URL format. ### [`v8.4.9`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​849) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.8...8.4.9) - Fixed `package.funding` (by Álvaro Mondéjar). ### [`v8.4.8`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​848) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.7...8.4.8) - Fixed end position in empty Custom Properties. ### [`v8.4.7`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​847) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.6...8.4.7) - Fixed `Node#warn()` type (by Masafumi Koba). - Fixed comment removal in values after `,`. ### [`v8.4.6`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​846) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.5...8.4.6) - Prevented comment removing when it change meaning of CSS. - Fixed parsing space in last semicolon-less CSS Custom Properties. - Fixed comment cleaning in CSS Custom Properties with space. - Fixed throwing an error on `.root` access for plugin-less case. ### [`v8.4.5`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​845) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.4...8.4.5) - Fixed `raws` types to make object extendable (by James Garbutt). - Moved from Yarn 1 to pnpm. ### [`v8.4.4`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​844) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.3...8.4.4) - Fixed absolute path in source map on zero plugins mode. ### [`v8.4.3`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​843) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.2...8.4.3) - Fixed `this.css.replace is not a function` error. ### [`v8.4.2`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​842) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.1...8.4.2) - Fixed previous source map support in zero plugins mode. ### [`v8.4.1`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8418) [Compare Source](https://togithub.com/postcss/postcss/compare/8.4.0...8.4.1) - Fixed an error on `absolute: true` with empty `sourceContent` (by Rene Haas). ### [`v8.4.0`](https://togithub.com/postcss/postcss/releases/tag/8.4.0): 8.4 “President Camio” [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.11...8.4.0) President Camio seal PostCSS 8.4 brought ranges for warnings and errors, smaller `node_modules` size, lazy parsing to avoid `PostCSS does nothing` warning, and TypeScript fixes. #### Thanks to Sponsors This release was possible thanks to our community. Sponsored by Tailwind CSS Sponsored by ThemeIsle If your company wants to support the sustainability of front-end infrastructure or wants to give some love to PostCSS, you can join our supporters by: - [**Tidelift**](https://tidelift.com/) with a Spotify-like subscription model supporting all projects from your lock file. - Direct donations in [**PostCSS & Autoprefixer Open Collective**](https://opencollective.com/postcss#section-contributors). #### Rages for Errors and Warnings [@​adalinesimonian](https://togithub.com/adalinesimonian), the author of amazing [Stylelint extension](https://togithub.com/stylelint/vscode-stylelint) for VS Code, added ranges to errors and warnings. ```js result.warn(msg, { index }) // One character warning at index result.warn(msg, { endIndex }) // Starts at node start, ends at endIndex result.warn(msg, { index, endIndex }) // Starts at index, ends at endIndex result.warn(msg, { start }) // Starts at start, ends at node end result.warn(msg, { end }) // Starts at node start, ends at end result.warn(msg, { start, end }) // Starts at start, ends at end result.warn(msg, { word }) // Starts at word location, ends at word index + length ``` It will improve DX in the IDE extension. #### Lazy Parsing Previously, we found that many tools run PostCSS even if the developer didn’t pass any PostCSS plugins. Parsing is the most expensive step in CSS processing. It led to a waste of resources without any reason. We tried to resolve the problem by adding a `PostCSS does nothing` warning. But it didn’t force tool authors to be more careful with user’s resources. If PostCSS sees that tool call it without passing plugins (or changing parser/stringifier), PostCSS will not parse CSS (until toll will call `Result#root`). In 8.4, [@​bogdan0083](https://togithub.com/bogdan0083) (with the help of [@​WilhelmYakunin](https://togithub.com/WilhelmYakunin)) tries to solve the problem in another way. It allows us to save resources and remove the `PostCSS does nothing` warning. ```js // No plugins, we do not parse CSS let result = await postcss().process(css, { from }) result.css // Is the same string passed to process() result.map // Special 1-to-1 source map result.root // CSS will parsed only here ``` #### Install Size Reduction With [≈60M weekly](https://npm-stat.com/charts.html?package=postcss) downloads, PostCSS has responsibility for the world’s resource spending. Together with [@​7rulnik](https://togithub.com/7rulnik) we [reduced](https://togithub.com/7rulnik/source-map-js/pull/7) [`source-map-js`](https://togithub.com/7rulnik/source-map-js) size. It is transitive dependency of PostCSS. In 8.4, we moved to a fixed version of `source-map-js`, which reduced the `postcss` size in your `node_modules` from [≈1 MB to 0.3 MB](https://packagephobia.com/result?p=postcss). With the huge popularity of PostCSS, it will free a lot of resources on our CIs. PostCSS install size reduction #### Migration from Jest to `uvu` [@​kimoofey](https://togithub.com/kimoofey) refactored all tests from the popular Jest framework to small and fast [`uvu`](https://togithub.com/lukeed/uvu). It will not affect end-users. However, it reduced our `node_modules` size by 33 MB and made tests twice faster (`yarn install & yarn unit`: 24 → 13 seconds). #### TypeScript Fixes - Added `Processor` types. - Added `Stringifier` types (by [@​43081j](https://togithub.com/43081j)). - Fixed types `Root` and `Document` in result values (by [@​43081j](https://togithub.com/43081j)). - Fixed `Node#walkRules()` types (by [@​hudochenkov](https://togithub.com/hudochenkov)). #### Other Changes - Fixed docs (by [@​paulshryock](https://togithub.com/paulshryock)). ### [`v8.3.11`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8311) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.10...8.3.11) - Remove debugging code. ### [`v8.3.10`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8310) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.9...8.3.10) - Fixed `Maximum call stack` issue of some source maps (by Yeting Li). ### [`v8.3.9`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​839) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.8...8.3.9) - Replaced `nanocolors` to `picocolors`. - Reduced package size. ### [`v8.3.8`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​838) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.7...8.3.8) - Update `nanocolors`. ### [`v8.3.7`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​837) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.6...8.3.7) - Replaced `colorette` to `nanocolors`. - Added bug field to `package.json` (by Christian Oliff). - Improved docs (by Andrew Bruce and Paul Shryock). ### [`v8.3.6`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​836) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.5...8.3.6) - Fixed column in `missed semicolon` error (by [@​Gusted](https://togithub.com/Gusted)). ### [`v8.3.5`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​835) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.4...8.3.5) - Fixed broken AST detection. ### [`v8.3.4`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​834) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.3...8.3.4) - Fixed broken AST detection. ### [`v8.3.3`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​833) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.2...8.3.3) - Fixed broken AST on `postcss` dependency duplication in custom parsers. ### [`v8.3.2`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​832) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.1...8.3.2) - Update changelog. ### [`v8.3.1`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8311) [Compare Source](https://togithub.com/postcss/postcss/compare/8.3.0...8.3.1) - Remove debugging code. ### [`v8.3.0`](https://togithub.com/postcss/postcss/releases/tag/8.3.0): 8.3 “Duke Murmur” [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.15...8.3.0) Duke Murmur seal PostCSS 8.3 improved source map parsing performance, added `Node#assign()` shortcut, and experimental `Document` node to AST. #### Thanks to Sponsors This release was possible thanks to our community. Sponsored by Tailwind CSS Sponsored by ThemeIsle If your company wants to support the sustainability of front-end infrastructure or wants to give some love to PostCSS, you can join our supporters by: - [**Tidelift**](https://tidelift.com/) with a Spotify-like subscription model supporting all projects from your lock file. - Direct donations in [**PostCSS & Autoprefixer Open Collective**](https://opencollective.com/postcss#section-contributors). #### Source Map Performance Because PostCSS needs synchronous API, we can’t move from the old \`source-map 0.6 to 0.7 (many other open-source projects too). [@​7rulnik](https://togithub.com/7rulnik) forked `source-map` 0.6 to [`source-map-js`](https://www.npmjs.com/package/source-map-js) and back-ported performance improvements from 0.7. In 8.3 we [switched](https://togithub.com/postcss/postcss/pull/1515) from `source-map` to this `source-map-js` fork. You map see 4x performance improvements in parsing map from processing step before PostCSS (for instance, Sass). #### `Document` Nodes Thanks to [@​gucong3000](https://togithub.com/gucong3000), PostCSS already parse CSS from HTML and JS files (CSS-in-JS templates and objects). But his plugin need big updates. [@​hudochenkov](https://togithub.com/hudochenkov) from [stylelint](https://stylelint.io/) team decided to create new parsers for styles inside [CSS-in-JS](https://togithub.com/stylelint/postcss-css-in-js), [HTML](https://togithub.com/stylelint/postcss-html), and [Markdown](https://togithub.com/stylelint/postcss-markdown). He [suggested](https://togithub.com/postcss/postcss/issues/1498) adding new [`Document`](https://postcss.org/api/#document) node type to PostCSS AST to keep multiple `Root` nodes inside and JS/HTML/Markdown code blocks between these style blocks. ```js const document = htmlParser( '' ) document.type //=> 'document' document.nodes.length //=> 2 document.nodes[0].type //=> 'root' ``` This is an experimental feature. Some aspects of this node could change within minor or patch version releases. #### `Node#assign()` Shortcut The creator of famous `postcss-preset-env` and many other PostCSS tools, [@​jonathantneal](https://togithub.com/jonathantneal) [suggested](https://togithub.com/postcss/postcss/pull/1572) a nice shortcut to change multiple properties in the node: ```js decl.assign({ prop: 'word-wrap', value: 'break-word' }) ``` ### [`v8.2.15`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8215) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.14...8.2.15) - Fixed `list` type definitions (by [@​n19htz](https://togithub.com/n19htz)). ### [`v8.2.14`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8214) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.13...8.2.14) - Removed `source-map` from client-side bundle (by Barak Igal). ### [`v8.2.13`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8213) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.12...8.2.13) - Fixed ReDoS vulnerabilities in source map parsing (by Yeting Li). ### [`v8.2.12`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8212) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.11...8.2.12) - Fixed `package.json` exports. ### [`v8.2.11`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8211) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.10...8.2.11) - Fixed `DEP0148` warning in Node.js 16. - Fixed docs (by [@​semiromid](https://togithub.com/semiromid)). ### [`v8.2.10`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8210) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.9...8.2.10) - Fixed ReDoS vulnerabilities in source map parsing. - Fixed webpack 5 support (by Barak Igal). - Fixed docs (by Roeland Moors). ### [`v8.2.9`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​829) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.8...8.2.9) - Exported `NodeErrorOptions` type (by Rouven Weßling). ### [`v8.2.8`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​828) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.7...8.2.8) - Fixed browser builds in webpack 4 (by Matt Jones). ### [`v8.2.7`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​827) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.6...8.2.7) - Fixed browser builds in webpack 5 (by Matt Jones). ### [`v8.2.6`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​826) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.5...8.2.6) - Fixed `Maximum call stack size exceeded` in `Node#toJSON`. - Fixed docs (by inokawa). ### [`v8.2.5`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​825) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.4...8.2.5) - Fixed escaped characters handling in `list.split` (by Natalie Weizenbaum). ### [`v8.2.4`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​824) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.3...8.2.4) - Added plugin name to `postcss.plugin()` warning (by Tom Williams). - Fixed docs (by Bill Columbia). ### [`v8.2.3`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​823) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.2...8.2.3) - Fixed `JSON.stringify(Node[])` support (by Niklas Mischkulnig). ### [`v8.2.2`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​822) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.1...8.2.2) - Fixed CSS-in-JS support (by James Garbutt). - Fixed plugin types (by Ludovico Fischer). - Fixed `Result#warn()` types. ### [`v8.2.1`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8215) [Compare Source](https://togithub.com/postcss/postcss/compare/8.2.0...8.2.1) - Fixed `list` type definitions (by [@​n19htz](https://togithub.com/n19htz)). ### [`v8.2.0`](https://togithub.com/postcss/postcss/releases/tag/8.2.0): 8.2 “Prince Orobas” [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.14...8.2.0) Prince Orobas seal PostCSS 8.2 added a new API to serialize and deserialize CSS AST to JSON. ```js import { parse, fromJSON } from 'postcss' let root = parse('a{}', { from: 'input.css' }) let json = root.toJSON() // save to file, send by network, etc let root2 = fromJSON(json) ``` Thanks to [@​mischnic](https://togithub.com/mischnic) for [his work](https://togithub.com/postcss/postcss/pull/1484). ### [`v8.1.14`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8114) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.13...8.1.14) - Fixed parser performance regression. ### [`v8.1.13`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8113) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.12...8.1.13) - Fixed broken AST after moving nodes in visitor API. ### [`v8.1.12`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8112) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.11...8.1.12) - Fixed Autoprefixer regression. ### [`v8.1.11`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8111) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.10...8.1.11) - Added PostCSS update suggestion on unknown event in plugin. ### [`v8.1.10`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8110) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.9...8.1.10) - Fixed `LazyResult` type export (by Evan You). - Fixed `LazyResult` type compatibility with `Promise` (by Anton Kastritskiy). ### [`v8.1.9`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​819) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.8...8.1.9) - Reduced dependencies number (by Bogdan Chadkin). ### [`v8.1.8`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​818) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.7...8.1.8) - Fixed `LazyResult` type compatibility with `Promise` (by Ludovico Fischer). - Fixed HTTPS links in documentation. ### [`v8.1.7`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​817) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.6...8.1.7) - Fixed `import` support in TypeScript (by Remco Haszing). ### [`v8.1.6`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​816) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.5...8.1.6) - Reverted `package.exports` Node.js 15 fix. ### [`v8.1.5`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​815) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.4...8.1.5) - Fixed Node.js 15 warning (by 沈鸿飞). ### [`v8.1.4`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​814) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.3...8.1.4) - Fixed TypeScript definition (by Arthur Petrie). ### [`v8.1.3`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​813) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.2...8.1.3) - Added `package.types`. ### [`v8.1.2`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​812) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.1...8.1.2) - Fixed API docs (by Arthur Petrie). - Improved plugin guide (by Yunus Gaziev). - Prepared code base for Deno support (by Oscar Otero). ### [`v8.1.1`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​8114) [Compare Source](https://togithub.com/postcss/postcss/compare/8.1.0...8.1.1) - Fixed parser performance regression. ### [`v8.1.0`](https://togithub.com/postcss/postcss/releases/tag/8.1.0): 8.1 “Duke Gemory” [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.9...8.1.0) Duke Gemory seal PostCSS 8.1 fixed the new visitor API from the 8.0 release. We fixed `Root` and `RootExit` re-calling on children's changes. And now visitors will visit the parent again if nested children were changed. We added `Once` and `OnceExit` events, which will not be called again on node changes. You can use them to lint files or collect statistics: ```js module.exports = { postcssPlugin: 'postcss-linter', OnceExit (root) { lint(root) } } module.exports.postcss = true ``` We updated [**Migration guide**](https://evilmartians.com/chronicles/postcss-8-plugin-migration) according to new changes. ### [`v8.0.9`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​809) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.8...8.0.9) - Replace prototype in PostCSS 7 nodes instead of recreating them. - Added missed `Transformer` to exported types (by Pierre-Marie Dartus). ### [`v8.0.8`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​808) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.7...8.0.8) - Fix `8.0.7` regression on PostCSS 7 nodes converting (by Adam Wathan). ### [`v8.0.7`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​807) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.6...8.0.7) - Fixed compatibility issue with mixin AST with PostCSS 7 and 8 nodes. - Added migration guide translation to Chinese to the warning. ### [`v8.0.6`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​806) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.5...8.0.6) - Fixed child adding methods in `Container`. ### [`v8.0.5`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​805) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.4...8.0.5) - Update changelog. ### [`v8.0.4`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​804) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.3...8.0.4) - Fixed `Cannot read property 'line' of null` error. - Fixed source map support for declarations. ### [`v8.0.3`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​803) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.2...8.0.3) - Fixed client-side bundling support. ### [`v8.0.2`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​802) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.1...8.0.2) - Fixed plugin packs support. ### [`v8.0.1`](https://togithub.com/postcss/postcss/blob/HEAD/CHANGELOG.md#​801) [Compare Source](https://togithub.com/postcss/postcss/compare/8.0.0...8.0.1) - Updated `Processor#version`. ### [`v8.0.0`](https://togithub.com/postcss/postcss/releases/tag/8.0.0): 8.0 “President Ose” [Compare Source](https://togithub.com/postcss/postcss/compare/7.0.39...8.0.0) President Ose seal PostCSS 8.0 brings new plugin API, `node_modules` size reduction, better source map support, and CSS parser improvements. Check out [a day-by-day diary](https://twitter.com/PostCSS/status/1273368785592999936) of PostCSS 8.0 development process. See Migration Guides [**for end-users**](https://togithub.com/postcss/postcss/wiki/PostCSS-8-for-end-users) and [**for plugin developers**](https://evilmartians.com/chronicles/postcss-8-plugin-migration). #### Thanks to Sponsors With more than [100 M downloads per month](https://npm-stat.com/charts.html?package=postcss), it becomes hard to support PostCSS in free time. For instance, getting the 8.0 release ready took [4 months of work](https://twitter.com/PostCSS/status/1273368785592999936). This release was possible thanks to out community. [**Tailwind CSS**](https://tailwindcss.com/), [**De Voorhoede**](https://www.voorhoede.nl/en/), [**InVision AG**](https://www.ivx.com/), [**Brainbow**](https://opencollective.com/brnbw), and [many individual contributions](https://opencollective.com/postcss#section-contributors). Sponsored by Tailwind CSS If your company wants to support the sustainability of front-end infrastructure or just wants to give some love to PostCSS, you can join our supporters by: - [**Tidelift**](https://tidelift.com/) with a Spotify-like subscription model and supporting all projects from your lock file. - Direct donations in [**PostCSS & Autoprefixer Open Collective**](https://opencollective.com/postcss#section-contributors). #### Breaking Changes We try to avoid any breaking changes for end-users: - PostCSS 8 dropped **Node.js 6.x, 8.x, 11.x, and 13.x** versions support. All these versions have no security updates anymore. - We now serve ES6+ sources in the npm package **without Babel** compilation. If you are creating tools like CodePen and put PostCSS into the client-side JS bundle, you may need to run Babel on `node_modules/postcss` for old browsers. - We removed rarely used `postcss.vendor` API. #### New Plugin API The biggest change in PostCSS 8 is a new plugin API. Thanks to [@​BondarenkoAlex](https://togithub.com/BondarenkoAlex) for big help in creating a new API. ```js module.exports = () => { return { postcssPlugin: 'postcss-will-change', Declaration: { 'will-change': (decl, { Declaration }) => { decl.cloneBefore( new Declaration({ prop: 'backface-visibility', value: 'hidden' }) ) } } } } module.exports.postcss = true ``` We know that rewriting old plugins will take time, but the new API will improve the end-user’s experience and make life easier for plugin developers: - With new API, all plugins can share a single scan of the CSS tree. It makes CSS processing up to **20% faster**. - Because npm often duplicates dependencies, you may have many `postcss` duplicates in your `node_modules`. New API fixes this problem. - Plugins will re-visit changed nodes to **reduce compatibility issues** between plugins. Now the order of plugins in your PostCSS config will be less important. - New API is close to Babel’s visitor API. These resources will help plugin developers in API migration: - [**The Migration Guide**](https://evilmartians.com/chronicles/postcss-8-plugin-migration) - [**Writing a PostCSS Plugin**](https://togithub.com/postcss/postcss/blob/master/docs/writing-a-plugin.md) - We have a [**Gitter chat**](https://gitter.im/postcss/postcss) open for all questions related to plugin migration. PostCSS development guidelines were also changed: - Now it is prohibited to create own AST on top of PostCSS AST classes since it could lead to [painful bugs](https://togithub.com/postcss/postcss/issues/1305) due to the usage private APIs. - Plugins and runners must have `postcss` in `peerDependencies`. #### New Website without React Previously PostCSS used [a React-based framework](https://togithub.com/phenomic/phenomic) for the project's website. Since we have a static website, we decided to migrate to a React-free framework and got good performance improvements: - **360 → 20** ms for Max Potential First Input Delay - **3.3 → 1.5** seconds for First CPU Idle - **3.3 → 1.5** seconds for Time to Interactive Check out [**postcss.org**](https://postcss.org/) and [**new API docs**](https://postcss.org/api/) that feature the awesome alchemy-inspired design by [@​okonet](https://togithub.com/okonet). PostCSS website performance results We also removed Google Analytics tracking scripts and encourage other open source projects to be an example in caring about user’s privacy and performance. #### Parser Improvments Did you know that all examples below are valid CSS? ```css :root { --empty: ; --JSON: [1, "2", {"three": {"a":1}}, [4]]; --javascript: function(rule) { console.log(rule) }; } @​supports (--element(".minwidth", { "minWidth": 300 })) { [--self] { background: greenyellow; } } ``` Now PostCSS parses even those rare edge cases correctly. Thanks to Tailwind CSS and Prettier teams for adding more cases to our [CSS parser tests collection](https://togithub.com/postcss/postcss-parser-tests/). Note that now `--roundMixin: { border-radius: 8px }` will be parsed as a `Declaration` with the `{ border-radius: 8px }` value. #### Better Source Map Support We have added support for two new source map formats: [**Index map**](https://sourcemaps.info/spec.html#h.535es3xeprgt) and [**JSON**](https://togithub.com/postcss/postcss/issues/1371) (`data:application/json`). PostCSS 8 is now much closer to the source map spec. Thanks to the Google team for reports: - We now [treat](https://togithub.com/postcss/postcss/issues/1347) `sources` in map **as URLs** instead of file paths. - We now [resolve](https://togithub.com/postcss/postcss/issues/1348) `sources` **relative to map file**, not CSS file. A few source map APIs were added: - `opts.maps.absolute = true` option for [absolute paths](https://togithub.com/postcss/postcss/issues/1352) in source map. - `opts.maps.annotation = (file, root) => url` for a [dynamic path](https://togithub.com/postcss/postcss/issues/1324) to source map. - `Node#origin()` now returns `position.url` in addition to `position.file` for compatibility with absolute URLs in source map’s `sources`. #### API Changes We have added **ES modules** support and now we **export all classes** from the main entry: ```js import { CssSyntaxError, parse } from "postcss" ``` [@​graberzz](https://togithub.com/graberzz) added [`Node#source.offset`](https://togithub.com/postcss/postcss/issues/1325) in addition to `line` and `column`. CSS Custom Properties and Sass-like `$`-variables now have a special `Declaration#variable` mark: ```js const root = parse(` :root { --propery: value; } $variable: value `) root.first.first.variable //=> true root.last.variable //=> true ``` #### TypeScript PostCSS now has a first-class TypeScript support: - We moved API docs from JSDoc to [**TypeDoc**](https://typedoc.org/). Check out our [**new API docs**](https://postcss.org/api/). - We are using [**check-dts**](https://togithub.com/ai/check-dts) to test types with [special unit tests](https://togithub.com/postcss/postcss/blob/master/test/errors.ts). - We keep types in separate files for better readability. - With the new structure and test system, we fixed many small issues in types. #### Other Changes - [Fixed calling `replaceWith`](https://togithub.com/postcss/postcss/pull/1368) with input replaced node (by [@​josephkaptur](https://togithub.com/josephkaptur)). - Reduce dependencies by replacing `chalk` to [`colorette`](https://togithub.com/jorgebucaran/colorette). - Added `Declaration#value` [auto-conversion](https://togithub.com/postcss/postcss/issues/1373) to string to prevent plugin’s bugs. - Fixed building PostCSS with Rollup (by [@​MapGrid](https://togithub.com/MapGrid)) because of [circular dependencies](https://togithub.com/postcss/postcss/pull/1321). - Moved unknown source from counter to random IDs: `:10:6`. - Removed docs from the npm package.

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.



This PR has been generated by Mend Renovate. View repository job log here.

github-actions[bot] commented 1 year ago

size-limit report 📦

Path Size
dist/index.cjs 7.1 KB (0%)
dist/index.js 7.06 KB (0%)
dist/index.css 1.25 KB (0%)
codecov-commenter commented 1 year ago

Codecov Report

Merging #1341 (ef4f120) into main (8130b15) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1341   +/-   ##
=======================================
  Coverage   73.76%   73.76%           
=======================================
  Files          42       42           
  Lines        1231     1231           
  Branches      322      322           
=======================================
  Hits          908      908           
  Misses        239      239           
  Partials       84       84           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.