-
Notifications
You must be signed in to change notification settings - Fork 2k
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 Calypso to Node 20 #83585
Update Calypso to Node 20 #83585
Conversation
0ba480f
to
02f4a5a
Compare
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
I manually triggered several builds using the node 20 base image:
|
The new test failure is a regression in NodeJS from what I can tell. Try this code in the Node repl (e.g. just execute console.log(new Intl.NumberFormat('en-ZA', { style: 'currency', currency: 'ZAR' }).format(12.34));
From what I understand, the comma is the correct variant. I reported this to Node as it doesn't seem like an issue on our side: nodejs/node#50477. Now, as far as I know we never render currencies using Node (in SSR), so the browser would be executing the formatter function meaning this wouldn't impact customers. Should we skip this test until they fix it, or patch our formatter to replace decimals with commas if |
nodejs/node#50477 (comment) links to https://unicode-org.atlassian.net/browse/CLDR-14707 which indicates this change happened on purpose so we might want to adapt our tests accordingly? cc @sirbrillig |
Interesting! For reference, on my sandbox with PHP, I see we use a comma for I've encountered a similar issue before on the backend and the way I resolved it was to make the currency unit tests accept multiple formats (in this case, either a comma or a period) for the specific currency which is transitioning.
|
7a4bc9d
to
f61e50e
Compare
👍🏻 Added via f61e50e The tests seem to be quite old (#16035) and I'm not exactly sure what implementation they were testing back then. To me it looks like today we're defaulting to |
f61e50e
to
010b449
Compare
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
I generated a new base image with the tag I triggered more builds using that image:
All these tests are passing. (for the linter, you can see the same number of failures in this branch and trunk.) And here is a calypso.live image which should be running Node 20: https://container-mystifying-carver.calypso.live/ |
This supersedes #81798. We had to revert that PR due to a unit test failure which appeared on trunk. We didn't catch it in our branch due to an oversight with our unit test setup. (The specific change in this branch compared to the original PR is c5c1d64)
The only reason we had to revert was tschaub/mock-fs#380, which is that certain Node FS methods don't get mocked properly with the
mock-fs
package under node 20. A small manual mock seems to fix the issue.The specific reason that the unit tests build is because of our base image setup. This base image is rebuilt twice per day, and includes all the binaries and tools for building and testing Calypso. As a result, this contains the Node image. Therefore, the branch unit test build points at the current "latest" base image, which does not include Node 20. Once we merged the PR, and run the "base image" build, then the latest base image includes "node 20." After that, every build started using the new Node version, including unit tests. While we tested a few builds (such as calypso.live) using a test base image which included Node 20, we didn't do that for the unit tests.
There is definitely room for improvement with how we test these PRs, but here's what we can do now:
test-node-20
)