From 36dbbb7ff2d2d34beee3e57626b0c2c0346e79aa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 00:30:47 +0000 Subject: [PATCH] Version Packages --- .changeset/block-position-interpolations.md | 5 -- .changeset/completions.md | 5 -- .changeset/configuration-feedback.md | 5 -- .changeset/diagnostics-and-mapping-fixes.md | 14 ---- ...cs-caching-and-substitution-performance.md | 5 -- .changeset/emmet-and-completion-placement.md | 5 -- .../interpolated-names-and-conditions.md | 5 -- .changeset/javascript-escapes.md | 5 -- .changeset/multiline-interpolations.md | 5 -- .changeset/nested-at-rule-completions.md | 5 -- .changeset/nested-layer-declarations.md | 5 -- .changeset/package-entry-points-and-types.md | 7 -- .changeset/plugin-resilience.md | 5 -- .../supported-hosts-and-typescript-floor.md | 5 -- .changeset/value-css-fragments.md | 5 -- CHANGELOG.md | 72 +++++++++++++++++++ package.json | 2 +- 17 files changed, 73 insertions(+), 87 deletions(-) delete mode 100644 .changeset/block-position-interpolations.md delete mode 100644 .changeset/completions.md delete mode 100644 .changeset/configuration-feedback.md delete mode 100644 .changeset/diagnostics-and-mapping-fixes.md delete mode 100644 .changeset/diagnostics-caching-and-substitution-performance.md delete mode 100644 .changeset/emmet-and-completion-placement.md delete mode 100644 .changeset/interpolated-names-and-conditions.md delete mode 100644 .changeset/javascript-escapes.md delete mode 100644 .changeset/multiline-interpolations.md delete mode 100644 .changeset/nested-at-rule-completions.md delete mode 100644 .changeset/nested-layer-declarations.md delete mode 100644 .changeset/package-entry-points-and-types.md delete mode 100644 .changeset/plugin-resilience.md delete mode 100644 .changeset/supported-hosts-and-typescript-floor.md delete mode 100644 .changeset/value-css-fragments.md diff --git a/.changeset/block-position-interpolations.md b/.changeset/block-position-interpolations.md deleted file mode 100644 index 10ec3de..0000000 --- a/.changeset/block-position-interpolations.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Mixin interpolations that share a line with other CSS, such as `color: red; ${mixin}`, and values split across lines no longer report false `colon expected` or `semi-colon expected` errors. diff --git a/.changeset/completions.md b/.changeset/completions.md deleted file mode 100644 index 096568f..0000000 --- a/.changeset/completions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Completions now follow plugin configuration changes without a restart. A completion or code fix whose edit would land outside the template is dropped instead of producing a broken edit. diff --git a/.changeset/configuration-feedback.md b/.changeset/configuration-feedback.md deleted file mode 100644 index e657bc1..0000000 --- a/.changeset/configuration-feedback.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Invalid or misspelled plugin settings are now reported in the TypeScript server log, naming the setting, what it accepts, and the closest match, instead of being ignored silently. Common spellings such as `"off"`, `"warn"`, and `"Error"` for lint levels are now accepted. diff --git a/.changeset/diagnostics-and-mapping-fixes.md b/.changeset/diagnostics-and-mapping-fixes.md deleted file mode 100644 index 50dd723..0000000 --- a/.changeset/diagnostics-and-mapping-fixes.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Errors are placed more accurately and appear in more cases: - -- Errors at the end of a template, such as an unclosed block, point inside the template instead of past its closing backtick, and an unclosed block can be folded. -- A stray `}` or `;` is always reported, underlined where it is written. -- Diagnostics work for files not open in the editor. -- Templates containing U+2028 or U+2029 line separators map positions correctly. -- A `;` or `}` inside a comment or an unquoted `url()` no longer causes a false `colon expected`. -- `styled.keyframes` templates are checked as keyframes. -- Code-fix requests for other error codes no longer return the plugin's fixes. -- `getTemplateSettings().getSubstitutions` from `./api` keeps its output the same length as its input for any spans. diff --git a/.changeset/diagnostics-caching-and-substitution-performance.md b/.changeset/diagnostics-caching-and-substitution-performance.md deleted file mode 100644 index f84a4ba..0000000 --- a/.changeset/diagnostics-caching-and-substitution-performance.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Diagnostics and hover are faster in large files and in templates with many interpolations. Results for unchanged templates are reused across requests, using at most 4 MB of memory per project. diff --git a/.changeset/emmet-and-completion-placement.md b/.changeset/emmet-and-completion-placement.md deleted file mode 100644 index a2e55f0..0000000 --- a/.changeset/emmet-and-completion-placement.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Emmet no longer offers whole declarations where none fit, such as inside a value: typing `display: fl` used to offer `float: left;`. Completions no longer appear inside CSS comments and strings, and an empty template now offers property suggestions. Emmet suggestions now also appear on a line that starts after a lone carriage return, a line continuation, or a line separator inside a string. diff --git a/.changeset/interpolated-names-and-conditions.md b/.changeset/interpolated-names-and-conditions.md deleted file mode 100644 index 1063c3a..0000000 --- a/.changeset/interpolated-names-and-conditions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Interpolations in property names (`padding-${side}: 4px;`), at-rule conditions (`@media screen and ${query} {`), selectors (`&.${className}:hover {`), and keyframe percentages (`${step}% {`) no longer report false errors, including when a nearby comment or string holds a `;` or `{`, or a comment sits before the `{` or `:`. 1.0.1 reported these errors as well. diff --git a/.changeset/javascript-escapes.md b/.changeset/javascript-escapes.md deleted file mode 100644 index d6b88f0..0000000 --- a/.changeset/javascript-escapes.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Templates are checked as the CSS styled-components actually receives, with JavaScript escapes such as `\"`, `\n`, and `\x41` read as the characters they stand for. Escapes in strings, names, and `url()` no longer report false errors, and an error on an escaped name underlines the whole escape. 1.0.1 reported these errors as well. diff --git a/.changeset/multiline-interpolations.md b/.changeset/multiline-interpolations.md deleted file mode 100644 index f2ce11f..0000000 --- a/.changeset/multiline-interpolations.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Interpolations written across several lines are now checked the same as when written on one line, removing false errors and wrong completions when one sits in a property name, an at-rule such as `@media` or `@keyframes`, a `url()`, a quoted string, or a comment. An interpolation inside `url()` followed by more text, such as `url(#${id}-grad)`, no longer reports a false error either. 1.0.1 reported these errors as well. diff --git a/.changeset/nested-at-rule-completions.md b/.changeset/nested-at-rule-completions.md deleted file mode 100644 index 84e8e01..0000000 --- a/.changeset/nested-at-rule-completions.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -Typing `@` inside a component now suggests the at-rules that work there, such as `@media`, `@container`, `@layer`, and `@keyframes`, with their documentation. diff --git a/.changeset/nested-layer-declarations.md b/.changeset/nested-layer-declarations.md deleted file mode 100644 index 33a14dd..0000000 --- a/.changeset/nested-layer-declarations.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -A `@layer` block with declarations directly inside a component, such as `@layer utilities { color: red; }`, no longer reports a false `{ expected`. A component and a global style with the same text no longer share results. diff --git a/.changeset/package-entry-points-and-types.md b/.changeset/package-entry-points-and-types.md deleted file mode 100644 index 876376f..0000000 --- a/.changeset/package-entry-points-and-types.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -'@styled/typescript-styled-plugin': minor ---- - -`@styled/typescript-styled-plugin/api` is now a public export for both `require()` and `import()`, and the deep `lib/api` imports keep working. It adds types for building configuration by hand and for injecting custom language services. Lint settings accept `unknownAtRules`, and `globalCss` (Pigment CSS) is a default tag. 1.0.1's private underscore-prefixed modules are not included. - -Thanks to @usercao for the modernization work most of this release builds on. diff --git a/.changeset/plugin-resilience.md b/.changeset/plugin-resilience.md deleted file mode 100644 index d964ebe..0000000 --- a/.changeset/plugin-resilience.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -An unexpected error inside the plugin, or malformed plugin configuration, is logged instead of failing the editor's whole response for the file, so TypeScript's own diagnostics and completions keep working. diff --git a/.changeset/supported-hosts-and-typescript-floor.md b/.changeset/supported-hosts-and-typescript-floor.md deleted file mode 100644 index ba356fd..0000000 --- a/.changeset/supported-hosts-and-typescript-floor.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': minor ---- - -On TypeScript older than 5.0, which the plugin does not support, the TypeScript server log now says that TypeScript 5.0 or newer is required, instead of showing an unexplained activation error. diff --git a/.changeset/value-css-fragments.md b/.changeset/value-css-fragments.md deleted file mode 100644 index a8c9d9b..0000000 --- a/.changeset/value-css-fragments.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -'@styled/typescript-styled-plugin': patch ---- - -A `css` fragment holding a single value, such as `` css`1px solid red` ``, is checked as a value instead of reporting a false `} expected`, and offers value completions. diff --git a/CHANGELOG.md b/CHANGELOG.md index e85f18e..87f2c05 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,77 @@ # Changelog +## 1.1.0 + +### Minor Changes + +- 9bdd306: `@styled/typescript-styled-plugin/api` is now a public export for both `require()` and `import()`, and the deep `lib/api` imports keep working. It adds types for building configuration by hand and for injecting custom language services. Lint settings accept `unknownAtRules`, and `globalCss` (Pigment CSS) is a default tag. 1.0.1's private underscore-prefixed modules are not included. + + Thanks to @usercao for the modernization work most of this release builds on. + +- 9bdd306, e13d896: On TypeScript older than 5.0, which the plugin does not support, the TypeScript server log now says that TypeScript 5.0 or newer is required, instead of showing an unexplained activation error. + + Thanks usercao! + +### Patch Changes + +- 9bdd306: Mixin interpolations that share a line with other CSS, such as `color: red; ${mixin}`, and values split across lines no longer report false `colon expected` or `semi-colon expected` errors. + + Thanks usercao! + +- 9bdd306: Completions now follow plugin configuration changes without a restart. A completion or code fix whose edit would land outside the template is dropped instead of producing a broken edit. + + Thanks usercao! + +- 9bdd306: Invalid or misspelled plugin settings are now reported in the TypeScript server log, naming the setting, what it accepts, and the closest match, instead of being ignored silently. Common spellings such as `"off"`, `"warn"`, and `"Error"` for lint levels are now accepted. + + Thanks usercao! + +- 9bdd306: Errors are placed more accurately and appear in more cases: + + - Errors at the end of a template, such as an unclosed block, point inside the template instead of past its closing backtick, and an unclosed block can be folded. + - A stray `}` or `;` is always reported, underlined where it is written. + - Diagnostics work for files not open in the editor. + - Templates containing U+2028 or U+2029 line separators map positions correctly. + - A `;` or `}` inside a comment or an unquoted `url()` no longer causes a false `colon expected`. + - `styled.keyframes` templates are checked as keyframes. + - Code-fix requests for other error codes no longer return the plugin's fixes. + - `getTemplateSettings().getSubstitutions` from `./api` keeps its output the same length as its input for any spans. + + Thanks usercao! + +- 9bdd306: Diagnostics and hover are faster in large files and in templates with many interpolations. Results for unchanged templates are reused across requests, using at most 4 MB of memory per project. + + Thanks usercao! + +- 9bdd306, e13d896: Emmet no longer offers whole declarations where none fit, such as inside a value: typing `display: fl` used to offer `float: left;`. Completions no longer appear inside CSS comments and strings, and an empty template now offers property suggestions. Emmet suggestions now also appear on a line that starts after a lone carriage return, a line continuation, or a line separator inside a string. + + Thanks usercao! + +- 9bdd306: Interpolations in property names (`padding-${side}: 4px;`), at-rule conditions (`@media screen and ${query} {`), selectors (`&.${className}:hover {`), and keyframe percentages (`${step}% {`) no longer report false errors, including when a nearby comment or string holds a `;` or `{`, or a comment sits before the `{` or `:`. 1.0.1 reported these errors as well. + + Thanks usercao! + +- 9bdd306: Templates are checked as the CSS styled-components actually receives, with JavaScript escapes such as `\"`, `\n`, and `\x41` read as the characters they stand for. Escapes in strings, names, and `url()` no longer report false errors, and an error on an escaped name underlines the whole escape. 1.0.1 reported these errors as well. + + Thanks usercao! + +- e13d896: Interpolations written across several lines are now checked the same as when written on one line, removing false errors and wrong completions when one sits in a property name, an at-rule such as `@media` or `@keyframes`, a `url()`, a quoted string, or a comment. An interpolation inside `url()` followed by more text, such as `url(#${id}-grad)`, no longer reports a false error either. 1.0.1 reported these errors as well. +- 9bdd306: Typing `@` inside a component now suggests the at-rules that work there, such as `@media`, `@container`, `@layer`, and `@keyframes`, with their documentation. + + Thanks usercao! + +- 9bdd306: A `@layer` block with declarations directly inside a component, such as `@layer utilities { color: red; }`, no longer reports a false `{ expected`. A component and a global style with the same text no longer share results. + + Thanks usercao! + +- 9bdd306: An unexpected error inside the plugin, or malformed plugin configuration, is logged instead of failing the editor's whole response for the file, so TypeScript's own diagnostics and completions keep working. + + Thanks usercao! + +- 9bdd306: A `css` fragment holding a single value, such as `` css`1px solid red` ``, is checked as a value instead of reporting a false `} expected`, and offers value completions. + + Thanks usercao! + ## 1.0.1 - December 11, 2023 - Add support for `@container` queries by updating the CSS language service diff --git a/package.json b/package.json index bbfc62a..744a265 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@styled/typescript-styled-plugin", - "version": "1.0.1", + "version": "1.1.0", "description": "TypeScript language service plugin that adds IntelliSense for styled components", "keywords": [ "TypeScript",