Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: minipass@4.0.0 and all related deps #5933

Merged
merged 7 commits into from Dec 7, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions mock-registry/package.json
Expand Up @@ -48,8 +48,8 @@
"@npmcli/eslint-config": "^4.0.1",
"@npmcli/template-oss": "4.11.0",
"nock": "^13.2.9",
"npm-package-arg": "^10.0.0",
"pacote": "^15.0.6",
"npm-package-arg": "^10.1.0",
"pacote": "^15.0.7",
"tap": "^16.3.0"
}
}
25 changes: 25 additions & 0 deletions node_modules/.gitignore
Expand Up @@ -85,6 +85,9 @@
!/events
!/fastest-levenshtein
!/fs-minipass
!/fs-minipass/node_modules/
/fs-minipass/node_modules/*
!/fs-minipass/node_modules/minipass
!/fs.realpath
!/function-bind
!/gauge
Expand Down Expand Up @@ -135,13 +138,34 @@
!/make-fetch-happen
!/minimatch
!/minipass-collect
!/minipass-collect/node_modules/
/minipass-collect/node_modules/*
!/minipass-collect/node_modules/minipass
!/minipass-fetch
!/minipass-fetch/node_modules/
/minipass-fetch/node_modules/*
!/minipass-fetch/node_modules/minipass
!/minipass-flush
!/minipass-flush/node_modules/
/minipass-flush/node_modules/*
!/minipass-flush/node_modules/minipass
!/minipass-json-stream
!/minipass-json-stream/node_modules/
/minipass-json-stream/node_modules/*
!/minipass-json-stream/node_modules/minipass
!/minipass-pipeline
!/minipass-pipeline/node_modules/
/minipass-pipeline/node_modules/*
!/minipass-pipeline/node_modules/minipass
!/minipass-sized
!/minipass-sized/node_modules/
/minipass-sized/node_modules/*
!/minipass-sized/node_modules/minipass
!/minipass
!/minizlib
!/minizlib/node_modules/
/minizlib/node_modules/*
!/minizlib/node_modules/minipass
!/mkdirp
!/ms
!/mute-stream
Expand All @@ -167,6 +191,7 @@
!/node-gyp/node_modules/make-fetch-happen
!/node-gyp/node_modules/minimatch
!/node-gyp/node_modules/minipass-fetch
!/node-gyp/node_modules/minipass
!/node-gyp/node_modules/nopt
!/node-gyp/node_modules/npmlog
!/node-gyp/node_modules/ssri
Expand Down
8 changes: 4 additions & 4 deletions node_modules/cacache/package.json
@@ -1,6 +1,6 @@
{
"name": "cacache",
"version": "17.0.2",
"version": "17.0.3",
"cache-version": {
"content": "2",
"index": "5"
Expand Down Expand Up @@ -49,7 +49,7 @@
"fs-minipass": "^2.1.0",
"glob": "^8.0.1",
"lru-cache": "^7.7.1",
"minipass": "^3.1.6",
"minipass": "^4.0.0",
"minipass-collect": "^1.0.2",
"minipass-flush": "^1.0.5",
"minipass-pipeline": "^1.2.4",
Expand All @@ -61,7 +61,7 @@
},
"devDependencies": {
"@npmcli/eslint-config": "^4.0.0",
"@npmcli/template-oss": "4.8.0",
"@npmcli/template-oss": "4.10.0",
"tap": "^16.0.0"
},
"engines": {
Expand All @@ -70,7 +70,7 @@
"templateOSS": {
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
"windowsCI": false,
"version": "4.8.0"
"version": "4.10.0"
},
"author": "GitHub Inc.",
"tap": {
Expand Down
15 changes: 15 additions & 0 deletions node_modules/fs-minipass/node_modules/minipass/LICENSE
@@ -0,0 +1,15 @@
The ISC License

Copyright (c) 2017-2022 npm, Inc., Isaac Z. Schlueter, and Contributors

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
155 changes: 155 additions & 0 deletions node_modules/fs-minipass/node_modules/minipass/index.d.ts
@@ -0,0 +1,155 @@
/// <reference types="node" />
import { EventEmitter } from 'events'
import { Stream } from 'stream'

declare namespace Minipass {
type Encoding = BufferEncoding | 'buffer' | null

interface Writable extends EventEmitter {
end(): any
write(chunk: any, ...args: any[]): any
}

interface Readable extends EventEmitter {
pause(): any
resume(): any
pipe(): any
}

interface Pipe<R, W> {
src: Minipass<R, W>
dest: Writable
opts: PipeOptions
}

type DualIterable<T> = Iterable<T> & AsyncIterable<T>

type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string

type BufferOrString = Buffer | string

interface StringOptions {
encoding: BufferEncoding
objectMode?: boolean
async?: boolean
}

interface BufferOptions {
encoding?: null | 'buffer'
objectMode?: boolean
async?: boolean
}

interface ObjectModeOptions {
objectMode: true
async?: boolean
}

interface PipeOptions {
end?: boolean
proxyErrors?: boolean
}

type Options<T> = T extends string
? StringOptions
: T extends Buffer
? BufferOptions
: ObjectModeOptions
}

declare class Minipass<
RType extends any = Buffer,
WType extends any = RType extends Minipass.BufferOrString
? Minipass.ContiguousData
: RType
>
extends Stream
implements Minipass.DualIterable<RType>
{
static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable

readonly bufferLength: number
readonly flowing: boolean
readonly writable: boolean
readonly readable: boolean
readonly paused: boolean
readonly emittedEnd: boolean
readonly destroyed: boolean

/**
* Not technically private or readonly, but not safe to mutate.
*/
private readonly buffer: RType[]
private readonly pipes: Minipass.Pipe<RType, WType>[]

/**
* Technically writable, but mutating it can change the type,
* so is not safe to do in TypeScript.
*/
readonly objectMode: boolean
async: boolean

/**
* Note: encoding is not actually read-only, and setEncoding(enc)
* exists. However, this type definition will insist that TypeScript
* programs declare the type of a Minipass stream up front, and if
* that type is string, then an encoding MUST be set in the ctor. If
* the type is Buffer, then the encoding must be missing, or set to
* 'buffer' or null. If the type is anything else, then objectMode
* must be set in the constructor options. So there is effectively
* no allowed way that a TS program can set the encoding after
* construction, as doing so will destroy any hope of type safety.
* TypeScript does not provide many options for changing the type of
* an object at run-time, which is what changing the encoding does.
*/
readonly encoding: Minipass.Encoding
// setEncoding(encoding: Encoding): void

// Options required if not reading buffers
constructor(
...args: RType extends Buffer
? [] | [Minipass.Options<RType>]
: [Minipass.Options<RType>]
)

write(chunk: WType, cb?: () => void): boolean
write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean
read(size?: number): RType
end(cb?: () => void): this
end(chunk: any, cb?: () => void): this
end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this
pause(): void
resume(): void
promise(): Promise<void>
collect(): Promise<RType[]>

concat(): RType extends Minipass.BufferOrString ? Promise<RType> : never
destroy(er?: any): void
pipe<W extends Minipass.Writable>(dest: W, opts?: Minipass.PipeOptions): W
unpipe<W extends Minipass.Writable>(dest: W): void

/**
* alias for on()
*/
addEventHandler(event: string, listener: (...args: any[]) => any): this

on(event: string, listener: (...args: any[]) => any): this
on(event: 'data', listener: (chunk: RType) => any): this
on(event: 'error', listener: (error: any) => any): this
on(
event:
| 'readable'
| 'drain'
| 'resume'
| 'end'
| 'prefinish'
| 'finish'
| 'close',
listener: () => any
): this

[Symbol.iterator](): Iterator<RType>
[Symbol.asyncIterator](): AsyncIterator<RType>
}

export = Minipass