@zuplo/cli 6.72.0 → 6.72.1

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.
Files changed (99) hide show
  1. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/.github/dependabot.yml +42 -2
  2. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/README.md +5 -5
  3. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/index.js +4 -7
  4. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/package.json +3 -3
  5. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/additionalProperties.test.js +47 -0
  6. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/const.test.js +20 -0
  7. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-json-stringify/test/patternProperties.test.js +24 -0
  8. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.gitattributes +2 -0
  9. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/dependabot.yml +53 -0
  10. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/workflows/ci.yml +154 -0
  11. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/.github/workflows/lock-threads.yml +19 -0
  12. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/LICENSE +30 -0
  13. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/README.md +152 -0
  14. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/benchmark.mjs +159 -0
  15. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/encoder.mjs +54 -0
  16. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/equal.mjs +51 -0
  17. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/non-simple-domain.mjs +22 -0
  18. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/package.json +17 -0
  19. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/string-array-to-hex-stripped.mjs +24 -0
  20. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/benchmark/ws-is-secure.mjs +65 -0
  21. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/eslint.config.js +6 -0
  22. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/index.js +405 -0
  23. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/lib/schemes.js +267 -0
  24. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/lib/utils.js +585 -0
  25. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/package.json +68 -0
  26. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/ajv.test.js +43 -0
  27. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/equal.test.js +168 -0
  28. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/fixtures/uri-js-parse.json +501 -0
  29. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/fixtures/uri-js-serialize.json +120 -0
  30. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/parse.test.js +325 -0
  31. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/query-fragment-normalization.test.js +33 -0
  32. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/resolve.test.js +87 -0
  33. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/rfc-3986.test.js +90 -0
  34. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/scheme-normalization.test.js +16 -0
  35. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security-normalization.test.js +39 -0
  36. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security-utf8-encoding.test.js +0 -0
  37. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/security.test.js +161 -0
  38. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/serialize.test.js +151 -0
  39. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/uri-js-compatibility.test.js +33 -0
  40. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/uri-js.test.js +912 -0
  41. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/test/util.test.js +47 -0
  42. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/tsconfig.json +10 -0
  43. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.d.ts +51 -0
  44. package/node_modules/@fastify/fast-json-stringify-compiler/node_modules/fast-uri/types/index.tst.ts +15 -0
  45. package/node_modules/@posthog/core/dist/index.d.ts +3 -0
  46. package/node_modules/@posthog/core/dist/index.d.ts.map +1 -1
  47. package/node_modules/@posthog/core/dist/index.js +133 -93
  48. package/node_modules/@posthog/core/dist/index.mjs +2 -1
  49. package/node_modules/@posthog/core/dist/metrics/index.d.ts +61 -0
  50. package/node_modules/@posthog/core/dist/metrics/index.d.ts.map +1 -0
  51. package/node_modules/@posthog/core/dist/metrics/index.js +326 -0
  52. package/node_modules/@posthog/core/dist/metrics/index.mjs +283 -0
  53. package/node_modules/@posthog/core/dist/metrics/metrics-utils.d.ts +41 -0
  54. package/node_modules/@posthog/core/dist/metrics/metrics-utils.d.ts.map +1 -0
  55. package/node_modules/@posthog/core/dist/metrics/metrics-utils.js +117 -0
  56. package/node_modules/@posthog/core/dist/metrics/metrics-utils.mjs +68 -0
  57. package/node_modules/@posthog/core/dist/metrics/types.d.ts +69 -0
  58. package/node_modules/@posthog/core/dist/metrics/types.d.ts.map +1 -0
  59. package/node_modules/@posthog/core/dist/metrics/types.js +18 -0
  60. package/node_modules/@posthog/core/dist/metrics/types.mjs +0 -0
  61. package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts +2 -0
  62. package/node_modules/@posthog/core/dist/posthog-core-stateless.d.ts.map +1 -1
  63. package/node_modules/@posthog/core/dist/posthog-core-stateless.js +16 -1
  64. package/node_modules/@posthog/core/dist/posthog-core-stateless.mjs +16 -1
  65. package/node_modules/@posthog/core/package.json +2 -2
  66. package/node_modules/@posthog/core/src/index.ts +20 -0
  67. package/node_modules/@posthog/core/src/metrics/index.spec.ts +459 -0
  68. package/node_modules/@posthog/core/src/metrics/index.ts +414 -0
  69. package/node_modules/@posthog/core/src/metrics/metrics-utils.ts +100 -0
  70. package/node_modules/@posthog/core/src/metrics/types.ts +89 -0
  71. package/node_modules/@posthog/core/src/posthog-core-stateless.ts +26 -0
  72. package/node_modules/@posthog/types/dist/capture-metric.d.ts +122 -0
  73. package/node_modules/@posthog/types/dist/capture-metric.d.ts.map +1 -0
  74. package/node_modules/@posthog/types/dist/capture-metric.js +36 -0
  75. package/node_modules/@posthog/types/dist/capture-metric.mjs +2 -0
  76. package/node_modules/@posthog/types/dist/index.d.ts +3 -1
  77. package/node_modules/@posthog/types/dist/index.d.ts.map +1 -1
  78. package/node_modules/@posthog/types/dist/index.js +19 -1
  79. package/node_modules/@posthog/types/dist/index.mjs +2 -0
  80. package/node_modules/@posthog/types/dist/posthog-config.d.ts +60 -0
  81. package/node_modules/@posthog/types/dist/posthog-config.d.ts.map +1 -1
  82. package/node_modules/@posthog/types/package.json +1 -1
  83. package/node_modules/@posthog/types/src/capture-metric.ts +133 -0
  84. package/node_modules/@posthog/types/src/index.ts +17 -0
  85. package/node_modules/@posthog/types/src/posthog-config.ts +62 -0
  86. package/node_modules/@zuplo/core/package.json +1 -1
  87. package/node_modules/@zuplo/graphql/package.json +1 -1
  88. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  89. package/node_modules/@zuplo/otel/package.json +1 -1
  90. package/node_modules/@zuplo/runtime/out/esm/{chunk-FAOWNDMK.js → chunk-IC7XGD5C.js} +93 -93
  91. package/node_modules/@zuplo/runtime/out/esm/chunk-IC7XGD5C.js.map +1 -0
  92. package/node_modules/@zuplo/runtime/out/esm/index.js +1 -1
  93. package/node_modules/@zuplo/runtime/out/esm/index.js.map +1 -1
  94. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +1 -1
  95. package/node_modules/@zuplo/runtime/out/types/index.d.ts +830 -6
  96. package/node_modules/@zuplo/runtime/package.json +1 -1
  97. package/package.json +6 -6
  98. package/node_modules/@zuplo/runtime/out/esm/chunk-FAOWNDMK.js.map +0 -1
  99. /package/node_modules/@zuplo/runtime/out/esm/{chunk-FAOWNDMK.js.LEGAL.txt → chunk-IC7XGD5C.js.LEGAL.txt} +0 -0
@@ -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: "monthly"
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: "monthly"
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"
@@ -11,7 +11,7 @@ Its performance advantage shrinks as your payload grows.
11
11
 
12
12
  ### How it works
13
13
 
14
- fast-json-stringify requires a [JSON Schema Draft 7](https://json-schema.org/specification-links.html#draft-7) input to generate a fast `stringify` function.
14
+ fast-json-stringify requires a [JSON Schema Draft 7](https://json-schema.org/specification-links#draft-7) input to generate a fast `stringify` function.
15
15
 
16
16
  ##### Benchmarks
17
17
 
@@ -137,7 +137,7 @@ const stringify = fastJson(mySchema, {
137
137
  <a name="fastJsonStringify"></a>
138
138
  ### fastJsonStringify(schema)
139
139
 
140
- Build a `stringify()` function based on [jsonschema draft 7 spec](https://json-schema.org/specification-links.html#draft-7).
140
+ Build a `stringify()` function based on [jsonschema draft 7 spec](https://json-schema.org/specification-links#draft-7).
141
141
 
142
142
  Supported types:
143
143
 
@@ -160,7 +160,7 @@ And nested ones, too.
160
160
  | `RegExp` | `string` |
161
161
  | `BigInt` | `integer` via `toString` |
162
162
 
163
- [JSON Schema built-in formats](https://json-schema.org/understanding-json-schema/reference/string.html#built-in-formats) for dates are supported and will be serialized as:
163
+ [JSON Schema built-in formats](https://json-schema.org/draft/2020-12/draft-bhutton-json-schema-validation-00#rfc.section.7.3.1) for dates are supported and will be serialized as:
164
164
 
165
165
  | Format | Serialized format example |
166
166
  | ----------- | -------------------------- |
@@ -436,7 +436,7 @@ console.log(stringify({
436
436
  <a name="ref"></a>
437
437
  #### Reuse - $ref
438
438
  If you want to reuse a definition of a value, you can use the property `$ref`.
439
- The value of `$ref` must be a string in [JSON Pointer](https://tools.ietf.org/html/rfc6901) format.
439
+ The value of `$ref` must be a string in [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) format.
440
440
  Example:
441
441
  ```javascript
442
442
  const schema = {
@@ -561,7 +561,7 @@ const stringify = fastJson(schema, { rounding: 'ceil' })
561
561
  <a name="nullable"></a>
562
562
  #### Nullable
563
563
 
564
- According to the [Open API 3.0 specification](https://swagger.io/docs/specification/data-models/data-types/#null), a value that can be null must be declared `nullable`.
564
+ According to the [Open API 3.0 specification](https://swagger.io/docs/specification/v3_0/data-models/data-types/#null), a value that can be null must be declared `nullable`.
565
565
 
566
566
  ##### Nullable object
567
567
  ```javascript
@@ -10,8 +10,6 @@ const Location = require('./lib/location')
10
10
  const validate = require('./lib/schema-validator')
11
11
  const mergeSchemas = require('./lib/merge-schemas')
12
12
 
13
- const SINGLE_TICK = /'/g
14
-
15
13
  let largeArraySize = 2e4
16
14
  let largeArrayMechanism = 'default'
17
15
 
@@ -382,10 +380,9 @@ function buildInnerObject (context, location, objVar) {
382
380
  const localUid = context.uid++
383
381
  let addComma = ''
384
382
 
385
- if (requiredProperties.length > 0) {
386
- // If we have required properties, we know that at least one property will be serialized.
387
- // We can avoid the runtime check for the comma.
388
-
383
+ // propertiesKeys is sorted required-first; the guard checks [0] is required because
384
+ // otherwise additionalProperties/patternProperties would emit a stray `{ ,"k":v }`.
385
+ if (propertiesKeys.length > 0 && requiredProperties.includes(propertiesKeys[0])) {
389
386
  // The first property is required, so we don't need a comma.
390
387
  // For the subsequent properties, we can blindly add a comma.
391
388
 
@@ -1074,7 +1071,7 @@ function buildConstSerializer (location, input) {
1074
1071
  `
1075
1072
  }
1076
1073
 
1077
- code += `json += '${JSON.stringify(schema.const).replace(SINGLE_TICK, "\\'")}'`
1074
+ code += `json += ${JSON.stringify(JSON.stringify(schema.const))}`
1078
1075
 
1079
1076
  if (hasNullType) {
1080
1077
  code += `
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-json-stringify",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "description": "Stringify your JSON at max speed",
5
5
  "main": "index.js",
6
6
  "type": "commonjs",
@@ -30,7 +30,7 @@
30
30
  "contributors": [
31
31
  {
32
32
  "name": "Tomas Della Vedova",
33
- "url": "http://delved.org"
33
+ "url": "https://delvedor.dev"
34
34
  },
35
35
  {
36
36
  "name": "Aras Abbasi",
@@ -81,7 +81,7 @@
81
81
  "@fastify/merge-json-schemas": "^0.2.0",
82
82
  "ajv": "^8.12.0",
83
83
  "ajv-formats": "^3.0.1",
84
- "fast-uri": "^3.0.0",
84
+ "fast-uri": "^4.0.0",
85
85
  "json-schema-ref-resolver": "^3.0.0",
86
86
  "rfdc": "^1.2.0"
87
87
  },
@@ -330,3 +330,50 @@ test('function and symbol references are not serialized as undefined', (t) => {
330
330
  const obj = { str: 'x', test: 'test', meth: () => 'x', sym: Symbol('x') }
331
331
  t.assert.equal(stringify(obj), '{"str":"x","test":"test"}')
332
332
  })
333
+
334
+ test('required + additionalProperties without declared properties produces valid JSON', (t) => {
335
+ // Regression: when `required` is non-empty but `properties` is absent
336
+ // (e.g. a record-style schema with only `additionalProperties`), the
337
+ // serializer used to emit a stray leading comma:
338
+ // {"obj":{,"a":1,"b":2}}
339
+ // because the "skip first comma" optimization assumed a declared
340
+ // property would anchor it. With no `properties`, the additionalProperties
341
+ // branch would write the separator before its first entry.
342
+ t.plan(2)
343
+ const stringify = build({
344
+ type: 'object',
345
+ properties: {
346
+ obj: {
347
+ type: 'object',
348
+ propertyNames: { type: 'string', enum: ['a', 'b'] },
349
+ additionalProperties: { type: 'number' },
350
+ required: ['a', 'b']
351
+ }
352
+ }
353
+ })
354
+
355
+ const out = stringify({ obj: { a: 1, b: 2 } })
356
+ t.assert.equal(out, '{"obj":{"a":1,"b":2}}')
357
+ t.assert.deepStrictEqual(JSON.parse(out), { obj: { a: 1, b: 2 } })
358
+ })
359
+
360
+ test('required key not in properties + additionalProperties produces valid JSON', (t) => {
361
+ // Regression: declared `properties` is non-empty but `required` only lists
362
+ // keys that are not in `properties`. After sorting, propertiesKeys[0] is
363
+ // not required, so the "first declared property anchors the comma" premise
364
+ // does not hold. The serializer used to emit '{,"str":"x"}' for input
365
+ // missing the (non-required) declared `num`.
366
+ t.plan(2)
367
+ const stringify = build({
368
+ type: 'object',
369
+ properties: {
370
+ num: { type: 'number' }
371
+ },
372
+ additionalProperties: true,
373
+ required: ['str']
374
+ })
375
+
376
+ const out = stringify({ str: 'x' })
377
+ t.assert.equal(out, '{"str":"x"}')
378
+ t.assert.deepStrictEqual(JSON.parse(out), { str: 'x' })
379
+ })
@@ -24,6 +24,26 @@ test('schema with const string', (t) => {
24
24
  t.assert.ok(validate(JSON.parse(output)), 'valid schema')
25
25
  })
26
26
 
27
+ test('schema with const string containing characters that need escaping', (t) => {
28
+ const values = ['back\\slash', 'tab\there', 'quote"here', 'new\nline', "tick's"]
29
+ t.plan(values.length * 2)
30
+
31
+ for (const value of values) {
32
+ const schema = {
33
+ type: 'object',
34
+ properties: {
35
+ foo: { const: value }
36
+ }
37
+ }
38
+
39
+ const stringify = build(schema)
40
+ const output = stringify({ foo: value })
41
+
42
+ t.assert.equal(output, JSON.stringify({ foo: value }))
43
+ t.assert.deepStrictEqual(JSON.parse(output), { foo: value })
44
+ }
45
+ })
46
+
27
47
  test('schema with const string and different input', (t) => {
28
48
  t.plan(2)
29
49
 
@@ -166,3 +166,27 @@ test('patternProperties - fail on invalid regex, handled by ajv', (t) => {
166
166
  }
167
167
  }), new Error('schema is invalid: data/patternProperties must match format "regex"'))
168
168
  })
169
+
170
+ test('required key not in properties + patternProperties produces valid JSON', (t) => {
171
+ // Regression: symmetric case to the additionalProperties variant. `required`
172
+ // names a key not in `properties`, so after sorting propertiesKeys[0] is not
173
+ // required and the "first declared property anchors the comma" premise does
174
+ // not hold. The patternProperties branch shares the same code path, so the
175
+ // same stray-leading-comma bug would surface here without the tightened
176
+ // guard in `index.js`.
177
+ t.plan(2)
178
+ const stringify = build({
179
+ type: 'object',
180
+ properties: {
181
+ num: { type: 'number' }
182
+ },
183
+ patternProperties: {
184
+ '^s_': { type: 'string' }
185
+ },
186
+ required: ['s_x']
187
+ })
188
+
189
+ const out = stringify({ s_x: 'x' })
190
+ t.assert.equal(out, '{"s_x":"x"}')
191
+ t.assert.deepStrictEqual(JSON.parse(out), { s_x: 'x' })
192
+ })
@@ -0,0 +1,2 @@
1
+ # Set default behavior to automatically convert line endings
2
+ * text=auto eol=lf
@@ -0,0 +1,53 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ commit-message:
6
+ # Prefix all commit messages with "chore: "
7
+ prefix: "chore"
8
+ schedule:
9
+ interval: "weekly"
10
+ cooldown:
11
+ default-days: 7
12
+ allow:
13
+ - dependency-name: "*"
14
+ update-types:
15
+ - "version-update:semver-major"
16
+ open-pull-requests-limit: 10
17
+
18
+ - package-ecosystem: "npm"
19
+ directory: "/"
20
+ commit-message:
21
+ # Prefix all commit messages with "chore: "
22
+ prefix: "chore"
23
+ schedule:
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/*"
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"
@@ -0,0 +1,154 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ - next
8
+ - 'v*'
9
+ paths-ignore:
10
+ - 'docs/**'
11
+ - '*.md'
12
+ pull_request:
13
+ paths-ignore:
14
+ - 'docs/**'
15
+ - '*.md'
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
+
22
+ permissions:
23
+ contents: read
24
+
25
+ jobs:
26
+ type-tests:
27
+ name: Type Tests
28
+ runs-on: ubuntu-latest
29
+ strategy:
30
+ matrix:
31
+ node-version: ['20', '22', '24', '26']
32
+ steps:
33
+ - uses: actions/checkout@v7
34
+ with:
35
+ persist-credentials: false
36
+
37
+ - uses: actions/setup-node@v6
38
+ with:
39
+ node-version: ${{ matrix.node-version }}
40
+ cache: 'npm'
41
+ cache-dependency-path: package.json
42
+ check-latest: true
43
+
44
+ - name: Install dependencies
45
+ run: npm install --ignore-scripts
46
+
47
+ - name: Run type tests
48
+ run: npm run test:typescript
49
+
50
+ unit-tests:
51
+ name: Unit Tests
52
+ runs-on: ubuntu-latest
53
+ strategy:
54
+ matrix:
55
+ node-version: ['16', '18', '20', '22', '24', '26']
56
+ steps:
57
+ - uses: actions/checkout@v7
58
+ with:
59
+ persist-credentials: false
60
+
61
+ - uses: actions/setup-node@v6
62
+ with:
63
+ node-version: ${{ matrix.node-version }}
64
+ cache: 'npm'
65
+ cache-dependency-path: package.json
66
+ check-latest: true
67
+
68
+ - name: Install dependencies
69
+ run: npm install --ignore-scripts
70
+
71
+ - name: Run unit tests
72
+ run: npm test
73
+
74
+ test-regression-check-node10:
75
+ name: Test compatibility with Node.js 10
76
+ runs-on: ubuntu-latest
77
+ permissions:
78
+ contents: read
79
+ steps:
80
+ - uses: actions/checkout@v7
81
+ with:
82
+ persist-credentials: false
83
+
84
+ - uses: actions/setup-node@v6
85
+ with:
86
+ node-version: '10'
87
+ cache: 'npm'
88
+ cache-dependency-path: package.json
89
+ check-latest: true
90
+
91
+ - name: Install
92
+ run: |
93
+ npm install --ignore-scripts
94
+
95
+ - name: Copy project as fast-uri to node_node_modules
96
+ run: |
97
+ rm -rf ./node_modules/fast-uri/lib &&
98
+ rm -rf ./node_modules/fast-uri/index.js &&
99
+ cp -r ./lib ./node_modules/fast-uri/lib &&
100
+ cp ./index.js ./node_modules/fast-uri/index.js
101
+
102
+ - name: Run tests
103
+ run: |
104
+ npm run test:unit
105
+ env:
106
+ NODE_OPTIONS: no-network-family-autoselection
107
+
108
+ test-browser:
109
+ name: Test browser compatibility
110
+ runs-on: ${{ matrix.os }}
111
+ strategy:
112
+ fail-fast: false
113
+ matrix:
114
+ os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
115
+ browser: ['chromium', 'firefox', 'webkit']
116
+ exclude:
117
+ - os: ubuntu-latest
118
+ browser: webkit
119
+ permissions:
120
+ contents: read
121
+ steps:
122
+ - uses: actions/checkout@v7
123
+ with:
124
+ persist-credentials: false
125
+
126
+ - uses: actions/setup-node@v6
127
+ with:
128
+ node-version: '24'
129
+ cache: 'npm'
130
+ cache-dependency-path: package.json
131
+ check-latest: true
132
+
133
+ - name: Install dependencies
134
+ run: |
135
+ npm install --ignore-scripts
136
+
137
+ - if: ${{ matrix.os == 'windows-latest' }}
138
+ run: npx playwright install winldd
139
+
140
+ - name: Run browser tests
141
+ run: |
142
+ npm run test:browser:${{ matrix.browser }}
143
+
144
+ test:
145
+ needs:
146
+ - test-regression-check-node10
147
+ permissions:
148
+ contents: write
149
+ pull-requests: write
150
+ uses: fastify/workflows/.github/workflows/plugins-ci.yml@v6
151
+ with:
152
+ license-check: true
153
+ lint: true
154
+ node-versions: '["16", "18", "20", "22", "24", "26"]'
@@ -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@v6
@@ -0,0 +1,30 @@
1
+ Copyright (c) 2011-2021, Gary Court until https://github.com/garycourt/uri-js/commit/a1acf730b4bba3f1097c9f52e7d9d3aba8cdcaae
2
+ Copyright (c) 2021-present The Fastify team <https://github.com/fastify/fastify#team>
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without
6
+ modification, are permitted provided that the following conditions are met:
7
+ * Redistributions of source code must retain the above copyright
8
+ notice, this list of conditions and the following disclaimer.
9
+ * Redistributions in binary form must reproduce the above copyright
10
+ notice, this list of conditions and the following disclaimer in the
11
+ documentation and/or other materials provided with the distribution.
12
+ * The names of any contributors may not be used to endorse or promote
13
+ products derived from this software without specific prior written
14
+ permission.
15
+
16
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS AND CONTRIBUTORS BE LIABLE FOR ANY
20
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
+
27
+ * * *
28
+
29
+ The complete list of contributors can be found at:
30
+ - https://github.com/garycourt/uri-js/graphs/contributors