Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 647 Support Node 18 as Target #649

Merged
merged 3 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
116 changes: 116 additions & 0 deletions lib/util/abi_crosswalk.json
Original file line number Diff line number Diff line change
Expand Up @@ -2231,6 +2231,26 @@
"node_abi": 72,
"v8": "7.8"
},
"12.22.8": {
"node_abi": 72,
"v8": "7.8"
},
"12.22.9": {
"node_abi": 72,
"v8": "7.8"
},
"12.22.10": {
"node_abi": 72,
"v8": "7.8"
},
"12.22.11": {
"node_abi": 72,
"v8": "7.8"
},
"12.22.12": {
"node_abi": 72,
"v8": "7.8"
},
"13.0.0": {
"node_abi": 79,
"v8": "7.8"
Expand Down Expand Up @@ -2435,6 +2455,26 @@
"node_abi": 83,
"v8": "8.4"
},
"14.18.2": {
"node_abi": 83,
"v8": "8.4"
},
"14.18.3": {
"node_abi": 83,
"v8": "8.4"
},
"14.19.0": {
"node_abi": 83,
"v8": "8.4"
},
"14.19.1": {
"node_abi": 83,
"v8": "8.4"
},
"14.19.2": {
"node_abi": 83,
"v8": "8.4"
},
"15.0.0": {
"node_abi": 88,
"v8": "8.6"
Expand Down Expand Up @@ -2587,6 +2627,30 @@
"node_abi": 93,
"v8": "9.4"
},
"16.13.1": {
"node_abi": 93,
"v8": "9.4"
},
"16.13.2": {
"node_abi": 93,
"v8": "9.4"
},
"16.14.0": {
"node_abi": 93,
"v8": "9.4"
},
"16.14.1": {
"node_abi": 93,
"v8": "9.4"
},
"16.14.2": {
"node_abi": 93,
"v8": "9.4"
},
"16.15.0": {
"node_abi": 93,
"v8": "9.4"
},
"17.0.0": {
"node_abi": 102,
"v8": "9.5"
Expand All @@ -2598,5 +2662,57 @@
"17.1.0": {
"node_abi": 102,
"v8": "9.5"
},
"17.2.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.3.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.3.1": {
"node_abi": 102,
"v8": "9.6"
},
"17.4.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.5.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.6.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.7.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.7.1": {
"node_abi": 102,
"v8": "9.6"
},
"17.7.2": {
"node_abi": 102,
"v8": "9.6"
},
"17.8.0": {
"node_abi": 102,
"v8": "9.6"
},
"17.9.0": {
"node_abi": 102,
"v8": "9.6"
},
"18.0.0": {
"node_abi": 108,
"v8": "10.1"
},
"18.1.0": {
"node_abi": 108,
"v8": "10.1"
}
cclauss marked this conversation as resolved.
Show resolved Hide resolved
}
20 changes: 20 additions & 0 deletions test/versioning.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,26 @@ test('should detect abi for node-webkit runtime', (t) => {
t.end();
});

test('should throw when custom node target is not found in abi_crosswalk file', (t) => {
try {
versioning.get_runtime_abi('node', '123456789.0.0');
} catch (e) {
const expectedMessage = 'Unsupported target version: 123456789.0.0';
t.equal(e.message, expectedMessage);
t.end();
}
});

test('should throw when custom node target is not semver', (t) => {
try {
versioning.get_runtime_abi('node', '1.2.3.4');
} catch (e) {
const expectedMessage = 'Unknown target version: 1.2.3.4';
t.equal(e.message, expectedMessage);
t.end();
}
});

test('should detect custom binary host from env', (t) => {
const mock_package_json = {
'name': 'test',
Expand Down