omnia-utils-js
v1.9.26
Published
omnia utility library
Readme
myredvest utilities library
Publishing
Automated publishing
- Ensure the accurate version is reflected in the feature branch
- Open a PR against
masterwith that feature branch - Ensure the PR build succeeds and approvals have been met
- Merge to
master - Let the CI/CD pipeline on
masterbuild, test, and publish, noting the version from step 1 fornpm installelsewhere
Manual Publishing (if necessary)
Initial One-Time Setup
- Login to Artifactory
- Select "Set Me Up" in the profile dropdown menu
- Select
npmande-mrv-npm-virtualfor 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
.npmrcfile; this is most likely located at~/.npmrcA. These changes can also be made in the.npmrcfile at the root of this repo, BUT they must NOT be committed as the code contains private user-specific information - Modify or add the
registryvalue in that global.npmrctohttps://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
mastervia a PR - Checkout the latest
masterbranch - Bump the package version number accordingly (can do via
npm versioncommand 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.npmrcauthentication 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
