Public helper packages with commonly used utilities / helpers.
![]()
functions to read information about the current branch either locally or inside Github actions.
![]()
Our recommended config for eslint. We provide two versions, one for usage in node projects and one for Angular.
![]()
Contains some custom es lint rules. Those are used in our recommended eslint config.
scripts to prepare and publish libs inside mono-repos with lerna
various utility functions, constants and helper types - usable in Node and Browsers
Add a .npmrc file to the root of your project:
@shiftcode:registry=https://npm.pkg.github.com
npm inpm run build- start developing
When opening a PR lerna publishes a new prerelease version with the preId -prXX.{COUNT}.
By creating this version lerna creates a commit with the updated versions in the package.json. It does not update the peerDependencies versions.
After merging the PR back to the master a new release is published with the graduated version (eg. 1.0.1-pr55.7 -> 1.0.1).
ensure your branch is named correctly by the convention
#XX-namewhereXXis your github issue number.
If it happens that you already have another commit locally, before updating the branch with this build(release):.. commit:
use
rebaseinstead ofmerge
We use lerna to manage the packages.
- For lerna to know the topological order of packages, we define the dependencies between the packages in each individual package as
devDependency - For testing reasons we compile against the source code to run tests without prior compiling of the source, this requires
tsconfig.pathsdefinitions and alsomoduleNameMapperinjest.config.js
We support two runtimes: node and latest browser versions.
Node 22 (which is also supported by AWS Lambda) supports 97% of es2022 features
(no version supports 100%) and 100% of es2023 features.
The only es2022 feature that is currently not supported and needs a polyfill when using it is
RegExp Match Indices (shows up in flags) (see 2ality blog for insights).
Polyfill can be found here: https://www.npmjs.com/package/regexp-match-indices.
For modern browsers the latest fully supported version is es2023 (see can-i-use)
which therefore is the target for @shiftcode/utilities package (see package README).