Skip to content

Commit e6512df

Browse files
authored
Restrict published files for this package (#94)
* Restrict published files for this package An allow list (as provided by the `files` field in `package.json`) is more effective than a deny list (as provided by `.npmignore`). By using an allow list we can ensure that random files don't accidentally get published (as happened with the v2.2.0 release). * Remove redundant mocha settings We're no longer using mocha for testing.
1 parent 6312921 commit e6512df

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.npmignore

-8
This file was deleted.

package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
"prepublish": "npm run lint && npm run test"
2828
},
2929
"types": "src/index.d.ts",
30-
"mocha": {
31-
"timeout": 15000
32-
},
3330
"devDependencies": {
3431
"codecov": "^3.8.1",
3532
"eslint": "^6.8.0",
@@ -56,5 +53,9 @@
5653
"lint-staged": {
5754
"*.js": "eslint --cache --fix",
5855
"*.{js,css,md}": "prettier --write"
59-
}
56+
},
57+
"files": [
58+
"src/*.js",
59+
"src/*.d.ts"
60+
]
6061
}

0 commit comments

Comments
 (0)