From 139677541ac7b987e8e6c0ad23dd5c37286c1463 Mon Sep 17 00:00:00 2001 From: Evan Hahn Date: Tue, 16 Jul 2019 12:46:41 -0500 Subject: [PATCH] Stop publishing non-essential files (like tests and gruntfile) to npm I noticed that we were publishing a bunch of unnecessary files (like the `test` directory and `gruntfile.js`) to npm. At best, this wastes space. At worst, we could accidentally publish some sensitive file (though that's unlikely). Tested this by: 1. Ran `npm pack` and verified that no unnecessary files were included 2. Copied the resulting tarbal, `airtable-0.7.0.tgz`, into a temporary directory 3. Ran `npm i airtable-0.7.0.tgz` 4. Verified that `node -p "require('airtable')"` didn't break See documentation for the [`files`][1] key in `package.json` for more info here. [1]: https://docs.npmjs.com/files/package.json#files --- package.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/package.json b/package.json index ced42a2f..6e8a78da 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,13 @@ "browser": { "request": "xhr" }, + "files": [ + "/README.md", + "/CHANGELOG.md", + "/LICENSE.txt", + "/build/airtable.browser.js", + "/lib/" + ], "devDependencies": { "body-parser": "^1.19.0", "envify": "^4.1.0",