Skip to content

Commit b472710

Browse files
committed
update deps, add @jbrowse/quick-lru, pin eslint to v9
Add explicit Promise<Stats> return type to LocalFile.stat() so the generated .d.ts references the duck-typed Stats interface from filehandle.ts instead of import("fs").Stats. This means consumers no longer need @types/node to type-check against this package. Also add rootDir to tsconfig (required by TS6) and pass --moduleResolution bundler to the CJS build to match the pattern used in other packages in this org.
1 parent 91c3a1c commit b472710

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"format": "prettier --write .",
3838
"prebuild": "yarn clean",
3939
"build:esm": "tsc --outDir esm",
40-
"build:es5": "tsc --module commonjs --outDir dist",
40+
"build:es5": "tsc --module commonjs --moduleResolution bundler --outDir dist",
4141
"build": "yarn build:esm && yarn build:es5",
4242
"postbuild:es5": "echo '{\"type\": \"commonjs\"}' > dist/package.json",
4343
"preversion": "yarn lint && yarn test --run && yarn build",
@@ -53,17 +53,17 @@
5353
"@eslint/js": "^10.0.1",
5454
"@types/node": "^25.5.0",
5555
"@types/range-parser": "^1.2.7",
56-
"@vitest/coverage-v8": "^4.0.15",
57-
"eslint": "^9.16.0",
58-
"eslint-plugin-import": "^2.31.0",
56+
"@vitest/coverage-v8": "^4.1.2",
57+
"eslint": "^9.39.4",
58+
"eslint-plugin-import": "^2.32.0",
5959
"eslint-plugin-unicorn": "^64.0.0",
60-
"prettier": "^3.4.1",
60+
"prettier": "^3.8.1",
6161
"range-parser": "^1.2.1",
62-
"rimraf": "^6.0.0",
62+
"rimraf": "^6.1.3",
6363
"standard-changelog": "^7.0.1",
6464
"typescript": "^6.0.2",
65-
"typescript-eslint": "^8.18.0",
66-
"vitest": "^4.0.15"
65+
"typescript-eslint": "^8.57.2",
66+
"vitest": "^4.1.2"
6767
},
6868
"publishConfig": {
6969
"access": "public"

pnpm-lock.yaml

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

src/localFile.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import type {
44
BufferEncoding,
55
FilehandleOptions,
66
GenericFilehandle,
7+
Stats,
78
} from './filehandle.ts'
89

910
export default class LocalFile implements GenericFilehandle {
@@ -56,7 +57,7 @@ export default class LocalFile implements GenericFilehandle {
5657
return readFile(this.filename, options)
5758
}
5859

59-
public async stat() {
60+
public async stat(): Promise<Stats> {
6061
return stat(this.filename)
6162
}
6263

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@
66
"target": "es2020",
77
"moduleResolution": "nodenext",
88
"module": "nodenext",
9+
"rootDir": "./src",
910
"sourceMap": true,
1011
"outDir": "./dist",
1112
"strict": true,
1213
"removeComments": false,
13-
"skipLibCheck": true,
14+
"skipLibCheck": false,
1415
"declaration": true,
1516
"noUncheckedIndexedAccess": true,
1617
"allowSyntheticDefaultImports": true,

0 commit comments

Comments
 (0)