Skip to content

Commit

Permalink
fix: Do not export index.json (#508)
Browse files Browse the repository at this point in the history
Although nyc does not support testing with experimental modules
nyc.config.mjs is supported in nyc 15.  This change ensures users can
`import` from @istanbuljs/nyc-config-* now that import of JSON is no
longer supported.
  • Loading branch information
coreyfarrell committed Nov 22, 2019
1 parent bf0141b commit a01a2b8
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 26 deletions.
7 changes: 7 additions & 0 deletions packages/nyc-config-babel/index.js
@@ -0,0 +1,7 @@
'use strict';

module.exports = {
sourceMap: false,
instrument: false,
require: ['@babel/register']
};
5 changes: 0 additions & 5 deletions packages/nyc-config-babel/index.json

This file was deleted.

4 changes: 2 additions & 2 deletions packages/nyc-config-babel/package.json
Expand Up @@ -2,9 +2,9 @@
"name": "@istanbuljs/nyc-config-babel",
"version": "3.0.0-alpha.1",
"description": "nyc configuration that works with babel-plugin-istanbul",
"main": "index.json",
"main": "index.js",
"files": [
"index.json"
"index.js"
],
"scripts": {
"test": "exit 0"
Expand Down
16 changes: 16 additions & 0 deletions packages/nyc-config-typescript/index.js
@@ -0,0 +1,16 @@
'use strict';

module.exports = {
cache: false,
extension: ['.ts', '.tsx'],
exclude: [
'**/*.d.ts',
'coverage/**',
'packages/*/test/**',
'test/**',
'test{,-*}.ts',
'**/*{.,-}{test,spec}.ts',
'**/__tests__/**',
'**/node_modules/**'
]
};
17 changes: 0 additions & 17 deletions packages/nyc-config-typescript/index.json

This file was deleted.

4 changes: 2 additions & 2 deletions packages/nyc-config-typescript/package.json
Expand Up @@ -2,9 +2,9 @@
"name": "@istanbuljs/nyc-config-typescript",
"version": "1.0.0-alpha.1",
"description": "nyc configuration that works with typescript",
"main": "index.json",
"main": "index.js",
"files": [
"index.json"
"index.js"
],
"scripts": {
"test": "exit 0"
Expand Down

0 comments on commit a01a2b8

Please sign in to comment.