-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve npm tarball emit (#493)
Some relative specifiers were being incorrectly emitted when referencing a `.js` file from a `.d.ts` file in the dist folder. Additionally, `.js` files were previously emitted into a `_dist` folder, which broke users that need to relatively access files in the NPM package using `import.meta.url` or similar. Now only `.d.ts` files are emitted into the `_dist` folder. Fixes #491 Fixes #477
- Loading branch information
1 parent
16e07f5
commit 7e28877
Showing
12 changed files
with
141 additions
and
83 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# mod.ts | ||
export * from "./sub/lib.js"; | ||
|
||
# sub/lib.js | ||
export default 1; | ||
|
||
# sub/lib.d.ts | ||
declare const _default: number; | ||
export default _default; | ||
|
||
# jsr.json | ||
{ | ||
"name": "@scope/foo", | ||
"version": "0.0.1", | ||
"exports": "./mod.ts" | ||
} | ||
|
||
# output | ||
== /jsr.json == | ||
{ | ||
"name": "@scope/foo", | ||
"version": "0.0.1", | ||
"exports": "./mod.ts" | ||
} | ||
|
||
== /mod.js == | ||
export * from "./sub/lib.js"; | ||
//# sourceMappingURL=mod.js.map | ||
|
||
== /mod.js.map == | ||
{"version":3,"file":"mod.js","sources":["./mod.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe"} | ||
|
||
== /mod.ts == | ||
export * from "./sub/lib.js"; | ||
|
||
== /package.json == | ||
{ | ||
"name": "@jsr/scope__foo", | ||
"version": "0.0.1", | ||
"homepage": "http://jsr.test/@scope/foo", | ||
"type": "module", | ||
"dependencies": {}, | ||
"exports": { | ||
".": { | ||
"default": "./mod.js" | ||
} | ||
}, | ||
"_jsr_revision": 0 | ||
} | ||
|
||
== /sub/lib.d.ts == | ||
declare const _default: number; | ||
export default _default; | ||
|
||
== /sub/lib.js == | ||
export default 1; | ||
|
Oops, something went wrong.