chore: package maintenance - #3
Merged
Merged
Conversation
Comment on lines
23
to
26
| "types": "./dist/index.d.ts", | ||
| "default": "./dist/index.js" | ||
| }, | ||
| "./*": { | ||
| "types": "./dist/*.d.ts", | ||
| "default": "./dist/*.js" | ||
| }, | ||
| "./package.json": "./package.json" |
There was a problem hiding this comment.
Potentially breaking removal of wildcard subpath exports
Dropping the ./* export map entry and typesVersions wildcard prevents consumers from importing any sub-path other than the package root (e.g. import x from '@antelopejs/interface-mongodb/some-module' will now throw ERR_PACKAGE_PATH_NOT_EXPORTED). If any downstream code relies on these paths, this is a breaking change. The PR is labelled chore and the version remains 0.0.2, so there is no semver signal to consumers that a breaking change was shipped. If sub-path imports were never intended to be part of the public API, a note in the changelog or a minor version bump would communicate the intent clearly.
Prompt To Fix With AI
This is a comment left during a code review.
Path: package.json
Line: 23-26
Comment:
**Potentially breaking removal of wildcard subpath exports**
Dropping the `./*` export map entry and `typesVersions` wildcard prevents consumers from importing any sub-path other than the package root (e.g. `import x from '@antelopejs/interface-mongodb/some-module'` will now throw `ERR_PACKAGE_PATH_NOT_EXPORTED`). If any downstream code relies on these paths, this is a breaking change. The PR is labelled `chore` and the version remains `0.0.2`, so there is no semver signal to consumers that a breaking change was shipped. If sub-path imports were never intended to be part of the public API, a note in the changelog or a minor version bump would communicate the intent clearly.
How can I resolve this? If you propose a fix, please make it concise.
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
antelopeJsfield to package.json (empty object for consistency across interface-* repos)./*andtypesVersionswildcard) to hide internal dist paths from consumersTest plan
pnpm run buildpnpm run lintGreptile Summary
This PR tightens the package's public API surface by removing the
./*wildcard subpath export and thetypesVersionswildcard, and adds an emptyantelopeJsfield for consistency with otherinterface-*packages. The changes are intentional and low-risk for a package whose consumers only use the root import, but removing the wildcard export is technically a breaking change if any consumer imported internal sub-paths.Confidence Score: 5/5
Safe to merge; only concern is a potential (non-confirmed) semver impact from removing wildcard exports.
All findings are P2. The only concern is speculative: whether any consumer actually uses sub-path imports. If the team is confident no consumers rely on
./*paths, the change is clean and safe.No files require special attention beyond the noted semver consideration in package.json.
Important Files Changed
typesVersions, adds emptyantelopeJsfield — potentially a breaking change for any consumer importing sub-paths, with no version bump.Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[Consumer imports package] --> B{Import path?} B -->|"@antelopejs/interface-mongodb"| C["✅ Resolves via '.' export\n(unchanged)"] B -->|"@antelopejs/interface-mongodb/package.json"| D["✅ Resolves via './package.json' export\n(unchanged)"] B -->|"@antelopejs/interface-mongodb/any-other-path"| E["❌ ERR_PACKAGE_PATH_NOT_EXPORTED\n(wildcard './*' removed by this PR)"]Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "chore: remove wildcard exports and add a..." | Re-trigger Greptile