This section is intended for contributors working on the SDK codebase.
You'll need:
Copy the Deno version specified under the deno-version field in .github/workflows/build.yml, then run the following
command to upgrade Deno to that exact version:
deno upgrade --version <deno-version>where <deno-version> is the version taken from the workflow file.
Run:
deno task commitdeno fmtdeno task buildOr step-by-step:
deno task bundle
deno task transpile
deno task minifybundle: bundles the SDK tobuild/krenalis.bundle.jstranspile: transpiles to ES5 and createsbuild/krenalis.es5.jsminify: minifies intodist/krenalis.min.js
deno task build:es6 # Builds dist/krenalis.es6.min.js
deno task build:cjs # Builds dist/krenalis.bundle.cjsdeno testUse this to format, test, and build before commits:
deno task commitTo update Deno to the latest available release:
- Upgrade Deno:
deno upgrade - Confirm the installed version:
deno --version - Refresh dependencies:
deno update - Run the full test suite before committing:
deno task commit - Update the
deno-versionfield in.github/workflows/build.ymlto match the new version
To update SWC to the latest release:
- Update the npm packages:
npm install @swc/core@latest @swc/cli@latest --save-dev - Run the full test suite before committing:
deno task commit
To update esbuild to the latest release:
- Update the npm package:
npm install esbuild@latest --save-dev - Run the full test suite before committing:
deno task commit
-
Ensure you're on the
mainbranch and that your local repository — including tags — is up to date:git switch main git fetch --all --tags git pull --ff-only
-
Build the distribution files:
deno task build deno task build:es6 deno task build:cjs
-
Update the version in
package.json:npm version patch --no-git-tag-version git add package.json package-lock.json
(Use
npm version minorif you want to release a minor version.) Then copy the new version number. -
Commit and create a tag with the version number:
git commit -m "Release vX.Y.Z" git tag vX.Y.Z -
Verify the commit and tag:
git log -1 --oneline --decorate
-
Push the commit and all tags:
git push git push --tags
-
Publish to NPM:
npm publish