Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop publishing non-essential files (like tests and gruntfile) to npm #128

Merged
merged 1 commit into from
Jul 16, 2019

Conversation

EvanHahn
Copy link
Contributor

@EvanHahn EvanHahn commented Jul 16, 2019

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 tarball, 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 key in package.json for more info here.

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
@EvanHahn EvanHahn requested review from jbbakst and kasrak July 16, 2019 17:50
@EvanHahn EvanHahn merged commit 1396775 into master Jul 16, 2019
@EvanHahn EvanHahn deleted the use_allowlist_for_published_files branch July 16, 2019 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants