Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
branches:
- main
name: release-please
env:
# renovate datasource=github-releases depName=jdx/mise
MISE_VERSION: 'v2025.11.7'
jobs:
release-please:
runs-on: ubuntu-latest
Expand All @@ -17,13 +20,15 @@ jobs:
# these if statements ensure that a publication only occurs when
# a new release is created:
if: ${{ steps.release.outputs.release_created }}
- uses: jdx/[email protected]
with:
version: ${{ env.MISE_VERSION }}
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: '22'
cache: yarn
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: corepack enable
if: ${{ steps.release.outputs.release_created }}
- run: yarn --immutable
if: ${{ steps.release.outputs.release_created }}
- run: npm publish
Expand Down
33 changes: 9 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,22 @@
name: Tests
on:
push:
env:
# renovate datasource=github-releases depName=jdx/mise
MISE_VERSION: 'v2025.11.8'
jobs:
static-checks:
runs-on: ubuntu-latest
tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- run: corepack enable
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
- uses: actions/checkout@v5
- uses: jdx/[email protected]
with:
cache: yarn
- run: yarn
- run: yarn tsc
- run: yarn lint --max-warnings=0
# This command builds and then prints files which would be included in the published package
- run: yarn pack --dry-run

test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
- run: corepack enable
version: ${{ env.MISE_VERSION }}
- uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: ${{ matrix.node-version }}
cache: yarn
- run: yarn
- run: yarn test --coverage
- run: mise run ci
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # v5.5.1
with:
flags: 'node_${{ matrix.node-version }}'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,17 @@ let receiptIdChunks = expo.chunkPushNotificationReceiptIds(receiptIds);

## Developing

The source code is in the `src/` directory and babel is used to turn it into ES5 that goes in the `build/` directory.
The `mise.toml` file lets you run the full CI pipeline with [mise](https://mise.jdx.dev) and the command `mise run ci`. Each task in the pipeline can also be run separately.

To build, `yarn build`.
`mise install` or `mise en .` will also install tools for your current interactive shell, including [yarn](https://yarnpkg.com/).

To build and watch for changes, `yarn watch`.
Scripts in the `package.json` file can be run with either `yarn <name>` or `node --run <name>`.

The source code is in the `src/` directory and the build output is emitted in the `build/` directory. To build, run `yarn build`.

To typecheck continuously, run `yarn tsc --watch`.

To run tests, run `yarn test`.

## See Also

Expand Down
35 changes: 35 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[tools]
node = "24.11.0"

[hooks]
postinstall = [
"npx corepack enable", # corepack installs stubs for yarn
"yarn install",
]

[tasks.yarn]
run = "yarn install --immutable"

[tasks."checks:types"]
depends = ["yarn"]
run = "node --run tsc"

[tasks."checks:publish"]
description = "This runs the prepack script, building the js files, then prints all file which would be included in the published package"
depends = ["yarn"]
run = "yarn npm publish --dry-run"

[tasks."checks:test"]
depends = ["yarn"]
run = "node --run test"

[tasks."checks:lint"]
depends = ["yarn"]
run = "node --run lint -- --max-warnings=0"

[tasks.ci]
description = "Run all checks"
run = [ { tasks = ["checks:*"] } ]

[settings]
experimental = true
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@
"build": "yarn prepack",
"lint": "eslint",
"prepack": "tsc --project tsconfig.build.json",
"test": "jest",
"tsc": "tsc",
"watch": "tsc --watch"
"test": "jest --coverage",
"tsc": "tsc"
},
"jest": {
"coverageDirectory": "<rootDir>/../coverage",
Expand Down
6 changes: 5 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:best-practices", "helpers:pinGitHubActionDigestsToSemver"],
"extends": [
"config:best-practices",
"customManagers:githubActionsVersions",
"helpers:pinGitHubActionDigestsToSemver"
],
"labels": ["dependencies"],
"packageRules": [
{
Expand Down