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 chmod error setting mode of DTS file that may not yet be written #1002

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

sentience
Copy link

Fixes #1001.

This removes rollup-plugin-hashbang from the configuration of Rollup that is used to generate DTS files. In theory, this plug-in is not needed for this build. rollup-plugin-hashbang remains in the configuration used when invoking Rollup to perform treeshaking.

The root cause of the issue may be inside rollup-plugin-hashbang, and a better fix might be possible there.

I have added a test to cover the issue being fixed, but it's possible this has broken something not covered by the existing tests.

@codesandbox
Copy link

codesandbox bot commented Sep 18, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@vercel
Copy link

vercel bot commented Sep 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 18, 2023 6:23am

@sentience
Copy link
Author

Note: this removes the shebang from .d.ts and .d.mts files generated by tsup --dts.

dist/scripts/extract.d.ts before:

#!/usr/bin/env node

dist/scripts/extract.d.ts after:

export { }

I believe this is correct. A shebang line in a .d.ts file doesn't seem to make any sense to me.

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

Successfully merging this pull request may close these issues.

Race condition causing errors chmod'ing DTS files with shebangs
1 participant