Repository navigation
chore(deps): test against pixi.js 8.22.0 instead of the pinned 8.6.2 - #289
Merged
Merged
Conversation
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]>
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.
Why
package.jsondeclares"pixi.js": "^8.6.2"in bothdevDependenciesandpeerDependencies, butpackage-lock.jsonpinned 8.6.2. CI therefore developed and tested sixteen minors behind the 8.22.0 that^8.6.2resolves to for anyone installing@pixi/uitoday.npm update pixi.jsmoves the lockfile only — the declared range is untouched. The lockfile diff is scoped to pixi and its transitive deps:pixi.jsearcut@types/earcut@webgpu/typesparse-svg-pathgifuct-js,js-binary-schema-parser,tiny-lru@types/css-font-loading-moduleBreakage 1 —
Container.parentis now nullablepixi tightened
Container.parentto nullable, surfacing fourTS18047errors 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 withTypeError: 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, andstartUpdateno longer marks itself as dragging when it cannot resolve a coordinate space.Three regression tests cover the new behaviour; each one fails with the
TypeErrorabove 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 fromlib/utils/utils.js. jest does not transformnode_modules, so it hitexport defaultand threw:jest.config.jsnow un-ignores earcut for transformation and routes.jsthroughbabel-jest. The presets are passed inline rather than read from.babelrc, because babel does not apply the project's.babelrcto files undernode_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-pathandtiny-lruare"type": "module"but pointmainat.cjsfiles, which load fine.Drive-by:
no-consoleforscripts/**npm run lint(xs lint --max-warnings 0) has been failing onmainsincescripts/build-umd.mjslanded in #286 — itsconsole.logtripsno-console, and the threshold is zero warnings. Unrelated to this update, but it blocks CI, so.eslintrc.jsonnow turns the rule off forscripts/**, where console output is the point.Side effect worth noting
pixi v8.21.0 dropped the
@webgpu/typestriple-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'slib.dom.d.ts, which is 181 unavoidable diagnostics in thetypes:distcheck on 8.6.2 and zero on 8.21+.types:distlives on #258, which has not merged yet, so that check does not exist onmainand could not be run here — the benefit lands when #258 does.Verification
Full CI sequence from
.github/workflows/testing.yml, all green:npm run lintnpm run typesnpm run testnpm run docsnpm run buildnpm ciwas also validated against the new lockfile in a clean directory.🤖 Generated with Claude Code