Drop JSPM workarounds fixed by jspm/jspm#2745 - #157
Draft
DmitrySharabin wants to merge 1 commit into
Draft
DmitrySharabin wants to merge 1 commit into
DmitrySharabin wants to merge 1 commit into
Conversation
Removes the .d.ts ignore filter (#122) and the condition-shadowing logic in stripConditions (#126), both now handled by the generator itself. types/typings stripping stays: #2745 enumerates targets reachable only under unknown conditions, but the resolver still refuses them. Requires @jspm/generator >= 2.16.4, which is not yet released. Ref #156. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016oHRkng85emGDgo9x9Mxpm
DmitrySharabin
force-pushed
the
drop-jspm-workarounds
branch
from
September 8, 2026 11:45
6a0ad03 to
da1fcdf
Compare
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.
Drops the workarounds fixed upstream by jspm/jspm#2745. Closes #156.
Warning
Do not merge yet. #2745 is merged but unreleased — latest
@jspm/generatoris 2.16.3 (2026-06-29); the fix landed 2026-08-17. Merge only together with a bump to 2.16.4+. On 2.16.3 this removal breaks colorjs.io, zod and idb.Removed
.d.tsignore filter (#122) — declarations now trace as dependency-free upstream.Condition-shadowing logic in
stripConditions(#126) — the generator now resolves strictly before speculating:Before: enumerated
deno/filenames, resolved viadefault→Module not found. Now:./src/.Still standing
types/typingsstripping. #2745 still enumerates targets reachable only under unknown conditions — its own test asserts this — whileresolvePackageTargetstays strict and refuses them.Real packages with the shape: ts-pattern@5.9.0 and es-toolkit@1.52.0 — a
./typessubpath with no runtime target:→
No './types' exports subpath defined.install()catches it and retries withsubpaths: false, so we degrade rather than throw — on both packages the resulting map still came out complete, so the observable cost today is a wasted retry plus a spurious "Failed to trace subpaths" warning. Stripping keeps us off that fallback path entirely.Reported upstream as jspm/jspm#2751 — fixing that retires
stripConditionsfor good.Verification
Built jspm
mainat078ff06from source; it passes the generator's ownpackage.test.js. Against 17 packages plus fixtures: the.d.tsfilter produces identical maps on/off, the shadowing logic is unnecessary, and thetypesstripping is what keepssubpaths: trueworking..mapwas dropped from the filter's regex deliberately — declaration maps trace asformat=esm, deps=[](JSON, no imports the lexer can see, including insidesourcesContent), and the only export shape that enumerates them condenses to a trailing-slash prefix.Not verified: the demo import-map diff, which needs a
@jspm/generatorversion that doesn't exist yet. Worth running before merge.src/map.jssrc/util/jspm-overrides.jstest/util/jspm-overrides.js🤖 Generated with Claude Code
https://claude.ai/code/session_016oHRkng85emGDgo9x9Mxpm