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
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ updates:
# Version updates wait 7 days; security updates are never delayed.
cooldown:
default-days: 7
# @types/node follows the lowest supported Node (engines); a newer major would let code
# compile against APIs that runtime lacks, so majors move only with the engines floor.
ignore:
- dependency-name: "@types/node"
update-types: ["version-update:semver-major"]
groups:
# A dependency joins the first group it matches, so the groups run from most to
# least specific. The pi packages pin each other with caret ranges: a lone bump
Expand Down
4 changes: 2 additions & 2 deletions extensions/web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function declaredCharset(contentType: string): string {

/** A decoder for `contentType`'s declared charset, or the platform default (UTF-8) for a
* label TextDecoder does not recognize: a bad or made-up charset must not fail the fetch. */
function decoderFor(contentType: string): TextDecoder {
function decoderFor(contentType: string): InstanceType<typeof TextDecoder> {
try {
return new TextDecoder(declaredCharset(contentType))
} catch {
Expand All @@ -206,7 +206,7 @@ function decoderFor(contentType: string): TextDecoder {
}

/** readCapped for a response with no body stream: the whole body is buffered, then cut or refused. */
async function readUnstreamed(response: Response, decoder: TextDecoder, limit: BodyLimit, tooLarge: () => Error): Promise<string> {
async function readUnstreamed(response: Response, decoder: InstanceType<typeof TextDecoder>, limit: BodyLimit, tooLarge: () => Error): Promise<string> {
const bytes = new Uint8Array(await response.arrayBuffer())
if (bytes.byteLength > limit.maxBytes && limit.overflow === 'refuse') throw tooLarge()
return decoder.decode(bytes.subarray(0, limit.maxBytes))
Expand Down
16 changes: 8 additions & 8 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"@earendil-works/pi-ai": "^1.1.0",
"@earendil-works/pi-coding-agent": "^1.1.0",
"@earendil-works/pi-tui": "^1.1.0",
"@types/node": "^26.1.1",
"@types/node": "^22.19.21",
"@vitest/coverage-v8": "^5.0.0",
"fast-check": "^4.9.0",
"knip": "^6.34.0",
Expand Down
2 changes: 1 addition & 1 deletion tests/resolution-probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ process.env.USERPROFILE = home
const agentDir = path.join(home, 'agent')

// jiti stats through the CommonJS fs object, so the probe wraps that one.
const cjsFs = createRequire(import.meta.url)('node:fs') as typeof fs
const cjsFs = createRequire(import.meta.url)('node:fs') as { statSync: typeof fs.statSync }
const statSync = cjsFs.statSync
const misses = new Set<string>()
cjsFs.statSync = ((target: fs.PathLike, options?: fs.StatOptions) => {
Expand Down
Loading