https://github.com/digabi/node-packages
https://github.com/digabi/node-packages
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/digabi/node-packages
- Owner: digabi
- License: other
- Created: 2025-07-29T07:03:47.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-01-09T15:07:07.000Z (5 months ago)
- Last Synced: 2026-01-12T04:29:26.381Z (5 months ago)
- Language: TypeScript
- Size: 790 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Digabi Node Packages
This repository contains utility packages for Digabi codebase.
### Package guidelines
- Typescript only
- Good unit test coverage
- If a devDependency is needed in all packages, add it to the root level package.json. Otherwise it should go in the packages own package.json
- Let’s keep dependencies to a minimum and only add them when they’re truly needed. Try to avoid pulling in a large library just for a single function.
#### Naming convention
No strict naming conventions. Package name should reflect the context and functionality. Feel free to add `-utils` ending if you feel like the package
is only an extension/helper and it could be confusing to name it only based on the context.
### Package structure
- `__tests__` contains unit tests for package. Each package should have unit tests that cover the usage.
- `src` contains actual code
### Creating a new package
1. Copy an existing package under `packages/` as a template and modify relevant parts.
- Try `crypto-utils` or `2fa` as pretty minimal examples.
2. Add an entry for your package to `.github/workflows/publish.yml`.
3. Run `just new-package foobar` where `foobar` is the package's name.
- The prefix `@digabi/` will be added automatically.
4. Sign into npmjs.com and navigate to the new package's settings.
5. Setup "Trusted publisher".
- Set "publishing access" to "require two-factor authentication and disallow tokens".
6. Ensure connection works by creating a new version with `publish.yml`.
### Updating a package
Publishing should be done only via github actions by triggering the `Publish new version` workflow.
1. Go to https://github.com/digabi/node-packages/actions/workflows/publish.yml and choose `Run workflow`.
2. If you want to create a pre release from a feature branch, select that as the branch to run workflow from.
3. Select package to update
4. Select what kind of version bump would you like to do. If doing a `pre` type release, the version will be
tagged with the branch name for example `feature-add-sort-function`. If normal release then it will be tagged as `latest`.