@istanbuljs/esm-loader-hook
Advanced tools
@@ -58,2 +58,3 @@ import {fileURLToPath} from 'url'; | ||
const {code} = await babel.transformAsync(source, { | ||
presets: ['@babel/preset-typescript'], | ||
babelrc: false, | ||
@@ -71,3 +72,4 @@ configFile: false, | ||
plugins: [ | ||
['babel-plugin-istanbul', babelConfig] | ||
['babel-plugin-istanbul', babelConfig], | ||
['@babel/plugin-syntax-decorators', {decoratorsBeforeExport: true}] | ||
] | ||
@@ -74,0 +76,0 @@ }); |
{ | ||
"name": "@istanbuljs/esm-loader-hook", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"description": "Loader hook for ESM instrumentation (experimental!!)", | ||
@@ -13,4 +13,3 @@ "type": "module", | ||
"posttest": "c8 report --check-coverage", | ||
"snap": "cross-env TAP_SNAPSHOT=1 npm test", | ||
"release": "standard-version" | ||
"snap": "cross-env TAP_SNAPSHOT=1 npm test" | ||
}, | ||
@@ -30,2 +29,4 @@ "engines": { | ||
"dependencies": { | ||
"@babel/plugin-syntax-decorators": "^7.25.9", | ||
"@babel/preset-typescript": "^7.26.0", | ||
"@babel/core": "^7.8.7", | ||
@@ -42,5 +43,5 @@ "@istanbuljs/load-nyc-config": "^1.1.0", | ||
"libtap": "^1.4.0", | ||
"standard-version": "^9.5.0", | ||
"tap-yaml-summary": "^0.1.0" | ||
} | ||
}, | ||
"files": ["index.js"] | ||
} |
@@ -10,3 +10,3 @@ # @istanbuljs/esm-loader-hook | ||
makes it relatively easy to use NYC to check coverage of ESM running in node.js | ||
13.7.0. Note this makes use of **experimental** node.js features and thus may | ||
16.12.0. Note this makes use of **experimental** node.js features and thus may | ||
stop working upon release of new versions of node.js. Until the node.js feature | ||
@@ -35,3 +35,3 @@ is stabilized breakage should not be unexpected. | ||
This module executes [babel-plugin-istanbul] in a transformSource loader hook. No | ||
This module executes [babel-plugin-istanbul] in a loader hook. No | ||
options are provided to the babel plugin and babel configuration files are not honored. | ||
@@ -38,0 +38,0 @@ Normally configuration will be provided by the currently running instance of nyc. If |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
5
-16.67%71
2.9%6003
-16.26%7
40%4
-20%1
Infinity%