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

files list added to package.json #754

Merged
merged 2 commits into from
May 14, 2021
Merged

files list added to package.json #754

merged 2 commits into from
May 14, 2021

Conversation

volovyks
Copy link
Collaborator

@volovyks volovyks commented May 13, 2021

We are publishing test, config, and other files to npm. Let's limit the file list only to the necessary ones.

Files published to npm before this change:

npm notice 📦 near-cli@1.6.0
npm notice === Tarball Contents ===
npm notice 69B .editorconfig
npm notice 12B .eslintignore
npm notice 510B .eslintrc.yml
npm notice 88B .gitattributes
npm notice 895B .github/dependabot.yml
npm notice 639B .github/ISSUE_TEMPLATE/bug_report.md
npm notice 604B .github/ISSUE_TEMPLATE/feature_request.md
npm notice 117B .gitpod.yml
npm notice 278B .travis.yml
npm notice 3.3kB CODE_OF_CONDUCT.md
npm notice 131B CODEOWNERS
npm notice 1.9kB CONTRIBUTING.md
npm notice 1.0kB LICENSE
npm notice 9.7kB LICENSE-APACHE
npm notice 53.6kB README.md
npm notice 619B bin/near
npm notice 8.0kB bin/near-cli.js
npm notice 1.8kB commands/add-key.js
npm notice 2.3kB commands/call.js
npm notice 6.6kB commands/create-account.js
npm notice 995B commands/delete-key.js
npm notice 4.1kB commands/dev-deploy.js
npm notice 1.1kB commands/evm-call.js
npm notice 593B commands/evm-dev-init.js
npm notice 790B commands/evm-view.js
npm notice 2.1kB commands/generate-key.js
npm notice 473B commands/proposals.js
npm notice 932B commands/repl.js
npm notice 1.3kB commands/tx-status.js
npm notice 963B commands/validators.js
npm notice 1.6kB commands/view-state.js
npm notice 2.2kB config.js
npm notice 723B get-config.js
npm notice 10.4kB index.js
npm notice 250B middleware/abi.js
npm notice 0B middleware/base64-args.js
npm notice 192B middleware/initial-balance.js
npm notice 916B middleware/key-store.js
npm notice 2.0kB middleware/ledger.js
npm notice 321B middleware/print-options.js
npm notice 1.1kB middleware/seed-phrase.js
npm notice 27B neardev/dev-account
npm notice 41B neardev/dev-account.env
npm notice 140B neardev/shared-test-staging/test.near.json
npm notice 140B neardev/shared-test/test.near.json
npm notice 1.6kB package.json
npm notice 2.4kB test_environment.js
npm notice 619B test/index.sh
npm notice 169.8kB test/res/fungible_token.wasm
npm notice 17.2kB test/res/guest_book.wasm
npm notice 1.3kB test/test_account_creation.sh
npm notice 476B test/test_account_operations.sh
npm notice 1.3kB test/test_contract.sh
npm notice 1.4kB test/test_deploy_init_contract.sh
npm notice 823B test/test_generate_key.sh
npm notice 1.1kB test/unit/explorer.test.js
npm notice 657B test/unit/inspect-response.test.js
npm notice 6.5kB utils/capture-login-success.js
npm notice 1.7kB utils/check-credentials.js
npm notice 2.1kB utils/check-version.js
npm notice 234B utils/connect.js
npm notice 302B utils/deprecation-warning.js
npm notice 4.6kB utils/eventtracking.js
npm notice 2.2kB utils/exit-on-error.js
npm notice 629B utils/explorer.js
npm notice 144B utils/implicit-accountid.js
npm notice 3.3kB utils/inspect-response.js
npm notice 202B utils/log-event.js
npm notice 1.1kB utils/readline.js
npm notice 1.2kB utils/settings.js
npm notice 5.9kB utils/validators-info.js
npm notice 1.8kB utils/verify-account.js
npm notice === Tarball Details ===
npm notice name: near-cli
npm notice version: 1.6.0
npm notice filename: near-cli-1.6.0.tgz
npm notice package size: 109.9 kB
npm notice unpacked size: 356.4 kB
npm notice shasum: edf599150daaf4a9d24c550a7adbe5e2946f0787
npm notice integrity: sha512-bbjUCvE/iG1ob[...]yVeJcMNCbENXQ==
npm notice total files: 72
npm notice

Files published to npm after this change:

npm notice 📦 near-cli@1.6.0
npm notice === Tarball Contents ===
npm notice 1.0kB LICENSE
npm notice 53.6kB README.md
npm notice 619B bin/near
npm notice 8.0kB bin/near-cli.js
npm notice 1.8kB commands/add-key.js
npm notice 2.3kB commands/call.js
npm notice 6.6kB commands/create-account.js
npm notice 995B commands/delete-key.js
npm notice 4.1kB commands/dev-deploy.js
npm notice 1.1kB commands/evm-call.js
npm notice 593B commands/evm-dev-init.js
npm notice 790B commands/evm-view.js
npm notice 2.1kB commands/generate-key.js
npm notice 473B commands/proposals.js
npm notice 932B commands/repl.js
npm notice 1.3kB commands/tx-status.js
npm notice 963B commands/validators.js
npm notice 1.6kB commands/view-state.js
npm notice 2.2kB config.js
npm notice 723B get-config.js
npm notice 10.4kB index.js
npm notice 250B middleware/abi.js
npm notice 0B middleware/base64-args.js
npm notice 192B middleware/initial-balance.js
npm notice 916B middleware/key-store.js
npm notice 2.0kB middleware/ledger.js
npm notice 321B middleware/print-options.js
npm notice 1.1kB middleware/seed-phrase.js
npm notice 1.7kB package.json
npm notice 6.5kB utils/capture-login-success.js
npm notice 1.7kB utils/check-credentials.js
npm notice 2.1kB utils/check-version.js
npm notice 234B utils/connect.js
npm notice 302B utils/deprecation-warning.js
npm notice 4.6kB utils/eventtracking.js
npm notice 2.2kB utils/exit-on-error.js
npm notice 629B utils/explorer.js
npm notice 144B utils/implicit-accountid.js
npm notice 3.3kB utils/inspect-response.js
npm notice 202B utils/log-event.js
npm notice 1.1kB utils/readline.js
npm notice 1.2kB utils/settings.js
npm notice 5.9kB utils/validators-info.js
npm notice 1.8kB utils/verify-account.js
npm notice === Tarball Details ===
npm notice name: near-cli
npm notice version: 1.6.0
npm notice filename: near-cli-1.6.0.tgz
npm notice package size: 35.5 kB
npm notice unpacked size: 140.7 kB
npm notice shasum: 98ddfbb282adf072a2269cde788a573fedd07aa0
npm notice integrity: sha512-xkyGTFM8iPSZA[...]i6dfvrvw/ed7w==
npm notice total files: 44
npm notice

Library becomes 3 times smaller as a bonus :)

@volovyks
Copy link
Collaborator Author

Files diff:
image
image

Copy link
Contributor

@mehtaphysical mehtaphysical left a comment

Choose a reason for hiding this comment

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

Looks good.

As a note to other reviewers, some files are always included: https://docs.npmjs.com/cli/v7/configuring-npm/package-json#files

so there is no need to explicitly include:

  • package.json
  • index.js
  • README.md
  • LICENSE

@volovyks volovyks merged commit f1f16e0 into master May 14, 2021
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