Skip to content
This repository was archived by the owner on Jan 13, 2024. It is now read-only.

Commit 207b653

Browse files
authored
Bump to vercel/[email protected] (#1616)
1 parent f0c4e8c commit 207b653

File tree

7 files changed

+65
-69
lines changed

7 files changed

+65
-69
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false # prevent test to stop if one fails
1313
matrix:
14-
node-version: [10.x, 12.x, 14.x, 16.x]
14+
node-version: [12.x, 14.x, 16.x, 18.x]
1515
os: [ubuntu-latest, windows-latest] # Skip macos-latest
1616

1717
runs-on: ${{ matrix.os }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"is-core-module": "2.9.0",
3030
"minimist": "^1.2.6",
3131
"multistream": "^4.1.0",
32-
"pkg-fetch": "3.3.0",
32+
"pkg-fetch": "3.4.1",
3333
"prebuild-install": "6.1.4",
3434
"resolve": "^1.22.0",
3535
"stream-meter": "^1.0.4"

test/test-42-fetch-all/main.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,14 @@ function nodeRangeToNodeVersion(nodeRange) {
1414
}
1515

1616
for (const platform of knownPlatforms) {
17-
const nodeRanges = ['node8', 'node10', 'node12', 'node14', 'node16'];
17+
const nodeRanges = [
18+
'node8',
19+
'node10',
20+
'node12',
21+
'node14',
22+
'node16',
23+
'node18',
24+
];
1825
for (const nodeRange of nodeRanges) {
1926
const nodeVersion = nodeRangeToNodeVersion(nodeRange);
2027
const archs = ['x64'];

test/test-50-fs-runtime-layer-2/main.js

Lines changed: 28 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,48 +20,43 @@ const output = './run-time/test-output.exe';
2020

2121
function bitty(version) {
2222
return (
23-
(2 * /^(node|v)?4/.test(version)) |
24-
(2 * /^(node|v)?5/.test(version)) |
25-
(4 * /^(node|v)?6/.test(version)) |
26-
(4 * /^(node|v)?7/.test(version)) |
2723
(4 * /^(node|v)?8/.test(version)) |
28-
(4 * /^(node|v)?9/.test(version)) |
2924
(8 * /^(node|v)?10/.test(version)) |
30-
(8 * /^(node|v)?11/.test(version)) |
3125
(16 * /^(node|v)?12/.test(version)) |
32-
(16 * /^(node|v)?13/.test(version)) |
3326
(32 * /^(node|v)?14/.test(version)) |
34-
(32 * /^(node|v)?16/.test(version))
27+
(64 * /^(node|v)?16/.test(version)) |
28+
(128 * /^(node|v)?18/.test(version))
3529
);
3630
}
3731

3832
const version1 = process.version;
3933
const version2 = target;
40-
if (bitty(version1) !== bitty(version2)) return;
4134

42-
let left, right;
43-
utils.mkdirp.sync(path.dirname(output));
44-
45-
left = utils.spawn.sync('node', [path.basename(input)], {
46-
cwd: path.dirname(input),
47-
});
48-
49-
utils.pkg.sync(['--target', target, '--output', output, input]);
50-
51-
right = utils.spawn.sync('./' + path.basename(output), [], {
52-
cwd: path.dirname(output),
53-
});
54-
55-
left = left.split('\n');
56-
right = right.split('\n');
57-
// right may have less lines, premature exit,
58-
// less trusted, so using left.length here
59-
for (let i = 0; i < left.length; i += 1) {
60-
if (/is out of range/.test(left[i]) && /is out of range/.test(right[i])) {
61-
left[i] = left[i].replace(/ It must be .*\. /, ' ');
62-
right[i] = right[i].replace(/ It must be .*\. /, ' ');
35+
if (bitty(version1) === bitty(version2)) {
36+
let left, right;
37+
utils.mkdirp.sync(path.dirname(output));
38+
39+
left = utils.spawn.sync('node', [path.basename(input)], {
40+
cwd: path.dirname(input),
41+
});
42+
43+
utils.pkg.sync(['--target', target, '--output', output, input]);
44+
45+
right = utils.spawn.sync('./' + path.basename(output), [], {
46+
cwd: path.dirname(output),
47+
});
48+
49+
left = left.split('\n');
50+
right = right.split('\n');
51+
// right may have less lines, premature exit,
52+
// less trusted, so using left.length here
53+
for (let i = 0; i < left.length; i += 1) {
54+
if (/is out of range/.test(left[i]) && /is out of range/.test(right[i])) {
55+
left[i] = left[i].replace(/ It must be .*\. /, ' ');
56+
right[i] = right[i].replace(/ It must be .*\. /, ' ');
57+
}
58+
assert.strictEqual(left[i], right[i]);
6359
}
64-
assert.strictEqual(left[i], right[i]);
65-
}
6660

67-
utils.vacuum.sync(path.dirname(output));
61+
utils.vacuum.sync(path.dirname(output));
62+
}

test/test-50-path-as-buffer/main.js

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,26 @@ const target = process.argv[2] || host;
1616
const input = './test-x-index.js';
1717
const output = './test-output.exe';
1818

19-
function bitty(version) {
20-
return (
21-
(2 * /^(node|v)?4/.test(version)) |
22-
(2 * /^(node|v)?5/.test(version)) |
23-
(2 * /^(node|v)?6/.test(version)) |
24-
(2 * /^(node|v)?7/.test(version)) |
25-
(2 * /^(node|v)?8/.test(version)) | // 2 = doesn't have URL
26-
(4 * /^(node|v)?9/.test(version)) |
27-
(4 * /^(node|v)?10/.test(version)) |
28-
(4 * /^(node|v)?11/.test(version)) |
29-
(4 * /^(node|v)?12/.test(version)) |
30-
(4 * /^(node|v)?13/.test(version)) |
31-
(4 * /^(node|v)?14/.test(version)) |
32-
(4 * /^(node|v)?16/.test(version))
33-
); // 4 = has URL
19+
function isNode8(version) {
20+
return /^(node|v)?8/.test(version);
3421
}
3522

3623
const version1 = process.version;
3724
const version2 = target;
38-
if (bitty(version1) !== bitty(version2)) return;
3925

40-
let left, right;
26+
if (isNode8(version1) === isNode8(version2)) {
27+
let left, right;
4128

42-
left = utils.spawn.sync('node', [path.basename(input)], {
43-
cwd: path.dirname(input),
44-
});
29+
left = utils.spawn.sync('node', [path.basename(input)], {
30+
cwd: path.dirname(input),
31+
});
4532

46-
utils.pkg.sync(['--target', target, '--output', output, input]);
33+
utils.pkg.sync(['--target', target, '--output', output, input]);
4734

48-
right = utils.spawn.sync('./' + path.basename(output), [], {
49-
cwd: path.dirname(output),
50-
});
35+
right = utils.spawn.sync('./' + path.basename(output), [], {
36+
cwd: path.dirname(output),
37+
});
5138

52-
assert.strictEqual(left, right);
53-
utils.vacuum.sync(output);
39+
assert.strictEqual(left, right);
40+
utils.vacuum.sync(output);
41+
}

test/test-79-npm/main.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,15 @@ const hostVersion = process.version.match(/^v(\d+)/)[1];
2121
const host = 'node' + hostVersion;
2222
const target = process.argv[2] || host;
2323
const windows = process.platform === 'win32';
24-
const npm = { 0: 2, 4: 2, 6: 3, 7: 4, 8: 5, 9: 5, 10: 5, 12: 6, 14: 6, 16: 7 }[
25-
hostVersion
26-
];
24+
const npm = {
25+
8: 5,
26+
10: 5,
27+
12: 6,
28+
14: 6,
29+
16: 7,
30+
18: 8,
31+
}[hostVersion];
32+
2733
assert(npm !== undefined);
2834

2935
function applyMetaToRight(right, meta) {

yarn.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2146,10 +2146,10 @@ picomatch@^2.2.3:
21462146
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972"
21472147
integrity sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==
21482148

2149-
pkg-fetch@3.3.0:
2150-
version "3.3.0"
2151-
resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.3.0.tgz#3afc2fb7a19219839cf75654fa8b54a2630df891"
2152-
integrity sha512-xJnIZ1KP+8rNN+VLafwu4tEeV4m8IkFBDdCFqmAJz9K1aiXEtbARmdbEe6HlXWGSVuShSHjFXpfkKRkDBQ5kiA==
2149+
pkg-fetch@3.4.1:
2150+
version "3.4.1"
2151+
resolved "https://registry.yarnpkg.com/pkg-fetch/-/pkg-fetch-3.4.1.tgz#be68bb9f7fdb0f6ed995abc518ab2e35aa64d2fd"
2152+
integrity sha512-fS4cdayCa1r4jHkOKGPJKnS9PEs6OWZst+s+m0+CmhmPZObMnxoRnf9T9yUWl+lzM2b5aJF7cnQIySCT7Hq8Dg==
21532153
dependencies:
21542154
chalk "^4.1.2"
21552155
fs-extra "^9.1.0"

0 commit comments

Comments
 (0)