Thanks for contributing! This is a published library; new versions are released
to NPM automatically
on merge to main.
- Ensure you have GitHub push access.
- Get your environment set up by running
npm ci. - Make your changes locally in a git clone of the repo in your own branch.
- As you go, commit along the way so that you get type checking, testing, etc. to run.
- Run
npx tscto type-check the project. - Run
npm testfor the unit tests. They run the*.spec.tsfiles directly with the Node.js built-in test runner.
The package is published as compiled JavaScript with type declarations in the
npm/ folder, which is created by the prepublishOnly hook:
.npm/compile.tstranspiles the TypeScript sources using@swc/coreand rewrites the.tsimport specifiers to.js.- TypeScript 7 emits the type
declarations, using
.npm/tsconfig.npm.json.
Run npm run prepublishOnly to build it locally.
- Finally, create a commit that packages up all the changes.
- Use conventional commits
(e.g.
fix:,feat:, etc.) to prefix the title. - Reference any applicable Jira tickets (e.g.
NPE-123) in the commit message. - Push your branch and create a pull request.
- Get the code reviewed.
- Once approved and CI passes, rebase or squash away!
semantic-releasein the Test&Release workflow takes care of creating a new GitHub release and publishing the package to NPM.
Once the new version is published, consumers can bump their dependency on
@nrfcloud/fetch-with-debug to pick it up.