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

boa: skip the esm tests for node >= 14.5.0 #347

Merged
merged 1 commit into from
Jul 15, 2020
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 packages/boa/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ module.exports = {
"no-param-reassign": "error",
"no-path-concat": "error",
"no-plusplus": "error",
"no-process-env": "error",
"no-process-env": "off",
"no-process-exit": "error",
"no-proto": "error",
"no-restricted-globals": "error",
Expand Down
14 changes: 11 additions & 3 deletions packages/boa/tests/es-module-loaders/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,18 @@ function getAbsolutePath(relativePath) {
const FLAG = '--experimental-loader';
const PATH_ESM_LOADER = getAbsolutePath('../../esm/loader.mjs');

// See https://github.com/nodejs/node/pull/29796
if (process.version < 'v12.11.1') {
const [major, minor, patch] = process.version.replace('v', '').split('.');
if (major <= '12' && minor <= '11' && patch <= '1') {
// See https://github.com/nodejs/node/pull/29796
console.log(`1..0 # Skipped: Current nodejs version: ${
process.version} does not support \`--experimental-loader\``);
process.version} does not support \`--experimental-loader\`.`);
process.exit(0);
}
if (major >= '14' && minor >= '5') {
// https://github.com/nodejs/node/pull/33501
// TODO(yorkie): compatible with the new esm hooks.
console.log(`1..0 # Skipped: Current nodejs version ${
process.version} does not support dynamic module type.`);
process.exit(0);
}

Expand Down