-
-
Notifications
You must be signed in to change notification settings - Fork 159
feat(resolve): full Node.js '#' subpath-imports (package.json "imports") support #7028
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
Merged
Merged
Changes from all commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
93c2b36
build: 7-day supply-chain soak + pinned security tooling
jdalton 8efeaff
docs: changelog fragment for #6912
jdalton 3b73baf
ci(zizmor): run the SRI-pinned binary instead of the marketplace action
jdalton 239e573
deps(sfw): bump firewall pins to 1.14.0 via dated soakBypass
jdalton c9dc5f5
deps(tools): bump zizmor 1.28.0, pnpm 11.15.1, npm 12.0.1 — newest so…
jdalton 71b13f6
docs: fragment says rack-pinned zizmor, not marketplace action
jdalton fc7e3f1
feat(soak): auto-prune expired bypass annotations — fixer + scheduled…
jdalton 6cc276e
ci(soak-autofix): bind the artipacked ignore to the checkout line
jdalton 4fe87ad
ci: pin actions/* to latest release-tag SHAs in the new security work…
jdalton 07ca0a9
fix(soak): expired annotations warn instead of failing — stale is not…
jdalton e3dda61
fix(soak): address review-bot findings across the port
jdalton d882d5a
fix(sfw): export SFW_UNKNOWN_HOST_ACTION=ignore in the shims
jdalton aa3e2f2
fix(soak): take review fixes surfaced on the aube twin
jdalton 3255e41
docs(soak): align prose with warn-not-fail; source-cite the unknown-h…
jdalton 3a8f00b
fix(soak): never prune a wrong-arithmetic annotation as "cleared"
jdalton 20a26b0
fix(soak): downloads fall back to unauthenticated and retry once on 5xx
jdalton c1eed51
fix(soak): stop the fixers reformatting files they do not own
jdalton 88169c6
fix(soak): stop the fixers reformatting files they do not own
jdalton ce95e57
feat(soak): gate npm's min-release-age-exclude entries too
jdalton b67907d
fix(soak): fail loudly when cargo silently ignores min-publish-age
jdalton c3d27e0
feat(soak): explain a window-blocked cargo re-resolution, refuse the …
jdalton 369dadf
fix(soak): take the adversarial-review findings
jdalton c1ff686
fix(soak): take the review findings — one is a regression I introduced
jdalton f8c6baf
fix(compile): survive binary/workspace skew and complete the surfaces…
jdalton e8e529d
docs: changelog fragment for #7021
jdalton 7bedfe2
feat(resolve): full Node.js '#' subpath-imports (package.json "import…
jdalton 107d8f7
docs: key the changelog fragment to PR #7028
jdalton 13c235f
fix: address stacked stdlib review
b9fef02
fix: address subpath imports review
bd379e1
Merge main into feat/subpath-imports
d68df30
Merge remote-tracking branch 'origin/main' into maint/pr-7028
cee7b45
Merge remote-tracking branch 'origin/main' into maint/pr-7028
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| **Full Node.js `#` subpath-imports support (package.json `"imports"`):** the resolver's `#`-specifier handling (from #5039, built for chalk's vendored deps) covered only the happy path; the new `resolve/subpath_imports.rs` implements the spec's PACKAGE_IMPORTS_RESOLVE: package scope discovery walking up to the nearest `package.json` with an `imports` object (stopping at `node_modules` boundaries), exact keys, `*` wildcard patterns with Node's best-match rule (longest prefix, `patternKeyCompare` tie-break), string / fallback-array / conditional-object targets (conditions matched in the same `perry`/`node`/`import`/`module`/`default`/`require` priority order as the `exports` resolver, `node` above `default`), bare-package targets re-entering node_modules resolution (`node:` builtins included), and spec-mandated rejections — the invalid specifiers `#`, `#/…`, and trailing `/`, plus targets or wildcard captures traversing `..`/`node_modules` or escaping the package directory, each with a descriptive error. Targets keep perry's TS-first extension probing, so `"#lib/*": "./src/lib/*"` resolves `#lib/foo` to `src/lib/foo.ts`. Runs before the tsconfig-`paths` fallback (spec resolution outranks aliasing) but falls through to it when no `imports` map governs the importer. `check --check-deps` now resolves `#` imports the same way instead of asking node_modules for a package literally named `#lib/…` — killing the false R003 "Package '#lib/x' not found in node_modules" errors real projects (e.g. sfw) hit. |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.