Skip to content

Support non-JavaScript identifier token in default export#330

Merged
mizdra merged 9 commits intomainfrom
support-non-js-ident-token-2
Feb 5, 2026
Merged

Support non-JavaScript identifier token in default export#330
mizdra merged 9 commits intomainfrom
support-non-js-ident-token-2

Conversation

@mizdra
Copy link
Copy Markdown
Owner

@mizdra mizdra commented Feb 4, 2026

close: #323

Future Works

Special Thanks

@apple-yagi created a proof of concept in #309 and #320, demonstrating that this feature is feasible. He also provided key ideas for implementing this feature, specifically the concept of multiple mapping objects, alongside me (ref: #309 (comment)). Thank you!

@mizdra mizdra added the Type: Feature New Feature label Feb 4, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Feb 4, 2026

🦋 Changeset detected

Latest commit: 8624e4d

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

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

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 force-pushed the support-non-js-ident-token-2 branch from f8a82de to e633dc7 Compare February 4, 2026 14:39
@mizdra mizdra marked this pull request as ready for review February 4, 2026 15:13
proxy.getCompletionEntryDetails = getCompletionEntryDetails(languageService, resolver, config);
proxy.getCodeFixesAtPosition = getCodeFixesAtPosition(language, languageService, project, resolver, config);
proxy.getDefinitionAndBoundSpan = getDefinitionAndBoundSpan(language, languageService);
proxy.findReferences = findReferences(languageService);
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/mizdra/css-modules-kit/pull/320/changes#diff-092ceede4ba31c22487aee4745cbd708001cd1fb391e45bb72c7f5429319d5fa applies a patch to getReferencesAtPosition. I'm unsure whether we should do the same in this PR.

This patch exists solely to pass tests. Typically, users won't encounter issues without it. The reason is explained at https://github.com/mizdra/css-modules-kit/pull/330/changes#diff-dfca5f15f8422ee53dd53de71429e82487d16f8582cbec09ee9943d5c8a84978R16-R20.

I plan to release without patching getReferencesAtPosition. If there are any issues, users will likely report bugs.

Co-Authored-By: Ryuya Yanagi <57742720+apple-yagi@users.noreply.github.com>
@mizdra mizdra merged commit d89f583 into main Feb 5, 2026
19 checks passed
@mizdra mizdra deleted the support-non-js-ident-token-2 branch February 5, 2026 01:49
@github-actions github-actions bot mentioned this pull request Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Feature New Feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support token names that are not valid as JavaScript identifiers in default exports

1 participant