diff --git a/.changeset/animation-shorthand-references.md b/.changeset/animation-shorthand-references.md deleted file mode 100644 index 268b6b84..00000000 --- a/.changeset/animation-shorthand-references.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@css-modules-kit/core': minor ---- - -feat(core): support `animation` shorthand diff --git a/.changeset/at-value-parser-with-value-parser.md b/.changeset/at-value-parser-with-value-parser.md deleted file mode 100644 index d969ff05..00000000 --- a/.changeset/at-value-parser-with-value-parser.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -'@css-modules-kit/core': minor ---- - -refactor(core): parse `@value` with postcss-value-parser - -The `@value` parser is reimplemented on top of postcss-value-parser. Behavior for syntax supported by css-loader is unchanged. - -For syntax that css-loader does not support (where css-modules-kit does not guarantee a specific behavior), the result changed: - -- `@value \\c: #000;` and `@value \'d: #000;` are now parsed as a token declaration instead of reporting an error. -- `@value \31 e: #000;` is now read as the token name `\31` instead of `e`. diff --git a/.changeset/composes-external-references.md b/.changeset/composes-external-references.md deleted file mode 100644 index f15622c8..00000000 --- a/.changeset/composes-external-references.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -'@css-modules-kit/core': minor -'@css-modules-kit/ts-plugin': minor ---- - -feat(core, ts-plugin): support `composes: from ''` - -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. - -Two diagnostics are also emitted in the check phase: - -- `Cannot import module ''` when the specifier cannot be resolved. -- `Module '' has no exported token ''.` when the referenced file does not export the token. diff --git a/.changeset/composes-local-references.md b/.changeset/composes-local-references.md deleted file mode 100644 index 639a59a8..00000000 --- a/.changeset/composes-local-references.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -'@css-modules-kit/core': minor -'@css-modules-kit/ts-plugin': minor -'@css-modules-kit/eslint-plugin': patch -'@css-modules-kit/stylelint-plugin': patch ---- - -feat(core, ts-plugin, eslint-plugin, stylelint-plugin): support composes property - -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 '';` do not produce references (support for `from ''` is planned). - -Two diagnostics are also emitted for invalid usage: - -- Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. -- Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token ''.`. - -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. diff --git a/.changeset/namespace-default-completion.md b/.changeset/namespace-default-completion.md deleted file mode 100644 index fd15780f..00000000 --- a/.changeset/namespace-default-completion.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@css-modules-kit/ts-plugin': patch ---- - -fix(ts-plugin): omit the `default` member from namespace member completion - -When `namedExports` is enabled and `prioritizeNamedImports` is disabled, completing members of a namespace import (`import * as styles from './a.module.css'; styles.`) no longer suggests a `default` member that the CSS module does not export. diff --git a/.changeset/sharp-bananas-share.md b/.changeset/sharp-bananas-share.md deleted file mode 100644 index 84d6c8fd..00000000 --- a/.changeset/sharp-bananas-share.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@css-modules-kit/core': patch ---- - -refactor: add u flag for configDirTemplate diff --git a/packages/codegen/CHANGELOG.md b/packages/codegen/CHANGELOG.md index 723ae810..dbbe4732 100644 --- a/packages/codegen/CHANGELOG.md +++ b/packages/codegen/CHANGELOG.md @@ -1,5 +1,12 @@ # @css-modules-kit/codegen +## 1.3.0 + +### Patch Changes + +- 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)]: + - @css-modules-kit/core@1.3.0 + ## 1.2.0 ### Patch Changes diff --git a/packages/codegen/package.json b/packages/codegen/package.json index 78d146b0..41679800 100644 --- a/packages/codegen/package.json +++ b/packages/codegen/package.json @@ -1,6 +1,6 @@ { "name": "@css-modules-kit/codegen", - "version": "1.2.0", + "version": "1.3.0", "private": false, "description": "A tool for generating `*.d.ts` files for `*.module.css`.", "keywords": [ diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 9169c247..9e73e340 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,41 @@ # @css-modules-kit/core +## 1.3.0 + +### Minor Changes + +- [#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 + +- [#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 + + The `@value` parser is reimplemented on top of postcss-value-parser. Behavior for syntax supported by css-loader is unchanged. + + For syntax that css-loader does not support (where css-modules-kit does not guarantee a specific behavior), the result changed: + - `@value \\c: #000;` and `@value \'d: #000;` are now parsed as a token declaration instead of reporting an error. + - `@value \31 e: #000;` is now read as the token name `\31` instead of `e`. + +- [#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: from ''` + + 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. + + Two diagnostics are also emitted in the check phase: + - `Cannot import module ''` when the specifier cannot be resolved. + - `Module '' has no exported token ''.` when the referenced file does not export the token. + +- [#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 + + 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 '';` do not produce references (support for `from ''` is planned). + + Two diagnostics are also emitted for invalid usage: + - Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. + - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token ''.`. + + 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. + +### Patch Changes + +- [#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 + ## 1.2.0 ### Minor Changes diff --git a/packages/core/package.json b/packages/core/package.json index b5c0590a..9826c3bb 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@css-modules-kit/core", - "version": "1.2.0", + "version": "1.3.0", "private": false, "description": "The core of css-modules-kit", "keywords": [ diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md index 2c8b85f9..805f03d9 100644 --- a/packages/eslint-plugin/CHANGELOG.md +++ b/packages/eslint-plugin/CHANGELOG.md @@ -1,5 +1,22 @@ # @css-modules-kit/eslint-plugin +## 1.3.0 + +### Patch Changes + +- [#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 + + 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 '';` do not produce references (support for `from ''` is planned). + + Two diagnostics are also emitted for invalid usage: + - Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. + - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token ''.`. + + 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. + +- 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)]: + - @css-modules-kit/core@1.3.0 + ## 1.2.0 ### Patch Changes diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index af875f69..d9e1f765 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@css-modules-kit/eslint-plugin", - "version": "1.2.0", + "version": "1.3.0", "private": false, "description": "A eslint plugin for CSS Modules", "keywords": [ diff --git a/packages/stylelint-plugin/CHANGELOG.md b/packages/stylelint-plugin/CHANGELOG.md index 89209a10..abb79be9 100644 --- a/packages/stylelint-plugin/CHANGELOG.md +++ b/packages/stylelint-plugin/CHANGELOG.md @@ -1,5 +1,22 @@ # @css-modules-kit/stylelint-plugin +## 1.3.0 + +### Patch Changes + +- [#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 + + 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 '';` do not produce references (support for `from ''` is planned). + + Two diagnostics are also emitted for invalid usage: + - Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. + - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token ''.`. + + 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. + +- 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)]: + - @css-modules-kit/core@1.3.0 + ## 1.2.0 ### Patch Changes diff --git a/packages/stylelint-plugin/package.json b/packages/stylelint-plugin/package.json index 2f8114a7..d6f95bd3 100644 --- a/packages/stylelint-plugin/package.json +++ b/packages/stylelint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@css-modules-kit/stylelint-plugin", - "version": "1.2.0", + "version": "1.3.0", "private": false, "description": "A stylelint plugin for CSS Modules", "keywords": [ diff --git a/packages/ts-plugin/CHANGELOG.md b/packages/ts-plugin/CHANGELOG.md index 8d853241..80ae6170 100644 --- a/packages/ts-plugin/CHANGELOG.md +++ b/packages/ts-plugin/CHANGELOG.md @@ -1,5 +1,36 @@ # @css-modules-kit/ts-plugin +## 1.3.0 + +### Minor Changes + +- [#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: from ''` + + 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. + + Two diagnostics are also emitted in the check phase: + - `Cannot import module ''` when the specifier cannot be resolved. + - `Module '' has no exported token ''.` when the referenced file does not export the token. + +- [#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 + + 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 '';` do not produce references (support for `from ''` is planned). + + Two diagnostics are also emitted for invalid usage: + - Parse phase: a `from` clause not followed by a quoted specifier or the `global` keyword is reported. + - Check phase: references that resolve to neither a locally defined token nor an imported token are reported as `Cannot find token ''.`. + + 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. + +### Patch Changes + +- [#410](https://github.com/mizdra/css-modules-kit/pull/410) [`41ec0a2`](https://github.com/mizdra/css-modules-kit/commit/41ec0a2e6cf8bac3e03d286ef2eac6608e91fc3f) - fix(ts-plugin): omit the `default` member from namespace member completion + + When `namedExports` is enabled and `prioritizeNamedImports` is disabled, completing members of a namespace import (`import * as styles from './a.module.css'; styles.`) no longer suggests a `default` member that the CSS module does not export. + +- 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)]: + - @css-modules-kit/core@1.3.0 + ## 1.2.0 ### Minor Changes diff --git a/packages/ts-plugin/package.json b/packages/ts-plugin/package.json index 99b876bd..1c23a875 100644 --- a/packages/ts-plugin/package.json +++ b/packages/ts-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@css-modules-kit/ts-plugin", - "version": "1.2.0", + "version": "1.3.0", "private": false, "description": "A TypeScript Language Service Plugin for CSS Modules", "keywords": [ diff --git a/packages/vscode/CHANGELOG.md b/packages/vscode/CHANGELOG.md index 83fe87e8..82527685 100644 --- a/packages/vscode/CHANGELOG.md +++ b/packages/vscode/CHANGELOG.md @@ -1,5 +1,12 @@ # css-modules-kit-vscode +## 1.3.0 + +### Patch Changes + +- Updated dependencies [[`4f59d0c`](https://github.com/mizdra/css-modules-kit/commit/4f59d0c6b5ab336d1e9a3eaa0d3763c8185032f2), [`947d06d`](https://github.com/mizdra/css-modules-kit/commit/947d06de88d762f14a09ffeb6c3afb1e69c04f64), [`41ec0a2`](https://github.com/mizdra/css-modules-kit/commit/41ec0a2e6cf8bac3e03d286ef2eac6608e91fc3f)]: + - @css-modules-kit/ts-plugin@1.3.0 + ## 1.2.0 ### Patch Changes diff --git a/packages/vscode/package.json b/packages/vscode/package.json index 0784605c..ca65629d 100644 --- a/packages/vscode/package.json +++ b/packages/vscode/package.json @@ -1,7 +1,7 @@ { "name": "css-modules-kit-vscode", "displayName": "CSS Modules Kit", - "version": "1.2.0", + "version": "1.3.0", "private": true, "description": "The VS Code extension for CSS Modules", "categories": [