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
1 change: 0 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ root = true

[*]
ij_html_space_inside_empty_tag = true
max_line_length = 140
end_of_line = lf
insert_final_newline = true
charset = utf-8
Expand Down
13 changes: 13 additions & 0 deletions .github/actions/node-setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
runs:
using: "composite"
steps:
- name: Use Node.js LTS
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: npm
cache-dependency-path: package-lock.json

- name: Install modules
shell: bash
run: npm ci --prefer-offline --no-audit --no-fund
96 changes: 78 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,96 @@
name: ci

permissions:
contents: read
pull-requests: read

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- master
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:
build:
type-check:
name: Type check
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup environment (node + install)
uses: ./.github/actions/node-setup

- name: Run type check
run: npm run type-check

lint:
name: Lint check
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup environment (node + install)
uses: ./.github/actions/node-setup

- name: Run lint check
run: npm run lint:check

format:
name: Format check
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup environment (node + install)
uses: ./.github/actions/node-setup

- name: Run format check
run: npm run format:check

test:
name: Run tests (Node ${{ matrix.node-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [ 20, 21, 22, 23, 24 ]
node-version: ['20.x', '21.x', '22.x', '23.x', '24.x', '25.x']

steps:
- uses: actions/checkout@v4
- name: Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Use Node.js ${{ matrix.node-version }}
- name: Set up Node.js (matrix)
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install modules
run: npm install

- name: Type check
run: npm run type-check
cache: 'npm'
cache-dependency-path: 'package-lock.json'

- name: Lint
run: npm run lint:check

- name: Format
run: npm run format:check
- name: Install
run: npm ci

- name: Run tests on Node.js ${{ matrix.node-version }}
run: npm test
- name: Run tests
id: run-tests
run: npm run test
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# opfs-mock

In-memory implementation of the [origin private file system](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system). Its main utility is for testing OPFS-dependent code in Node.js. It's tested
on Node.js versions 20-24.
on Node.js versions 20-25.

## Installation

Expand Down
7 changes: 4 additions & 3 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.6/schema.json",
"formatter": {
"useEditorconfig": true,
"formatWithErrors": true,
"attributePosition": "multiline",
"ignore": ["dist"]
"includes": ["**", "!**/dist"],
"lineWidth": 140
},
"linter": {
"rules": {
Expand All @@ -20,7 +21,7 @@
"noNonNullAssertion": "off"
}
},
"ignore": ["dist"]
"includes": ["**", "!**/dist"]
},
"javascript": {
"formatter": {
Expand Down
Loading