-
Notifications
You must be signed in to change notification settings - Fork 34
Updating and publishing to data‐point
To update and subsequently publish data-point a few things are required:
Read and write access to the main data-point repository here
GitHub - ViacomInc/data-point: JavaScript Utility for collecting, processing and transforming data
Maintainer rights to the following libraries in npmjs (NOTE: It is NOT necessary to have access to all of these to publish the changes. You only really need access to the packages you are updating/publishing):
Core Data-Point: npm: data-point
Data-Point Service: npm: data-point-service
Data-Point Cache: npm: data-point-cache
Data-Point Express: npm: data-point-express
Data-Point Codemods: npm: data-point-codemods
Bench Trial: npm: bench-trial
- Clone data-point repo to local environment:
git clone git@github.com:ViacomInc/data-point.git
- In github, there is a tag for every version of data-point available in npmjs. You should identify which version you would like to update.
Ex: at the time of this writing. Webplex is using version data-point-service@4.2.7-alpha.0
- Checkout the tag in a new branch in your local, replace
{version-tag-to-update}
with the release tag you’re updating and update{name-of-fix-branch}
with an appropriate semantic name:
git checkout -tag tags/{version-tag-to-update} -b {name-of-fix-branch}
Ex:
git checkout tags/data-point-service@4.2.7-alpha.0 -b feat/update-ioredis-package
-
Make changes in data-point repo
-
Commit changes utilizing commitizen:
yarn commit
- Push changes to new branch in data-point repo:
git push origin {name-of-fix-branch}
- After the new branch is created and you’re ready to publish to NPM!
NOTE: Before publishing please double check all your work and the current version numbers in npmjs do not collide with the suggested new versions when lerna attempts to publish
To publish you can run the following command:
yarn run lint && yarn jest --coverage && yarn lerna publish --conventional-commits
The output of the lerna publish command should look something like:
yarn run v1.22.22
$ /Users/timothymahon/projects/data-point/node_modules/.bin/lerna publish --conventional-commits prepatch
lerna notice cli v3.16.2
lerna info versioning independent
lerna info publish rooted leaf detected, skipping synthetic root lifecycles
lerna info Looking for changed packages since data-point-cache@4.1.1-alpha.0
Changes:
- data-point-express: 5.0.5-alpha.0 => 5.0.6-alpha.0
- data-point-service: 4.2.8-alpha.0 => 4.2.9-alpha.0
? Are you sure you want to publish these packages? (ynH)
If all looks good then you can type y and press enter to publish the new version to npmjs.
This command should also add a commit hash called publish with the version updates to packages.json etc.
Example: Publish · ViacomInc/data-point@c159b8c
- Finally you can validate your changes were pushed to npmjs by checking the npmjs links above. After the packages are published you’re ready to use pull them!