omnia-utils-js
v1.9.26
Published
omnia utility library
Downloads
4
Readme
myredvest utilities library
Publishing
Automated publishing
- Ensure the accurate version is reflected in the feature branch
- Open a PR against
master
with that feature branch - Ensure the PR build succeeds and approvals have been met
- Merge to
master
- Let the CI/CD pipeline on
master
build, test, and publish, noting the version from step 1 fornpm install
elsewhere
Manual Publishing (if necessary)
Initial One-Time Setup
- Login to Artifactory
- Select "Set Me Up" in the profile dropdown menu
- Select
npm
ande-mrv-npm-virtual
for the "Package Type" and "Repository" respectively - Type your Artifactory password into the credentials input and submit (lock icon button) to populate the commands with the properly formatted text
- Copy the "Using basic authentication" code snippet, including your base64 encoded username:password combo
- Paste that code snippet into your global
.npmrc
file; this is most likely located at~/.npmrc
A. These changes can also be made in the.npmrc
file at the root of this repo, BUT they must NOT be committed as the code contains private user-specific information - Modify or add the
registry
value in that global.npmrc
tohttps://artifactory.lowes.com/artifactory/api/npm/e-mrv-npm-virtual/
Repeat For Every New Published Version
- Ensure all changes are committed and have been approved and merged to
master
via a PR - Checkout the latest
master
branch - Bump the package version number accordingly (can do via
npm version
command as needed; be sure to use "patch" or correct version bump strategy) npm run build
- Build the compiled filesnpm run test
- Ensure 100% of tests are passing with 100% test coverage, otherwise fix to meet those thresholdsnpm publish
- Publish the new version (this relies on.npmrc
authentication steps above)
Store Number logic
For production we will always use 1 store number, which is where the application is deployed.
For lower environments, including local, we can override the store number value for various conditions using localStorage
storenumber
- this is the "real" store number set by the myredvest login applicationapiStoreNumber
- the store number used in the base URL portion of all API requests, including BFF and GenesisitemSearchStoreNumber
- the store number used as a query param in all item search requestsbffStoreNumber
- the store number used in the base URL portion of only BFF requests (likeapiStoreNumber
, but more specific and will override that value for BFF requests if this is set)
Each of these values has defaults, so it is safe to use them without having declared their localStorage
counterparts