-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to PIXI v6 with individual package imports #152
Update to PIXI v6 with individual package imports #152
Conversation
Dropping support for v4 was expected - honestly I was expecting to drop support for v5, but if it still works for that then great! What is here looks good, I think the only further thing to do is to update the manual tests in the |
So I played around with the tests a bit which was quite interesting. Here's a summary of what I did with them in addition to removing the old v4 tests: pixi-v5-iifeThe v5 pixi-v5-moduleFor the v5 This is a bit "hacky" but I suppose it's still worthwhile to keep v5 as some sort of backwards compatibility. pixi-v6-moduleI got the v6 pixi-v6-iifeThe v6 Since v6 no longer really supports the ambient declarations they could probably be completely removed from the package if v5 support is dropped. |
@andrewstart what do you think about dropping the v5 support? The types don't really work so it's a bit of a hack to use it with TypeScript. Or should there be a mention in the readme that modules and types only work for v6, and v5 and v6 bundle don't have type support? It might be cleaner if the package only supported v6 and the ambient types were dropped completely. |
Dropping v5 support and ambient types would be fine. It would be nice to get the pixi-v6-module test working with the individual modules, just to make sure that we always work with the bare minimum of packages. The package management should be a bit easier with only one version to keep track of. |
The v6 module test now works with the individual packages. I tested it so that you can delete Also the v6 tests and ambient types are gone. |
Seems I was a bit enthusiastic about removing |
test/pixi-v6-module/package.json
Outdated
"electron": "^9.4.0", | ||
"override-require": "^1.1.1", | ||
"pixi-particles": "*", | ||
"resource-loader": "3" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this one is missing its typescript dependency (to get access to the tsc
command)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa no idea where/when that disappeared. It worked for me but it might be because I have a global typescript package installed. In any case I added it to that test. I also updated all the other typescript dependencies to the latest version and tested that everything still works.
Any idea by when this will be done? |
Soon-ish. I'm working on another breaking change and want to fold them into one update. |
Conversion work for #151
Here's a list of what I did to make the package work with PIXI v6 using the individual modules:
dts-bundle-generator
dependency because PIXI's type onlyimport type
imports did not work with the old one.pixi.js
as a dev dependency since it's needed for the examples to work.esModuleInterop
tsc flag for@pixi/utils EventEmitter
to work.buildAmbientTypes.js
script to work with multiple imports and verified that the new output is similar to the old one.as any
cast workarounds in theLinkedListContainer
thanks to improved PIXI types.package.json
the test script is a simpleecho done
? Maybe they're not implemented yet?As for some breaking changes I dropped support for v4 for the shared
Ticker
andTexture.fromImage
usage. Since v4 doesn't have the individual packages I'm not sure if it's possible to keep supporting v4 and v6 at the same time?I didn't yet do anything with the
LinkedListContainer
renderWebGL
,renderAdvancedWebGL
andrenderCanvas
functions. I think they're only for v4 so they could probably be removed if the v4 support is dropped?I also didn't touch
README.md
since I'm not sure what is going to happen with v4 support yet.Feedback would be welcome.