chore: bump @ts-bridge/cli to v0.6.4 and drop unused shims - #320
chore: bump @ts-bridge/cli to v0.6.4 and drop unused shims#320cryptodev-2s wants to merge 1 commit into
@ts-bridge/cli to v0.6.4 and drop unused shims#320Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
|
124f717 to
743cee8
Compare
743cee8 to
361c13c
Compare
361c13c to
83f363a
Compare
83f363a to
710ff2e
Compare
710ff2e to
529d2d5
Compare
529d2d5 to
49c1eec
Compare
@ts-bridge/cli ^0.1.2 -> ^0.6.4
@ts-bridge/shims ^0.1.1 -> removed
This builds the published artifacts, so the output was diffed rather than
just checked for a zero exit. 216 files before and after, none added or
removed, and only two of them changed:
versions.mjs switches from a default import of semver plus destructuring
to direct named imports. semver is CJS, so this now leans on
Node's cjs-module-lexer resolving the names.
logging.mjs gains an $importDefault helper that honours __esModule when
importing debug, which is more correct than the old plain
default import.
The semver change is the risky one, and the test suite cannot catch it
because tests run against src/ through ts-jest, never against dist/. Both
entry points were therefore imported directly from the built output on Node
18, 20, 22 and 24, in ESM and CJS. All pass, so the named imports resolve
everywhere we support.
@ts-bridge/shims was never referenced by src/ or by the build output, and
core does not carry it. Removing it produces a byte identical dist/.
49c1eec to
81ee668
Compare
Top of stack #315, on #319.
@ts-bridge/cli^0.1.2^0.6.4@ts-bridge/shims^0.1.1Output diff
This builds the published artifacts, so
dist/was diffed rather than just checked for a zero exit. 216 files before and after, none added or removed, and only two changed:versions.mjsswitches from a default import plus destructuring to direct named imports:semveris CJS, so this now leans on Node'scjs-module-lexerresolving those names.logging.mjsgains an$importDefaulthelper honouring__esModulewhen importingdebug, which is more correct than the old plain default import.Why that needed checking by hand
The semver change cannot be caught by the test suite: tests run against
src/through ts-jest and never touchdist/. If the lexer failed to resolve a name, it would surface as a runtimeSyntaxErrorfor consumers, not a test failure.So both entry points were imported directly from the built output, in ESM and CJS, on every Node version we support:
Dropping shims
@ts-bridge/shimswas never referenced bysrc/or by the build output, and core does not carry it. Removing it produces a byte identicaldist/.Note
Medium Risk
Upgrading the ts-bridge build pipeline can change published dist output and CJS/ESM interop for consumers without failing existing src-based tests.
Overview
Upgrades the
@ts-bridge/clidev dependency from^0.1.2to^0.6.4and removes the unused@ts-bridge/shimspackage. Theyarn.lockupdate follows the new CLI dependency graph (e.g.@ts-bridge/resolver,cjs-module-lexer) and drops transitive packages such asresolve.exportsthat the older CLI pulled in.This is a build-tooling change:
yarn buildstill runsts-bridge --project tsconfig.build.json --clean, but the newer CLI can emit different interop code indist/when artifacts are rebuilt—worth a quick smoke test of published entry points after merge, since tests againstsrc/may not catchdist/import/runtime issues.Reviewed by Cursor Bugbot for commit 81ee668. Bugbot is set up for automated code reviews on this repo. Configure here.