thread-stream 2.7.0 → 3.0.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/.github/workflows/ci.yml +2 -6
- package/lib/worker.js +0 -1
- package/package.json +1 -1
- package/test/never-drain.test.js +3 -1
- package/test/pkg/pkg.test.js +2 -0
package/.github/workflows/ci.yml
CHANGED
|
@@ -38,15 +38,11 @@ jobs:
|
|
|
38
38
|
contents: read
|
|
39
39
|
strategy:
|
|
40
40
|
matrix:
|
|
41
|
-
node-version: [
|
|
41
|
+
node-version: [18, 20, 22]
|
|
42
42
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
|
43
43
|
exclude:
|
|
44
44
|
- os: windows-latest
|
|
45
|
-
node-version:
|
|
46
|
-
- os: macos-latest
|
|
47
|
-
node-version: 14
|
|
48
|
-
- os: macos-latest
|
|
49
|
-
node-version: 16
|
|
45
|
+
node-version: 22
|
|
50
46
|
|
|
51
47
|
steps:
|
|
52
48
|
- name: Check out repo
|
package/lib/worker.js
CHANGED
package/package.json
CHANGED
package/test/never-drain.test.js
CHANGED
|
@@ -22,7 +22,9 @@ function retryUntilTimeout (fn, timeout) {
|
|
|
22
22
|
})
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
const isNode18 = process.version.indexOf('v18') === 0
|
|
26
|
+
|
|
27
|
+
test('emit warning when the worker gracefully exit without the stream ended', { skip: !isNode18 }, async function (t) {
|
|
26
28
|
const expectedWarning = 'ThreadStream: process exited before destination stream was drained. this may indicate that the destination stream try to write to a another missing stream'
|
|
27
29
|
const stream = new ThreadStream({
|
|
28
30
|
filename: join(__dirname, 'to-next.js')
|
package/test/pkg/pkg.test.js
CHANGED
|
@@ -14,6 +14,8 @@ test('worker test when packaged into executable using pkg', async (t) => {
|
|
|
14
14
|
// package the app into several node versions, check config for more info
|
|
15
15
|
const filePath = `${join(__dirname, packageName)}.js`
|
|
16
16
|
const configPath = join(__dirname, 'pkg.config.json')
|
|
17
|
+
process.env.NODE_OPTIONS ||= ''
|
|
18
|
+
process.env.NODE_OPTIONS = '--no-warnings'
|
|
17
19
|
const { stderr } = await exec(`npx pkg ${filePath} --config ${configPath}`)
|
|
18
20
|
|
|
19
21
|
// there should be no error when packaging
|