Skip to content

fix: TypeScript subpaths#9835

Merged
devongovett merged 3 commits intomainfrom
fix-types-rfc
Mar 24, 2026
Merged

fix: TypeScript subpaths#9835
devongovett merged 3 commits intomainfrom
fix-types-rfc

Conversation

@devongovett
Copy link
Copy Markdown
Member

  • Fixes incorrect paths to typescript declarations in old individual packages, and S2 icons.
  • Adds a types field to the package.jsons for each sub-path, so that TS without "moduleResolution": "bundler" continue to work.

Comment thread scripts/buildEsm.js
let dir = shim.replace('.js', '');
fs.mkdirSync(dir, {recursive: true});
fs.writeFileSync(dir + '/module.js', `export * from '${specifier}';\n`);
fs.writeFileSync(dir + '/main.js', `module.exports = require('${specifier.replace('.js', '.cjs')}');\n`);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Realized we don't really need these extra files. We can just have the package.json point directly to where we are re-exporting from.

@rspbot
Copy link
Copy Markdown

rspbot commented Mar 24, 2026

@devongovett devongovett added this pull request to the merge queue Mar 24, 2026
Merged via the queue into main with commit a911b98 Mar 24, 2026
29 checks passed
@devongovett devongovett deleted the fix-types-rfc branch March 24, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants