helen-common-infra v1.0.5
Helen Common Infra
Azure Typescript SDK utils library to speed up and standardize Typescript based infra development in Helen.
This repository can be imported as an NPM library to different infra repos that can benefit from Azure TS SDK utils.
Getting started
You need to install the following OS dependencies:
- node.js (lts)
Then, to install the code dependencies, run:
npm i
The development flow
Make code changes
Format code after making the code changes
npm run format
Check that the code is formatted by the prettier rules
npm run check
Run unit tests
nmp run test
Audit the used npm libs
npm audit --registry=https://registry.npmjs.org/
Transpile the TS source code to JS
npm run build
If need be, test the code changes manually using the transpiled JS
For manual testing, to link your local helen-common-infra
codebase as a dependency to another Helen repo and to simultaneously reflect your code changes, and thus to be able to develop helen-common-infra
, go to the other Helen repo folder and run:
npm link <relative-path-to-helen-common-infra>
For example, to add your local helen-common-infra
as a dependency to your local helen-repo-x
, which is assumed to be located at the same parent folder than your helen-common-infra
, prompt yourself to your local helen-repo-x
and then run:
npm link ../helen-common-infra
This creates a symlink that points from helen-repo-x/node_modules/helen-common-infra
to your local helen-common-infra
. After this, your changes to your helen-common-infra
should be reflected to your ´helen-repo-x´ after you run:
npm run build
NOTE: npm run build
will transpile helen-common-infra
as JavaScript, which will the the compiled code that can be used by any dependent Helen repos, like helen-repo-x
.
Using helen-common-infra in other Helen applications
To install helen-common-infra
to other Helen applications as an NPM dependency, you need to:
Go to the repo root folder of the node.JS application where you would like to import
helen-common-infra
as an NPM dependencyCreate yourself an access token for accessing
helen-common-infra
feed. Go to the feed view of helen-common-infra in Azure DevOps, where you need to click the "Connect to feed" button and then follow the instructions to store the generated access token content to your local.npmrc
file at the repo's root folder.Then, after creating and setting up the
.npmrc
file, you should be able to addhelen-common-infra
as a dependency and to install its codebase locally.
If you want to add the latest helen-common-infra
as a dependency, run:
npm install helen-common-infra
Or, if you want to specify certain version of helen-common-infra
to be added as a dependency, e.g. "1.0.0", run:
npm install helen-common-infra@1.0.0
Versioning helen-common-infra
Semantic versioning is recommented:
Before releasing a patch / bugfix, run:
npm version patch
Before releasing a new feature, run:
npm version minor
Before releasing a breaking change of any kind, run:
npm version major
TODO Issue#21822
- Implement a CI pipeline for releasing new helen-common-infra
versions. The pipeline could have a semver option based on which correct npm version [...]
command would be run by the pipeline.
7 months ago