Repository navigation
Declare default extensions in package manifests - #22
Open
colinhacks wants to merge 1 commit into
Open
colinhacks wants to merge 1 commit into
colinhacks wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: bde0918 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
Collaborator
|
Thanks @colinhacks, I'll chat with @remcohaszing about this and try to get back to you ASAP. I like that this also makes it easier for users. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Disclosure: made with Claude Code and verified locally against TypeScript 7.1.1-rc and the repo's test suite below.
TypeScript 7.1 RC (
typescript@7.1.1-rc) reads a content mapper's default extensions fromtypescript.contentMapper.extensionsinpackage.json(microsoft/TypeScript#65047), so atsconfig.jsonentry can register each package by name alone without listingextensions.Changes
typescript.contentMapper.extensionsto each package'spackage.json, matching the lists already in each README:css-modules-content-mapper:[".module.css"]sass-content-mapper:[".module.scss", ".module.sass"]less-content-mapper:[".module.less"]README.mdfiles to omit"extensions"from thetsconfig.jsonexample and note the default extensions, overriding viaextensions, and listingextensionson TypeScript versions before 7.1 RC..changeset/quiet-files-map.md) covering all three packages.Backward compatible:
typescript@7.1.0-betaignores the manifest field, and settingextensionsintsconfig.jsonstill overrides the default on both beta and RC.Verification
css-modules-content-mapper@0.5.0,sass-content-mapper@0.3.0, andless-content-mapper@0.3.0ontypescript@7.1.1-rcwith package-onlytsconfig.jsonentries: each fails withTS18141and the module imports fail withTS2307.npm packtarballs of this branch ontypescript@7.1.1-rc:.module.css,.module.scss,.module.sass, and.module.lessimports get typed (plantedTS2339/TS2551errors on missing class names are reported), and setting"extensions": [".css"]intsconfig.jsonoverrides the default.eslint,tsc --build,prettier,remark, andnpm test(138 passed).