• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

npm / arborist / #1020

Build:
Build:
LAST BUILD BRANCH:
DEFAULT BRANCH: master
Ran 10 May 2021 04:29PM UTC
Jobs 1
Files 38
Run time 37min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
#1020

push

wraithgar
guard against locale-specific sorting

Node will use the current environment's locale sorting for
String.localeCompare.  Thankfully, String.localeCompare can take a
second argument to specify the locale.  Up until Node 13, any valid
argument provided to the function _may_ be respected if Node was
compiled with Intl support, or would always be treated as `'en'`
otherwise.

The solution is to always set the locale to `'en'`.  An alternative
solution would be to compare strings based on byte order, but this does
not provide ideal ergonomis.

To verify this, the locale is set in the test environment to `'sk'`,
which has a significantly different alphabet, including sorting words
starting with `'ch'` _after_ words starting with `'d'`.

Re: npm/cli#2829
Fix: #276

3047 of 3047 branches covered (100.0%)

Branch coverage included in aggregate %.

4110 of 4110 relevant lines covered (100.0%)

564.15 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1020.1 10 May 2021 04:29PM UTC 0
100.0
Source Files on build #1020
Detailed source file information is not available for this build.
  • Back to Repo
  • 571e9e4c on github
  • Prev Build on
  • Next Build on
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc