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

build: publish to npm only if needed #432

Merged
merged 11 commits into from
Oct 2, 2023
Merged

Conversation

peterpeterparker
Copy link
Member

@peterpeterparker peterpeterparker commented Oct 2, 2023

Motivation

So far, we've been incrementing the version of all libraries when we publish, even if some of them received no improvements or fixes. I find this approach a bit cumbersome. Since I propose to commit to semantic versioning (#431), a better approach would be most welcomed. That's why this PR introduces a publication script that handles the publishing of libraries only if they were actually modified.

Changes

  • use shasum to compare local library with npm and publish only upon differences

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

size-limit report 📦

Path Size
@dfinity/ckbtc 6.38 KB (0%)
@dfinity/cmc 1.01 KB (0%)
@dfinity/ledger 2.92 KB (0%)
@dfinity/nns 29.79 KB (0%)
@dfinity/nns-proto 76.3 KB (0%)
@dfinity/sns 14.85 KB (0%)
@dfinity/utils 3.81 KB (0%)
@dfinity/ic-management 1.94 KB (0%)

@peterpeterparker peterpeterparker marked this pull request as ready for review October 2, 2023 07:16
Copy link
Contributor

@lmuntaner lmuntaner left a comment

Choose a reason for hiding this comment

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

LGTM, how did you test that it works?

@peterpeterparker
Copy link
Member Author

LGTM, how did you test that it works?

I compared with juno-js.

I get different shasum using ic-js, which is correct as most recent changes are not published, and similar shasum in juno-js because of the contrary.

@lmuntaner
Copy link
Contributor

LGTM, how did you test that it works?

I compared with juno-js.

I get different shasum using ic-js, which is correct as most recent changes are not published, and similar shasum in juno-js because of the contrary.

Thanks!

@peterpeterparker peterpeterparker merged commit 16a3ea4 into main Oct 2, 2023
9 checks passed
@peterpeterparker peterpeterparker deleted the build/publish-npm branch October 2, 2023 10:12
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