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
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
Expand All @@ -25,10 +25,10 @@ jobs:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
registry-url: https://registry.npmjs.org
- run: npm ci
Expand Down
42 changes: 24 additions & 18 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,42 @@
on: [pull_request]
on:
pull_request:
push:
branches:
- main
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
- run: npm ci
- run: npm run lint
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
- run: npm ci
- run: npm run build
- run: git diff --exit-code
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: actions/setup-node@v4
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
- run: npm ci
- run: npx c8 npm run test
Expand All @@ -43,7 +47,7 @@ jobs:
TestBun:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: oven-sh/setup-bun@v2
Expand All @@ -58,20 +62,22 @@ jobs:
TestDeno:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: denoland/setup-deno@v1
- uses: denoland/setup-deno@v2
with:
deno-version: vx.x.x
- run: deno test --allow-read src
deno-version: 2.x
cache: true
- run: deno install --quiet
- run: deno test --allow-read --allow-env src
TestPublish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: 22.x
node-version: 24.x
cache: npm
registry-url: https://registry.npmjs.org
- run: npx jsr publish --dry-run
16 changes: 9 additions & 7 deletions biome.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
{
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
"$schema": "https://biomejs.dev/schemas/2.2.4/schema.json",
"assist": {
"actions": {
"source": {
"organizeImports": "on"
}
}
},
"files": {
"ignore": [
"cjs/**",
"esm/**",
"temp/**",
"coverage/**"
]
"includes": ["**", "!cjs", "!esm", "!temp", "!coverage", "!example.test.ts"]
}
}
4 changes: 2 additions & 2 deletions cli/bun.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import * as fs from "node:fs/promises";
import { URL } from "node:url";
import ts from "typescript";
import { listFiles, listTsSourceStringLiterals } from "./util.ts";
import * as fs from "node:fs/promises";

const srcDir = new URL("../src/", import.meta.url);
const bunDir = new URL("../bun/", import.meta.url);
Expand Down
11 changes: 2 additions & 9 deletions cli/generate-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,11 @@ for await (const { pathname } of listFiles(srcDir, excludeList)) {
const from = pathname.slice(srcDir.pathname.length);
let line = `export * from "./${from}";`;
if (from === "codePoints.ts") {
line = `export * as cp from "./${from}"`;
line = `export * as cp from "./${from}";`;
}
lines.push(line);
}
}
lines.sort((l1, l2) => {
const s1 = l1.split("/").length;
const s2 = l2.split("/").length;
if (s1 === s2) {
return l1 < l2 ? -1 : 1;
}
return s1 < s2 ? -1 : 1;
});
lines.sort((l1, l2) => (l1.toLowerCase() < l2.toLowerCase() ? -1 : 1));
lines.push("");
await fs.writeFile(destUrl, lines.join("\n"));
4 changes: 2 additions & 2 deletions cli/temp.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import ts from "typescript";
import * as fs from "node:fs/promises";
import { URL } from "node:url";
import ts from "typescript";
import { listFiles, listTsSourceStringLiterals } from "./util.ts";
import * as fs from "node:fs/promises";

const srcDir = new URL("../src/", import.meta.url);
const tempDir = new URL("../temp/", import.meta.url);
Expand Down
2 changes: 1 addition & 1 deletion cli/util.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import ts from "typescript";
import * as fs from "node:fs/promises";
import { URL } from "node:url";
import ts from "typescript";

export const listFiles = async function* (
fileUrl: URL,
Expand Down
Loading