Repository navigation
Update typescript to version 6 - #32
Conversation
This is just an effort to stay up to date. There should be no actual implications on functionality. Declarations are now generated by `tsc` instead of `tsup`, which drops the redundant `dist/index.d.mts`. That is the only consumer-visible change, so this goes out as a patch release. Issue #28 Update to TS6
There was a problem hiding this comment.
Pull request overview
Updates the project toolchain to TypeScript 6 and adjusts the build process so declarations are generated via tsc (rather than tsup), aligning the published dist/ contents with the intended package outputs and documenting the release.
Changes:
- Bump
typescriptto^6.0.3and increment package version to1.0.2. - Switch type generation to
tsc(build:types) and stop generating DTS viatsup. - Update
tsconfig.jsonoutput layout (rootDir: "src") and record the release note inCHANGELOG.md.
Reviewed changes
Copilot reviewed 3 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| tsup.config.ts | Stops tsup from emitting declaration files. |
| tsconfig.json | Sets rootDir to ensure declarations emit to dist/ paths that match package.json’s types entry. |
| package.json | Updates version, TypeScript dependency, and build scripts to run tsc for types. |
| package-lock.json | Locks updated dependency graph consistent with TS6 and refreshed lint/tooling dependencies. |
| CHANGELOG.md | Adds a 1.0.2 entry noting the removal of the duplicated dist/index.d.mts artifact. |
Suppressed comments (1)
package.json:41
- The TS6/lint toolchain update pulls in dependencies that require newer Node than this package advertises. For example,
@typescript-eslint/eslint-pluginin the lockfile requires Node^18.18.0 || ^20.9.0 || >=21.1.0, and it also pullseslint-visitor-keys@5.0.1which declares Node^20.19.0 || ^22.13.0 || >=24. With"engines": { "node": ">=16" }, contributors/CI running Node 16 (or even some Node 18 installs) can end up unable to runnpm run lint/npm run buildreliably.
Consider either (a) bumping the documented Node engine requirement to match the new minimum needed by the dev toolchain, or (b) pinning/overriding the lint deps to versions that still support Node 16/18 (if TS6 support allows it).
"typescript": "^6.0.3"
},
"engines": {
"node": ">=16"
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
hminsky2002
left a comment
There was a problem hiding this comment.
Thank you for your service @slifty !
This PR updates to TS6.
It comes with a tiny bump because the new build doesn't include a
.d.mtsbut from testing it seems that doesn't matter (and the file was identical to the.d.mjs)Resolves #28