fix: packaging exports resolution + lint, Node 22, security#2
Merged
Conversation
The package.json main/exports point to ./dist/index.cjs and
./dist/index.d.cts, but without "type": "module" tsup emitted
index.js (CJS) / index.mjs (ESM), so require() of the published
package failed to resolve. Adding "type": "module" makes tsup emit
index.js (ESM), index.cjs (CJS), index.d.ts, index.d.cts to match the
existing exports map.
Also fixes 15 no-redundant-type-constituents lint errors: bare string
constituents in BackupStatus, RestoreStatus and SpanningServiceName
collapsed the unions to string. Changed to (string & {}) to preserve
literal autocomplete, with a scoped ban-types eslint-disable for the
idiom.
- Bump @types/node to ^22 and tsup target to node22 (aligns with engines.node >=22 and CI matrix already on Node 22) - Add CODE_OF_CONDUCT.md (Contributor Covenant) - npm audit fix produced no changes; remaining 8 advisories (7 moderate, 1 high) all require --force breaking upgrades
c05e688 to
54f29d0
Compare
github-actions Bot
pushed a commit
that referenced
this pull request
May 20, 2026
## [1.0.2](v1.0.1...v1.0.2) (2026-05-20) ### Bug Fixes * packaging exports resolution + lint, Node 22, security ([#2](#2)) ([42580e8](42580e8))
|
🎉 This PR is included in version 1.0.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes a critical packaging defect plus housekeeping for the node-spanning SDK.
Critical:
.cjs/.d.ctsexports now resolvepackage.jsondeclaresindex.cjsandindex.d.ctsin itsexportsmap, but without"type": "module"the tooling never emitted those extensions correctly — CommonJS and TypeScript consumers got broken/missing resolution. Adding"type": "module"makes tsup emit the package.json-declared file extensions so all four export targets (index.js,index.cjs,index.d.ts,index.d.cts) build and resolve correctly.Other changes
... | string) replaced with the(string & {})idiom so literal autocomplete is preserved; intentional polling loop annotated with a scoped eslint-disable.@types/node^22, tsuptarget: node22).npm audit fixapplied.CODE_OF_CONDUCT.md; updatedCHANGELOG.md.Verification
npm run build— green;dist/containsindex.js,index.cjs,index.d.ts,index.d.ctsnpm test— 43/43 passnpm run lint— 0 errors (11 pre-existing warnings)