@babel/helper-fixtures
Advanced tools
Comparing version 8.0.0-alpha.7 to 8.0.0-alpha.8
@@ -7,7 +7,10 @@ { | ||
{ "$ref": "#/definitions/TaskOption" }, | ||
{ "$ref": "https://json.schemastore.org/babelrc", "$comment": "Todo: switch to our inhouse schema" } | ||
{ | ||
"$ref": "https://json.schemastore.org/babelrc", | ||
"$comment": "Todo: switch to our inhouse schema" | ||
} | ||
], | ||
"definitions": { | ||
"OS": { | ||
"type":"string", | ||
"type": "string", | ||
"description": "The possible values of `process.platform`. See https://nodejs.org/api/process.html#process_process_platform", | ||
@@ -21,3 +24,3 @@ "enum": ["aix", "darwin", "freebsd", "linux", "openbsd", "sunos", "win32"] | ||
"description": "Whether this test should run when BABEL_8_BREAKING is enabled", | ||
"type":"boolean" | ||
"type": "boolean" | ||
}, | ||
@@ -29,6 +32,11 @@ "ignoreOutput": { | ||
"minNodeVersion": { | ||
"description": "The minimum Node.js version this test should run on", | ||
"description": "The minimum Node.js version the exec.js test should run on", | ||
"type": "string", | ||
"pattern": "^\\d+(\\.\\d+){0,2}$" | ||
}, | ||
"minNodeVersionTransform": { | ||
"description": "The minimum Node.js version the input.js transform test should run on", | ||
"type": "string", | ||
"pattern": "^\\d+(\\.\\d+){0,2}$" | ||
}, | ||
"os": { | ||
@@ -45,3 +53,3 @@ "description": "The OS this test should run on", | ||
"description": "Expected thrown error message", | ||
"type":"string", | ||
"type": "string", | ||
"default": "" | ||
@@ -51,4 +59,8 @@ }, | ||
"description": "Whether this test should validate the stdout and stderr", | ||
"type":"boolean", | ||
"type": "boolean", | ||
"default": false | ||
}, | ||
"SKIP_babel7plugins_babel8core": { | ||
"description": "The reason for skipping when testing Babel 7 plugins with Babel 8 core, if any", | ||
"type": "string" | ||
} | ||
@@ -55,0 +67,0 @@ } |
@@ -116,3 +116,3 @@ import semver from "semver"; | ||
title: humanize(taskName, true), | ||
disabled: taskName[0] === ".", | ||
disabled: taskName[0] === "." ? true : process.env.TEST_babel7plugins_babel8core && taskOpts.SKIP_babel7plugins_babel8core || false, | ||
options: taskOpts, | ||
@@ -140,2 +140,3 @@ doNotSetSourceType: taskOpts.DO_NOT_SET_SOURCE_TYPE, | ||
delete taskOpts.SKIP_ON_PUBLISH; | ||
delete taskOpts.SKIP_babel7plugins_babel8core; | ||
if (taskOpts.minNodeVersion) { | ||
@@ -147,6 +148,20 @@ const minimumVersion = semver.clean(taskOpts.minNodeVersion); | ||
if (semver.lt(nodeVersion, minimumVersion)) { | ||
return; | ||
if (test.actual.code) { | ||
test.exec.code = null; | ||
} else { | ||
return; | ||
} | ||
} | ||
delete taskOpts.minNodeVersion; | ||
} | ||
if (taskOpts.minNodeVersionTransform) { | ||
const minimumVersion = semver.clean(taskOpts.minNodeVersionTransform); | ||
if (minimumVersion == null) { | ||
throw new Error(`'minNodeVersionTransform' has invalid semver format: ${taskOpts.minNodeVersionTransform}`); | ||
} | ||
if (semver.lt(nodeVersion, minimumVersion)) { | ||
return; | ||
} | ||
delete taskOpts.minNodeVersionTransform; | ||
} | ||
if (taskOpts.os) { | ||
@@ -153,0 +168,0 @@ let os = taskOpts.os; |
{ | ||
"name": "@babel/helper-fixtures", | ||
"version": "8.0.0-alpha.7", | ||
"version": "8.0.0-alpha.8", | ||
"description": "Helper function to support fixtures", | ||
@@ -21,3 +21,3 @@ "author": "The Babel Team (https://babel.dev/team)", | ||
"devDependencies": { | ||
"@jridgewell/gen-mapping": "^0.3.3", | ||
"@jridgewell/gen-mapping": "^0.3.5", | ||
"@types/semver": "^7.3.4" | ||
@@ -24,0 +24,0 @@ }, |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42201
364
7