chore(build): upgrade repo tooling to latest versions - #2928
Conversation
Install native TypeScript 7 as `tsc` while keeping the TypeScript 6 API available for tooling via `@typescript/typescript6`. Update tsconfigs for TS 6/7 `rootDir` requirements and drop deprecated `es5` targets. Co-authored-by: Cursor <cursoragent@cursor.com>
✅ Pixel Bundle Size — @imtbl/pixel
Budget: 10.00 KB gzipped (warn at 8.00 KB) |
✅ Audience Bundle Size — @imtbl/audience
Budget: 24.00 KB gzipped (warn at 20.00 KB) |
|
View your CI Pipeline Execution ↗ for commit 32ccfea
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
Introduce oxlint + oxlint-tsgolint@7 with a hybrid adoption config (new type-aware findings as warnings). Wire into root lint, lint-staged, and PR CI. Fix a few correctness issues surfaced by the first oxlint pass. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop Airbnb/ESLint package configs and make Oxlint the sole lint gate. Use eslint/id-match as a lightweight stand-in for @typescript-eslint/naming-convention. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Replace tsup with tsdown (shared tsdown.base.ts), drop unused ts-node, switch husky/lint-staged to lefthook, and bump nx 23, syncpack 15, and @actions/core 3. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning According to your organization's Security Policy, you must resolve all "Block" alerts before proceeding. It is recommended to resolve "Warn" alerts too. Learn more about Socket for GitHub. Please tag @prodsec or slack us at #ask-security if you need assitance.
|
Replace Node/rollup/eslint mini-packages under .github/actions with composite actions. Drop unused @actions/core and lint-ci.sh. Co-authored-by: Cursor <cursoragent@cursor.com>
Move shared versions into named catalogs (toolchain/react/testing/web3), migrate Yarn resolutions into workspace overrides (elliptic pin), and codify peerDependencyRules plus dedupePeers. Drop syncpack in favor of catalogMode: strict; keep audience prepack instead of global injection. Co-authored-by: Cursor <cursoragent@cursor.com>
Resolve pr.yaml conflicts: keep Oxlint step (drop syncpack) and tsdown allowlist paths for functional-test gating. Co-authored-by: Cursor <cursoragent@cursor.com>
Unpin ethers version strings in checkout-sdk tests, restore buffer for game-bridge Parcel, move passport sample app/ under src and use --webpack for Next 16, add @emotion/react + CSS module types for checkout sample-app, and switch hardhat config to CJS for Node 24. Co-authored-by: Cursor <cursoragent@cursor.com>
Replace incomplete window.window mocks in connect/provider tests with ethereum stubs so in-flight axios/ethers work keeps a real URL, fixing flaky CI failures in connect.test.ts. Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
tsc(@typescript/native), TypeScript 6 API viatypescript→@typescript/typescript6tsdown.base.tsbrowser/node presetoxlint+oxlint-tsgolint@7, type-aware enabled); wirepnpm lint/ lint-staged / PR CI to Oxlint onlyPublished package surfaces (
exports/main/module/browser/types/ dependency keys) are unchanged for the SDK packages.No public API shape changes. Consumer-facing entrypoints and package.json contract fields match
main.Small logic tweaks (not interface redesigns):
@imtbl/checkout-widgets—BridgeReviewSummaryIf
from.browserProvider.provideris missing, it now opens the switch-network drawer and returns instead of calling.send('eth_chainId')and throwing. Type-driven hardening with a real runtime behavior change on that edge case.@imtbl/bridge-sdk—withBridgeErrorFixes dead
|| 'UnknownError'after a template string. Empty/undefinederror messages become"Type: UnknownError"instead of"Type: undefined".SegmentAnalyticsProviderType-only: dropped a generic type arg and cast
AnalyticsProviderfor TS portability. No runtime change.Everything else in
src/is comments, tests, sample-app layout, or CI action cleanup.Indirect runtime note: browser bundles no longer inject the Node
Bufferpolyfill. That’s build output, not an exported API. Fine if code only guardstypeof Buffer(as metrics does); would matter only if something relied on that polyfill being present as a side effect of loading the bundle.Design decisions
Why tsup → tsdown
tsdown.base.tspreset replaces per-package tsup boilerplate so browser/node outputs, minify, and polyfill behavior stay consistent.Buffer/processpolyfills viaesbuild-plugins-node-modules-polyfill(see bundle sizes below). Metrics only guards those globals (typeof Buffer,process.env…); the old plugin still shipped ~31 KB of polyfill into anything that inlined metrics.Why dual TypeScript 6/7
@typescript/native) is what we run fortsc/ typecheck speed.typescriptpackage name (@typescript/typescript6) so tools that still expect the TS 6 API (and peer ranges) keep working during the ecosystem transition.Why Oxlint (and not ESLint)
oxlint-tsgolint, one monorepo command (pnpm lint) instead of per-package ESLint configs.eslint/id-matchinstead of@typescript-eslint/naming-convention. Legacyeslint-disablecomments are inert and can be cleaned up later.Why pnpm 11 catalogs / overrides / peer rules
pnpm-workspace.yaml(.npmrcis auth/registry only).toolchain/react/testing/web3) +catalogMode: strictreplace syncpack for shared version policy and stop ad-hoc versions creeping back viapnpm add.package.json#resolutionsis ignored by pnpm 11 — moved to workspaceoverrides(e.g. elliptic single-version).peerDependencyRules+dedupePeerscodify known React 19 / TS 6–7 peer noise instead of ignoring install dumps.injectWorkspacePackages: audience still usesprepackto strip bundled workspace deps from published metadata; selectivedependenciesMeta.*.injectedcan be evaluated later if packing needs it.@imtbl/*to workspacesrcso tests don’t depend onpublicHoistPattern: ['@imtbl/*'](hoist kept for rollup/tsc transitive resolution for now).Why lefthook
prepareinstalls hooks with--reset-hooks-pathso local hook wiring stays predictable across pnpm 11.Bundle size impact (
main→ this branch)Measured from clean
nx run-many -t buildonorigin/main(a9d70c9) vs this branch (32ccfeae). Sizes are gzip viagzip -c(same as CI budget workflows).Why sizes moved
Buffer/processpolyfills from the browser preset (tsup esbuild plugin → tsdownrollup-plugin-polyfill-node).CDN / script-tag bundles (CI budgets)
@imtbl/audience@imtbl/pixel@imtbl/sdkBrowser ESM package entries
@imtbl/metrics@imtbl/audience@imtbl/auth@imtbl/orderbook@imtbl/checkout-sdk@imtbl/dex-sdk@imtbl/wallet@imtbl/passport@imtbl/audience-core@imtbl/bridge-sdk@imtbl/blockchain-data@imtbl/generated-clients@imtbl/cryptofiat@imtbl/config@imtbl/toolkit@imtbl/sdk(entry)Deferred / skip
pnpm patch— no local monkey-patches; seaport remains intentional git deps via@imtbl/contractspublicHoistPatternfurther (still needed for rollup/tsc transitive workspace resolution)networkConcurrencyuntil seaport yarn-prepare races are gonedependenciesMeta.*.injected— evaluate later if packing needs it