|
1 | 1 | # @css-modules-kit/core |
2 | 2 |
|
| 3 | +## 1.3.0 |
| 4 | + |
| 5 | +### Minor Changes |
| 6 | + |
| 7 | +- [#415](https://github.com/mizdra/css-modules-kit/pull/415) [`e9315e4`](https://github.com/mizdra/css-modules-kit/commit/e9315e49ea9acbaa21196435ce463e6dd7efc94b) - feat(core): support `animation` shorthand |
| 8 | + |
| 9 | +- [#412](https://github.com/mizdra/css-modules-kit/pull/412) [`a247518`](https://github.com/mizdra/css-modules-kit/commit/a247518bd1ae67d02f3193fb052eaf50acde2ff8) - refactor(core): parse `@value` with postcss-value-parser |
| 10 | + |
| 11 | + The `@value` parser is reimplemented on top of postcss-value-parser. Behavior for syntax supported by css-loader is unchanged. |
| 12 | + |
| 13 | + For syntax that css-loader does not support (where css-modules-kit does not guarantee a specific behavior), the result changed: |
| 14 | + - `@value \\c: #000;` and `@value \'d: #000;` are now parsed as a token declaration instead of reporting an error. |
| 15 | + - `@value \31 e: #000;` is now read as the token name `\31` instead of `e`. |
| 16 | + |
| 17 | +- [#409](https://github.com/mizdra/css-modules-kit/pull/409) [`4f59d0c`](https://github.com/mizdra/css-modules-kit/commit/4f59d0c6b5ab336d1e9a3eaa0d3763c8185032f2) - feat(core, ts-plugin): support `composes: <name> from '<specifier>'` |
| 18 | + |
| 19 | + Class names referenced via `composes: foo from './other.module.css';` are now linked to the `.foo {...}` declaration in the referenced file. Go to Definition jumps from the reference to the declaration, Find All References lists reference sites across files, and Rename updates the declaration and every reference together. |
| 20 | + |
| 21 | + Two diagnostics are also emitted in the check phase: |
| 22 | + - `Cannot import module '<specifier>'` when the specifier cannot be resolved. |
| 23 | + - `Module '<specifier>' has no exported token '<name>'.` when the referenced file does not export the token. |
| 24 | + |
| 25 | +- [#408](https://github.com/mizdra/css-modules-kit/pull/408) [`947d06d`](https://github.com/mizdra/css-modules-kit/commit/947d06de88d762f14a09ffeb6c3afb1e69c04f64) - feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes property |
| 26 | + |
| 27 | + Class names referenced via `composes: foo;` are now linked back to the `.foo {...}` declaration. Go to Definition jumps from a reference to the declaration, Find All References lists every reference site, and Rename updates the declaration and every reference together. Space-separated names (`composes: foo bar;`), comma-separated names (`composes: foo, bar;`), and mixes of both are supported. `composes: global(foo);`, `composes: foo from global;`, and `composes: foo from '<specifier>';` do not produce references (support for `from '<specifier>'` is planned). |
| 28 | + |
| 29 | + Two diagnostics are also emitted for invalid usage: |
| 30 | + - Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. |
| 31 | + - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token '<name>'.`. |
| 32 | + |
| 33 | + The `no-unused-class-names` rule in eslint-plugin and stylelint-plugin now treats names referenced via `composes` from within the same CSS as used, so they are no longer reported as unused. |
| 34 | + |
| 35 | +### Patch Changes |
| 36 | + |
| 37 | +- [#403](https://github.com/mizdra/css-modules-kit/pull/403) [`f40f511`](https://github.com/mizdra/css-modules-kit/commit/f40f5118158ffa2126eb9e23bbe6b7bf09efba63) - refactor: add u flag for configDirTemplate |
| 38 | + |
3 | 39 | ## 1.2.0 |
4 | 40 |
|
5 | 41 | ### Minor Changes |
|
0 commit comments