@babel/helper-fixtures
Advanced tools
Comparing version 7.24.0 to 7.24.1
@@ -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,3 +59,3 @@ }, | ||
"description": "Whether this test should validate the stdout and stderr", | ||
"type":"boolean", | ||
"type": "boolean", | ||
"default": false | ||
@@ -54,0 +62,0 @@ } |
@@ -155,6 +155,20 @@ "use strict"; | ||
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) { | ||
@@ -161,0 +175,0 @@ let os = taskOpts.os; |
{ | ||
"name": "@babel/helper-fixtures", | ||
"version": "7.24.0", | ||
"version": "7.24.1", | ||
"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
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
41904
368