Skip to content
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

🚢 3.0.0 planning issue #2232

Closed
1 of 8 tasks
LinusU opened this issue Apr 19, 2023 · 22 comments
Closed
1 of 8 tasks

🚢 3.0.0 planning issue #2232

LinusU opened this issue Apr 19, 2023 · 22 comments

Comments

@LinusU
Copy link
Collaborator

LinusU commented Apr 19, 2023

Things to consider for the 3.0.0 major version:

Please note that this issue is for discussing breaking changes and not a place for general feature requests!

@chearon
Copy link
Collaborator

chearon commented Apr 19, 2023

Added Pango 2, which will solve a ton of font issues.

Should N-API be considered a breaking change? I plan on testing a lot, but it will introduce at least a few regressions.

@LinusU
Copy link
Collaborator Author

LinusU commented Apr 19, 2023

Added Pango 2, which will solve a ton of font issues.

Nice! 🙌

Should N-API be considered a breaking change? I plan on testing a lot, but it will introduce at least a few regressions.

Might be a good idea 👍

@zbjornson zbjornson pinned this issue Apr 19, 2023
@piranna
Copy link
Contributor

piranna commented May 23, 2023

If we replace Canvas for OffscreenCanvas, can we get merged my PRs, specially #1540 with the ScreenBackend class so we can have proper support for on-screen Canvas?

@jimmywarting
Copy link
Contributor

can we instead remove the hole Image and http stuff with a createImageBitmap(blob)?

@jimmywarting
Copy link
Contributor

why should OffscreenCanvas extend EventTarget?

@aoor9
Copy link

aoor9 commented Nov 24, 2023

Is v3.0.0 released? Because it doesn't seem to be available on npm registry.

@LinusU
Copy link
Collaborator Author

LinusU commented Nov 27, 2023

@zbjornson I saw that you pushed a v3.0.0 commit & tag to the repo, but we haven't published it to npm yet. The package.json still says that Node.js 10 is minimum version, and no other of the breaking changes are in yet.

Maybe we can add a few more breaking changes now before we re-tag and publish 3.0.0 to Npm? Or we consider 3.0.0 shipped and the breaking changes discussed above will go in 4.x...

I'll open some PRs which we could consider.

pinging @chearon also, do you have any input?

@LinusU
Copy link
Collaborator Author

LinusU commented Nov 27, 2023

why should OffscreenCanvas extend EventTarget?

According to MDN, OffscreenCanvas in the browser extends EventTarget? https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas

@alumni
Copy link

alumni commented Nov 27, 2023

Seems that the Mac build and the Windows tests are failing after the N-API refactor, maybe those would need to be fixed first in order to publish the package? :)

@chearon
Copy link
Collaborator

chearon commented Nov 27, 2023

It's not published to NPM because the Windows prebuilds aren't working (and neither @zbjornson or I have looked - that's always a huge time sink). package.json node got changed in #2235, so that technically is a breaking change.

@zbjornson
Copy link
Collaborator

Specifically, the NAPI port means that prebuilds need to be reworked (#2235 (comment)) and I haven't had time to do that.

In the meantime, I tried to make Node.js v21 prebuilds for the latest 2.x version, but those failed on Windows as Caleb said. #2295 (comment)

As far as more changes, I favor deferring other changes to 4.x+ since the NAPI port unblocks using node-canvas in Bun and that work is done.

@LinusU
Copy link
Collaborator Author

LinusU commented Nov 28, 2023

As far as more changes, I favor deferring other changes to 4.x+ since the NAPI port unblocks using node-canvas in Bun and that work is done.

I'm all for releasing early! So I don't think we should block on anything else, but e.g. just bumping our minimum supported Node.js version (#2310) I think would be really nice to get in just so that we don't have to support old versions of Node.js that probably aren't used much, since they are end of life.

Are you two open on merging breaking changes until the prebuilds are fixed and we are ready to publish to npm? How do you feel about raising supported version as I did in #2310?

@zbjornson
Copy link
Collaborator

Are you two open on merging breaking changes until the prebuilds are fixed and we are ready to publish to npm?

Good with me as long as they don't make the current prebuild troubles worse :)

How do you feel about raising supported version as I did in #2310?

👍

@LinusU
Copy link
Collaborator Author

LinusU commented Nov 29, 2023

I've fixed the tests and increased the minimum version of Node.js.

Since the Node.js version is increased now, I don't think that #2309 is a breaking change anymore so no need to rush that.

Pango 2 doesn't seem to be released yet, so that change will not make it I guess.

I would have loved to land Canvas -> OffscreenCanvas, and the new Image & ImageData. But since that will probably affect the native code a bit it might make it harder to work on the prebuilds? And it might also take some time...

If I have time, I could implement those in a branch and then we could hold off on merging until prebuilds are done and we see that they work together...


We also need to update the v3.0.0 tag, which solution do you think would work best?

1️⃣ I move the v3.0.0 commit using git rebase and then force push to master
2️⃣ We create a new empty commit that will be the tagged v3.0.0 commit
3️⃣ We point the v3.0.0 tag to whatever commit is the latest when we want to release v3.0.0 (probably ad793da)

If we don't think it will cause too many issues, I kind of prefer 1️⃣, just so that every release to npm matches up with a commit that bumps the version. This is probably something that should be enforced using Npm package provenance in the future...

@YuMuuu
Copy link

YuMuuu commented Jan 3, 2024

The v3.0.0 release needs to merge #2309. When will you plan to merge it?

@quinton-ashley
Copy link

Is v3 done yet?

@chearon
Copy link
Collaborator

chearon commented Sep 18, 2024

I was so happy to find out today that @zbjornson finished prebuilds (#2235) (it was a while ago, but I'm only recently carving out new free time...). I think that was the only blocker for 3.0.0? I don't think we're going to get any feedback on the alpha releases.

Pango 2 doesn't seem to be released yet, so that change will not make it I guess.

I haven't seen any updates to the pango2 branch in 2 years, so I've been slowly working on a new HarfBuzz-based font stack. It's a lot more work but at least we'll have the ability to fix more bugs people encounter (and it'll be very, very fast).

We also need to update the v3.0.0 tag, which solution do you think would work best?

Yeah, that messed up the changelog too. I like 1️⃣ as well, I just hope it doesn't cause too much trouble.

This is probably something that should be enforced using Npm package provenance in the future...

--provenance looks like a great idea.

@zbjornson
Copy link
Collaborator

zbjornson commented Sep 23, 2024

@chearon #2390 is the only regression I've seen in v3.0.0-pre. Looks like there's a PR for it.

@chearon
Copy link
Collaborator

chearon commented Sep 23, 2024

Oh yeah thanks, I forgot about that. I'll review/merge next time I get time.

@piranna
Copy link
Contributor

piranna commented Sep 24, 2024

I have been waiting since several years to get my PRs for screen drawing merged, at least the one adding the ScreenBackend abstract class... That would fix and clean-up the rendering backend APIs and allow to add new ones later easily.

@astralstriker
Copy link

I have a node project which uses canvas. I was looking to migrate it to deno. I believe 3.0.0-rc2 has a fix for missing node_module_register symbol error. When is the release planned for 3.0.0?

Here is the link to the issue I opened in the deno repo.

@chearon chearon unpinned this issue Dec 23, 2024
@chearon
Copy link
Collaborator

chearon commented Dec 23, 2024

3.0 is released!

@chearon chearon closed this as completed Dec 23, 2024
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

No branches or pull requests

10 participants