@scalar/asyncapi-upgrader 0.1.15 → 0.1.17

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,13 @@
1
1
  # @scalar/asyncapi-upgrader
2
2
 
3
+ ## 0.1.17
4
+
5
+ ## 0.1.16
6
+
7
+ ### Patch Changes
8
+
9
+ - [#10481](https://github.com/scalar/scalar/pull/10481): Show AsyncAPI external documentation links in introductions, including references, and preserve root external documentation when upgrading AsyncAPI 2.x.
10
+
3
11
  ## 0.1.15
4
12
 
5
13
  ## 0.1.14
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade-from-two-to-three.d.ts","sourceRoot":"","sources":["../../src/2.6-to-3.0/upgrade-from-two-to-three.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAKxD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,aAAa,GAAG,aAAa,CAepF"}
1
+ {"version":3,"file":"upgrade-from-two-to-three.d.ts","sourceRoot":"","sources":["../../src/2.6-to-3.0/upgrade-from-two-to-three.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAKxD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,gBAAgB,EAAE,aAAa,GAAG,aAAa,CAoBpF"}
@@ -14,6 +14,10 @@ export function upgradeFromTwoToThree(originalDocument) {
14
14
  return document;
15
15
  }
16
16
  document.asyncapi = ASYNCAPI_VERSION;
17
+ if (isObject(document.info) && isObject(document.externalDocs)) {
18
+ // Keep the root value so references authored against the 2.x path still resolve.
19
+ document.info.externalDocs ??= document.externalDocs;
20
+ }
17
21
  // OAuth flows must be rewritten before security requirements consult them.
18
22
  upgradeComponentOAuthScopes(document);
19
23
  upgradeServers(document);
package/package.json CHANGED
@@ -20,7 +20,7 @@
20
20
  "asyncapi 3.0",
21
21
  "asyncapi 3.1"
22
22
  ],
23
- "version": "0.1.15",
23
+ "version": "0.1.17",
24
24
  "engines": {
25
25
  "node": ">=22"
26
26
  },
@@ -71,10 +71,10 @@
71
71
  },
72
72
  "sideEffects": false,
73
73
  "dependencies": {
74
- "@scalar/helpers": "0.16.1"
74
+ "@scalar/helpers": "0.16.3"
75
75
  },
76
76
  "devDependencies": {
77
- "@scalar/types": "0.23.0",
77
+ "@scalar/types": "0.23.2",
78
78
  "vite": "8.1.5"
79
79
  },
80
80
  "scripts": {