Skip to content

Commit

Permalink
fix(npm package): ignore unused files (#4405)
Browse files Browse the repository at this point in the history
- Use a 'whitelist' (`"files"` in package.json) instead of a blacklist (`.npmignore` file) to mark files for the packages.
- Remove a lot of unused config files from the stryker packages
  • Loading branch information
regseb committed Sep 27, 2023
1 parent 975f011 commit f14e789
Show file tree
Hide file tree
Showing 26 changed files with 17 additions and 210 deletions.
15 changes: 0 additions & 15 deletions packages/api/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/api/package.json
Expand Up @@ -8,6 +8,7 @@
"url": "https://github.com/stryker-mutator/stryker-js.git",
"directory": "packages/api"
},
"files": ["./dist/", "./core.d.ts", "./src-generated/", "./src/"],
"exports": {
"./check": "./dist/src/check/index.js",
"./core": "./dist/src/core/index.js",
Expand Down
13 changes: 0 additions & 13 deletions packages/core/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/core/package.json
Expand Up @@ -3,6 +3,7 @@
"version": "7.1.1",
"description": "The extendable JavaScript mutation testing framework",
"type": "module",
"files": ["./bin/", "./dist/", "./schema/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/cucumber-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/cucumber-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/cucumber-runner",
"version": "7.1.1",
"description": "A plugin to use the cucumber test runner in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
22 changes: 0 additions & 22 deletions packages/grunt-stryker/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/grunt-stryker/package.json
Expand Up @@ -32,6 +32,7 @@
"engines": {
"node": ">=16.0.0"
},
"files": ["./tasks/"],
"main": "Gruntfile.js",
"devDependencies": {
"@stryker-mutator/api": "7.1.1",
Expand Down
16 changes: 0 additions & 16 deletions packages/instrumenter/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/instrumenter/package.json
Expand Up @@ -4,6 +4,7 @@
"description": "The code instrumenter used in Stryker, the JavaScript mutation testing framework",
"main": "dist/src/index.js",
"type": "module",
"files": ["./dist/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/jasmine-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/jasmine-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/jasmine-runner",
"version": "7.1.1",
"description": "A plugin to use the Jasmine (NodeJS) test runner in Stryker, the mutation testing framework for JavaScript and friends",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/jest-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/jest-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/jest-runner",
"version": "7.1.1",
"description": "A plugin to use the jest test runner and framework in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"main": "dist/src/index.js",
"exports": {
".": {
Expand Down
16 changes: 0 additions & 16 deletions packages/karma-runner/.npmignore

This file was deleted.

5 changes: 5 additions & 0 deletions packages/karma-runner/package.json
Expand Up @@ -2,6 +2,11 @@
"name": "@stryker-mutator/karma-runner",
"version": "7.1.1",
"description": "A plugin to use the karma test runner in Stryker, the JavaScript mutation testing framework",
"files": [
"./dist/",
"./src-generated/",
"./src/",
"./stryker-karma.conf.cjs"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/mocha-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/mocha-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/mocha-runner",
"version": "7.1.1",
"description": "A plugin to use the mocha test runner in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/tap-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/tap-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/tap-runner",
"version": "7.1.1",
"description": "A plugin to use the TAP (test anything protocol) test runner in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/typescript-checker/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/typescript-checker/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/typescript-checker",
"version": "7.1.1",
"description": "A typescript type checker plugin to be used in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/util/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/util/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/util",
"version": "7.1.1",
"description": "Contains utilities for Stryker, the mutation testing framework for JavaScript and friends",
"files": ["./dist/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down
16 changes: 0 additions & 16 deletions packages/vitest-runner/.npmignore

This file was deleted.

1 change: 1 addition & 0 deletions packages/vitest-runner/package.json
Expand Up @@ -2,6 +2,7 @@
"name": "@stryker-mutator/vitest-runner",
"version": "7.1.1",
"description": "A plugin to use the vitest test runner and framework in Stryker, the JavaScript mutation testing framework",
"files": ["./dist/", "./src-generated/", "./src/"],
"exports": {
".": {
"import": "./dist/src/index.js"
Expand Down

0 comments on commit f14e789

Please sign in to comment.