@scalar/postman-to-openapi 0.7.19 → 0.7.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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalar/postman-to-openapi
2
2
 
3
+ ## 0.7.21
4
+
5
+ ## 0.7.20
6
+
7
+ ### Patch Changes
8
+
9
+ - [#10140](https://github.com/scalar/scalar/pull/10140): Replace redundant type assertions with compiler-checked annotations, typed accumulators, and existing guards across helpers, API conversion, request handling, and schema rendering.
10
+
11
+ Narrow DOM elements and caught errors before accessing their properties. Correct header lookup to include missing values and handle them during PowerShell snippet generation.
12
+
13
+ Validate release-note provider responses, represent unresolved references and absent groups in helper return types, and require narrowing merged object values. Preserve AsyncAPI broker credentials separately from HTTP authentication schemes.
14
+
3
15
  ## 0.7.19
4
16
 
5
17
  ## 0.7.18
@@ -1 +1 @@
1
- {"version":3,"file":"merge-path-item.d.ts","sourceRoot":"","sources":["../../src/helpers/merge-path-item.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAYxD,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AAErD,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,MAAM,WAAW,CAAC,cAAc,CAAC,EASvE,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,OAAO,WAAW,CAAC,WAAW,EAC9B,mBAAmB,MAAM,EACzB,UAAU,WAAW,CAAC,cAAc,EACpC,iBAAgB,OAAe,KAC9B,IAuCF,CAAA"}
1
+ {"version":3,"file":"merge-path-item.d.ts","sourceRoot":"","sources":["../../src/helpers/merge-path-item.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAYxD,eAAO,MAAM,oBAAoB,oBAAoB,CAAA;AAErD,eAAO,MAAM,cAAc,EAAE,SAAS,CAAC,MAAM,WAAW,CAAC,cAAc,CAAC,EASvE,CAAA;AAED,eAAO,MAAM,aAAa,GACxB,OAAO,WAAW,CAAC,WAAW,EAC9B,mBAAmB,MAAM,EACzB,UAAU,WAAW,CAAC,cAAc,EACpC,iBAAgB,OAAe,KAC9B,IAuCF,CAAA"}
@@ -1,3 +1,4 @@
1
+ import { isObjectLike } from '@scalar/helpers/object/is-object';
1
2
  import { generateUniqueValue } from '../helpers/generate-unique-value.js';
2
3
  import { getOperationExamples } from '../helpers/get-operation-examples.js';
3
4
  import { mergeOperations } from '../helpers/merge-operation.js';
@@ -15,7 +16,7 @@ export const OPERATION_KEYS = [
15
16
  'trace',
16
17
  ];
17
18
  export const mergePathItem = (paths, normalizedPathKey, pathItem, mergeOperation = false) => {
18
- const targetPath = (paths[normalizedPathKey] ?? {});
19
+ const targetPath = paths[normalizedPathKey] ?? {};
19
20
  for (const [key, value] of Object.entries(pathItem)) {
20
21
  if (value === undefined) {
21
22
  continue;
@@ -48,14 +49,13 @@ const updateExtensionKey = (operation, extensionKey, oldKey, newKey) => {
48
49
  return;
49
50
  }
50
51
  const map = operation[extensionKey];
51
- if (!map || typeof map !== 'object' || Array.isArray(map)) {
52
+ if (!isObjectLike(map) || Array.isArray(map)) {
52
53
  return;
53
54
  }
54
- const castedMap = map;
55
- const value = castedMap[oldKey];
55
+ const value = map[oldKey];
56
56
  if (value === undefined) {
57
57
  return;
58
58
  }
59
- delete castedMap[oldKey];
60
- castedMap[newKey] = value;
59
+ delete map[oldKey];
60
+ map[newKey] = value;
61
61
  };
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "export",
20
20
  "scalar"
21
21
  ],
22
- "version": "0.7.19",
22
+ "version": "0.7.21",
23
23
  "engines": {
24
24
  "node": ">=22"
25
25
  },
@@ -38,13 +38,13 @@
38
38
  "CHANGELOG.md"
39
39
  ],
40
40
  "dependencies": {
41
- "@scalar/helpers": "0.11.3",
42
- "@scalar/openapi-types": "0.9.5"
41
+ "@scalar/helpers": "0.13.0",
42
+ "@scalar/openapi-types": "0.9.7"
43
43
  },
44
44
  "devDependencies": {
45
+ "@scalar/openapi-parser": "0.29.5",
45
46
  "@types/node": "^24.1.0",
46
- "vite": "8.1.5",
47
- "@scalar/openapi-parser": "0.29.1"
47
+ "vite": "8.1.5"
48
48
  },
49
49
  "scripts": {
50
50
  "build": "tsc -p tsconfig.build.json && tsc-alias -p tsconfig.build.json",