summaryrefslogtreecommitdiffstats
path: root/debian/patches/workaround-nodejs-bug.patch
blob: 924de09d32f6c2ffa6a2b4d7c7dffec517948643 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
Description: workaround nodejs bug
Author: Yadd <yadd@debian.org>
Forwarded: not-needed
Last-Update: 2023-12-02

--- a/fastify-busboy/deps/dicer/lib/Dicer.js
+++ b/fastify-busboy/deps/dicer/lib/Dicer.js
@@ -1,7 +1,7 @@
 'use strict'
 
-const WritableStream = require('node:stream').Writable
-const inherits = require('node:util').inherits
+const WritableStream = require('stream').Writable
+const inherits = require('util').inherits
 
 const StreamSearch = require('../../streamsearch/sbmh')
 
--- a/fastify-busboy/deps/dicer/lib/HeaderParser.js
+++ b/fastify-busboy/deps/dicer/lib/HeaderParser.js
@@ -1,7 +1,7 @@
 'use strict'
 
-const EventEmitter = require('node:events').EventEmitter
-const inherits = require('node:util').inherits
+const EventEmitter = require('events').EventEmitter
+const inherits = require('util').inherits
 const getLimit = require('../../../lib/utils/getLimit')
 
 const StreamSearch = require('../../streamsearch/sbmh')
--- a/fastify-busboy/deps/dicer/lib/PartStream.js
+++ b/fastify-busboy/deps/dicer/lib/PartStream.js
@@ -1,7 +1,7 @@
 'use strict'
 
-const inherits = require('node:util').inherits
-const ReadableStream = require('node:stream').Readable
+const inherits = require('util').inherits
+const ReadableStream = require('stream').Readable
 
 function PartStream (opts) {
   ReadableStream.call(this, opts)
--- a/fastify-busboy/deps/streamsearch/sbmh.js
+++ b/fastify-busboy/deps/streamsearch/sbmh.js
@@ -26,8 +26,8 @@
  * Based heavily on the Streaming Boyer-Moore-Horspool C++ implementation
  * by Hongli Lai at: https://github.com/FooBarWidget/boyer-moore-horspool
  */
-const EventEmitter = require('node:events').EventEmitter
-const inherits = require('node:util').inherits
+const EventEmitter = require('events').EventEmitter
+const inherits = require('util').inherits
 
 function SBMH (needle) {
   if (typeof needle === 'string') {
--- a/fastify-busboy/lib/main.js
+++ b/fastify-busboy/lib/main.js
@@ -1,7 +1,7 @@
 'use strict'
 
-const WritableStream = require('node:stream').Writable
-const { inherits } = require('node:util')
+const WritableStream = require('stream').Writable
+const { inherits } = require('util')
 const Dicer = require('../deps/dicer/lib/Dicer')
 
 const MultipartParser = require('./types/multipart')
--- a/fastify-busboy/lib/types/multipart.js
+++ b/fastify-busboy/lib/types/multipart.js
@@ -7,8 +7,8 @@
 //  * support limits.fieldNameSize
 //     -- this will require modifications to utils.parseParams
 
-const { Readable } = require('node:stream')
-const { inherits } = require('node:util')
+const { Readable } = require('stream')
+const { inherits } = require('util')
 
 const Dicer = require('../../deps/dicer/lib/Dicer')
 
--- a/fastify-busboy/test/dicer-multipart.test.js
+++ b/fastify-busboy/test/dicer-multipart.test.js
@@ -1,10 +1,10 @@
 'use strict'
 
 const Dicer = require('../deps/dicer/lib/Dicer')
-const assert = require('node:assert')
-const fs = require('node:fs')
-const path = require('node:path')
-const inspect = require('node:util').inspect
+const assert = require('assert')
+const fs = require('fs')
+const path = require('path')
+const inspect = require('util').inspect
 const { test } = require('tap')
 
 const FIXTURES_ROOT = path.join(__dirname, 'fixtures/')
--- a/fastify-busboy/test/parse-params.test.js
+++ b/fastify-busboy/test/parse-params.test.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const { inspect } = require('node:util')
+const { inspect } = require('util')
 const { test } = require('tap')
 const parseParams = require('../lib/utils/parseParams')
 
--- a/scripts/generate-undici-types-package-json.js
+++ b/scripts/generate-undici-types-package-json.js
@@ -1,5 +1,5 @@
-const fs = require('node:fs')
-const path = require('node:path')
+const fs = require('fs')
+const path = require('path')
 
 const packageJSONPath = path.join(__dirname, '..', 'package.json')
 const packageJSONRaw = fs.readFileSync(packageJSONPath, 'utf-8')
--- a/test/client-node-max-header-size.js
+++ b/test/client-node-max-header-size.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const { execSync } = require('node:child_process')
+const { execSync } = require('child_process')
 const { test } = require('tap')
 
 const command = 'node -e "require(\'.\').request(\'https://httpbin.org/get\')"'
--- a/test/fetch/client-node-max-header-size.js
+++ b/test/fetch/client-node-max-header-size.js
@@ -1,6 +1,6 @@
 'use strict'
 
-const { execSync } = require('node:child_process')
+const { execSync } = require('child_process')
 const { test, skip } = require('tap')
 const { nodeMajor } = require('../../lib/core/util')
 
--- a/test/fetch/http2.js
+++ b/test/fetch/http2.js
@@ -1,10 +1,10 @@
 'use strict'
 
-const { createSecureServer } = require('node:http2')
-const { createReadStream, readFileSync } = require('node:fs')
-const { once } = require('node:events')
-const { Blob } = require('node:buffer')
-const { Readable } = require('node:stream')
+const { createSecureServer } = require('http2')
+const { createReadStream, readFileSync } = require('fs')
+const { once } = require('events')
+const { Blob } = require('buffer')
+const { Readable } = require('stream')
 
 const { test, plan } = require('tap')
 const pem = require('https-pem')
--- a/test/http2-alpn.js
+++ b/test/http2-alpn.js
@@ -1,10 +1,10 @@
 'use strict'
 
-const https = require('node:https')
-const { once } = require('node:events')
-const { createSecureServer } = require('node:http2')
-const { readFileSync } = require('node:fs')
-const { join } = require('node:path')
+const https = require('https')
+const { once } = require('events')
+const { createSecureServer } = require('http2')
+const { readFileSync } = require('fs')
+const { join } = require('path')
 const { test } = require('tap')
 
 const { Client } = require('..')
--- a/test/http2.js
+++ b/test/http2.js
@@ -1,10 +1,10 @@
 'use strict'
 
-const { createSecureServer } = require('node:http2')
-const { createReadStream, readFileSync } = require('node:fs')
-const { once } = require('node:events')
-const { Blob } = require('node:buffer')
-const { Writable, pipeline, PassThrough, Readable } = require('node:stream')
+const { createSecureServer } = require('http2')
+const { createReadStream, readFileSync } = require('fs')
+const { once } = require('events')
+const { Blob } = require('buffer')
+const { Writable, pipeline, PassThrough, Readable } = require('stream')
 
 const { test, plan } = require('tap')
 const { gte } = require('semver')
--- a/test/retry-handler.js
+++ b/test/retry-handler.js
@@ -1,6 +1,6 @@
 'use strict'
-const { createServer } = require('node:http')
-const { once } = require('node:events')
+const { createServer } = require('http')
+const { once } = require('events')
 
 const tap = require('tap')