Aktueller Stand
This commit is contained in:
2
backend/node_modules/process-warning/.github/dependabot.yml
generated
vendored
2
backend/node_modules/process-warning/.github/dependabot.yml
generated
vendored
@@ -9,5 +9,5 @@ updates:
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
interval: "monthly"
|
||||
open-pull-requests-limit: 10
|
||||
|
||||
3
backend/node_modules/process-warning/.github/workflows/ci.yml
generated
vendored
3
backend/node_modules/process-warning/.github/workflows/ci.yml
generated
vendored
@@ -4,7 +4,6 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- next
|
||||
- 'v*'
|
||||
paths-ignore:
|
||||
@@ -17,7 +16,7 @@ on:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v3
|
||||
uses: fastify/workflows/.github/workflows/plugins-ci.yml@v5
|
||||
with:
|
||||
license-check: true
|
||||
lint: true
|
||||
|
||||
2
backend/node_modules/process-warning/.taprc
generated
vendored
2
backend/node_modules/process-warning/.taprc
generated
vendored
@@ -1,2 +0,0 @@
|
||||
files:
|
||||
- test/**/*[!jest].test.js
|
||||
8
backend/node_modules/process-warning/README.md
generated
vendored
8
backend/node_modules/process-warning/README.md
generated
vendored
@@ -1,13 +1,13 @@
|
||||
# process-warning
|
||||
|
||||

|
||||
[](https://github.com/fastify/process-warning/actions/workflows/ci.yml)
|
||||
[](https://www.npmjs.com/package/process-warning)
|
||||
[](https://standardjs.com/)
|
||||
[](https://github.com/neostandard/neostandard)
|
||||
|
||||
A small utility for generating consistent warning objects across your codebase.
|
||||
It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise).
|
||||
|
||||
_This module is used by the [Fastify](https://fastify.io) framework and it was called `fastify-warning` prior to version 1.0.0._
|
||||
_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._
|
||||
|
||||
### Install
|
||||
|
||||
@@ -109,7 +109,7 @@ Warnings can be suppressed:
|
||||
|
||||
- by setting the `NODE_NO_WARNINGS` environment variable to `1`
|
||||
- by passing the `--no-warnings` flag to the node process
|
||||
- by setting 'no-warnings' in the `NODE_OPTIONS` environment variable
|
||||
- by setting '--no-warnings' in the `NODE_OPTIONS` environment variable
|
||||
|
||||
For more information see [node's documentation](https://nodejs.org/api/cli.html).
|
||||
|
||||
|
||||
6
backend/node_modules/process-warning/eslint.config.js
generated
vendored
Normal file
6
backend/node_modules/process-warning/eslint.config.js
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
module.exports = require('neostandard')({
|
||||
ignores: require('neostandard').resolveIgnoresFromGitignore(),
|
||||
ts: true
|
||||
})
|
||||
47
backend/node_modules/process-warning/package.json
generated
vendored
47
backend/node_modules/process-warning/package.json
generated
vendored
@@ -1,16 +1,16 @@
|
||||
{
|
||||
"name": "process-warning",
|
||||
"version": "3.0.0",
|
||||
"version": "5.0.0",
|
||||
"description": "A small utility for creating warnings and emitting them.",
|
||||
"main": "index.js",
|
||||
"type": "commonjs",
|
||||
"types": "types/index.d.ts",
|
||||
"scripts": {
|
||||
"lint": "standard",
|
||||
"lint:fix": "standard --fix",
|
||||
"lint": "eslint",
|
||||
"lint:fix": "eslint --fix",
|
||||
"test": "npm run test:unit && npm run test:jest && npm run test:typescript",
|
||||
"test:jest": "jest jest.test.js",
|
||||
"test:unit": "tap",
|
||||
"test:unit": "c8 --100 node --test",
|
||||
"test:typescript": "tsd"
|
||||
},
|
||||
"repository": {
|
||||
@@ -27,16 +27,47 @@
|
||||
"once"
|
||||
],
|
||||
"author": "Tomas Della Vedova",
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Matteo Collina",
|
||||
"email": "hello@matteocollina.com"
|
||||
},
|
||||
{
|
||||
"name": "Manuel Spigolon",
|
||||
"email": "behemoth89@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "James Sumners",
|
||||
"url": "https://james.sumners.info"
|
||||
},
|
||||
{
|
||||
"name": "Frazer Smith",
|
||||
"email": "frazer.dev@icloud.com",
|
||||
"url": "https://github.com/fdawgs"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "https://github.com/fastify/fastify-warning/issues"
|
||||
},
|
||||
"homepage": "https://github.com/fastify/fastify-warning#readme",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/fastify"
|
||||
},
|
||||
{
|
||||
"type": "opencollective",
|
||||
"url": "https://opencollective.com/fastify"
|
||||
}
|
||||
],
|
||||
"devDependencies": {
|
||||
"@fastify/pre-commit": "^2.1.0",
|
||||
"benchmark": "^2.1.4",
|
||||
"jest": "^29.0.1",
|
||||
"standard": "^17.0.0",
|
||||
"tap": "^16.3.0",
|
||||
"tsd": "^0.29.0"
|
||||
"c8": "^10.1.3",
|
||||
"eslint": "^9.17.0",
|
||||
"jest": "^29.7.0",
|
||||
"neostandard": "^0.12.0",
|
||||
"tsd": "^0.31.0"
|
||||
}
|
||||
}
|
||||
|
||||
17
backend/node_modules/process-warning/test/emit-interpolated-string.test.js
generated
vendored
17
backend/node_modules/process-warning/test/emit-interpolated-string.test.js
generated
vendored
@@ -1,17 +1,20 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('..')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('emit with interpolated string', t => {
|
||||
t.plan(4)
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
|
||||
process.on('warning', onWarning)
|
||||
function onWarning (warning) {
|
||||
t.equal(warning.name, 'TestDeprecation')
|
||||
t.equal(warning.code, 'CODE')
|
||||
t.equal(warning.message, 'Hello world')
|
||||
t.ok(codeWarning.emitted)
|
||||
t.assert.deepStrictEqual(warning.name, 'TestDeprecation')
|
||||
t.assert.deepStrictEqual(warning.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warning.message, 'Hello world')
|
||||
t.assert.ok(codeWarning.emitted)
|
||||
}
|
||||
|
||||
const codeWarning = createWarning({
|
||||
@@ -24,6 +27,8 @@ test('emit with interpolated string', t => {
|
||||
|
||||
setImmediate(() => {
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
17
backend/node_modules/process-warning/test/emit-once-only.test.js
generated
vendored
17
backend/node_modules/process-warning/test/emit-once-only.test.js
generated
vendored
@@ -1,17 +1,20 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('..')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('emit should emit a given code only once', t => {
|
||||
t.plan(4)
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
|
||||
process.on('warning', onWarning)
|
||||
function onWarning (warning) {
|
||||
t.equal(warning.name, 'TestDeprecation')
|
||||
t.equal(warning.code, 'CODE')
|
||||
t.equal(warning.message, 'Hello world')
|
||||
t.ok(warn.emitted)
|
||||
t.assert.deepStrictEqual(warning.name, 'TestDeprecation')
|
||||
t.assert.deepStrictEqual(warning.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warning.message, 'Hello world')
|
||||
t.assert.ok(warn.emitted)
|
||||
}
|
||||
|
||||
const warn = createWarning({
|
||||
@@ -23,6 +26,8 @@ test('emit should emit a given code only once', t => {
|
||||
warn()
|
||||
setImmediate(() => {
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
16
backend/node_modules/process-warning/test/emit-reset.test.js
generated
vendored
16
backend/node_modules/process-warning/test/emit-reset.test.js
generated
vendored
@@ -1,11 +1,13 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('../')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('a limited warning can be re-set', t => {
|
||||
t.plan(4)
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
let count = 0
|
||||
process.on('warning', onWarning)
|
||||
function onWarning () {
|
||||
@@ -19,18 +21,20 @@ test('a limited warning can be re-set', t => {
|
||||
})
|
||||
|
||||
warn()
|
||||
t.ok(warn.emitted)
|
||||
t.assert.ok(warn.emitted)
|
||||
|
||||
warn()
|
||||
t.ok(warn.emitted)
|
||||
t.assert.ok(warn.emitted)
|
||||
|
||||
warn.emitted = false
|
||||
warn()
|
||||
t.ok(warn.emitted)
|
||||
t.assert.ok(warn.emitted)
|
||||
|
||||
setImmediate(() => {
|
||||
t.equal(count, 2)
|
||||
t.assert.deepStrictEqual(count, 2)
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
15
backend/node_modules/process-warning/test/emit-set.test.js
generated
vendored
15
backend/node_modules/process-warning/test/emit-set.test.js
generated
vendored
@@ -1,11 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('../')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('emit should set the emitted state', t => {
|
||||
t.plan(3)
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
|
||||
process.on('warning', onWarning)
|
||||
function onWarning () {
|
||||
t.fail('should not be called')
|
||||
@@ -16,15 +19,17 @@ test('emit should set the emitted state', t => {
|
||||
code: 'CODE',
|
||||
message: 'Hello world'
|
||||
})
|
||||
t.notOk(warn.emitted)
|
||||
t.assert.ok(!warn.emitted)
|
||||
warn.emitted = true
|
||||
t.ok(warn.emitted)
|
||||
t.assert.ok(warn.emitted)
|
||||
|
||||
warn()
|
||||
t.ok(warn.emitted)
|
||||
t.assert.ok(warn.emitted)
|
||||
|
||||
setImmediate(() => {
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
19
backend/node_modules/process-warning/test/emit-unlimited.test.js
generated
vendored
19
backend/node_modules/process-warning/test/emit-unlimited.test.js
generated
vendored
@@ -1,7 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('..')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('emit should emit a given code unlimited times', t => {
|
||||
t.plan(50)
|
||||
@@ -10,13 +11,15 @@ test('emit should emit a given code unlimited times', t => {
|
||||
const expectedRun = []
|
||||
const times = 10
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
|
||||
process.on('warning', onWarning)
|
||||
function onWarning (warning) {
|
||||
t.equal(warning.name, 'TestDeprecation')
|
||||
t.equal(warning.code, 'CODE')
|
||||
t.equal(warning.message, 'Hello world')
|
||||
t.ok(warn.emitted)
|
||||
t.equal(runs++, expectedRun.shift())
|
||||
t.assert.deepStrictEqual(warning.name, 'TestDeprecation')
|
||||
t.assert.deepStrictEqual(warning.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warning.message, 'Hello world')
|
||||
t.assert.ok(warn.emitted)
|
||||
t.assert.deepStrictEqual(runs++, expectedRun.shift())
|
||||
}
|
||||
|
||||
const warn = createWarning({
|
||||
@@ -32,6 +35,8 @@ test('emit should emit a given code unlimited times', t => {
|
||||
}
|
||||
setImmediate(() => {
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
40
backend/node_modules/process-warning/test/index.test.js
generated
vendored
40
backend/node_modules/process-warning/test/index.test.js
generated
vendored
@@ -1,6 +1,6 @@
|
||||
'use strict'
|
||||
|
||||
const test = require('tap').test
|
||||
const { test } = require('node:test')
|
||||
const { createWarning, createDeprecation } = require('..')
|
||||
|
||||
process.removeAllListeners('warning')
|
||||
@@ -13,9 +13,9 @@ test('Create warning with zero parameter', t => {
|
||||
code: 'CODE',
|
||||
message: 'Not available'
|
||||
})
|
||||
t.equal(warnItem.name, 'TestWarning')
|
||||
t.equal(warnItem.message, 'Not available')
|
||||
t.equal(warnItem.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
|
||||
t.assert.deepStrictEqual(warnItem.message, 'Not available')
|
||||
t.assert.deepStrictEqual(warnItem.code, 'CODE')
|
||||
})
|
||||
|
||||
test('Create error with 1 parameter', t => {
|
||||
@@ -26,9 +26,9 @@ test('Create error with 1 parameter', t => {
|
||||
code: 'CODE',
|
||||
message: 'hey %s'
|
||||
})
|
||||
t.equal(warnItem.name, 'TestWarning')
|
||||
t.equal(warnItem.format('alice'), 'hey alice')
|
||||
t.equal(warnItem.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
|
||||
t.assert.deepStrictEqual(warnItem.format('alice'), 'hey alice')
|
||||
t.assert.deepStrictEqual(warnItem.code, 'CODE')
|
||||
})
|
||||
|
||||
test('Create error with 2 parameters', t => {
|
||||
@@ -39,9 +39,9 @@ test('Create error with 2 parameters', t => {
|
||||
code: 'CODE',
|
||||
message: 'hey %s, I like your %s'
|
||||
})
|
||||
t.equal(warnItem.name, 'TestWarning')
|
||||
t.equal(warnItem.format('alice', 'attitude'), 'hey alice, I like your attitude')
|
||||
t.equal(warnItem.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
|
||||
t.assert.deepStrictEqual(warnItem.format('alice', 'attitude'), 'hey alice, I like your attitude')
|
||||
t.assert.deepStrictEqual(warnItem.code, 'CODE')
|
||||
})
|
||||
|
||||
test('Create error with 3 parameters', t => {
|
||||
@@ -52,9 +52,9 @@ test('Create error with 3 parameters', t => {
|
||||
code: 'CODE',
|
||||
message: 'hey %s, I like your %s %s'
|
||||
})
|
||||
t.equal(warnItem.name, 'TestWarning')
|
||||
t.equal(warnItem.format('alice', 'attitude', 'see you'), 'hey alice, I like your attitude see you')
|
||||
t.equal(warnItem.code, 'CODE')
|
||||
t.assert.deepStrictEqual(warnItem.name, 'TestWarning')
|
||||
t.assert.deepStrictEqual(warnItem.format('alice', 'attitude', 'see you'), 'hey alice, I like your attitude see you')
|
||||
t.assert.deepStrictEqual(warnItem.code, 'CODE')
|
||||
})
|
||||
|
||||
test('Creates a deprecation warning', t => {
|
||||
@@ -65,24 +65,24 @@ test('Creates a deprecation warning', t => {
|
||||
code: 'CODE',
|
||||
message: 'hello %s'
|
||||
})
|
||||
t.equal(deprecationItem.name, 'DeprecationWarning')
|
||||
t.equal(deprecationItem.format('world'), 'hello world')
|
||||
t.equal(deprecationItem.code, 'CODE')
|
||||
t.assert.deepStrictEqual(deprecationItem.name, 'DeprecationWarning')
|
||||
t.assert.deepStrictEqual(deprecationItem.format('world'), 'hello world')
|
||||
t.assert.deepStrictEqual(deprecationItem.code, 'CODE')
|
||||
})
|
||||
|
||||
test('Should throw when error code has no name', t => {
|
||||
t.plan(1)
|
||||
t.throws(() => createWarning(), new Error('Warning name must not be empty'))
|
||||
t.assert.throws(() => createWarning(), new Error('Warning name must not be empty'))
|
||||
})
|
||||
|
||||
test('Should throw when error has no code', t => {
|
||||
t.plan(1)
|
||||
t.throws(() => createWarning({ name: 'name' }), new Error('Warning code must not be empty'))
|
||||
t.assert.throws(() => createWarning({ name: 'name' }), new Error('Warning code must not be empty'))
|
||||
})
|
||||
|
||||
test('Should throw when error has no message', t => {
|
||||
t.plan(1)
|
||||
t.throws(() => createWarning({
|
||||
t.assert.throws(() => createWarning({
|
||||
name: 'name',
|
||||
code: 'code'
|
||||
}), new Error('Warning message must not be empty'))
|
||||
@@ -90,7 +90,7 @@ test('Should throw when error has no message', t => {
|
||||
|
||||
test('Cannot set unlimited other than boolean', t => {
|
||||
t.plan(1)
|
||||
t.throws(() => createWarning({
|
||||
t.assert.throws(() => createWarning({
|
||||
name: 'name',
|
||||
code: 'code',
|
||||
message: 'message',
|
||||
|
||||
11
backend/node_modules/process-warning/test/issue-88.test.js
generated
vendored
11
backend/node_modules/process-warning/test/issue-88.test.js
generated
vendored
@@ -1,13 +1,14 @@
|
||||
'use strict'
|
||||
|
||||
const { test } = require('tap')
|
||||
const { test } = require('node:test')
|
||||
const { createWarning } = require('..')
|
||||
const { withResolvers } = require('./promise')
|
||||
|
||||
test('Must not overwrite config', t => {
|
||||
t.plan(1)
|
||||
|
||||
function onWarning (warning) {
|
||||
t.equal(warning.code, 'CODE_1')
|
||||
t.assert.deepStrictEqual(warning.code, 'CODE_1')
|
||||
}
|
||||
|
||||
const a = createWarning({
|
||||
@@ -22,12 +23,16 @@ test('Must not overwrite config', t => {
|
||||
unlimited: true
|
||||
})
|
||||
|
||||
const { promise, resolve } = withResolvers()
|
||||
|
||||
process.on('warning', onWarning)
|
||||
a('CODE_1')
|
||||
a('CODE_1')
|
||||
|
||||
setImmediate(() => {
|
||||
process.removeListener('warning', onWarning)
|
||||
t.end()
|
||||
resolve()
|
||||
})
|
||||
|
||||
return promise
|
||||
})
|
||||
|
||||
32
backend/node_modules/process-warning/test/jest.test.js
generated
vendored
32
backend/node_modules/process-warning/test/jest.test.js
generated
vendored
@@ -3,20 +3,22 @@
|
||||
|
||||
const { createWarning } = require('..')
|
||||
|
||||
test('works with jest', done => {
|
||||
const code = createWarning({
|
||||
name: 'TestDeprecation',
|
||||
code: 'CODE',
|
||||
message: 'Hello world'
|
||||
})
|
||||
code('world')
|
||||
if (globalThis.test) {
|
||||
test('works with jest', done => {
|
||||
const code = createWarning({
|
||||
name: 'TestDeprecation',
|
||||
code: 'CODE',
|
||||
message: 'Hello world'
|
||||
})
|
||||
code('world')
|
||||
|
||||
// we cannot actually listen to process warning event
|
||||
// because jest messes with it (that's the point of this test)
|
||||
// we can only test it was emitted indirectly
|
||||
// and test no exception is raised
|
||||
setImmediate(() => {
|
||||
expect(code.emitted).toBeTruthy()
|
||||
done()
|
||||
// we cannot actually listen to process warning event
|
||||
// because jest messes with it (that's the point of this test)
|
||||
// we can only test it was emitted indirectly
|
||||
// and test no exception is raised
|
||||
setImmediate(() => {
|
||||
expect(code.emitted).toBeTruthy()
|
||||
done()
|
||||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
18
backend/node_modules/process-warning/test/no-warnings.test.js
generated
vendored
18
backend/node_modules/process-warning/test/no-warnings.test.js
generated
vendored
@@ -1,8 +1,8 @@
|
||||
'use strict'
|
||||
|
||||
const { test } = require('tap')
|
||||
const { spawnSync } = require('child_process')
|
||||
const { resolve } = require('path')
|
||||
const { test } = require('node:test')
|
||||
const { spawnSync } = require('node:child_process')
|
||||
const { resolve } = require('node:path')
|
||||
|
||||
const entry = resolve(__dirname, '../examples', 'example.js')
|
||||
|
||||
@@ -14,7 +14,7 @@ test('--no-warnings is set in cli', t => {
|
||||
])
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.equal(stderr, '')
|
||||
t.assert.deepStrictEqual(stderr, '')
|
||||
})
|
||||
|
||||
test('--no-warnings is not set in cli', t => {
|
||||
@@ -24,7 +24,7 @@ test('--no-warnings is not set in cli', t => {
|
||||
])
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
})
|
||||
|
||||
test('NODE_NO_WARNINGS is set to 1', t => {
|
||||
@@ -38,7 +38,7 @@ test('NODE_NO_WARNINGS is set to 1', t => {
|
||||
})
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.equal(stderr, '')
|
||||
t.assert.deepStrictEqual(stderr, '')
|
||||
})
|
||||
|
||||
test('NODE_NO_WARNINGS is set to 0', t => {
|
||||
@@ -52,7 +52,7 @@ test('NODE_NO_WARNINGS is set to 0', t => {
|
||||
})
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
})
|
||||
|
||||
test('NODE_NO_WARNINGS is not set', t => {
|
||||
@@ -62,7 +62,7 @@ test('NODE_NO_WARNINGS is not set', t => {
|
||||
])
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
t.assert.match(stderr, /\[CUSTDEP001\] DeprecationWarning: This is a deprecation warning/)
|
||||
})
|
||||
|
||||
test('NODE_Options contains --no-warnings', t => {
|
||||
@@ -76,5 +76,5 @@ test('NODE_Options contains --no-warnings', t => {
|
||||
})
|
||||
|
||||
const stderr = child.stderr.toString()
|
||||
t.equal(stderr, '')
|
||||
t.assert.deepStrictEqual(stderr, '')
|
||||
})
|
||||
|
||||
10
backend/node_modules/process-warning/test/promise.js
generated
vendored
Normal file
10
backend/node_modules/process-warning/test/promise.js
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
withResolvers: function () {
|
||||
let promiseResolve, promiseReject
|
||||
const promise = new Promise((resolve, reject) => {
|
||||
promiseResolve = resolve
|
||||
promiseReject = reject
|
||||
})
|
||||
return { promise, resolve: promiseResolve, reject: promiseReject }
|
||||
}
|
||||
}
|
||||
10
backend/node_modules/process-warning/types/index.d.ts
generated
vendored
10
backend/node_modules/process-warning/types/index.d.ts
generated
vendored
@@ -27,11 +27,11 @@ declare namespace processWarning {
|
||||
createDeprecation(params: DeprecationOptions): WarningItem;
|
||||
}
|
||||
|
||||
export function createWarning(params: WarningOptions): WarningItem;
|
||||
export function createDeprecation(params: DeprecationOptions): WarningItem;
|
||||
export function createWarning (params: WarningOptions): WarningItem
|
||||
export function createDeprecation (params: DeprecationOptions): WarningItem
|
||||
|
||||
const processWarning: ProcessWarning;
|
||||
export { processWarning as default };
|
||||
const processWarning: ProcessWarning
|
||||
export { processWarning as default }
|
||||
}
|
||||
|
||||
export = processWarning;
|
||||
export = processWarning
|
||||
|
||||
Reference in New Issue
Block a user