Skip to content

chore(deps): test against pixi.js 8.22.0 instead of the pinned 8.6.2 - #289

Merged
CyberDex merged 1 commit into
mainfrom
claude/peaceful-noether-0f0bb7
Oct 2, 2026
Merged

CyberDex merged 1 commit into
mainfrom
claude/peaceful-noether-0f0bb7

Conversation

@CyberDex

@CyberDex CyberDex commented Oct 2, 2026

Copy link
Copy Markdown
Member

Why

package.json declares "pixi.js": "^8.6.2" in both devDependencies and peerDependencies, but package-lock.json pinned 8.6.2. CI therefore developed and tested sixteen minors behind the 8.22.0 that ^8.6.2 resolves to for anyone installing @pixi/ui today.

npm update pixi.js moves the lockfile only — the declared range is untouched. The lockfile diff is scoped to pixi and its transitive deps:

package before after
pixi.js 8.6.2 8.22.0
earcut 2.2.4 3.2.4
@types/earcut 2.1.4 3.0.0
@webgpu/types 0.1.51 0.1.74
parse-svg-path 0.1.2 0.2.0
gifuct-js, js-binary-schema-parser, tiny-lru — added
@types/css-font-loading-module 0.0.12 removed

Breakage 1 — Container.parent is now nullable

pixi tightened Container.parent to nullable, surfacing four TS18047 errors in the slider drag paths (SliderBase.startUpdate, SliderBase.update, Slider.update, DoubleSlider.update).

These are real crashes, not typing nits. Confirmed by swapping in obj.parent! — the non-null assertion compiles, then fails at runtime with TypeError: Cannot read properties of null (reading 'worldTransform'). So the fix is a guard, not an assertion: the drag handlers bail out when the event target is off the stage, and startUpdate no longer marks itself as dragging when it cannot resolve a coordinate space.

Three regression tests cover the new behaviour; each one fails with the TypeError above if the guards are replaced by assertions.

Breakage 2 — all 41 jest suites failed to load

pixi 8.22 pulls earcut 3, which ships ESM only ("type": "module", "exports": "./src/earcut.js"), and pixi's CommonJS build requires it from lib/utils/utils.js. jest does not transform node_modules, so it hit export default and threw:

node_modules/earcut/src/earcut.js:35
export default function earcut(data, holeIndices, dim = 2) {
^^^^^^
SyntaxError: Unexpected token 'export'
    at node_modules/pixi.js/lib/utils/utils.js:3:20
    at node_modules/pixi.js/lib/index.js:10:1

jest.config.js now un-ignores earcut for transformation and routes .js through babel-jest. The presets are passed inline rather than read from .babelrc, because babel does not apply the project's .babelrc to files under node_modules — without that, earcut would be "transformed" with no module transform and still arrive as ESM.

earcut is the only ESM-only dependency in the tree: parse-svg-path and tiny-lru are "type": "module" but point main at .cjs files, which load fine.

Drive-by: no-console for scripts/**

npm run lint (xs lint --max-warnings 0) has been failing on main since scripts/build-umd.mjs landed in #286 — its console.log trips no-console, and the threshold is zero warnings. Unrelated to this update, but it blocks CI, so .eslintrc.json now turns the rule off for scripts/**, where console output is the point.

Side effect worth noting

pixi v8.21.0 dropped the @webgpu/types triple-slash reference from its non-legacy declarations: 21 declaration files carried /// <reference types="@webgpu/types" /> on 8.6.2, versus 3 on 8.22.0 — and all three are now .legacy.d.ts. That reference collides with the WebGPU types built into TypeScript 7's lib.dom.d.ts, which is 181 unavoidable diagnostics in the types:dist check on 8.6.2 and zero on 8.21+.

types:dist lives on #258, which has not merged yet, so that check does not exist on main and could not be run here — the benefit lands when #258 does.

Verification

Full CI sequence from .github/workflows/testing.yml, all green:

step result
npm run lint pass
npm run types pass
npm run test pass — 41/41 suites, 939 tests
npm run docs pass
npm run build pass

npm ci was also validated against the new lockfile in a clean directory.

🤖 Generated with Claude Code

package.json declares `pixi.js: ^8.6.2` in both devDependencies and
peerDependencies, but package-lock.json pinned 8.6.2, so CI developed and
tested sixteen minors behind the 8.22.0 that `^8.6.2` resolves to for anyone
installing @pixi/ui today. `npm update pixi.js` moves the lockfile only; the
declared range is untouched.

Two things broke on 8.22.0:

- pixi tightened `Container.parent` to nullable, surfacing four TS18047
  errors in the slider drag paths. Each is a real crash rather than a
  typing nit: a pointer event whose target has been detached from the
  stage threw "Cannot read properties of null (reading 'worldTransform')".
  The drag handlers now bail out instead, and `startUpdate` no longer
  marks itself as dragging when it cannot resolve a coordinate space.

- Every jest suite failed to load. pixi 8.22 pulls earcut 3, which ships
  ESM only ("type": "module", exports: "./src/earcut.js"), and pixi's
  CommonJS build requires it from lib/utils/utils.js. jest does not
  transform node_modules, so it hit `export default` and threw a
  SyntaxError. earcut is now un-ignored for transformation and .js files
  go through babel-jest, with the presets passed inline because babel does
  not apply the project .babelrc to files under node_modules.

Also turns off `no-console` for scripts/**, which has failed
`xs lint --max-warnings 0` since scripts/build-umd.mjs landed in #286.

Co-Authored-By: Claude Opus 5 <[email protected]>
@CyberDex
CyberDex merged commit ea0b666 into main Oct 2, 2026
3 checks passed
@CyberDex
CyberDex deleted the claude/peaceful-noether-0f0bb7 branch October 2, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant