Skip to content

Commit edd8347

Browse files
committed
chore: local support for node --strip-types
1 parent e7d6042 commit edd8347

25 files changed

+102
-68
lines changed

.github/workflows/run-tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
with:
2222
node-version: ${{ matrix.node-version }}
2323
check-latest: true
24-
- run: npm i
24+
cache: npm
25+
- run: npm ci
2526
- run: npm run test:coverage
2627
env:
2728
CI: true

.github/workflows/typecheck.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Typecheck
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: [master]
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Use Node.js 24.x
15+
uses: actions/setup-node@v4
16+
with:
17+
node-version: 24
18+
check-latest: true
19+
cache: npm
20+
- run: npm ci
21+
- run: npm run typecheck
22+
env:
23+
CI: true

benchmarks/benchmark.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fdir } from "../src/index";
1+
import { fdir } from "../src/index.ts";
22
import { fdir as fdir5 } from "fdir5";
33
import { fdir as fdir4 } from "fdir4";
44
import fdir3 from "fdir3";
@@ -17,7 +17,7 @@ import { getAllFilesSync, getAllFiles } from "get-all-files";
1717
import packageJson from "../package.json";
1818
import { readFileSync, readdirSync, writeFileSync } from "fs";
1919
import CSV2MD from "csv-to-markdown-table";
20-
import { getSystemInfo } from "./export";
20+
import { getSystemInfo } from "./export.ts";
2121
import { readdir } from "fs/promises";
2222

2323
async function benchmark() {

benchmarks/fdir-benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import child_process from "child_process";
2-
import { Fdir } from "../src/index";
2+
import { Fdir } from "../src/index.ts";
33
import b from "benny";
44

55
type Version = (typeof versions)[number] | "current";

benchmarks/glob-benchmark.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { fdir } from "../src/index";
1+
import { fdir } from "../src/index.ts";
22
import { glob, globSync } from "glob";
33
import fg from "fast-glob";
44
import tg from "tiny-glob";

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"scripts": {
99
"prepublishOnly": "npm run test && npm run build",
1010
"build": "tsdown",
11+
"typecheck": "tsc",
1112
"format": "prettier --write src __tests__ benchmarks",
1213
"test": "vitest run __tests__/",
1314
"test:coverage": "vitest run --coverage __tests__/",
@@ -77,7 +78,7 @@
7778
"tiny-glob": "^0.2.9",
7879
"ts-node": "^10.9.1",
7980
"tsdown": "^0.12.5",
80-
"typescript": "^5.3.2",
81+
"typescript": "^5.8.3",
8182
"vitest": "^0.34.6",
8283
"walk-sync": "^3.0.0"
8384
},

src/api/async.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { Output, Options, ResultCallback } from "../types";
2-
import { Walker } from "./walker";
1+
import type { Output, Options, ResultCallback } from "../types.ts";
2+
import { Walker } from "./walker.ts";
33

44
export function promise<TOutput extends Output>(
55
root: string,

src/api/functions/get-array.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Options } from "../../types";
1+
import type { Options } from "../../types.ts";
22

33
export type GetArrayFunction = (paths: string[]) => string[];
44

src/api/functions/group-files.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Group, Options } from "../../types";
1+
import type { Group, Options } from "../../types.ts";
22

33
export type GroupFilesFunction = (
44
groups: Group[],

0 commit comments

Comments
 (0)