Skip to content

Commit

Permalink
fix(wallet_jrpc_client): empty npm package when publishing (#1093)
Browse files Browse the repository at this point in the history
Description
---
* Added a `npm run build` step on npm publish ci jobs
* Bumped `wallet_jrpc_client` version to trigger a new npm publish

Motivation and Context
---
The CI job for publishing `wallet_jrpc_client` npm package did not
include the `dist` folder where the actual code exists. To fix this,
this PR runs a `npm run build` step before publishing to the npm
registry to make sure the `dist` folder is created.

For safety we add it this too to the `typescript-bindings` ci job to
prevent this problem in the future.

How Has This Been Tested?
---
Publishing first into a personal npm scope to test this behaviour

What process can a PR reviewer use to test or verify this change?
---
Does not apply

Breaking Changes
---

- [x] None
- [ ] Requires data directory to be deleted
- [ ] Other - Please specify
  • Loading branch information
mrnaveira authored Jul 26, 2024
1 parent 77cb3d5 commit 3824612
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/npm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,12 @@ jobs:
with:
node-version: "20"
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: bindings
access: 'public'

# Publish the Tari Wallet Daemon client to the NPM registry
publish-wallet-daemon-client:
Expand All @@ -38,8 +40,10 @@ jobs:
with:
node-version: "20"
- run: npm ci
- run: npm run build
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
package: clients/javascript/wallet_daemon_client
access: 'public'

2 changes: 1 addition & 1 deletion applications/tari_dan_wallet_web_ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions clients/javascript/wallet_daemon_client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion clients/javascript/wallet_daemon_client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tari-project/wallet_jrpc_client",
"version": "1.0.7",
"version": "1.0.8",
"description": "Tari wallet JSON-RPC client library",
"publishConfig": {
"access": "public"
Expand Down

0 comments on commit 3824612

Please sign in to comment.