Skip to content

deps(core, ts-plugin, codegen, stylelint-plugin, eslint-plugin): move the code shared by ts-plugin and codegen to the new core-strada package - #466

Merged
mizdra merged 1 commit into
mainfrom
claude/core-strada
Nov 10, 2026
Merged

mizdra merged 1 commit into
mainfrom
claude/core-strada

Conversation

@mizdra

@mizdra mizdra commented Nov 1, 2026 •

Copy link
Copy Markdown
Owner

ref: #377

Background

css-modules-kit is working on supporting TypeScript 7+. Specifically, the following changes are planned:

  • Add @css-modules-kit/content-mapper
    • This package is based on the Content Mapper added in TypeScript 7.1, and it can add types to *.module.css
    • It replaces @css-modules-kit/codegen and @css-modules-kit/ts-plugin
  • Make @css-modules-kit/eslint-plugin and @css-modules-kit/stylelint-plugin usable without installing TypeScript

The blocker for these changes is that @css-modules-kit/core depends on typescript 6 or earlier. @css-modules-kit/core is depended on by @css-modules-kit/eslint-plugin and @css-modules-kit/stylelint-plugin (and by @css-modules-kit/content-mapper in the future). So @css-modules-kit/core must stop depending on typescript 6 or earlier.

Approach

Move the code shared by ts-plugin and codegen, the tools that run on the API of TypeScript 6 or earlier, to a new package, @css-modules-kit/core-strada. Then remove the typescript peer dependency from @css-modules-kit/core.

Changes

  • Add @css-modules-kit/core-strada. The following moved there from @css-modules-kit/core:
    • Reading tsconfig.json
    • Checking CSS modules
    • Generating .d.ts files
    • Converting diagnostics to the TypeScript format
    • Resolving modules
    • Path utilities
  • @css-modules-kit/core keeps parsing CSS modules and finding component files, and no longer has typescript as a peer dependency
  • ts-plugin, codegen, stylelint-plugin and eslint-plugin now depend on core-strada in addition to core
  • Update the lint rules:
    • Forbid importing typescript in core
    • Allow importing node:path directly in core, stylelint-plugin, eslint-plugin and content-mapper

Future work

stylelint-plugin and eslint-plugin have been depending on the API of typescript 6 or earlier. So they depend on core-strada as of this PR. The next PR in this stack will remove that dependency.

@mizdra mizdra added the Type: Dependencies Dependency issues or Changes to dependency files label Nov 1, 2026
@changeset-bot

changeset-bot Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5f512d2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@css-modules-kit/core Patch
@css-modules-kit/core-strada Patch
@css-modules-kit/ts-plugin Patch
@css-modules-kit/codegen Patch
@css-modules-kit/eslint-plugin Patch
@css-modules-kit/stylelint-plugin Patch
css-modules-kit-vscode Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mizdra
mizdra added this pull request to stack #467 November 1, 2026 14:04
@mizdra
mizdra force-pushed the claude/core-strada branch from e24312a to b36424d Compare November 1, 2026 15:35
@mizdra
mizdra removed this pull request from stack #467 November 1, 2026 16:10
@mizdra
mizdra added this pull request to stack #471 November 1, 2026 16:10
@mizdra
mizdra force-pushed the claude/core-strada branch from b36424d to f009071 Compare November 1, 2026 16:17
@mizdra mizdra changed the title refactor(core, ts-plugin, codegen, stylelint-plugin, eslint-plugin): move the code that depends on the TypeScript API to the new core-strada package refactor(core, ts-plugin, codegen, stylelint-plugin, eslint-plugin): move the code shared by ts-plugin and codegen to the new core-strada package Nov 1, 2026
@mizdra
mizdra marked this pull request as ready for review November 1, 2026 16:58
@mizdra
mizdra force-pushed the claude/core-strada branch 3 times, most recently from 53161d4 to 0aed046 Compare November 3, 2026 04:14
… the code shared by ts-plugin and codegen to the new core-strada package

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mizdra
mizdra force-pushed the claude/core-strada branch from 0aed046 to 5f512d2 Compare November 3, 2026 04:32
@mizdra mizdra changed the title refactor(core, ts-plugin, codegen, stylelint-plugin, eslint-plugin): move the code shared by ts-plugin and codegen to the new core-strada package deps(core, ts-plugin, codegen, stylelint-plugin, eslint-plugin): move the code shared by ts-plugin and codegen to the new core-strada package Nov 3, 2026
@mizdra
mizdra merged commit d43493e into main Nov 10, 2026
16 checks passed
@mizdra
mizdra deleted the claude/core-strada branch November 10, 2026 14:35
@github-actions github-actions Bot mentioned this pull request Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Dependencies Dependency issues or Changes to dependency files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant