muhammara 3.4.0 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [3.5.0] - 2022-12-07
11
+
12
+ ### Added
13
+
14
+ - Electron 22.0.x
15
+
10
16
  ## [3.4.0] - 2022-11-24
11
17
 
12
18
  ### Added
@@ -326,7 +332,8 @@ with the following changes.
326
332
 
327
333
  - Initial release
328
334
 
329
- [unreleased]: https://github.com/julianhille/MuhammaraJS/compare/3.4.0...HEAD
335
+ [unreleased]: https://github.com/julianhille/MuhammaraJS/compare/3.5.0...HEAD
336
+ [3.5.0]: https://github.com/julianhille/MuhammaraJS/compare/3.4.0...3.5.0
330
337
  [3.4.0]: https://github.com/julianhille/MuhammaraJS/compare/3.3.0...3.4.0
331
338
  [3.3.0]: https://github.com/julianhille/MuhammaraJS/compare/3.2.0...3.3.0
332
339
  [3.2.0]: https://github.com/julianhille/MuhammaraJS/compare/3.1.1...3.2.0
@@ -2,39 +2,71 @@
2
2
  import { EventEmitter } from 'events'
3
3
  import { Stream } from 'stream'
4
4
 
5
- export type Encoding = BufferEncoding | 'buffer' | null
6
-
7
- interface Writable extends EventEmitter {
8
- end(): any
9
- write(chunk: any, ...args: any[]): any
10
- }
11
-
12
- interface Readable extends EventEmitter {
13
- pause(): any
14
- resume(): any
15
- pipe(): any
16
- }
17
-
18
- interface Pipe<R, W> {
19
- src: Minipass<R, W>
20
- dest: Writable
21
- opts: PipeOptions
5
+ declare namespace Minipass {
6
+ type Encoding = BufferEncoding | 'buffer' | null
7
+
8
+ interface Writable extends EventEmitter {
9
+ end(): any
10
+ write(chunk: any, ...args: any[]): any
11
+ }
12
+
13
+ interface Readable extends EventEmitter {
14
+ pause(): any
15
+ resume(): any
16
+ pipe(): any
17
+ }
18
+
19
+ interface Pipe<R, W> {
20
+ src: Minipass<R, W>
21
+ dest: Writable
22
+ opts: PipeOptions
23
+ }
24
+
25
+ type DualIterable<T> = Iterable<T> & AsyncIterable<T>
26
+
27
+ type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string
28
+
29
+ type BufferOrString = Buffer | string
30
+
31
+ interface StringOptions {
32
+ encoding: BufferEncoding
33
+ objectMode?: boolean
34
+ async?: boolean
35
+ }
36
+
37
+ interface BufferOptions {
38
+ encoding?: null | 'buffer'
39
+ objectMode?: boolean
40
+ async?: boolean
41
+ }
42
+
43
+ interface ObjectModeOptions {
44
+ objectMode: true
45
+ async?: boolean
46
+ }
47
+
48
+ interface PipeOptions {
49
+ end?: boolean
50
+ proxyErrors?: boolean
51
+ }
52
+
53
+ type Options<T> = T extends string
54
+ ? StringOptions
55
+ : T extends Buffer
56
+ ? BufferOptions
57
+ : ObjectModeOptions
22
58
  }
23
59
 
24
- type DualIterable<T> = Iterable<T> & AsyncIterable<T>
25
-
26
- type ContiguousData = Buffer | ArrayBufferLike | ArrayBufferView | string
27
-
28
- type BufferOrString = Buffer | string
29
-
30
- export default class Minipass<
60
+ declare class Minipass<
31
61
  RType extends any = Buffer,
32
- WType extends any = RType extends BufferOrString ? ContiguousData : RType
62
+ WType extends any = RType extends Minipass.BufferOrString
63
+ ? Minipass.ContiguousData
64
+ : RType
33
65
  >
34
66
  extends Stream
35
- implements DualIterable<RType>
67
+ implements Minipass.DualIterable<RType>
36
68
  {
37
- static isStream(stream: any): stream is Readable | Writable
69
+ static isStream(stream: any): stream is Minipass.Readable | Minipass.Writable
38
70
 
39
71
  readonly bufferLength: number
40
72
  readonly flowing: boolean
@@ -48,7 +80,7 @@ export default class Minipass<
48
80
  * Not technically private or readonly, but not safe to mutate.
49
81
  */
50
82
  private readonly buffer: RType[]
51
- private readonly pipes: Pipe<RType, WType>[]
83
+ private readonly pipes: Minipass.Pipe<RType, WType>[]
52
84
 
53
85
  /**
54
86
  * Technically writable, but mutating it can change the type,
@@ -70,31 +102,31 @@ export default class Minipass<
70
102
  * TypeScript does not provide many options for changing the type of
71
103
  * an object at run-time, which is what changing the encoding does.
72
104
  */
73
- readonly encoding: Encoding
105
+ readonly encoding: Minipass.Encoding
74
106
  // setEncoding(encoding: Encoding): void
75
107
 
76
108
  // Options required if not reading buffers
77
109
  constructor(
78
110
  ...args: RType extends Buffer
79
- ? [] | [Options<RType>]
80
- : [Options<RType>]
111
+ ? [] | [Minipass.Options<RType>]
112
+ : [Minipass.Options<RType>]
81
113
  )
82
114
 
83
115
  write(chunk: WType, cb?: () => void): boolean
84
- write(chunk: WType, encoding?: Encoding, cb?: () => void): boolean
116
+ write(chunk: WType, encoding?: Minipass.Encoding, cb?: () => void): boolean
85
117
  read(size?: number): RType
86
118
  end(cb?: () => void): this
87
119
  end(chunk: any, cb?: () => void): this
88
- end(chunk: any, encoding?: Encoding, cb?: () => void): this
120
+ end(chunk: any, encoding?: Minipass.Encoding, cb?: () => void): this
89
121
  pause(): void
90
122
  resume(): void
91
123
  promise(): Promise<void>
92
124
  collect(): Promise<RType[]>
93
125
 
94
- concat(): RType extends BufferOrString ? Promise<RType> : never
126
+ concat(): RType extends Minipass.BufferOrString ? Promise<RType> : never
95
127
  destroy(er?: any): void
96
- pipe<W extends Writable>(dest: W, opts?: PipeOptions): W
97
- unpipe<W extends Writable>(dest: W): void
128
+ pipe<W extends Minipass.Writable>(dest: W, opts?: Minipass.PipeOptions): W
129
+ unpipe<W extends Minipass.Writable>(dest: W): void
98
130
 
99
131
  /**
100
132
  * alias for on()
@@ -120,30 +152,4 @@ export default class Minipass<
120
152
  [Symbol.asyncIterator](): AsyncIterator<RType>
121
153
  }
122
154
 
123
- interface StringOptions {
124
- encoding: BufferEncoding
125
- objectMode?: boolean
126
- async?: boolean
127
- }
128
-
129
- interface BufferOptions {
130
- encoding?: null | 'buffer'
131
- objectMode?: boolean
132
- async?: boolean
133
- }
134
-
135
- interface ObjectModeOptions {
136
- objectMode: true
137
- async?: boolean
138
- }
139
-
140
- export declare interface PipeOptions {
141
- end?: boolean
142
- proxyErrors?: boolean
143
- }
144
-
145
- export declare type Options<T> = T extends string
146
- ? StringOptions
147
- : T extends Buffer
148
- ? BufferOptions
149
- : ObjectModeOptions
155
+ export = Minipass
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "_from": "minipass@^3.0.0",
3
- "_id": "minipass@3.3.4",
3
+ "_id": "minipass@3.3.6",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-I9WPbWHCGu8W+6k1ZiGpPu0GkoKBeorkfKNuAFBNS1HNFJvke82sxvI5bzcCNpWPorkOO5QQ+zomzzwRxejXiw==",
5
+ "_integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==",
6
6
  "_location": "/minipass",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
@@ -20,8 +20,8 @@
20
20
  "/minizlib",
21
21
  "/tar"
22
22
  ],
23
- "_resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.4.tgz",
24
- "_shasum": "ca99f95dd77c43c7a76bf51e6d200025eee0ffae",
23
+ "_resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz",
24
+ "_shasum": "7bba384db3a1520d18c9c0e5251c3444e95dd94a",
25
25
  "_spec": "minipass@^3.0.0",
26
26
  "_where": "/home/runner/work/MuhammaraJS/MuhammaraJS/node_modules/tar",
27
27
  "author": {
@@ -79,12 +79,13 @@
79
79
  },
80
80
  "scripts": {
81
81
  "postpublish": "git push origin --follow-tags",
82
- "postversion": "npm publish --tag=next",
82
+ "postversion": "npm publish",
83
83
  "preversion": "npm test",
84
84
  "test": "tap"
85
85
  },
86
86
  "tap": {
87
87
  "check-coverage": true
88
88
  },
89
- "version": "3.3.4"
89
+ "types": "index.d.ts",
90
+ "version": "3.3.6"
90
91
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muhammara",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "Create, read and modify PDF files and streams. A drop in replacement for hummusjs PDF library",
5
5
  "homepage": "https://github.com/julianhille/Muhammarajs",
6
6
  "license": "Apache-2.0",