Skip to content

Commit dced87c

Browse files
Version Packages
1 parent e9315e4 commit dced87c

18 files changed

Lines changed: 121 additions & 65 deletions

.changeset/animation-shorthand-references.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/at-value-parser-with-value-parser.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

.changeset/composes-external-references.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.changeset/composes-local-references.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.changeset/namespace-default-completion.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

.changeset/sharp-bananas-share.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

packages/codegen/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @css-modules-kit/codegen
22

3+
## 1.3.0
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`e9315e4`](https://github.com/mizdra/css-modules-kit/commit/e9315e49ea9acbaa21196435ce463e6dd7efc94b), [`a247518`](https://github.com/mizdra/css-modules-kit/commit/a247518bd1ae67d02f3193fb052eaf50acde2ff8), [`4f59d0c`](https://github.com/mizdra/css-modules-kit/commit/4f59d0c6b5ab336d1e9a3eaa0d3763c8185032f2), [`947d06d`](https://github.com/mizdra/css-modules-kit/commit/947d06de88d762f14a09ffeb6c3afb1e69c04f64), [`f40f511`](https://github.com/mizdra/css-modules-kit/commit/f40f5118158ffa2126eb9e23bbe6b7bf09efba63)]:
8+
- @css-modules-kit/core@1.3.0
9+
310
## 1.2.0
411

512
### Patch Changes

packages/codegen/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@css-modules-kit/codegen",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": false,
55
"description": "A tool for generating `*.d.ts` files for `*.module.css`.",
66
"keywords": [

packages/core/CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# @css-modules-kit/core
22

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+
339
## 1.2.0
440

541
### Minor Changes

packages/core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@css-modules-kit/core",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"private": false,
55
"description": "The core of css-modules-kit",
66
"keywords": [

0 commit comments

Comments
 (0)