@jsenv/test 3.7.45 → 3.7.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jsenv_test.js +20 -2
- package/package.json +4 -4
package/dist/jsenv_test.js
CHANGED
|
@@ -2166,7 +2166,25 @@ const assertAndNormalizeFileUrl = (
|
|
|
2166
2166
|
return value;
|
|
2167
2167
|
};
|
|
2168
2168
|
|
|
2169
|
-
|
|
2169
|
+
/*
|
|
2170
|
+
* Which of two pathnames comes first: directories before what is under them,
|
|
2171
|
+
* deeper before shallower, then the names themselves.
|
|
2172
|
+
*
|
|
2173
|
+
* How a leading number reads is the caller's call, because the two readings are
|
|
2174
|
+
* both right somewhere:
|
|
2175
|
+
* - numeric (the default), where the number is a quantity: "9_x" then "10_x" —
|
|
2176
|
+
* what a generated list wants, so a story numbered by hand stays in the order
|
|
2177
|
+
* it happens;
|
|
2178
|
+
* - { numeric: false }, where the number is part of the name: "10_x" right
|
|
2179
|
+
* after "1_x" — the order the filesystem itself gives, and the one every file
|
|
2180
|
+
* explorer above it shows, so a human reading a directory finds it in the
|
|
2181
|
+
* order their editor already shows.
|
|
2182
|
+
*/
|
|
2183
|
+
const comparePathnames = (
|
|
2184
|
+
leftPathame,
|
|
2185
|
+
rightPathname,
|
|
2186
|
+
{ numeric = true } = {},
|
|
2187
|
+
) => {
|
|
2170
2188
|
const leftPartArray = leftPathame.split("/");
|
|
2171
2189
|
const rightPartArray = rightPathname.split("/");
|
|
2172
2190
|
|
|
@@ -2202,7 +2220,7 @@ const comparePathnames = (leftPathame, rightPathname) => {
|
|
|
2202
2220
|
i++;
|
|
2203
2221
|
// local comparison comes first
|
|
2204
2222
|
const comparison = leftPart.localeCompare(rightPart, undefined, {
|
|
2205
|
-
numeric
|
|
2223
|
+
numeric,
|
|
2206
2224
|
sensitivity: "base",
|
|
2207
2225
|
});
|
|
2208
2226
|
if (comparison !== 0) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jsenv/test",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.46",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@c88/v8-coverage": "0.1.1",
|
|
34
|
-
"@jsenv/ast": "6.10.
|
|
35
|
-
"@jsenv/plugin-supervisor": "1.8.
|
|
36
|
-
"@jsenv/sourcemap": "1.4.
|
|
34
|
+
"@jsenv/ast": "6.10.4",
|
|
35
|
+
"@jsenv/plugin-supervisor": "1.8.23",
|
|
36
|
+
"@jsenv/sourcemap": "1.4.9",
|
|
37
37
|
"he": "1.2.0",
|
|
38
38
|
"istanbul-lib-coverage": "3.2.2",
|
|
39
39
|
"istanbul-lib-instrument": "6.0.3",
|