-
-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support .js
→ .ts
conversion in local export map
#59
Labels
Comments
Does TypeScript follow this resolution logic? |
Yes. (I think as of version 4.7) |
Confirmed this is TypeScript behavior: index.ts import test from 'test-package';
console.log(test); node_modules/test-package/package.json { "exports": "./file.js" } node_modules/test-package/file.ts export default 1234; Output
|
This comment was marked as off-topic.
This comment was marked as off-topic.
2 tasks
This comment was marked as off-topic.
This comment was marked as off-topic.
6 tasks
privatenumber
added a commit
that referenced
this issue
Jul 1, 2024
renovate bot
added a commit
to mmkal/eslint-plugin-mmkal
that referenced
this issue
Aug 20, 2024
##### [v4.17.0](privatenumber/tsx@v4.16.5...bd83d3b) ##### [v4.16.5](https://github.com/privatenumber/tsx/releases/tag/v4.16.5) ##### Bug Fixes - **resolver:** directory import nested ".." ([2fada74](privatenumber/tsx@2fada74)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.5) ##### [v4.16.4](https://github.com/privatenumber/tsx/releases/tag/v4.16.4) ##### Bug Fixes - **resolver:** handle importing ".." ([3cf0b6a](privatenumber/tsx@3cf0b6a)), closes [#626](privatenumber/tsx#626) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.4) ##### [v4.16.3](privatenumber/tsx@v4.16.2...ca4bf11) ##### [v4.16.2](privatenumber/tsx@v4.16.1...042be03) ##### [v4.16.1](https://github.com/privatenumber/tsx/releases/tag/v4.16.1) ##### Bug Fixes - **cjs:** isolate implicit resolver enhancement ([#59](privatenumber/tsx#59)) ([143a5bd](privatenumber/tsx@143a5bd)) - **cjs:** namespace filter to preserve file path ([6ef949c](privatenumber/tsx@6ef949c)) - **esm:** implicit resolution with tsconfig paths ([a74aa58](privatenumber/tsx@a74aa58)), closes [#607](privatenumber/tsx#607) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.1) ##### [v4.16.0](privatenumber/tsx@v4.15.9...da3bcb0) ##### [v4.15.9](privatenumber/tsx@v4.15.8...c67e3ba) ##### [v4.15.8](privatenumber/tsx@v4.15.7...ae2a1bc) ##### [v4.15.7](https://github.com/privatenumber/tsx/releases/tag/v4.15.7) ##### Bug Fixes - nyc coverage compatibility ([#54](privatenumber/tsx#54)) ([26d633c](privatenumber/tsx@26d633c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.7) ##### [v4.15.6](https://github.com/privatenumber/tsx/releases/tag/v4.15.6) ##### Bug Fixes - minimum Node version in warning for `module.register()` ([#592](privatenumber/tsx#592)) ([cb27d4d](privatenumber/tsx@cb27d4d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.6) ##### [v4.15.5](https://github.com/privatenumber/tsx/releases/tag/v4.15.5) ##### Bug Fixes - **cjs:** make transformers overwritable ([c22fa7d](privatenumber/tsx@c22fa7d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.5) ##### [v4.15.4](https://github.com/privatenumber/tsx/releases/tag/v4.15.4) ##### Bug Fixes - **cjs:** handle re-exports from relative paths ([5166122](privatenumber/tsx@5166122)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.4) ##### [v4.15.3](https://github.com/privatenumber/tsx/releases/tag/v4.15.3) ##### Bug Fixes - **cjs:** load json with namespace ([6b03a38](privatenumber/tsx@6b03a38)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.3) ##### [v4.15.2](https://github.com/privatenumber/tsx/releases/tag/v4.15.2) ##### Bug Fixes - **esm:** resolve implicit extension in package subpath ([7e1fe22](privatenumber/tsx@7e1fe22)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.2) ##### [v4.15.1](https://github.com/privatenumber/tsx/releases/tag/v4.15.1) ##### Bug Fixes - prevent ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE ([fb247eb](privatenumber/tsx@fb247eb)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.1) ##### [v4.15.0](https://github.com/privatenumber/tsx/releases/tag/v4.15.0) ##### Features - esbuild 0.21 ([#19](privatenumber/tsx#19)) ([6f1d305](privatenumber/tsx@6f1d305)) - esbuild 0.21.3 ([edbdfdf](privatenumber/tsx@edbdfdf)) - esbuild 0.21.4 ([c67d746](privatenumber/tsx@c67d746)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.0) ##### [v4.14.1](https://github.com/privatenumber/tsx/releases/tag/v4.14.1) ##### Bug Fixes - **cjs:** only hide transformers when namespaced ([9e647a5](privatenumber/tsx@9e647a5)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.1) ##### [v4.14.0](https://github.com/privatenumber/tsx/releases/tag/v4.14.0) ##### Features - resolve .js → .ts in `package.json` exports & main ([4503421](privatenumber/tsx@4503421)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.0) ##### [v4.13.3](https://github.com/privatenumber/tsx/releases/tag/v4.13.3) ##### Bug Fixes - **cjs:** resolve directory import relative to parent ([#42](privatenumber/tsx#42)) ([02d3856](privatenumber/tsx@02d3856)) - **esm:** cjs interop to support decorators ([807f467](privatenumber/tsx@807f467)) - **esm:** resolve .ts extension in imports map ([89621bf](privatenumber/tsx@89621bf)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.3) ##### [v4.13.2](https://github.com/privatenumber/tsx/releases/tag/v4.13.2) ##### Bug Fixes - **esm:** ignore transforming .js files with CJS syntax ([#40](privatenumber/tsx#40)) ([87a7683](privatenumber/tsx@87a7683)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.2) ##### [v4.13.1](https://github.com/privatenumber/tsx/releases/tag/v4.13.1) ##### Bug Fixes - **esm/api:** `tsImport()` to parse CJS exports ([0a78bfd](privatenumber/tsx@0a78bfd)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.1) ##### [v4.13.0](https://github.com/privatenumber/tsx/releases/tag/v4.13.0) ##### Features - **cjs/api:** `register()` to support namespace ([#35](privatenumber/tsx#35)) ([c703300](privatenumber/tsx@c703300)) - **esm/api:** `tsImport()` to support loading CommonJS files ([0eb4e91](privatenumber/tsx@0eb4e91)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.0) ##### [v4.12.1](https://github.com/privatenumber/tsx/releases/tag/v4.12.1) ##### Bug Fixes - **esm:** resolve implicit ts paths in packages ([de900a1](privatenumber/tsx@de900a1)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.1) ##### [v4.12.0](https://github.com/privatenumber/tsx/releases/tag/v4.12.0) ##### Bug Fixes - **cjs:** make resolver chainable ([585f117](privatenumber/tsx@585f117)) - **esm:** named import from CommonJS file ([#33](privatenumber/tsx#33)) ([7c85303](privatenumber/tsx@7c85303)) ##### Features - **cjs:** support query for cache busting ([#37](privatenumber/tsx#37)) ([e1464cf](privatenumber/tsx@e1464cf)) ##### Performance Improvements - **esm:** only try extensions if file path ([72d0896](privatenumber/tsx@72d0896)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.0) ##### [v4.11.2](https://github.com/privatenumber/tsx/releases/tag/v4.11.2) ##### Bug Fixes - **cjs:** esm interop in `.mjs` files ([#32](https://github.com/privatenumber/tsx/issues/32)) ([aa2b639](privatenumber/tsx@aa2b639)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.2) ##### [v4.11.1](https://github.com/privatenumber/tsx/releases/tag/v4.11.1) ##### Bug Fixes - **cjs/api:** resolve correct module and types when imported ([#566](privatenumber/tsx#566)) ([5e70105](privatenumber/tsx@5e70105)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.1) ##### [v4.11.0](https://github.com/privatenumber/tsx/releases/tag/v4.11.0) ##### Bug Fixes - only error on invalid tsconfig if explicitly passed in ([#30](privatenumber/tsx#30)) ([b6bf39b](privatenumber/tsx@b6bf39b)) ##### Features - **esm api:** configurable `tsconfig` ([3f42ae3](privatenumber/tsx@3f42ae3)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.0) ##### [v4.10.5](https://github.com/privatenumber/tsx/releases/tag/v4.10.5) ##### Bug Fixes - handle parsing variable `of` ([86cf87c](privatenumber/tsx@86cf87c)), closes [#556](privatenumber/tsx#556) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.5) ##### [v4.10.4](privatenumber/tsx@v4.10.3...4a8a2dc) ##### [v4.10.3](https://github.com/privatenumber/tsx/releases/tag/v4.10.3) ##### Performance Improvements - skip parsing if `import(` is not found in minified code ([5cdd50b](privatenumber/tsx@5cdd50b)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.3) ##### [v4.10.2](privatenumber/tsx@v4.10.1...2c87fc1) ##### [v4.10.1](privatenumber/tsx@v4.10.0...efb3509) ##### [v4.10.0](https://github.com/privatenumber/tsx/releases/tag/v4.10.0) ##### Features - **esm api:** register to return a namespaced import() method ([53bb4aa](privatenumber/tsx@53bb4aa)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.0) ##### [v4.9.5](privatenumber/tsx@v4.9.4...dae9f0d) ##### [v4.9.4](https://github.com/privatenumber/tsx/releases/tag/v4.9.4) ##### Bug Fixes - **tsImport:** import module from commonjs ([48f0a75](privatenumber/tsx@48f0a75)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.4) ##### [v4.9.3](https://github.com/privatenumber/tsx/releases/tag/v4.9.3) ##### Bug Fixes - import implicit extensions from packages ([8022fcf](privatenumber/tsx@8022fcf)), closes [#542](privatenumber/tsx#542) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.3) ##### [v4.9.2](https://github.com/privatenumber/tsx/releases/tag/v4.9.2) ##### Bug Fixes - **esm:** resolve absolute paths ([#544](privatenumber/tsx#544)) ([3a0ea18](privatenumber/tsx@3a0ea18)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.2) ##### [v4.9.1](privatenumber/tsx@v4.9.0...96bc596) ##### [v4.9.0](privatenumber/tsx@v4.8.2...4f515ab) ##### [v4.8.2](https://github.com/privatenumber/tsx/releases/tag/v4.8.2) ##### Bug Fixes - **types:** cjs/api to use .d.cts ([4b1f03c](privatenumber/tsx@4b1f03c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.8.2) ##### [v4.8.1](privatenumber/tsx@v4.8.0...084dec0) ##### [v4.8.0](privatenumber/tsx@v4.7.3...99ba136) ##### [v4.7.3](https://github.com/privatenumber/tsx/releases/tag/v4.7.3) ##### Bug Fixes - support TS resolution in JS files when `allowJs` is set ([#535](privatenumber/tsx#535)) ([081853e](privatenumber/tsx@081853e)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.7.3) ##### [v4.7.2](privatenumber/tsx@v4.7.1...1a10da7)
renovate bot
added a commit
to mmkal/eslint-plugin-mmkal
that referenced
this issue
Aug 20, 2024
##### [v4.17.0](privatenumber/tsx@v4.16.5...bd83d3b) ##### [v4.16.5](https://github.com/privatenumber/tsx/releases/tag/v4.16.5) ##### Bug Fixes - **resolver:** directory import nested ".." ([2fada74](privatenumber/tsx@2fada74)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.5) ##### [v4.16.4](https://github.com/privatenumber/tsx/releases/tag/v4.16.4) ##### Bug Fixes - **resolver:** handle importing ".." ([3cf0b6a](privatenumber/tsx@3cf0b6a)), closes [#626](privatenumber/tsx#626) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.4) ##### [v4.16.3](privatenumber/tsx@v4.16.2...ca4bf11) ##### [v4.16.2](privatenumber/tsx@v4.16.1...042be03) ##### [v4.16.1](https://github.com/privatenumber/tsx/releases/tag/v4.16.1) ##### Bug Fixes - **cjs:** isolate implicit resolver enhancement ([#59](privatenumber/tsx#59)) ([143a5bd](privatenumber/tsx@143a5bd)) - **cjs:** namespace filter to preserve file path ([6ef949c](privatenumber/tsx@6ef949c)) - **esm:** implicit resolution with tsconfig paths ([a74aa58](privatenumber/tsx@a74aa58)), closes [#607](privatenumber/tsx#607) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.1) ##### [v4.16.0](privatenumber/tsx@v4.15.9...da3bcb0) ##### [v4.15.9](privatenumber/tsx@v4.15.8...c67e3ba) ##### [v4.15.8](privatenumber/tsx@v4.15.7...ae2a1bc) ##### [v4.15.7](https://github.com/privatenumber/tsx/releases/tag/v4.15.7) ##### Bug Fixes - nyc coverage compatibility ([#54](privatenumber/tsx#54)) ([26d633c](privatenumber/tsx@26d633c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.7) ##### [v4.15.6](https://github.com/privatenumber/tsx/releases/tag/v4.15.6) ##### Bug Fixes - minimum Node version in warning for `module.register()` ([#592](privatenumber/tsx#592)) ([cb27d4d](privatenumber/tsx@cb27d4d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.6) ##### [v4.15.5](https://github.com/privatenumber/tsx/releases/tag/v4.15.5) ##### Bug Fixes - **cjs:** make transformers overwritable ([c22fa7d](privatenumber/tsx@c22fa7d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.5) ##### [v4.15.4](https://github.com/privatenumber/tsx/releases/tag/v4.15.4) ##### Bug Fixes - **cjs:** handle re-exports from relative paths ([5166122](privatenumber/tsx@5166122)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.4) ##### [v4.15.3](https://github.com/privatenumber/tsx/releases/tag/v4.15.3) ##### Bug Fixes - **cjs:** load json with namespace ([6b03a38](privatenumber/tsx@6b03a38)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.3) ##### [v4.15.2](https://github.com/privatenumber/tsx/releases/tag/v4.15.2) ##### Bug Fixes - **esm:** resolve implicit extension in package subpath ([7e1fe22](privatenumber/tsx@7e1fe22)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.2) ##### [v4.15.1](https://github.com/privatenumber/tsx/releases/tag/v4.15.1) ##### Bug Fixes - prevent ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE ([fb247eb](privatenumber/tsx@fb247eb)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.1) ##### [v4.15.0](https://github.com/privatenumber/tsx/releases/tag/v4.15.0) ##### Features - esbuild 0.21 ([#19](privatenumber/tsx#19)) ([6f1d305](privatenumber/tsx@6f1d305)) - esbuild 0.21.3 ([edbdfdf](privatenumber/tsx@edbdfdf)) - esbuild 0.21.4 ([c67d746](privatenumber/tsx@c67d746)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.0) ##### [v4.14.1](https://github.com/privatenumber/tsx/releases/tag/v4.14.1) ##### Bug Fixes - **cjs:** only hide transformers when namespaced ([9e647a5](privatenumber/tsx@9e647a5)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.1) ##### [v4.14.0](https://github.com/privatenumber/tsx/releases/tag/v4.14.0) ##### Features - resolve .js → .ts in `package.json` exports & main ([4503421](privatenumber/tsx@4503421)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.0) ##### [v4.13.3](https://github.com/privatenumber/tsx/releases/tag/v4.13.3) ##### Bug Fixes - **cjs:** resolve directory import relative to parent ([#42](privatenumber/tsx#42)) ([02d3856](privatenumber/tsx@02d3856)) - **esm:** cjs interop to support decorators ([807f467](privatenumber/tsx@807f467)) - **esm:** resolve .ts extension in imports map ([89621bf](privatenumber/tsx@89621bf)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.3) ##### [v4.13.2](https://github.com/privatenumber/tsx/releases/tag/v4.13.2) ##### Bug Fixes - **esm:** ignore transforming .js files with CJS syntax ([#40](privatenumber/tsx#40)) ([87a7683](privatenumber/tsx@87a7683)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.2) ##### [v4.13.1](https://github.com/privatenumber/tsx/releases/tag/v4.13.1) ##### Bug Fixes - **esm/api:** `tsImport()` to parse CJS exports ([0a78bfd](privatenumber/tsx@0a78bfd)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.1) ##### [v4.13.0](https://github.com/privatenumber/tsx/releases/tag/v4.13.0) ##### Features - **cjs/api:** `register()` to support namespace ([#35](privatenumber/tsx#35)) ([c703300](privatenumber/tsx@c703300)) - **esm/api:** `tsImport()` to support loading CommonJS files ([0eb4e91](privatenumber/tsx@0eb4e91)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.0) ##### [v4.12.1](https://github.com/privatenumber/tsx/releases/tag/v4.12.1) ##### Bug Fixes - **esm:** resolve implicit ts paths in packages ([de900a1](privatenumber/tsx@de900a1)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.1) ##### [v4.12.0](https://github.com/privatenumber/tsx/releases/tag/v4.12.0) ##### Bug Fixes - **cjs:** make resolver chainable ([585f117](privatenumber/tsx@585f117)) - **esm:** named import from CommonJS file ([#33](privatenumber/tsx#33)) ([7c85303](privatenumber/tsx@7c85303)) ##### Features - **cjs:** support query for cache busting ([#37](privatenumber/tsx#37)) ([e1464cf](privatenumber/tsx@e1464cf)) ##### Performance Improvements - **esm:** only try extensions if file path ([72d0896](privatenumber/tsx@72d0896)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.0) ##### [v4.11.2](https://github.com/privatenumber/tsx/releases/tag/v4.11.2) ##### Bug Fixes - **cjs:** esm interop in `.mjs` files ([#32](https://github.com/privatenumber/tsx/issues/32)) ([aa2b639](privatenumber/tsx@aa2b639)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.2) ##### [v4.11.1](https://github.com/privatenumber/tsx/releases/tag/v4.11.1) ##### Bug Fixes - **cjs/api:** resolve correct module and types when imported ([#566](privatenumber/tsx#566)) ([5e70105](privatenumber/tsx@5e70105)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.1) ##### [v4.11.0](https://github.com/privatenumber/tsx/releases/tag/v4.11.0) ##### Bug Fixes - only error on invalid tsconfig if explicitly passed in ([#30](privatenumber/tsx#30)) ([b6bf39b](privatenumber/tsx@b6bf39b)) ##### Features - **esm api:** configurable `tsconfig` ([3f42ae3](privatenumber/tsx@3f42ae3)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.0) ##### [v4.10.5](https://github.com/privatenumber/tsx/releases/tag/v4.10.5) ##### Bug Fixes - handle parsing variable `of` ([86cf87c](privatenumber/tsx@86cf87c)), closes [#556](privatenumber/tsx#556) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.5) ##### [v4.10.4](privatenumber/tsx@v4.10.3...4a8a2dc) ##### [v4.10.3](https://github.com/privatenumber/tsx/releases/tag/v4.10.3) ##### Performance Improvements - skip parsing if `import(` is not found in minified code ([5cdd50b](privatenumber/tsx@5cdd50b)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.3) ##### [v4.10.2](privatenumber/tsx@v4.10.1...2c87fc1) ##### [v4.10.1](privatenumber/tsx@v4.10.0...efb3509) ##### [v4.10.0](https://github.com/privatenumber/tsx/releases/tag/v4.10.0) ##### Features - **esm api:** register to return a namespaced import() method ([53bb4aa](privatenumber/tsx@53bb4aa)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.0) ##### [v4.9.5](privatenumber/tsx@v4.9.4...dae9f0d) ##### [v4.9.4](https://github.com/privatenumber/tsx/releases/tag/v4.9.4) ##### Bug Fixes - **tsImport:** import module from commonjs ([48f0a75](privatenumber/tsx@48f0a75)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.4) ##### [v4.9.3](https://github.com/privatenumber/tsx/releases/tag/v4.9.3) ##### Bug Fixes - import implicit extensions from packages ([8022fcf](privatenumber/tsx@8022fcf)), closes [#542](privatenumber/tsx#542) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.3) ##### [v4.9.2](https://github.com/privatenumber/tsx/releases/tag/v4.9.2) ##### Bug Fixes - **esm:** resolve absolute paths ([#544](privatenumber/tsx#544)) ([3a0ea18](privatenumber/tsx@3a0ea18)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.2) ##### [v4.9.1](privatenumber/tsx@v4.9.0...96bc596) ##### [v4.9.0](privatenumber/tsx@v4.8.2...4f515ab) ##### [v4.8.2](https://github.com/privatenumber/tsx/releases/tag/v4.8.2) ##### Bug Fixes - **types:** cjs/api to use .d.cts ([4b1f03c](privatenumber/tsx@4b1f03c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.8.2) ##### [v4.8.1](privatenumber/tsx@v4.8.0...084dec0) ##### [v4.8.0](privatenumber/tsx@v4.7.3...99ba136) ##### [v4.7.3](https://github.com/privatenumber/tsx/releases/tag/v4.7.3) ##### Bug Fixes - support TS resolution in JS files when `allowJs` is set ([#535](privatenumber/tsx#535)) ([081853e](privatenumber/tsx@081853e)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.7.3) ##### [v4.7.2](privatenumber/tsx@v4.7.1...1a10da7)
renovate bot
added a commit
to mmkal/eslint-plugin-mmkal
that referenced
this issue
Aug 20, 2024
##### [v4.17.0](privatenumber/tsx@v4.16.5...bd83d3b) ##### [v4.16.5](https://github.com/privatenumber/tsx/releases/tag/v4.16.5) ##### Bug Fixes - **resolver:** directory import nested ".." ([2fada74](privatenumber/tsx@2fada74)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.5) ##### [v4.16.4](https://github.com/privatenumber/tsx/releases/tag/v4.16.4) ##### Bug Fixes - **resolver:** handle importing ".." ([3cf0b6a](privatenumber/tsx@3cf0b6a)), closes [#626](privatenumber/tsx#626) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.4) ##### [v4.16.3](privatenumber/tsx@v4.16.2...ca4bf11) ##### [v4.16.2](privatenumber/tsx@v4.16.1...042be03) ##### [v4.16.1](https://github.com/privatenumber/tsx/releases/tag/v4.16.1) ##### Bug Fixes - **cjs:** isolate implicit resolver enhancement ([#59](privatenumber/tsx#59)) ([143a5bd](privatenumber/tsx@143a5bd)) - **cjs:** namespace filter to preserve file path ([6ef949c](privatenumber/tsx@6ef949c)) - **esm:** implicit resolution with tsconfig paths ([a74aa58](privatenumber/tsx@a74aa58)), closes [#607](privatenumber/tsx#607) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.16.1) ##### [v4.16.0](privatenumber/tsx@v4.15.9...da3bcb0) ##### [v4.15.9](privatenumber/tsx@v4.15.8...c67e3ba) ##### [v4.15.8](privatenumber/tsx@v4.15.7...ae2a1bc) ##### [v4.15.7](https://github.com/privatenumber/tsx/releases/tag/v4.15.7) ##### Bug Fixes - nyc coverage compatibility ([#54](privatenumber/tsx#54)) ([26d633c](privatenumber/tsx@26d633c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.7) ##### [v4.15.6](https://github.com/privatenumber/tsx/releases/tag/v4.15.6) ##### Bug Fixes - minimum Node version in warning for `module.register()` ([#592](privatenumber/tsx#592)) ([cb27d4d](privatenumber/tsx@cb27d4d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.6) ##### [v4.15.5](https://github.com/privatenumber/tsx/releases/tag/v4.15.5) ##### Bug Fixes - **cjs:** make transformers overwritable ([c22fa7d](privatenumber/tsx@c22fa7d)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.5) ##### [v4.15.4](https://github.com/privatenumber/tsx/releases/tag/v4.15.4) ##### Bug Fixes - **cjs:** handle re-exports from relative paths ([5166122](privatenumber/tsx@5166122)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.4) ##### [v4.15.3](https://github.com/privatenumber/tsx/releases/tag/v4.15.3) ##### Bug Fixes - **cjs:** load json with namespace ([6b03a38](privatenumber/tsx@6b03a38)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.3) ##### [v4.15.2](https://github.com/privatenumber/tsx/releases/tag/v4.15.2) ##### Bug Fixes - **esm:** resolve implicit extension in package subpath ([7e1fe22](privatenumber/tsx@7e1fe22)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.2) ##### [v4.15.1](https://github.com/privatenumber/tsx/releases/tag/v4.15.1) ##### Bug Fixes - prevent ERR_DOMAIN_CANNOT_SET_UNCAUGHT_EXCEPTION_CAPTURE ([fb247eb](privatenumber/tsx@fb247eb)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.1) ##### [v4.15.0](https://github.com/privatenumber/tsx/releases/tag/v4.15.0) ##### Features - esbuild 0.21 ([#19](privatenumber/tsx#19)) ([6f1d305](privatenumber/tsx@6f1d305)) - esbuild 0.21.3 ([edbdfdf](privatenumber/tsx@edbdfdf)) - esbuild 0.21.4 ([c67d746](privatenumber/tsx@c67d746)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.15.0) ##### [v4.14.1](https://github.com/privatenumber/tsx/releases/tag/v4.14.1) ##### Bug Fixes - **cjs:** only hide transformers when namespaced ([9e647a5](privatenumber/tsx@9e647a5)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.1) ##### [v4.14.0](https://github.com/privatenumber/tsx/releases/tag/v4.14.0) ##### Features - resolve .js → .ts in `package.json` exports & main ([4503421](privatenumber/tsx@4503421)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.14.0) ##### [v4.13.3](https://github.com/privatenumber/tsx/releases/tag/v4.13.3) ##### Bug Fixes - **cjs:** resolve directory import relative to parent ([#42](privatenumber/tsx#42)) ([02d3856](privatenumber/tsx@02d3856)) - **esm:** cjs interop to support decorators ([807f467](privatenumber/tsx@807f467)) - **esm:** resolve .ts extension in imports map ([89621bf](privatenumber/tsx@89621bf)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.3) ##### [v4.13.2](https://github.com/privatenumber/tsx/releases/tag/v4.13.2) ##### Bug Fixes - **esm:** ignore transforming .js files with CJS syntax ([#40](privatenumber/tsx#40)) ([87a7683](privatenumber/tsx@87a7683)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.2) ##### [v4.13.1](https://github.com/privatenumber/tsx/releases/tag/v4.13.1) ##### Bug Fixes - **esm/api:** `tsImport()` to parse CJS exports ([0a78bfd](privatenumber/tsx@0a78bfd)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.1) ##### [v4.13.0](https://github.com/privatenumber/tsx/releases/tag/v4.13.0) ##### Features - **cjs/api:** `register()` to support namespace ([#35](privatenumber/tsx#35)) ([c703300](privatenumber/tsx@c703300)) - **esm/api:** `tsImport()` to support loading CommonJS files ([0eb4e91](privatenumber/tsx@0eb4e91)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.13.0) ##### [v4.12.1](https://github.com/privatenumber/tsx/releases/tag/v4.12.1) ##### Bug Fixes - **esm:** resolve implicit ts paths in packages ([de900a1](privatenumber/tsx@de900a1)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.1) ##### [v4.12.0](https://github.com/privatenumber/tsx/releases/tag/v4.12.0) ##### Bug Fixes - **cjs:** make resolver chainable ([585f117](privatenumber/tsx@585f117)) - **esm:** named import from CommonJS file ([#33](privatenumber/tsx#33)) ([7c85303](privatenumber/tsx@7c85303)) ##### Features - **cjs:** support query for cache busting ([#37](privatenumber/tsx#37)) ([e1464cf](privatenumber/tsx@e1464cf)) ##### Performance Improvements - **esm:** only try extensions if file path ([72d0896](privatenumber/tsx@72d0896)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.12.0) ##### [v4.11.2](https://github.com/privatenumber/tsx/releases/tag/v4.11.2) ##### Bug Fixes - **cjs:** esm interop in `.mjs` files ([#32](https://github.com/privatenumber/tsx/issues/32)) ([aa2b639](privatenumber/tsx@aa2b639)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.2) ##### [v4.11.1](https://github.com/privatenumber/tsx/releases/tag/v4.11.1) ##### Bug Fixes - **cjs/api:** resolve correct module and types when imported ([#566](privatenumber/tsx#566)) ([5e70105](privatenumber/tsx@5e70105)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.1) ##### [v4.11.0](https://github.com/privatenumber/tsx/releases/tag/v4.11.0) ##### Bug Fixes - only error on invalid tsconfig if explicitly passed in ([#30](privatenumber/tsx#30)) ([b6bf39b](privatenumber/tsx@b6bf39b)) ##### Features - **esm api:** configurable `tsconfig` ([3f42ae3](privatenumber/tsx@3f42ae3)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.11.0) ##### [v4.10.5](https://github.com/privatenumber/tsx/releases/tag/v4.10.5) ##### Bug Fixes - handle parsing variable `of` ([86cf87c](privatenumber/tsx@86cf87c)), closes [#556](privatenumber/tsx#556) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.5) ##### [v4.10.4](privatenumber/tsx@v4.10.3...4a8a2dc) ##### [v4.10.3](https://github.com/privatenumber/tsx/releases/tag/v4.10.3) ##### Performance Improvements - skip parsing if `import(` is not found in minified code ([5cdd50b](privatenumber/tsx@5cdd50b)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.3) ##### [v4.10.2](privatenumber/tsx@v4.10.1...2c87fc1) ##### [v4.10.1](privatenumber/tsx@v4.10.0...efb3509) ##### [v4.10.0](https://github.com/privatenumber/tsx/releases/tag/v4.10.0) ##### Features - **esm api:** register to return a namespaced import() method ([53bb4aa](privatenumber/tsx@53bb4aa)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.10.0) ##### [v4.9.5](privatenumber/tsx@v4.9.4...dae9f0d) ##### [v4.9.4](https://github.com/privatenumber/tsx/releases/tag/v4.9.4) ##### Bug Fixes - **tsImport:** import module from commonjs ([48f0a75](privatenumber/tsx@48f0a75)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.4) ##### [v4.9.3](https://github.com/privatenumber/tsx/releases/tag/v4.9.3) ##### Bug Fixes - import implicit extensions from packages ([8022fcf](privatenumber/tsx@8022fcf)), closes [#542](privatenumber/tsx#542) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.3) ##### [v4.9.2](https://github.com/privatenumber/tsx/releases/tag/v4.9.2) ##### Bug Fixes - **esm:** resolve absolute paths ([#544](privatenumber/tsx#544)) ([3a0ea18](privatenumber/tsx@3a0ea18)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.9.2) ##### [v4.9.1](privatenumber/tsx@v4.9.0...96bc596) ##### [v4.9.0](privatenumber/tsx@v4.8.2...4f515ab) ##### [v4.8.2](https://github.com/privatenumber/tsx/releases/tag/v4.8.2) ##### Bug Fixes - **types:** cjs/api to use .d.cts ([4b1f03c](privatenumber/tsx@4b1f03c)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.8.2) ##### [v4.8.1](privatenumber/tsx@v4.8.0...084dec0) ##### [v4.8.0](privatenumber/tsx@v4.7.3...99ba136) ##### [v4.7.3](https://github.com/privatenumber/tsx/releases/tag/v4.7.3) ##### Bug Fixes - support TS resolution in JS files when `allowJs` is set ([#535](privatenumber/tsx#535)) ([081853e](privatenumber/tsx@081853e)) *** This release is also available on: - [npm package (@latest dist-tag)](https://www.npmjs.com/package/tsx/v/4.7.3) ##### [v4.7.2](privatenumber/tsx@v4.7.1...1a10da7)
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Feature request
Using
tsx
it’s possible to writeimport … from './index.js'
. It’s ok ifindex.js
doesn’t exist, but onlyindex.ts
. It will just resolve to that.If
package.json
contains anexports
field, it’s valid to import the package by name instead of by a path reference.For example, after compilation of https://github.com/remcohaszing/remark-mdx-frontmatter, it’s valid to rewrite the compiled test to use
import remarkMdxFrontmatter from 'remark-mdx-frontmatter'
intest.ts
. This won’t work without compiling first.I suggest to make
tsx
use the same logic for aliasing.js
→.ts
after resolvingpackage.json
exports as it does for relative imports.Why?
tsx
for importing other local packages inside a mono repo.Alternatives
N/A
Additional context
No response
The text was updated successfully, but these errors were encountered: