@justair/justair-library
v4.8.41
Published
JustAir Internal Library
Maintainers
Keywords
Readme
justair-library
Overview
The justair-library is an NPM package that is installed on all backend and AWS Lambda services within the JustAir ecosystem. It provides essential utilities and shared functionality used across various JustAir services.
Prerequisites
To access and install the justair-library, you must be a part of the JustAir organization on npmjs.org. Ensure you have the following:
- NPM - Node Package Manager
- Access Token - Obtain your access token from the JustAir organization on npmjs.org
Installation
To install the justair-library, use the following command:
npm install @justair/justair-libraryEnsure you have authenticated with npmjs.org using your access token:
npm login
# Follow the prompts to authenticateAlternatively, you can set your token directly in your NPM configuration:
npm set //registry.npmjs.org/:_authToken=YOUR_ACCESS_TOKENUsage
After installation, you can import and use the library in your project:
const justair = require("@justair/justair-library");
// Example usage
justair.someUtilityFunction();Upgrading Versions
To upgrade to a newer version of the justair-library, run:
npm update @justair/justair-libraryEnsure you review the release notes and any potential breaking changes before upgrading.
Publishing a New Version
Testing Locally Before Publishing
Before publishing to npm, it's recommended to test your package locally:
Build and pack the library locally:
npm run build # If you have a build step npm packThis creates a
.tgzfile (e.g.,justair-justair-library-1.0.0.tgz)Install in a test project:
In your test project directory:
npm install /path/to/justair-library/justair-justair-library-1.0.0.tgzOr using npm link for development:
# In the justair-library directory npm link # In your test project directory npm link @justair/justair-libraryTest your changes:
Import and test the library in your test project to ensure everything works as expected.
Unlink when done (if using npm link):
# In your test project directory npm unlink @justair/justair-library # In the justair-library directory npm unlink
Publishing to npm
Once you've tested locally and are ready to publish:
Update the version number:
Modify the version field in
package.jsonaccording to semantic versioning guidelines.Build the package (if applicable):
Ensure any build steps are completed:
npm run buildLogin to npm:
Ensure you are authenticated with the JustAir organization on npmjs.org:
npm login # Follow the prompts to authenticatePublish the package:
Run the following command to publish the updated package:
npm publish --access public
Contributing
If you would like to contribute to this project, please fork the repository and submit a pull request. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Contact
For any inquiries or support, please contact the development team.
