Skip to content
Merged
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
40 changes: 32 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:

env:
# Unify cypress cache folder to avoid missing binaries on macOS/Windows
CYPRESS_CACHE_FOLDER: ~/.cypress-cache

jobs:
formatting:
runs-on: ubuntu-latest
Expand All @@ -19,11 +23,11 @@ jobs:

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "20"

- run: npm install
node-version: "24"
- run: corepack enable
- run: pnpm install

- run: npx prettier --check .
- run: pnpm exec prettier --check .

typechecks:
runs-on: ubuntu-latest
Expand All @@ -35,11 +39,11 @@ jobs:

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "20"
node-version: "24"
- run: corepack enable
- run: pnpm install

- run: npm install

- run: npx tsc
- run: pnpm exec tsc

e2e-chrome:
runs-on: ubuntu-latest
Expand All @@ -49,6 +53,11 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "24"
- run: corepack enable

- uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6
with:
browser: chrome
Expand All @@ -61,6 +70,11 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "24"
- run: corepack enable

- uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6
with:
browser: firefox
Expand All @@ -73,6 +87,11 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "24"
- run: corepack enable

- uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6
with:
browser: edge
Expand All @@ -85,6 +104,11 @@ jobs:
with:
persist-credentials: false

- uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561 # v2
with:
node-version: "24"
- run: corepack enable

- uses: cypress-io/github-action@f790eee7a50d9505912f50c2095510be7de06aa7 # v6
with:
browser: webkit
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/*
.corepack/*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
pnpm-lock.yaml
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ The library is implemented in [withered](https://en.wikipedia.org/wiki/Gunpei_Yo

There is ample JSDoc documentation so that the TypeScript compiler may be used for typechecking in strict mode:

npm test
pnpm test

The code is formatted with slightly non-standard prettier:

npm run format
pnpm run format

End-to-end tests are done using Cypress.

Expand Down
27 changes: 27 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
description = "Node.js and pnpm via Corepack";

inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};

outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];

forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = [
pkgs.nodejs_22
pkgs.corepack_22
];

shellHook = ''
export COREPACK_HOME="$PWD/.corepack"
'';
};
});
};
}
Loading
Loading