@zuplo/cli 7.9.20 → 7.9.21
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/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.js.map +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.min.js +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/cjs/index.cjs.min.js.map +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.js +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.js.map +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.min.js +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/iife/index.iife.min.js.map +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/index.min.js +1 -1
- package/node_modules/@jsep-plugin/assignment/dist/index.min.js.map +1 -1
- package/node_modules/@jsep-plugin/assignment/package.json +4 -4
- package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.js.map +1 -1
- package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.min.js +1 -1
- package/node_modules/@jsep-plugin/regex/dist/cjs/index.cjs.min.js.map +1 -1
- package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.js +1 -1
- package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.js.map +1 -1
- package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.min.js +1 -1
- package/node_modules/@jsep-plugin/regex/dist/iife/index.iife.min.js.map +1 -1
- package/node_modules/@jsep-plugin/regex/dist/index.min.js +1 -1
- package/node_modules/@jsep-plugin/regex/dist/index.min.js.map +1 -1
- package/node_modules/@jsep-plugin/regex/package.json +4 -4
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +5 -0
- package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core-stateless.js +7 -4
- package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +7 -4
- package/node_modules/@posthog/core/dist/posthog-core.d.ts +1 -0
- package/node_modules/@posthog/core/dist/posthog-core.d.ts.map +1 -1
- package/node_modules/@posthog/core/dist/posthog-core.js +8 -4
- package/node_modules/@posthog/core/dist/posthog-core.mjs +9 -5
- package/node_modules/@posthog/core/package.json +1 -1
- package/node_modules/@posthog/core/src/posthog-core-stateless.ts +12 -4
- package/node_modules/@posthog/core/src/posthog-core.ts +13 -11
- package/node_modules/@zuplo/core/package.json +1 -1
- package/node_modules/@zuplo/graphql/package.json +1 -1
- package/node_modules/@zuplo/openapi-tools/package.json +1 -1
- package/node_modules/@zuplo/otel/package.json +1 -1
- package/node_modules/@zuplo/runtime/package.json +1 -1
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/jsep/dist/cjs/jsep.cjs.js +4 -2
- package/node_modules/jsep/dist/cjs/jsep.cjs.js.map +1 -1
- package/node_modules/jsep/dist/cjs/jsep.cjs.min.js +1 -1
- package/node_modules/jsep/dist/cjs/jsep.cjs.min.js.map +1 -1
- package/node_modules/jsep/dist/iife/jsep.iife.js +5 -3
- package/node_modules/jsep/dist/iife/jsep.iife.js.map +1 -1
- package/node_modules/jsep/dist/iife/jsep.iife.min.js +1 -1
- package/node_modules/jsep/dist/iife/jsep.iife.min.js.map +1 -1
- package/node_modules/jsep/dist/jsep.js +4 -2
- package/node_modules/jsep/dist/jsep.min.js +1 -1
- package/node_modules/jsep/dist/jsep.min.js.map +1 -1
- package/node_modules/jsep/package.json +13 -13
- package/node_modules/process-warning/.github/workflows/ci.yml +1 -1
- package/node_modules/process-warning/.github/workflows/lock-threads.yml +1 -1
- package/node_modules/process-warning/.github/workflows/release.yml +24 -0
- package/node_modules/process-warning/README.md +46 -46
- package/node_modules/process-warning/package.json +1 -1
- package/node_modules/secure-json-parse/.github/dependabot.yml +42 -2
- package/node_modules/secure-json-parse/.github/workflows/ci.yml +20 -45
- package/node_modules/secure-json-parse/.github/workflows/lock-threads.yml +19 -0
- package/node_modules/secure-json-parse/.github/workflows/release.yml +24 -0
- package/node_modules/secure-json-parse/LICENSE +1 -3
- package/node_modules/secure-json-parse/README.md +63 -23
- package/node_modules/secure-json-parse/benchmarks/ignore.js +15 -13
- package/node_modules/secure-json-parse/benchmarks/no__proto__.js +19 -17
- package/node_modules/secure-json-parse/benchmarks/package.json +1 -1
- package/node_modules/secure-json-parse/benchmarks/remove.js +19 -17
- package/node_modules/secure-json-parse/benchmarks/throw.js +19 -17
- package/node_modules/secure-json-parse/benchmarks/valid.js +19 -17
- package/node_modules/secure-json-parse/index.js +4 -2
- package/node_modules/secure-json-parse/package.json +7 -7
- package/node_modules/secure-json-parse/test/index.test.js +3 -1
- package/node_modules/secure-json-parse/types/{index.test-d.ts → index.tst.ts} +15 -13
- package/package.json +11 -11
- package/node_modules/secure-json-parse/.github/stale.yml +0 -21
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jsep",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "a tiny JavaScript expression parser",
|
|
5
5
|
"author": "Stephen Oney <swloney@gmail.com> (http://from.so/)",
|
|
6
6
|
"maintainers": [
|
|
@@ -26,27 +26,27 @@
|
|
|
26
26
|
"typings": "typings/tsd.d.ts",
|
|
27
27
|
"private": false,
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@commitlint/cli": "^
|
|
30
|
-
"@commitlint/config-angular": "^
|
|
31
|
-
"@rollup/plugin-replace": "^
|
|
29
|
+
"@commitlint/cli": "^21.2.3",
|
|
30
|
+
"@commitlint/config-angular": "^21.2.3",
|
|
31
|
+
"@rollup/plugin-replace": "^6.0.3",
|
|
32
32
|
"@semantic-release/changelog": "^5.0.1",
|
|
33
33
|
"@semantic-release/exec": "^6.0.3",
|
|
34
34
|
"@semantic-release/git": "^9.0.0",
|
|
35
35
|
"benchmark": "^2.1.4",
|
|
36
36
|
"docco": "^0.9.1",
|
|
37
|
-
"eslint": "^
|
|
37
|
+
"eslint": "^10.12.0",
|
|
38
38
|
"http-server": "^14.1.1",
|
|
39
|
-
"husky": "^
|
|
39
|
+
"husky": "^9.1.7",
|
|
40
40
|
"node-qunit-puppeteer": "^2.1.2",
|
|
41
|
-
"puppeteer": "^
|
|
42
|
-
"rollup": "^
|
|
43
|
-
"rollup-plugin-delete": "^
|
|
41
|
+
"puppeteer": "^25.12.0",
|
|
42
|
+
"rollup": "^4.64.2",
|
|
43
|
+
"rollup-plugin-delete": "^3.0.2",
|
|
44
44
|
"rollup-plugin-terser": "^7.0.2",
|
|
45
45
|
"semantic-release-monorepo": "^7.0.5",
|
|
46
46
|
"semantic-release-plus": "^18.4.1"
|
|
47
47
|
},
|
|
48
48
|
"engines": {
|
|
49
|
-
"node": ">=
|
|
49
|
+
"node": ">= 20.16.0"
|
|
50
50
|
},
|
|
51
51
|
"directories": {
|
|
52
52
|
"test": "test"
|
|
@@ -141,9 +141,9 @@
|
|
|
141
141
|
"default": "npm run lint && npm run build:all && npm run test:all && npm run docco",
|
|
142
142
|
"build": "npx rollup -c && cp package-cjs.json dist/cjs/package.json",
|
|
143
143
|
"build:watch": "npx rollup -c --watch",
|
|
144
|
-
"build:all": "pnpm run build
|
|
145
|
-
"test": "npx http-server -p 49649 --silent & npx node-qunit-puppeteer http://localhost:49649/test/unit_tests.html",
|
|
146
|
-
"test:all": "
|
|
144
|
+
"build:all": "pnpm --recursive --workspace-root run build",
|
|
145
|
+
"test": "npx http-server -p 49649 --silent & npx node-qunit-puppeteer http://localhost:49649/test/unit_tests.html 30000 \"--no-sandbox\" ",
|
|
146
|
+
"test:all": "pnpm -r --workspace-concurrency=1 run test",
|
|
147
147
|
"test:performance": "node test/performance.test.js",
|
|
148
148
|
"docco": "npx docco src/jsep.js --css=src/docco.css --output=annotated_source/",
|
|
149
149
|
"lint": "npx eslint src/**/*.js test/*.js test/packages/**/*.js packages/**/*.js",
|
|
@@ -27,7 +27,7 @@ jobs:
|
|
|
27
27
|
permissions:
|
|
28
28
|
contents: write
|
|
29
29
|
pull-requests: write
|
|
30
|
-
uses: fastify/workflows/.github/workflows/plugins-ci.yml@
|
|
30
|
+
uses: fastify/workflows/.github/workflows/plugins-ci.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
31
31
|
with:
|
|
32
32
|
license-check: true
|
|
33
33
|
lint: true
|
|
@@ -16,4 +16,4 @@ jobs:
|
|
|
16
16
|
permissions:
|
|
17
17
|
issues: write
|
|
18
18
|
pull-requests: write
|
|
19
|
-
uses: fastify/workflows/.github/workflows/lock-threads.yml@
|
|
19
|
+
uses: fastify/workflows/.github/workflows/lock-threads.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release the package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
semver:
|
|
7
|
+
description: 'Release bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
permissions:
|
|
20
|
+
id-token: write # required for npm provenance via OIDC
|
|
21
|
+
contents: write # required to push the release commit and the tag
|
|
22
|
+
uses: fastify/workflows/.github/workflows/reusable-release.yml@b1a11bce713bc857e52b2231fec3c89071ad3135
|
|
23
|
+
with:
|
|
24
|
+
semver: ${{ inputs.semver }}
|
|
@@ -4,18 +4,18 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/process-warning)
|
|
5
5
|
[](https://github.com/neostandard/neostandard)
|
|
6
6
|
|
|
7
|
-
A small utility for generating consistent [warning objects](https://nodejs.org/api/process.html#event-warning) across
|
|
7
|
+
A small utility for generating consistent [warning objects](https://nodejs.org/api/process.html#event-warning) across a codebase.
|
|
8
8
|
It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise).
|
|
9
9
|
|
|
10
|
-
_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._
|
|
10
|
+
_This module is used by the [Fastify](https://fastify.dev) framework, and it was called `fastify-warning` prior to version 1.0.0._
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## Install
|
|
13
13
|
|
|
14
14
|
```
|
|
15
15
|
npm i process-warning
|
|
16
16
|
```
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
## Usage
|
|
19
19
|
|
|
20
20
|
The module exports two builder functions for creating warnings.
|
|
21
21
|
|
|
@@ -34,35 +34,34 @@ const warning = createWarning({
|
|
|
34
34
|
const emitted = warning('world')
|
|
35
35
|
```
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
### Methods
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
#### `createWarning({name, code, message[, unlimited]})`
|
|
40
40
|
|
|
41
|
-
- `name` (`string`, required) - The error name,
|
|
42
|
-
`error.name`. For consistency,
|
|
43
|
-
|
|
44
|
-
- `code` (`string`, required) - The warning code,
|
|
45
|
-
`error.code`. For consistency,
|
|
46
|
-
`{ThreeLetterModuleName}_`, e.g. `FST_`.
|
|
47
|
-
- `message` (`string`, required) - The warning message.
|
|
48
|
-
|
|
41
|
+
- `name` (`string`, required) - The error name, accessible through
|
|
42
|
+
`error.name`. For consistency, prefix module error names with
|
|
43
|
+
`{ModuleName}Warning`.
|
|
44
|
+
- `code` (`string`, required) - The warning code, accessible through
|
|
45
|
+
`error.code`. For consistency, prefix plugin error codes with
|
|
46
|
+
`{ThreeLetterModuleName}_`, e.g. `FST_`. Note: Codes should be all uppercase.
|
|
47
|
+
- `message` (`string`, required) - The warning message. Interpolated strings
|
|
48
|
+
can also be used to format the message.
|
|
49
49
|
- `options` (`object`, optional) - Optional options with the following
|
|
50
50
|
properties:
|
|
51
51
|
+ `unlimited` (`boolean`, optional) - Should the warning be emitted more than
|
|
52
52
|
once? Defaults to `false`.
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
##### `createDeprecation({code, message[, options]})`
|
|
54
|
+
#### `createDeprecation({ code, message[, options] })`
|
|
56
55
|
|
|
57
56
|
This is a wrapper for `createWarning`. It is equivalent to invoking
|
|
58
|
-
`createWarning` with the `name` parameter set to "DeprecationWarning"
|
|
57
|
+
`createWarning` with the `name` parameter set to `"DeprecationWarning"`.
|
|
59
58
|
|
|
60
59
|
Deprecation warnings have extended support for the Node.js CLI options:
|
|
61
60
|
`--throw-deprecation`, `--no-deprecation`, and `--trace-deprecation`.
|
|
62
61
|
|
|
63
|
-
|
|
62
|
+
#### `warning([, a [, b [, c]]])`
|
|
64
63
|
|
|
65
|
-
The returned `warning` function can used
|
|
64
|
+
The returned `warning` function can be used to emit warnings.
|
|
66
65
|
A warning is guaranteed to be emitted at least once.
|
|
67
66
|
|
|
68
67
|
- `[, a [, b [, c]]]` (`any`, optional) - Parameters for string interpolation.
|
|
@@ -73,14 +72,16 @@ const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CO
|
|
|
73
72
|
FST_ERROR_CODE()
|
|
74
73
|
```
|
|
75
74
|
|
|
76
|
-
|
|
75
|
+
Using an interpolated string:
|
|
76
|
+
|
|
77
77
|
```js
|
|
78
78
|
const { createWarning } = require('process-warning')
|
|
79
79
|
const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'})
|
|
80
80
|
FST_ERROR_CODE('world')
|
|
81
81
|
```
|
|
82
82
|
|
|
83
|
-
The `warning` object has methods and properties for managing the warning's state.
|
|
83
|
+
The `warning` object has methods and properties for managing the warning's state. These are useful for testing.
|
|
84
|
+
|
|
84
85
|
```js
|
|
85
86
|
const { createWarning } = require('process-warning')
|
|
86
87
|
const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s'})
|
|
@@ -90,20 +91,21 @@ console.log(FST_ERROR_CODE.emitted) // true
|
|
|
90
91
|
|
|
91
92
|
const FST_ERROR_CODE_2 = createWarning('MyAppWarning', 'FST_ERROR_CODE_2', 'Hello %s')
|
|
92
93
|
FST_ERROR_CODE_2.emitted = true
|
|
93
|
-
FST_ERROR_CODE_2('world') //
|
|
94
|
+
FST_ERROR_CODE_2('world') // Will not be emitted because it is not unlimited
|
|
94
95
|
```
|
|
95
96
|
|
|
96
|
-
|
|
97
|
+
Using an unlimited warning:
|
|
98
|
+
|
|
97
99
|
```js
|
|
98
100
|
const { createWarning } = require('process-warning')
|
|
99
101
|
const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s', unlimited: true })
|
|
100
|
-
FST_ERROR_CODE('world') //
|
|
101
|
-
FST_ERROR_CODE('world') //
|
|
102
|
+
FST_ERROR_CODE('world') // Will be emitted
|
|
103
|
+
FST_ERROR_CODE('world') // Will be emitted again
|
|
102
104
|
```
|
|
103
105
|
|
|
104
106
|
#### `spyWarning(warning)`
|
|
105
107
|
|
|
106
|
-
Spy the created warning function for testing
|
|
108
|
+
Spy on the created warning function for testing purposes.
|
|
107
109
|
|
|
108
110
|
```js
|
|
109
111
|
const { test } = require('node:test')
|
|
@@ -113,45 +115,43 @@ const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CO
|
|
|
113
115
|
test('spy warning', t => {
|
|
114
116
|
const spyData = spyWarning(FST_ERROR_CODE)
|
|
115
117
|
|
|
116
|
-
//
|
|
118
|
+
// Call after spying
|
|
117
119
|
const emitted = FST_ERROR_CODE('world')
|
|
118
120
|
t.assert.strictEqual(emitted, true)
|
|
119
121
|
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
//
|
|
122
|
+
// Restore the warning function
|
|
123
|
+
// This must be called when spying is no longer required
|
|
124
|
+
// Otherwise, the call data will accumulate
|
|
123
125
|
t.after(() => spyData.restore())
|
|
124
126
|
|
|
125
127
|
t.assert.strictEqual(FST_ERROR_CODE.emitted, true)
|
|
126
|
-
// calls
|
|
127
|
-
// result
|
|
128
|
+
// `calls` contains the arguments and results
|
|
129
|
+
// `result` indicates whether the warning was emitted through `process.emitWarning`
|
|
128
130
|
console.log(spyData.calls) // [{ arguments: ['world'], result: true }]
|
|
129
131
|
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['world'])
|
|
130
|
-
t.assert.strictEqual(spyData.calls[0].result,
|
|
131
|
-
//
|
|
132
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
133
|
+
// Number of times the function was called
|
|
132
134
|
console.log(spyData.callCount()) // 1
|
|
133
|
-
t.assert.strictEqual(spyData.callCount(),
|
|
135
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
134
136
|
|
|
135
|
-
//
|
|
137
|
+
// Reset the spy statistics and warning state
|
|
136
138
|
spyData.reset()
|
|
137
139
|
t.assert.strictEqual(FST_ERROR_CODE.emitted, false)
|
|
138
140
|
t.assert.deepStrictEqual(spyData.calls, [])
|
|
139
|
-
t.assert.strictEqual(spyData.callCount(),
|
|
141
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
140
142
|
})
|
|
141
143
|
```
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
It is possible to suppress warnings by utilizing one of node's built-in warning suppression mechanisms.
|
|
145
|
+
### Suppressing warnings
|
|
146
146
|
|
|
147
|
-
Warnings can be suppressed:
|
|
147
|
+
Warnings can be suppressed by using one of Node.js's built-in warning suppression mechanisms:
|
|
148
148
|
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
149
|
+
- Setting the `NODE_NO_WARNINGS` environment variable to `1`
|
|
150
|
+
- Passing the `--no-warnings` flag to the Node.js process
|
|
151
|
+
- Setting `--no-warnings` in the `NODE_OPTIONS` environment variable
|
|
152
152
|
|
|
153
|
-
For more information see [
|
|
153
|
+
For more information, see the [Node.js documentation](https://nodejs.org/api/cli.html).
|
|
154
154
|
|
|
155
155
|
## License
|
|
156
156
|
|
|
157
|
-
Licensed under [MIT](./LICENSE).
|
|
157
|
+
Licensed under [MIT](./LICENSE).
|
|
@@ -2,12 +2,52 @@ version: 2
|
|
|
2
2
|
updates:
|
|
3
3
|
- package-ecosystem: "github-actions"
|
|
4
4
|
directory: "/"
|
|
5
|
+
commit-message:
|
|
6
|
+
# Prefix all commit messages with "chore: "
|
|
7
|
+
prefix: "chore"
|
|
5
8
|
schedule:
|
|
6
|
-
interval: "
|
|
9
|
+
interval: "weekly"
|
|
10
|
+
cooldown:
|
|
11
|
+
default-days: 7
|
|
12
|
+
allow:
|
|
13
|
+
- dependency-name: "*"
|
|
14
|
+
update-types:
|
|
15
|
+
- "version-update:semver-major"
|
|
7
16
|
open-pull-requests-limit: 10
|
|
8
17
|
|
|
9
18
|
- package-ecosystem: "npm"
|
|
10
19
|
directory: "/"
|
|
20
|
+
commit-message:
|
|
21
|
+
# Prefix all commit messages with "chore: "
|
|
22
|
+
prefix: "chore"
|
|
11
23
|
schedule:
|
|
12
|
-
interval: "
|
|
24
|
+
interval: "weekly"
|
|
25
|
+
cooldown:
|
|
26
|
+
default-days: 7
|
|
27
|
+
versioning-strategy: "increase-if-necessary"
|
|
28
|
+
allow:
|
|
29
|
+
- dependency-name: "*"
|
|
30
|
+
update-types:
|
|
31
|
+
- "version-update:semver-major"
|
|
32
|
+
ignore:
|
|
33
|
+
# TODO: remove ignore until neostandard support ESLint 10
|
|
34
|
+
- dependency-name: "eslint"
|
|
35
|
+
- dependency-name: "neostandard"
|
|
36
|
+
- dependency-name: "@stylistic/*"
|
|
13
37
|
open-pull-requests-limit: 10
|
|
38
|
+
groups:
|
|
39
|
+
# Production dependencies with breaking changes
|
|
40
|
+
dependencies:
|
|
41
|
+
dependency-type: "production"
|
|
42
|
+
# ESLint related dependencies
|
|
43
|
+
dev-dependencies-eslint:
|
|
44
|
+
patterns:
|
|
45
|
+
- "eslint"
|
|
46
|
+
- "neostandard"
|
|
47
|
+
- "@stylistic/*"
|
|
48
|
+
# TypeScript related dependencies
|
|
49
|
+
dev-dependencies-typescript:
|
|
50
|
+
patterns:
|
|
51
|
+
- "@types/*"
|
|
52
|
+
- "tstyche"
|
|
53
|
+
- "typescript"
|
|
@@ -14,47 +14,22 @@ on:
|
|
|
14
14
|
- 'docs/**'
|
|
15
15
|
- '*.md'
|
|
16
16
|
|
|
17
|
+
# This allows a subsequently queued workflow run to interrupt previous runs
|
|
18
|
+
concurrency:
|
|
19
|
+
group: "${{ github.workflow }}-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}"
|
|
20
|
+
cancel-in-progress: true
|
|
21
|
+
|
|
17
22
|
permissions:
|
|
18
23
|
contents: read
|
|
19
24
|
|
|
20
25
|
jobs:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
if: github.event_name == 'pull_request'
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
permissions:
|
|
26
|
-
contents: read
|
|
27
|
-
steps:
|
|
28
|
-
- name: Check out repo
|
|
29
|
-
uses: actions/checkout@v5
|
|
30
|
-
with:
|
|
31
|
-
persist-credentials: false
|
|
32
|
-
|
|
33
|
-
- name: Dependency review
|
|
34
|
-
uses: actions/dependency-review-action@56339e523c0409420f6c2c9a2f4292bbb3c07dd3 # v4.8.0
|
|
35
|
-
|
|
36
|
-
lint:
|
|
37
|
-
name: Lint Code
|
|
38
|
-
runs-on: ubuntu-latest
|
|
26
|
+
quality-check:
|
|
27
|
+
uses: fastify/workflows/.github/workflows/nested-quality.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
39
28
|
permissions:
|
|
40
29
|
contents: read
|
|
41
|
-
|
|
42
|
-
-
|
|
43
|
-
|
|
44
|
-
with:
|
|
45
|
-
persist-credentials: false
|
|
46
|
-
|
|
47
|
-
- name: Setup Node
|
|
48
|
-
uses: actions/setup-node@v5
|
|
49
|
-
with:
|
|
50
|
-
check-latest: true
|
|
51
|
-
node-version: lts/*
|
|
52
|
-
|
|
53
|
-
- name: Install dependencies
|
|
54
|
-
run: npm i --ignore-scripts
|
|
55
|
-
|
|
56
|
-
- name: Lint code
|
|
57
|
-
run: npm run lint
|
|
30
|
+
with:
|
|
31
|
+
license-check: true
|
|
32
|
+
lint: true
|
|
58
33
|
|
|
59
34
|
browsers:
|
|
60
35
|
name: Test Browsers
|
|
@@ -63,12 +38,12 @@ jobs:
|
|
|
63
38
|
contents: read
|
|
64
39
|
steps:
|
|
65
40
|
- name: Check out repo
|
|
66
|
-
uses: actions/checkout@
|
|
41
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
67
42
|
with:
|
|
68
43
|
persist-credentials: false
|
|
69
44
|
|
|
70
45
|
- name: Setup Node
|
|
71
|
-
uses: actions/setup-node@
|
|
46
|
+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
72
47
|
with:
|
|
73
48
|
check-latest: true
|
|
74
49
|
node-version: lts/*
|
|
@@ -89,15 +64,15 @@ jobs:
|
|
|
89
64
|
contents: read
|
|
90
65
|
strategy:
|
|
91
66
|
matrix:
|
|
92
|
-
node-version: [20, 22, 24]
|
|
67
|
+
node-version: [20, 22, 24, 26]
|
|
93
68
|
steps:
|
|
94
69
|
- name: Check out repo
|
|
95
|
-
uses: actions/checkout@
|
|
70
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
96
71
|
with:
|
|
97
72
|
persist-credentials: false
|
|
98
73
|
|
|
99
74
|
- name: Setup Node ${{ matrix.node-version }}
|
|
100
|
-
uses: actions/setup-node@
|
|
75
|
+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
101
76
|
with:
|
|
102
77
|
check-latest: true
|
|
103
78
|
node-version: ${{ matrix.node-version }}
|
|
@@ -115,12 +90,12 @@ jobs:
|
|
|
115
90
|
contents: read
|
|
116
91
|
steps:
|
|
117
92
|
- name: Check out repo
|
|
118
|
-
uses: actions/checkout@
|
|
93
|
+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
119
94
|
with:
|
|
120
95
|
persist-credentials: false
|
|
121
96
|
|
|
122
97
|
- name: Setup Node
|
|
123
|
-
uses: actions/setup-node@
|
|
98
|
+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
|
|
124
99
|
with:
|
|
125
100
|
check-latest: true
|
|
126
101
|
node-version: lts/*
|
|
@@ -128,7 +103,7 @@ jobs:
|
|
|
128
103
|
- name: Install dependencies
|
|
129
104
|
run: npm i --ignore-scripts
|
|
130
105
|
|
|
131
|
-
- name:
|
|
106
|
+
- name: tstyche
|
|
132
107
|
run: npm run test:typescript
|
|
133
108
|
|
|
134
109
|
automerge:
|
|
@@ -137,13 +112,13 @@ jobs:
|
|
|
137
112
|
github.event_name == 'pull_request' &&
|
|
138
113
|
github.event.pull_request.head.repo.full_name == github.repository &&
|
|
139
114
|
github.event.pull_request.user.login == 'dependabot[bot]'
|
|
140
|
-
needs: [browsers,
|
|
115
|
+
needs: [browsers, quality-check, test, typescript]
|
|
141
116
|
permissions:
|
|
142
117
|
pull-requests: write
|
|
143
118
|
contents: write
|
|
144
119
|
runs-on: ubuntu-latest
|
|
145
120
|
steps:
|
|
146
|
-
- uses: fastify/github-action-merge-dependabot@
|
|
121
|
+
- uses: fastify/github-action-merge-dependabot@30c3f8f14a4f7b315ba38dbc1b793d27128fef82 # v3.12.0
|
|
147
122
|
with:
|
|
148
123
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
149
124
|
target: major
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: Lock Threads
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
schedule:
|
|
5
|
+
- cron: '0 0 1 * *'
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: lock
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
lock-threads:
|
|
16
|
+
permissions:
|
|
17
|
+
issues: write
|
|
18
|
+
pull-requests: write
|
|
19
|
+
uses: fastify/workflows/.github/workflows/lock-threads.yml@ef591e2186785d5ab36b9fe6a79c7ce2f1d94e57 # v7.0.0
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Release the package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
semver:
|
|
7
|
+
description: 'Release bump type'
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
options:
|
|
11
|
+
- patch
|
|
12
|
+
- minor
|
|
13
|
+
- major
|
|
14
|
+
|
|
15
|
+
permissions: {}
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
release:
|
|
19
|
+
permissions:
|
|
20
|
+
id-token: write # required for npm provenance via OIDC
|
|
21
|
+
contents: write # required to push the release commit and the tag
|
|
22
|
+
uses: fastify/workflows/.github/workflows/reusable-release.yml@b1a11bce713bc857e52b2231fec3c89071ad3135
|
|
23
|
+
with:
|
|
24
|
+
semver: ${{ inputs.semver }}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Copyright (c) 2019, Sideway Inc, and project contributors
|
|
2
|
-
Copyright (c) 2019-present The Fastify team
|
|
2
|
+
Copyright (c) 2019-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
3
3
|
All rights reserved.
|
|
4
4
|
|
|
5
|
-
The Fastify team members are listed at https://github.com/fastify/fastify#team.
|
|
6
|
-
|
|
7
5
|
The complete list of contributors can be found at:
|
|
8
6
|
- https://github.com/hapijs/bourne/graphs/contributors
|
|
9
7
|
- https://github.com/fastify/secure-json-parse/graphs/contributors
|
|
@@ -88,39 +88,79 @@ Scans a given object for prototype properties where:
|
|
|
88
88
|
|
|
89
89
|
## Benchmarks
|
|
90
90
|
|
|
91
|
-
Machine: 2
|
|
91
|
+
Machine: 2.4 Ghz 14-core Intel Core i7-13650HX
|
|
92
92
|
|
|
93
93
|
```
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
v22.20.0
|
|
95
|
+
|
|
96
|
+
> benchmarks@1.0.0 valid
|
|
97
|
+
> node valid.js
|
|
98
|
+
|
|
99
|
+
valid benchmark
|
|
100
|
+
┌─────────┬─────────────────────────────────────┬──────────────────┬──────────────────┬────────────────────────┬────────────────────────┬─────────┐
|
|
101
|
+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
|
|
102
|
+
├─────────┼─────────────────────────────────────┼──────────────────┼──────────────────┼────────────────────────┼────────────────────────┼─────────┤
|
|
103
|
+
│ 0 │ 'JSON.parse' │ '610.10 ± 0.39%' │ '600.00 ± 0.00' │ '1740515 ± 0.02%' │ '1666667 ± 0' │ 1639075 │
|
|
104
|
+
│ 1 │ 'JSON.parse proto' │ '875.42 ± 0.39%' │ '800.00 ± 0.00' │ '1210508 ± 0.03%' │ '1250000 ± 0' │ 1142308 │
|
|
105
|
+
│ 2 │ 'secure-json-parse parse' │ '634.34 ± 0.32%' │ '600.00 ± 0.00' │ '1624445 ± 0.01%' │ '1666667 ± 0' │ 1576434 │
|
|
106
|
+
│ 3 │ 'secure-json-parse parse proto' │ '657.25 ± 0.42%' │ '600.00 ± 0.00' │ '1666577 ± 0.03%' │ '1666667 ± 0' │ 1521499 │
|
|
107
|
+
│ 4 │ 'secure-json-parse safeParse' │ '646.03 ± 1.68%' │ '600.00 ± 0.00' │ '1622543 ± 0.02%' │ '1666667 ± 0' │ 1547914 │
|
|
108
|
+
│ 5 │ 'secure-json-parse safeParse proto' │ '912.34 ± 0.20%' │ '900.00 ± 0.00' │ '1122250 ± 0.02%' │ '1111111 ± 0' │ 1096080 │
|
|
109
|
+
│ 6 │ 'JSON.parse reviver' │ '3448.5 ± 0.59%' │ '3200.0 ± 0.00' │ '300173 ± 0.04%' │ '312500 ± 0' │ 289982 │
|
|
110
|
+
└─────────┴─────────────────────────────────────┴──────────────────┴──────────────────┴────────────────────────┴────────────────────────┴─────────┘
|
|
111
|
+
|
|
112
|
+
> benchmarks@1.0.0 ignore
|
|
96
113
|
> node ignore.js
|
|
97
114
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
115
|
+
ignore benchmark
|
|
116
|
+
┌─────────┬───────────────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
|
|
117
|
+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
|
|
118
|
+
├─────────┼───────────────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
|
|
119
|
+
│ 0 │ 'JSON.parse' │ '897.15 ± 0.53%' │ '800.00 ± 0.00' │ '1201546 ± 0.03%' │ '1250000 ± 0' │ 1114647 │
|
|
120
|
+
│ 1 │ 'secure-json-parse parse' │ '891.22 ± 0.45%' │ '800.00 ± 0.00' │ '1168492 ± 0.02%' │ '1250000 ± 0' │ 1122056 │
|
|
121
|
+
│ 2 │ 'secure-json-parse safeParse' │ '938.74 ± 0.56%' │ '900.00 ± 0.00' │ '1106881 ± 0.02%' │ '1111111 ± 0' │ 1065255 │
|
|
122
|
+
│ 3 │ 'reviver' │ '5741.8 ± 0.79%' │ '4900.0 ± 100.00' │ '188823 ± 0.08%' │ '204082 ± 4252' │ 174162 │
|
|
123
|
+
└─────────┴───────────────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
|
|
124
|
+
|
|
125
|
+
> benchmarks@1.0.0 no_proto
|
|
103
126
|
> node no__proto__.js
|
|
104
127
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
128
|
+
no __proto__ benchmark
|
|
129
|
+
┌─────────┬───────────────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
|
|
130
|
+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
|
|
131
|
+
├─────────┼───────────────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
|
|
132
|
+
│ 0 │ 'JSON.parse' │ '930.41 ± 0.56%' │ '800.00 ± 0.00' │ '1154630 ± 0.03%' │ '1250000 ± 0' │ 1074798 │
|
|
133
|
+
│ 1 │ 'secure-json-parse parse' │ '996.09 ± 0.27%' │ '900.00 ± 0.00' │ '1039752 ± 0.02%' │ '1111111 ± 0' │ 1003921 │
|
|
134
|
+
│ 2 │ 'secure-json-parse safeParse' │ '1050.5 ± 7.38%' │ '900.00 ± 0.00' │ '1038060 ± 0.02%' │ '1111111 ± 0' │ 951942 │
|
|
135
|
+
│ 3 │ 'reviver' │ '5424.7 ± 3.23%' │ '5100.0 ± 100.00' │ '192362 ± 0.05%' │ '196078 ± 3922' │ 184341 │
|
|
136
|
+
└─────────┴───────────────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
|
|
137
|
+
|
|
138
|
+
> benchmarks@1.0.0 remove
|
|
110
139
|
> node remove.js
|
|
111
140
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
141
|
+
remove benchmark
|
|
142
|
+
┌─────────┬───────────────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
|
|
143
|
+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
|
|
144
|
+
├─────────┼───────────────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
|
|
145
|
+
│ 0 │ 'JSON.parse' │ '927.86 ± 0.51%' │ '800.00 ± 0.00' │ '1161336 ± 0.03%' │ '1250000 ± 0' │ 1077745 │
|
|
146
|
+
│ 1 │ 'secure-json-parse parse' │ '1968.1 ± 0.51%' │ '1900.0 ± 100.00' │ '525418 ± 0.02%' │ '526316 ± 26316' │ 508117 │
|
|
147
|
+
│ 2 │ 'secure-json-parse safeParse' │ '930.60 ± 0.19%' │ '900.00 ± 0.00' │ '1103037 ± 0.02%' │ '1111111 ± 0' │ 1074579 │
|
|
148
|
+
│ 3 │ 'reviver' │ '5531.4 ± 0.36%' │ '5100.0 ± 100.00' │ '187392 ± 0.06%' │ '196078 ± 3922' │ 180786 │
|
|
149
|
+
└─────────┴───────────────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
|
|
150
|
+
|
|
151
|
+
> benchmarks@1.0.0 throw
|
|
117
152
|
> node throw.js
|
|
118
153
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
154
|
+
throw benchmark
|
|
155
|
+
┌─────────┬───────────────────────────────┬──────────────────┬───────────────────┬────────────────────────┬────────────────────────┬─────────┐
|
|
156
|
+
│ (index) │ Task name │ Latency avg (ns) │ Latency med (ns) │ Throughput avg (ops/s) │ Throughput med (ops/s) │ Samples │
|
|
157
|
+
├─────────┼───────────────────────────────┼──────────────────┼───────────────────┼────────────────────────┼────────────────────────┼─────────┤
|
|
158
|
+
│ 0 │ 'JSON.parse valid' │ '908.52 ± 0.54%' │ '800.00 ± 0.00' │ '1178218 ± 0.03%' │ '1250000 ± 0' │ 1100690 │
|
|
159
|
+
│ 1 │ 'JSON.parse error' │ '7993.2 ± 0.54%' │ '7600.0 ± 200.00' │ '128668 ± 0.06%' │ '131579 ± 3374' │ 125108 │
|
|
160
|
+
│ 2 │ 'secure-json-parse parse' │ '3436.4 ± 2.67%' │ '3100.0 ± 100.00' │ '312206 ± 0.05%' │ '322581 ± 10081' │ 291001 │
|
|
161
|
+
│ 3 │ 'secure-json-parse safeParse' │ '2800.9 ± 0.33%' │ '2700.0 ± 0.00' │ '364670 ± 0.03%' │ '370370 ± 0' │ 357026 │
|
|
162
|
+
│ 4 │ 'reviver' │ '9045.6 ± 1.12%' │ '8300.0 ± 200.00' │ '115581 ± 0.08%' │ '120482 ± 2975' │ 110552 │
|
|
163
|
+
└─────────┴───────────────────────────────┴──────────────────┴───────────────────┴────────────────────────┴────────────────────────┴─────────┘
|
|
124
164
|
```
|
|
125
165
|
|
|
126
166
|
## Acknowledgments
|