Setting up your npm-based application(s) to consume Never-Ending Support (NES).
There are 3 things to configure to consume an NES package, well technically 4 but since we are tech people and not business people we're going to ignore the sales/token acquisition process. Anyway on to the those 3 steps:
1. Configure a .npmrc file in the root of your project
2. Update your current dependencies to point to the NES versions
3. Configure an "overrides" section of your package.json
Why do I need to set 3 things to use NES packages?
A brief explanation of each of the steps above and the purpose they serve should answer that question.
The purpose of a .npmrc file is to provide configuration to the npm command line tool. This allows npm (or other package manager tools like yarn and pnpm) to know about the NES repository to be able to retrieve NES versions of the packages you are using. The values set within there define the URI for the repository hosting @neverendingsupport scoped packages. The other information provided there is an authentication token associated with this URI to ensure your access to the NES packages.
The dependencies will have a minor change, in that the keys will not change but the version will be updated. This allows your code to use the same imports that it currently does. The new version will look something like this:
"npm" represents that the dependency is an npm package
"@neverendingsupport/pkg" is the name of the NES hosted library
"version" is the version of the NES hosted library
The overrides works in conjunction with the dependency structure above, to allow the dependency key to remain the same, while telling the command line tool where to get the package.