-
-
Notifications
You must be signed in to change notification settings - Fork 127
feat!: defaults fixedExtension to true when platform is node
#517
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
Conversation
✅ Deploy Preview for tsdown ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
commit: |
fixedExtension to true if platform is nodefixedExtension to true when platform is node
6b76efb to
bf400bd
Compare
|
This should depend on |
|
I see It broke my lib because in package.json I have |
|
I personally agree with Bjorn Lu's take on this — but if this is to be the default behavior in tsdown, maybe the I had a bunch of projects that worked perfectly with a vanilla Thanks for your work! |
Thank you for your understanding. |
|
Thanks! I didn't realize all the options are available as CLI flags, thought it was limited to https://tsdown.dev/reference/cli and what's documented in the |
|
Although configuration options are provided, it is still hoped that the default should follow the package.json type, or it should be the default --no-fixed-extension, generating code that is more in line with expectations in the case of minimal configuration or no configuration. |
|
v0.16 has been released for some time now, so we can no longer change the default behavior without affecting those who have already migrated. In the future, tsdown will be more cautious when introducing breaking changes. |
Following rolldown/tsdown#517, `fixedExtension` is now on by default for node applications, which means that everything that it's emitting `mjs` for any esm js files and `.d.mts` for esm type declarations.
…#565) <!-- 👋 Hi, thanks for sending a PR to package-json-validator! 💖 Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [ ] Addresses an existing open issue: fixes #000 - [ ] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/package-json-validator/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/package-json-validator/blob/main/.github/CONTRIBUTING.md) were taken ## Overview (This was failing in the renovate PR: https://github.com/JoshuaKGoldberg/package-json-validator/pulls) Following rolldown/tsdown#517, `fixedExtension` is now on by default when the platform is node, which means that it's emitting `mjs` for any esm js files and `.d.mts` for esm ts files. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
(This was failing in the renovate PR: #1373) Following rolldown/tsdown#517, fixedExtension is now on by default when the platform is node, which means that it's emitting mjs for any esm js files and .d.mts for esm ts files.
…#1386) <!-- 👋 Hi, thanks for sending a PR to eslint-plugin-package-json! 🗂 Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [ ] Addresses an existing open issue: fixes #000 - [ ] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/eslint-plugin-package-json/blob/main/.github/CONTRIBUTING.md) were taken ## Overview (This was failing in the renovate PR: #1373) Following rolldown/tsdown#517, `fixedExtension` is now on by default when the platform is node, which means that it's emitting `mjs` for any esm js files and `.d.mts` for esm ts files. --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Would it at least be possible to update the breaking-changes section to clarify the impact of this change? The current entry:
doesn’t explain why this is breaking. I overlooked it and ran into unexpected bugs even after checking the release notes. Adding something like
retroacively, would help users better understand the impact when skimming the changelog. |
|
The changelog has been updated in the release notes: https://github.com/rolldown/tsdown/releases/tag/v0.16.0 Thank you for your feedback! |
|
This should definitely depend on type in package.json by default. That's by convention this breaks pipelines unnecessarily |
|
I'd make it by default match the extension of the entry file. And maybe add a option |
|
You can use |
## PR Checklist - [x] Addresses an existing open issue: fixes #2287 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/create-typescript-app/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Bumps everything to latest using `ncu -u`, except: * `zod` and `zod-package-json`: because Bingo is still on v3 * `eslint-plugin-package-json`: pending the refresh of ESLint settings in #2275, only bumps a few minors The main changes are: * Removing unnecessary `files` entries in `package.json`, courtesy of `eslint-plugin-package-json` & `package-json-validator` updates: JoshuaKGoldberg/eslint-plugin-package-json#1232 & co. * Explicitly defaulting `fixedExtension` to `false`, courtesy of rolldown/tsdown#517 🎁
Description
Defaults
fixedExtensionto true whenplatformisnode.Linked Issues
Additional context