Skip to content

feat: include files in package.json for better distribution #159

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
"directories": {
"test": "test"
},
"files": [
"lib",
"bin",
".github/workflows/wiby.yaml",
"package-support.json"
],
Comment on lines +12 to +17
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. the files field is dangerous and should never be used; npmignore is how files are kept out of the published package
  2. tests should be published in a package so that npm explore foo && npm install && npm test always works
  3. github workflows never need to be published.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the files field is dangerous and should never be used; npmignore is how files are kept out of the published package

Sure, I also agree with that, but I see that many packages use files instead of .npmignore

tests should be published in a package so that npm explore foo && npm install && npm test always works

That's new to me, and it's the first time i've heard it. So, let's send the tests.

github workflows never need to be published.

with Wiby's current design, we need to send that file. I want to change the way Wiby runs in GitHub Actions, but that will take time.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why the published wiby tarball needs to contain a github action, since actions are only run from repos?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By a command we used that copied that same GitHub Action, wiby github-workflow install

https://github.com/pkgjs/wiby/blob/main/USAGE.md#wiby-github-workflow-install

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok, good catch :-)

"scripts": {
"action-wiby-test": "npm install --production && ./bin/wiby test",
"action-wiby-result": "npm install --production && ./bin/wiby result",
Expand Down