Skip to content
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

fix: emit .d.ts and .js files into _dist folder and other fixes #463

Merged
merged 1 commit into from
Apr 30, 2024

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented Apr 29, 2024

Fixes #462

To make this work, also bans publishing packages containing a top level folder called _dist.

Also we now do not reference .d.ts files from other .d.ts files using the .d.ts extension, because otherwise tsc gets upset. So we instead use .js (even if the file does not exist!)

Also we emit source maps into separate files, because TSC doesn't understand embedded source maps.

Base automatically changed from fix_npm_tarball_generation_when_slow_types to main April 29, 2024 17:07
@lucacasonato lucacasonato changed the title fix: emit .d.ts and .js files into _dist folder fix: emit .d.ts and .js files into _dist folder and other fixes Apr 29, 2024
@lucacasonato lucacasonato dismissed marvinhagemeister’s stale review April 29, 2024 19:10

PR changed significantly

Copy link
Contributor

@dsherret dsherret left a comment

Choose a reason for hiding this comment

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

LGTM

- Emit .d.ts files and .js files into the `_dist` folder, so that TypeScript doesn't end up probing for the wrong file
- Do not reference `.d.ts` files from other `.d.ts` files using the `.d.ts` extension, because otherwise tsc gets upset. So we instead use `.js` (even if the file does not exist!)
- Emit source maps in separate files, because TSC doesn't understand embedded source maps
@lucacasonato lucacasonato added this pull request to the merge queue Apr 30, 2024
Merged via the queue into main with commit 69144b0 Apr 30, 2024
8 checks passed
@lucacasonato lucacasonato deleted the npm_tarball_dist_folder branch April 30, 2024 09:19
@donovanglover
Copy link

Looks like this change broke my package base16-tailwind since it depends on the schemes directory being relative to the src directory (path.join(__dirname, '../schemes')).

@marvinhagemeister
Copy link
Contributor

@donovanglover Can you file a new issue for that? It's much easier for us to track issues in issues, rather then comments on closed PRs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants