Skip to content

Commit 20dd44f

Browse files
committed
deps: hoist minipass-fetch
1 parent be1e6da commit 20dd44f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+1716
-89
lines changed

node_modules/.gitignore

+6-5
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
!/@sigstore/sign/node_modules/@npmcli/fs
5050
!/@sigstore/sign/node_modules/cacache
5151
!/@sigstore/sign/node_modules/make-fetch-happen
52+
!/@sigstore/sign/node_modules/minipass-fetch
5253
!/@sigstore/sign/node_modules/proc-log
5354
!/@sigstore/sign/node_modules/ssri
5455
!/@sigstore/sign/node_modules/unique-filename
@@ -138,13 +139,12 @@
138139
!/just-diff
139140
!/lru-cache
140141
!/make-fetch-happen
141-
!/make-fetch-happen/node_modules/
142-
/make-fetch-happen/node_modules/*
143-
!/make-fetch-happen/node_modules/minipass-fetch
144-
!/make-fetch-happen/node_modules/minizlib
145142
!/minimatch
146143
!/minipass-collect
147144
!/minipass-fetch
145+
!/minipass-fetch/node_modules/
146+
/minipass-fetch/node_modules/*
147+
!/minipass-fetch/node_modules/minizlib
148148
!/minipass-flush
149149
!/minipass-flush/node_modules/
150150
/minipass-flush/node_modules/*
@@ -177,6 +177,7 @@
177177
!/node-gyp/node_modules/cacache
178178
!/node-gyp/node_modules/isexe
179179
!/node-gyp/node_modules/make-fetch-happen
180+
!/node-gyp/node_modules/minipass-fetch
180181
!/node-gyp/node_modules/nopt
181182
!/node-gyp/node_modules/proc-log
182183
!/node-gyp/node_modules/ssri
@@ -204,7 +205,6 @@
204205
!/npm-registry-fetch
205206
!/npm-registry-fetch/node_modules/
206207
/npm-registry-fetch/node_modules/*
207-
!/npm-registry-fetch/node_modules/minipass-fetch
208208
!/npm-registry-fetch/node_modules/minizlib
209209
!/npm-user-validate
210210
!/p-map
@@ -273,6 +273,7 @@
273273
!/tuf-js/node_modules/@npmcli/fs
274274
!/tuf-js/node_modules/cacache
275275
!/tuf-js/node_modules/make-fetch-happen
276+
!/tuf-js/node_modules/minipass-fetch
276277
!/tuf-js/node_modules/proc-log
277278
!/tuf-js/node_modules/ssri
278279
!/tuf-js/node_modules/unique-filename

node_modules/make-fetch-happen/node_modules/minipass-fetch/package.json renamed to node_modules/@sigstore/sign/node_modules/minipass-fetch/package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "4.0.0",
3+
"version": "3.0.5",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
77
"scripts": {
88
"test:tls-fixtures": "./test/fixtures/tls/setup.sh",
99
"test": "tap",
1010
"snap": "tap",
11-
"lint": "npm run eslint",
11+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
1212
"postlint": "template-oss-check",
13-
"lintfix": "npm run eslint -- --fix",
13+
"lintfix": "npm run lint -- --fix",
1414
"posttest": "npm run lint",
15-
"template-oss-apply": "template-oss-apply --force",
16-
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
15+
"template-oss-apply": "template-oss-apply --force"
1716
},
1817
"tap": {
1918
"coverage-map": "map.js",
@@ -24,8 +23,8 @@
2423
]
2524
},
2625
"devDependencies": {
27-
"@npmcli/eslint-config": "^5.0.0",
28-
"@npmcli/template-oss": "4.23.3",
26+
"@npmcli/eslint-config": "^4.0.0",
27+
"@npmcli/template-oss": "4.22.0",
2928
"@ungap/url-search-params": "^0.2.2",
3029
"abort-controller": "^3.0.0",
3130
"abortcontroller-polyfill": "~1.7.3",
@@ -39,7 +38,7 @@
3938
"dependencies": {
4039
"minipass": "^7.0.3",
4140
"minipass-sized": "^1.0.3",
42-
"minizlib": "^3.0.1"
41+
"minizlib": "^2.1.2"
4342
},
4443
"optionalDependencies": {
4544
"encoding": "^0.1.13"
@@ -59,12 +58,12 @@
5958
"lib/"
6059
],
6160
"engines": {
62-
"node": "^18.17.0 || >=20.5.0"
61+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
6362
},
6463
"author": "GitHub Inc.",
6564
"templateOSS": {
6665
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
67-
"version": "4.23.3",
66+
"version": "4.22.0",
6867
"publish": "true"
6968
}
7069
}

node_modules/minipass-fetch/package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "3.0.5",
3+
"version": "4.0.0",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
77
"scripts": {
88
"test:tls-fixtures": "./test/fixtures/tls/setup.sh",
99
"test": "tap",
1010
"snap": "tap",
11-
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
11+
"lint": "npm run eslint",
1212
"postlint": "template-oss-check",
13-
"lintfix": "npm run lint -- --fix",
13+
"lintfix": "npm run eslint -- --fix",
1414
"posttest": "npm run lint",
15-
"template-oss-apply": "template-oss-apply --force"
15+
"template-oss-apply": "template-oss-apply --force",
16+
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
1617
},
1718
"tap": {
1819
"coverage-map": "map.js",
@@ -23,8 +24,8 @@
2324
]
2425
},
2526
"devDependencies": {
26-
"@npmcli/eslint-config": "^4.0.0",
27-
"@npmcli/template-oss": "4.22.0",
27+
"@npmcli/eslint-config": "^5.0.0",
28+
"@npmcli/template-oss": "4.23.3",
2829
"@ungap/url-search-params": "^0.2.2",
2930
"abort-controller": "^3.0.0",
3031
"abortcontroller-polyfill": "~1.7.3",
@@ -38,7 +39,7 @@
3839
"dependencies": {
3940
"minipass": "^7.0.3",
4041
"minipass-sized": "^1.0.3",
41-
"minizlib": "^2.1.2"
42+
"minizlib": "^3.0.1"
4243
},
4344
"optionalDependencies": {
4445
"encoding": "^0.1.13"
@@ -58,12 +59,12 @@
5859
"lib/"
5960
],
6061
"engines": {
61-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
62+
"node": "^18.17.0 || >=20.5.0"
6263
},
6364
"author": "GitHub Inc.",
6465
"templateOSS": {
6566
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
66-
"version": "4.22.0",
67+
"version": "4.23.3",
6768
"publish": "true"
6869
}
6970
}

node_modules/npm-registry-fetch/node_modules/minipass-fetch/package.json renamed to node_modules/node-gyp/node_modules/minipass-fetch/package.json

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "4.0.0",
3+
"version": "3.0.5",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
77
"scripts": {
88
"test:tls-fixtures": "./test/fixtures/tls/setup.sh",
99
"test": "tap",
1010
"snap": "tap",
11-
"lint": "npm run eslint",
11+
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
1212
"postlint": "template-oss-check",
13-
"lintfix": "npm run eslint -- --fix",
13+
"lintfix": "npm run lint -- --fix",
1414
"posttest": "npm run lint",
15-
"template-oss-apply": "template-oss-apply --force",
16-
"eslint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\""
15+
"template-oss-apply": "template-oss-apply --force"
1716
},
1817
"tap": {
1918
"coverage-map": "map.js",
@@ -24,8 +23,8 @@
2423
]
2524
},
2625
"devDependencies": {
27-
"@npmcli/eslint-config": "^5.0.0",
28-
"@npmcli/template-oss": "4.23.3",
26+
"@npmcli/eslint-config": "^4.0.0",
27+
"@npmcli/template-oss": "4.22.0",
2928
"@ungap/url-search-params": "^0.2.2",
3029
"abort-controller": "^3.0.0",
3130
"abortcontroller-polyfill": "~1.7.3",
@@ -39,7 +38,7 @@
3938
"dependencies": {
4039
"minipass": "^7.0.3",
4140
"minipass-sized": "^1.0.3",
42-
"minizlib": "^3.0.1"
41+
"minizlib": "^2.1.2"
4342
},
4443
"optionalDependencies": {
4544
"encoding": "^0.1.13"
@@ -59,12 +58,12 @@
5958
"lib/"
6059
],
6160
"engines": {
62-
"node": "^18.17.0 || >=20.5.0"
61+
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
6362
},
6463
"author": "GitHub Inc.",
6564
"templateOSS": {
6665
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
67-
"version": "4.23.3",
66+
"version": "4.22.0",
6867
"publish": "true"
6968
}
7069
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Isaac Z. Schlueter and Contributors
4+
Copyright (c) 2016 David Frank
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
23+
24+
---
25+
26+
Note: This is a derivative work based on "node-fetch" by David Frank,
27+
modified and distributed under the terms of the MIT license above.
28+
https://github.com/bitinn/node-fetch
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
'use strict'
2+
class AbortError extends Error {
3+
constructor (message) {
4+
super(message)
5+
this.code = 'FETCH_ABORTED'
6+
this.type = 'aborted'
7+
Error.captureStackTrace(this, this.constructor)
8+
}
9+
10+
get name () {
11+
return 'AbortError'
12+
}
13+
14+
// don't allow name to be overridden, but don't throw either
15+
set name (s) {}
16+
}
17+
module.exports = AbortError
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
'use strict'
2+
const { Minipass } = require('minipass')
3+
const TYPE = Symbol('type')
4+
const BUFFER = Symbol('buffer')
5+
6+
class Blob {
7+
constructor (blobParts, options) {
8+
this[TYPE] = ''
9+
10+
const buffers = []
11+
let size = 0
12+
13+
if (blobParts) {
14+
const a = blobParts
15+
const length = Number(a.length)
16+
for (let i = 0; i < length; i++) {
17+
const element = a[i]
18+
const buffer = element instanceof Buffer ? element
19+
: ArrayBuffer.isView(element)
20+
? Buffer.from(element.buffer, element.byteOffset, element.byteLength)
21+
: element instanceof ArrayBuffer ? Buffer.from(element)
22+
: element instanceof Blob ? element[BUFFER]
23+
: typeof element === 'string' ? Buffer.from(element)
24+
: Buffer.from(String(element))
25+
size += buffer.length
26+
buffers.push(buffer)
27+
}
28+
}
29+
30+
this[BUFFER] = Buffer.concat(buffers, size)
31+
32+
const type = options && options.type !== undefined
33+
&& String(options.type).toLowerCase()
34+
if (type && !/[^\u0020-\u007E]/.test(type)) {
35+
this[TYPE] = type
36+
}
37+
}
38+
39+
get size () {
40+
return this[BUFFER].length
41+
}
42+
43+
get type () {
44+
return this[TYPE]
45+
}
46+
47+
text () {
48+
return Promise.resolve(this[BUFFER].toString())
49+
}
50+
51+
arrayBuffer () {
52+
const buf = this[BUFFER]
53+
const off = buf.byteOffset
54+
const len = buf.byteLength
55+
const ab = buf.buffer.slice(off, off + len)
56+
return Promise.resolve(ab)
57+
}
58+
59+
stream () {
60+
return new Minipass().end(this[BUFFER])
61+
}
62+
63+
slice (start, end, type) {
64+
const size = this.size
65+
const relativeStart = start === undefined ? 0
66+
: start < 0 ? Math.max(size + start, 0)
67+
: Math.min(start, size)
68+
const relativeEnd = end === undefined ? size
69+
: end < 0 ? Math.max(size + end, 0)
70+
: Math.min(end, size)
71+
const span = Math.max(relativeEnd - relativeStart, 0)
72+
73+
const buffer = this[BUFFER]
74+
const slicedBuffer = buffer.slice(
75+
relativeStart,
76+
relativeStart + span
77+
)
78+
const blob = new Blob([], { type })
79+
blob[BUFFER] = slicedBuffer
80+
return blob
81+
}
82+
83+
get [Symbol.toStringTag] () {
84+
return 'Blob'
85+
}
86+
87+
static get BUFFER () {
88+
return BUFFER
89+
}
90+
}
91+
92+
Object.defineProperties(Blob.prototype, {
93+
size: { enumerable: true },
94+
type: { enumerable: true },
95+
})
96+
97+
module.exports = Blob

0 commit comments

Comments
 (0)