@scalar/openapi-parser 0.29.12 → 0.29.13

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @scalar/openapi-parser
2
2
 
3
+ ## 0.29.13
4
+
5
+ ### Patch Changes
6
+
7
+ - [#10559](https://github.com/scalar/scalar/pull/10559): Clean up Biome warnings in package code and tests. Handle rejected debounced callbacks and await streaming writes.
8
+ - [#10506](https://github.com/scalar/scalar/pull/10506): Organize imports consistently with the checks enforced in CI.
9
+
3
10
  ## 0.29.12
4
11
 
5
12
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAG3D;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI3G"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAChD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAK3D;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI3G"}
@@ -1,5 +1,5 @@
1
- import { getEntrypoint } from '../../../utils/get-entrypoint.js';
2
1
  import { details as detailsUtility } from '../../../utils/details.js';
2
+ import { getEntrypoint } from '../../../utils/get-entrypoint.js';
3
3
  import { workThroughQueue } from '../utils/workThroughQueue.js';
4
4
  /**
5
5
  * Run the chained tasks and return just some basic information about the OpenAPI document
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAG5D;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAIlF"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAI5D;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAIlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAG9D;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAKrF"}
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAI9D;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAKrF"}
@@ -1 +1 @@
1
- {"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAIhD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI3F"}
1
+ {"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAMhD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAIhD;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,CAI/E"}
1
+ {"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAO9D;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAkElG"}
1
+ {"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAA;AAO9D;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAiElG"}
@@ -16,12 +16,11 @@ export async function workThroughQueue(queue) {
16
16
  const name = task.name;
17
17
  const options = 'options' in task ? task.options : undefined;
18
18
  // Use the result of the previous task, or fall back to the original input
19
- const currentSpecification = result.specification
20
- ? result.specification
21
- : typeof input === 'object'
22
- ? // Detach from the original object
23
- structuredClone(input)
24
- : input;
19
+ let currentSpecification = result.specification || input;
20
+ if (!result.specification && typeof input === 'object') {
21
+ // Detach from the original object.
22
+ currentSpecification = structuredClone(input);
23
+ }
25
24
  // load
26
25
  if (name === 'load') {
27
26
  result = {
@@ -36,11 +36,11 @@ errors = []) {
36
36
  // Recursively resolve all references
37
37
  dereference(finalInput, filesystem, file ?? entrypoint, new WeakSet(), errors, options);
38
38
  // Remove duplicates (according to message) from errors
39
- errors = errors.filter((error, index, self) => index === self.findIndex((t) => t.message === error.message && t.code === error.code));
39
+ const uniqueErrors = errors.filter((error, index, self) => index === self.findIndex((t) => t.message === error.message && t.code === error.code));
40
40
  // Return the resolved specification
41
41
  return {
42
- valid: errors.length === 0,
43
- errors,
42
+ valid: uniqueErrors.length === 0,
43
+ errors: uniqueErrors,
44
44
  schema: finalInput,
45
45
  };
46
46
  }
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "parser",
18
18
  "typescript"
19
19
  ],
20
- "version": "0.29.12",
20
+ "version": "0.29.13",
21
21
  "engines": {
22
22
  "node": ">=22"
23
23
  },
@@ -48,12 +48,12 @@
48
48
  ],
49
49
  "sideEffects": false,
50
50
  "dependencies": {
51
- "@scalar/helpers": "0.16.2",
52
- "@scalar/json-magic": "0.15.6",
53
- "@scalar/openapi-types": "0.9.7",
54
- "@scalar/openapi-upgrader": "0.4.3",
55
- "@scalar/openapi-validator": "0.1.11",
56
- "@scalar/types": "0.23.1",
51
+ "@scalar/helpers": "0.16.3",
52
+ "@scalar/json-magic": "0.15.7",
53
+ "@scalar/openapi-types": "0.9.8",
54
+ "@scalar/openapi-upgrader": "0.4.4",
55
+ "@scalar/openapi-validator": "0.1.12",
56
+ "@scalar/types": "0.23.2",
57
57
  "yaml": "^2.9.0"
58
58
  },
59
59
  "devDependencies": {