Conversation
There was a problem hiding this comment.
Pull request overview
This PR migrates the package build pipeline from tsup to tsdown, updating TypeScript resolution settings and internal imports accordingly, and adds CI coverage for the new build step.
Changes:
- Replace
tsupbuild configuration withtsdownconfiguration (including asset handling + post-build optimization hook). - Update TypeScript config and internal imports to support explicit
.tsextensions and bundler-style module resolution. - Add a GitHub Actions
buildjob to ensurenpm run buildsucceeds in CI.
Reviewed changes
Copilot reviewed 11 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsup.config.ts | Removed previous tsup-based build configuration (entries, clean build dir, copy + optimize onSuccess). |
| tsdown.config.ts | Added tsdown build configuration, including loader/copy settings, output naming rules, and onSuccess optimization. |
| tsconfig.json | Switched to moduleResolution: bundler and enabled allowImportingTsExtensions to support explicit .ts imports. |
| src/animal-quest.ts | Updated internal import to include .ts extension. |
| src/ambassadors/species.ts | Updated internal imports to include .ts extensions. |
| src/ambassadors/images.ts | Updated internal imports to include .ts extensions and reformatted import block. |
| src/ambassadors/filters.ts | Updated internal import to include .ts extension. |
| src/ambassadors/core.ts | Updated internal imports to include .ts extensions. |
| scripts/optimize.ts | Updated JSON import syntax to use import attributes (with { type: "json" }). |
| scripts/iucn.ts | Updated internal import to include .ts extension. |
| package.json | Bumped version, switched build script to tsdown, replaced tsup dependency with tsdown. |
| package-lock.json | Lockfile updates reflecting replacement of tsup with tsdown and transitive dependency changes. |
| .github/workflows/test.yml | Added a build job running npm run build with asset-cache + populate steps. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Version published 🚀npm install @alveusgg/data@0.72.0-pre.016cf6cb38201f555f1c5109ed2774b2fb496493pnpm add @alveusgg/data@0.72.0-pre.016cf6cb38201f555f1c5109ed2774b2fb496493 |
#9139) When another plugin resolves a specifier and marks it `external: true`, `CopyModulePlugin::resolve_id` was ignoring the flag and attempting to red the id, producing `Failed to read copy module <id>`. This surfaces with `rolldown-plugin-dts`, which returns ambient-module glob specifiers such as `typeof import("*.jpg")` as external. If `.jpg` is also configured as `moduleTypes: copy`, the copy plugin invokes `ctx.resolve`, which runs the dts resolver, gets back `{ id: "*.jpg", external: true }`, and then crashes trying to read `*.jpg` off disk. Real world example: alveusgg/data#265
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
bb63acd to
c45c704
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
016cf6c to
f26d724
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 13 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f26d724 to
1f7ba76
Compare
Unblocks #264 as tsup is no longer maintained and is not compatible with TS 6