Skip to content
This repository has been archived by the owner on Jan 19, 2022. It is now read-only.

Specify 'en' locale to String.localeCompare #3

Merged
merged 1 commit into from
May 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cache-install-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const cacheInstallDir = ({ cache, packages }) => {

const getHash = (packages) =>
crypto.createHash('sha512')
.update(packages.sort((a, b) => a.localeCompare(b)).join('\n'))
.update(packages.sort((a, b) => a.localeCompare(b, 'en')).join('\n'))
.digest('hex')
.slice(0, 16)

Expand Down
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const exec = async (opts) => {
},
}))
.map(mani => mani._from)
.sort((a, b) => a.localeCompare(b))
.sort((a, b) => a.localeCompare(b, 'en'))

// no need to install if already present
if (add.length) {
Expand Down