Page MenuHomePhabricator

[chronik-client] Add prepublish command to prevent unbuilt npm deployments
ClosedPublic

Authored by bytesofman on Jul 17 2023, 04:19.

Details

Summary

Depends on D14270

Package must be built before deployment. Adding 'prepublish' command so that npm publish will build the package before publishing.

Test Plan

Confirm spelling of "prepublish" and that npm run build builds the package

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

A few more things to consider before getting this in.

  • None of the other packages in the monorepo use yarn, make sure yarn is not in this package, unless it needs to be
  • Probably also want to run the tests before publishing

Remove version bump

This should be added to CI. However, it's still worth adding this here for now, to prevent any accidental publishing without first running npm run build. This step will be required in eventual CI add.

Getting cherry pick failures, probably needs rebase after D14270 landed yesterday

Why do you need to build before publishing ?

Why do you need to build before publishing ?

In this npm package, the actual module comes from the dist/ folder. npm run build populates the dist folder with the latest code.

This revision is now accepted and ready to land.Jul 19 2023, 11:42