Skip to content

Conversation

@stephenplusplus
Copy link
Contributor

https://www.npmjs.org/doc/files/package.json.html#files

Best to keep it slim 👍 Did I miss any files?

@ryanseys
Copy link
Contributor

This is effectively the inverse effect of .npmignore (which we have), so we should pick one and crown it the victor. 👑

@stephenplusplus
Copy link
Contributor Author

Oh, wow. Didn't know we had that! I prefer a whitelist, and less root level dot file noise. I'll update the PR to remove that file, then leave it to the judges 🔨

@ryanseys
Copy link
Contributor

A whitelist will be shorter than the .npmignore blacklist if we really want to exclude a lot from npm publish but it's always nice to have more info available to the developer for debugging and whitelists are known to be more error-prone if not done correctly (ahem, Google IO 2014 @silvolu & @rakyll). E.g. README for npmjs.org to display is always nice, and tests so that Windows users can run tests from node_modules easily and report their errors 😄

So at the end of the day, I'm really indifferent as long as it's done correctly. 👍

@ryanseys
Copy link
Contributor

That final statement is a lie, I changed my mind. I like the blacklist / .npmignore even if it means more dotfiles.

@stephenplusplus
Copy link
Contributor Author

but it's always nice to have more info available to the developer for debugging

This should be done by cloning the repository, not by sorting through files in a node_modules directory.

whitelists are known to be more error-prone if not done correctly

I think each are as likely to cause problems if misused, but since "main" is defined in package.json to point to "lib", along with our dependencies, our scripts, etc. it makes the most sense to me to continue to use that as the source of truth of how we define our project.

E.g. README for npmjs.org to display is always nice

npm includes the readme by default.

@ryanseys
Copy link
Contributor

This should be done by cloning the repository

Fair enough. Don't really know what the convention is for that but I always like to run tests on the specific version installed rather than trying to track it down, clone and checkout.. Some projects exclude tests, I like to keep them in but that's just me.

I think each are as likely to cause problems if misused

Tru dat.

npm includes the readme by default.

Didn't know this! 👍

You know what you're doing, carry on 😄

rakyll pushed a commit that referenced this pull request Sep 2, 2014
npm: slim down distributed files.
@rakyll rakyll merged commit 0ae0917 into googleapis:master Sep 2, 2014
chingor13 pushed a commit that referenced this pull request Sep 12, 2022
*build!: Update library to use Node 12
chingor13 pushed a commit that referenced this pull request Sep 14, 2022
*build!: Update library to use Node 12
@release-please release-please bot mentioned this pull request Sep 14, 2022
sofisl pushed a commit that referenced this pull request Sep 15, 2022
sofisl pushed a commit that referenced this pull request Oct 12, 2022
sofisl pushed a commit that referenced this pull request Oct 13, 2022
sofisl pushed a commit that referenced this pull request Nov 16, 2022
* chore(main): release 2.1.1

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Nov 16, 2022
Source-Link: googleapis/synthtool@d229a12
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:74ab2b3c71ef27e6d8b69b1d0a0c9d31447777b79ac3cd4be82c265b45f37e5e
sofisl pushed a commit that referenced this pull request Nov 30, 2022
sofisl pushed a commit that referenced this pull request Jan 27, 2026
sofisl pushed a commit that referenced this pull request Jan 27, 2026
miguelvelezsa pushed a commit that referenced this pull request Jan 28, 2026
* Exclude property from index (doc)

* Excludes the description property
miguelvelezsa pushed a commit that referenced this pull request Jan 29, 2026
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.

3 participants