@skillswaveca/nova-shared-libraries
v5.1.0
Published
A monorepo of shared libraries for Nova projects.
Readme
Nova shared libraries
This repository contains a collection of shared libraries used across the Nova ecosystem. These libraries are designed to be used across multiple projects and are intended to simplify the development process.
Usage
This package is published to npm. You can include it in your project by adding
"@skillswaveca/nova-shared-libraries": "^5.0.0",to your projects package.json or by running npm install @skillswaveca/nova-shared-libraries
Installation
This nova shared repository is a monorepo, which means that it contains multiple packages. It uses pnpm, so you will need to install that first
npm install -g pnpmOnce installed you can install the dependencies of the repository by running the following command:
pnpm installLibrary documentation
You can find the documentation in the github pages of this repository. Here
If you want to generate the documentation for a single package you can run the following command:
pnpm run generate-docs --filter <package-name>While it is not necessary to generate docs yourself as the CI will do it for you, you can aggregate the documentation of all the packages by running the following command:
pnpm run aggregate-docsTo view the generated documentation locally, run:
pnpm run docsThis will build the docs and start a local server (using sirv) at http://localhost:8080 (or next available port).
Testing
You can run all tests by running
pnpm -r testOr you can run tests for an individual workspace by running
cd packages/{packageToTest}
pnpm run testDeveloping locally
If you want to change this package simultaneously with a related Nova repo, you can do that using npm link (docs).
The basic steps are:
- At the root of this repo, run
npm link - Go to the repo you are working on and run
npm link @skillswaveca/nova-shared-libraries - Any changes you make in
@skillswaveca/nova-shared-librariesshould be automatically included in the repo.
Adding a library to the repository
This repository contains a helper script for creating new libraries. You can run the following command to create a new library:
pnpm run create-libraryAfter running the create-library script, you will be prompted to enter the name of the library you want to create and the description. The script will then create a new directory with the name you provided and will initialize a new package inside it.
> [email protected] create-library
> node ./scripts/create-library.js
Enter the package name: nova-model
Enter the package description: A library for defining models in the nova ecosystemRelease Process
This repository uses semantic-release to automate versioning and releases. When you merge to main, the release workflow automatically:
- Analyzes commit messages to determine the version bump
- Generates CHANGELOG.md
- Creates a GitHub release
- Publishes to npm
Commit Message Format
Use Conventional Commits format to trigger the correct version bump:
Patch Release (x.x.X) - Bug Fixes
git commit -m "fix: correct logging output format"
git commit -m "fix(drivers): handle null response from API"Minor Release (x.X.0) - New Features
git commit -m "feat: add new authentication method"
git commit -m "feat(router): support custom middleware validation"Major Release (X.0.0) - Breaking Changes
Use BREAKING CHANGE: in the commit body or footer:
git commit -m "feat!: update to ESLint 9
BREAKING CHANGE: Migrated to ESLint 9 flat config format.
Projects using this library will need to update their ESLint configuration."Or use the ! suffix on the type:
git commit -m "feat!: remove deprecated API methods"
git commit -m "refactor!: change logger interface"Other Commit Types (No Release)
These don't trigger a release:
git commit -m "chore: update dependencies"
git commit -m "docs: fix typo in README"
git commit -m "style: format code"
git commit -m "test: add unit tests for driver"
git commit -m "refactor: simplify config logic"
git commit -m "ci: update GitHub Actions workflow"Skipping CI/Release
To skip the release workflow entirely:
git commit -m "chore: update dev dependencies [skip ci]"Manual Release
If you need to create a release manually:
- Update version in all
package.jsonfiles - Update CHANGELOG.md
- Commit with
[skip ci] - Create GitHub release
- Publish to npm:
pnpm -r publish --access public
