Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2021-05-07 02:06:29 +0300
committerGar <gar+gh@danger.computer>2021-05-10 19:37:12 +0300
commit1d092144eaaabff63ac8424b40b2286822be7677 (patch)
treecfc63a6d91736f3165fcc4d38431ff3a2819b660 /package-lock.json
parent1eb7e5c7d466293b472c2506c64e5a89ec84ac2f (diff)
fix(packages): locale-agnostic string sorting
This adds the 'en' locale to all instances of String.localeCompare within the CLI codebase. Tests added for the cases where we're sorting arbitrary user-generated data. The tests rely on the fact that 'ch' sorts after 'd' in the `'sk'` locale, but ahead of `'d'` in the `'en'` locale. To ensure that this is the default behavior if no locale is specified, `LC_ALL=sk` is set in the test environment. Other instances of `localeCompare` sort data that the cli controls, so no tests were added. Re: https://github.com/npm/cli/issues/2829 PR-URL: https://github.com/npm/cli/pull/3203 Credit: @isaacs Close: #3203 Reviewed-by: @ruyadorno
Diffstat (limited to 'package-lock.json')
0 files changed, 0 insertions, 0 deletions