A monorepo of shared libraries for Nova projects.
npm install @skillswaveca/nova-shared-libraries
json
"@skillswaveca/nova-shared-libraries": "^5.0.0",
`
to your projects package.json or by running npm install @skillswaveca/nova-shared-librariesInstallation
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
`bash
npm install -g pnpm
`
Once installed you can install the dependencies of the repository by running the following command:
`bash
pnpm install
`
Library documentation
You can find the documentation in the github pages of this repository. HereIf you want to generate the documentation for a single package you can run the following command:
`bash
pnpm run generate-docs --filter
`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:
`bash
pnpm run aggregate-docs
`To view the generated documentation locally, run:
`bash
pnpm run docs
`This 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
`bash
pnpm -r test
`Or you can run tests for an individual workspace by running
`bash
cd packages/{packageToTest}
pnpm run test
`Developing 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:
1. At the root of this repo, run
npm link
2. Go to the repo you are working on and run npm link @skillswaveca/nova-shared-libraries
3. Any changes you make in @skillswaveca/nova-shared-libraries should 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:`bash
pnpm run create-library
`After 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.
`bash
> nova-shared-libraries@1.0.0 create-library
> node ./scripts/create-library.jsEnter the package name: nova-model
Enter the package description: A library for defining models in the nova ecosystem
`Release 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
$3
Use Conventional Commits format to trigger the correct version bump:
#### Patch Release (x.x.X) - Bug Fixes
`bash
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
`bash
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:`bash
git commit -m "feat!: update to ESLint 9BREAKING 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:`bash
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:
`bash
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"
`$3
To skip the release workflow entirely:
`bash
git commit -m "chore: update dev dependencies [skip ci]"
`$3
If you need to create a release manually:
1. Update version in all
package.json files
2. Update CHANGELOG.md
3. Commit with [skip ci]
4. Create GitHub release
5. Publish to npm: pnpm -r publish --access public`