@nrfcloud/lambda-helpers is a published library: it provides helper functions
for AWS Lambda functions used in nRF Cloud and is published to
NPM.
- 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 testto run the unit tests.
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.
Now that you have a new version of @nrfcloud/lambda-helpers published, you can
bump the dependency in the projects that consume it.