Conversation
| value = replaceAll(value, "'", this.symbols.group); | ||
| } | ||
|
|
||
| // On newer ICU versions, the special single quote has been normalized, so we need to backport. |
There was a problem hiding this comment.
I'm not sure I understand why this change is needed?
There was a problem hiding this comment.
See #9887 (comment) - apparently de-CH doesn't always resolve to the special group character, thereby causing the test for it to fail as NaN is parsed.
|
Thanks for the PR. You're running on a newer version than v24.14.1? Instead of having the tests pass for both, we should either lock the nvm to the version which works, or update the node version on CI and everywhere else along with the tests. We're making the tests harder to update in the future should it change in some way not already covered. This is how we've handled it in the past as well. |
|
@snowystinger I'm running on 24.14.0, OSX 26.2, with US and English, albeit in Europe/Berlin TZ. Curiously enough, this results in the following. Don't mind the ~/dev/public/rsp main* ❯ mx node -e "console.log(new Intl.NumberFormat('de-CH').formatToParts(1000).find(p => p.type === 'group').value)" 10:40:17 AM
' // U+0027
~/dev/public/rsp main* ❯ mx bun -e "console.log(new Intl.NumberFormat('de-CH').formatToParts(1000).find(p => p.type === 'group').value)" 10:40:28 AM
’ // U+2019
~/dev/public/rsp main* ❯ mx node -e "console.log(new Intl.DateTimeFormat('en-US-u-ca-ethiopic', {year: 'numeric', era: 'narrow', timeZone: 'UTC'}).formatToParts(0).find(p => p.type === 'era').value)" 11:16:52 AM
AM
~/dev/public/rsp main* ❯ mx bun -e "console.log(new Intl.DateTimeFormat('en-US-u-ca-ethiopic', {year: 'numeric', era: 'narrow', timeZone: 'UTC'}).formatToParts(0).find(p => p.type === 'era').value)" 11:16:57 AM
ERA1
~/dev/public/rsp main* ❯ mx node -v 10:40:40 AM
v24.14.0
~/dev/public/rsp main* ❯ mx bun -v 10:41:40 AM
1.3.11Afaik, CircleCI appears to be locked to 24.13. I get the same issue on my system when I run with v24.13.1 though, so I was wondering why CI is passing. Since I don't use nvm, I may be running another binary for the same version?? Edit: My colleague, who's using nvm got the same issue on v24.13. Curious to learn why CI is passing then 🤷 |
|
UPDATE i mispoke about 24.14.1, the comment has been updated. Test with different node versions Best guess is that ICU fixed something. I'm ok leaving the backtick vs apostrophe, that seems useful like some of our other conversions for uncommon characters. I think we can just update any test to use the new correct value. I don't think we need to do the era check in the test, we can just change the nvmrc version for the repo to ^24.14 I think it can take a semver range and update the circleci config, will that still work with your tool? |
|
I'm using mise-en-place (alias I would appreciate either locking to a specific version or otherwise supporting both scenarios in tests, but I will be fine if you don't want to go that route - just need to configure caret aliases once until upstream supports it. Edit: Nvmrc does not support semver ranges, see nvm-sh/nvmrc#2 |
Closes failures when running test suite locally.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: