From 5f058e2f67cad3e983c919a8ab46c1d2f1b74efd Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 15 Nov 2024 13:43:07 +0000 Subject: [PATCH 1/2] fix(deps): update dependency @apidevtools/json-schema-ref-parser to v11 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- .changeset/renovate-f322bf6.md | 5 +++++ .../package.json | 2 +- yarn.lock | 22 +++++-------------- 3 files changed, 11 insertions(+), 18 deletions(-) create mode 100644 .changeset/renovate-f322bf6.md diff --git a/.changeset/renovate-f322bf6.md b/.changeset/renovate-f322bf6.md new file mode 100644 index 0000000000..370c832ea5 --- /dev/null +++ b/.changeset/renovate-f322bf6.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-backend-module-openapi': patch +--- + +Updated dependency `@apidevtools/json-schema-ref-parser` to `^11.0.0`. diff --git a/plugins/catalog-backend-module-openapi/package.json b/plugins/catalog-backend-module-openapi/package.json index 1c15e923fa..718c231561 100644 --- a/plugins/catalog-backend-module-openapi/package.json +++ b/plugins/catalog-backend-module-openapi/package.json @@ -37,7 +37,7 @@ "test": "backstage-cli package test" }, "dependencies": { - "@apidevtools/json-schema-ref-parser": "^9.0.6", + "@apidevtools/json-schema-ref-parser": "^11.0.0", "@backstage/backend-common": "^0.25.0", "@backstage/backend-plugin-api": "workspace:^", "@backstage/catalog-model": "workspace:^", diff --git a/yarn.lock b/yarn.lock index 4dfc33c315..fcb2c08d27 100644 --- a/yarn.lock +++ b/yarn.lock @@ -203,26 +203,14 @@ __metadata: languageName: node linkType: hard -"@apidevtools/json-schema-ref-parser@npm:^11.7.0": - version: 11.7.0 - resolution: "@apidevtools/json-schema-ref-parser@npm:11.7.0" +"@apidevtools/json-schema-ref-parser@npm:^11.0.0, @apidevtools/json-schema-ref-parser@npm:^11.7.0": + version: 11.7.2 + resolution: "@apidevtools/json-schema-ref-parser@npm:11.7.2" dependencies: "@jsdevtools/ono": ^7.1.3 "@types/json-schema": ^7.0.15 js-yaml: ^4.1.0 - checksum: ee1c9e7c1bbf0b8d935522f9407c382e20a54464414fa65326fa8f56239e5a6f2b911f48c65fe2888a94d3445dced46ba36c286da435d47cefc8699d4a5b0ae2 - languageName: node - linkType: hard - -"@apidevtools/json-schema-ref-parser@npm:^9.0.6": - version: 9.1.2 - resolution: "@apidevtools/json-schema-ref-parser@npm:9.1.2" - dependencies: - "@jsdevtools/ono": ^7.1.3 - "@types/json-schema": ^7.0.6 - call-me-maybe: ^1.0.1 - js-yaml: ^4.1.0 - checksum: 5bd6885db0fd6633879bb4638b7a3aead6b061cb6422083c6be505ee6873be54e3376380df164c73edd8901d4145a9bfe9bc0b008a568fd8b0626b1df96fae8f + checksum: 44096e5cd5a03b17ee5eb0a3b9e9a4db85d87da8ae2abda264eae615f2a43e3e6ba5ca208e1161d4d946755b121c10a9550e88792a725951f2c4cff6df0d8a19 languageName: node linkType: hard @@ -5964,7 +5952,7 @@ __metadata: version: 0.0.0-use.local resolution: "@backstage/plugin-catalog-backend-module-openapi@workspace:plugins/catalog-backend-module-openapi" dependencies: - "@apidevtools/json-schema-ref-parser": ^9.0.6 + "@apidevtools/json-schema-ref-parser": ^11.0.0 "@backstage/backend-common": ^0.25.0 "@backstage/backend-plugin-api": "workspace:^" "@backstage/backend-test-utils": "workspace:^" From 677d0b765987fb1bb2bd27d22d15c181df645b47 Mon Sep 17 00:00:00 2001 From: blam Date: Fri, 15 Nov 2024 16:20:49 -0700 Subject: [PATCH 2/2] chore: fixing issues with the build Signed-off-by: blam --- .../catalog-backend-module-openapi/src/lib/bundle.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/catalog-backend-module-openapi/src/lib/bundle.ts b/plugins/catalog-backend-module-openapi/src/lib/bundle.ts index 59f7e5791f..b2b186dff1 100644 --- a/plugins/catalog-backend-module-openapi/src/lib/bundle.ts +++ b/plugins/catalog-backend-module-openapi/src/lib/bundle.ts @@ -13,7 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import $RefParser from '@apidevtools/json-schema-ref-parser'; +import { + $RefParser, + ParserOptions, + ResolverOptions, +} from '@apidevtools/json-schema-ref-parser'; import { parse, stringify } from 'yaml'; import * as path from 'path'; @@ -36,7 +40,7 @@ export async function bundleFileWithRefs( read: BundlerRead, resolveUrl: BundlerResolveUrl, ): Promise { - const fileUrlReaderResolver: $RefParser.ResolverOptions = { + const fileUrlReaderResolver: ResolverOptions = { canRead: file => { const protocol = getProtocol(file.url); return protocol === undefined || protocol === 'file'; @@ -47,7 +51,7 @@ export async function bundleFileWithRefs( return await read(url); }, }; - const httpUrlReaderResolver: $RefParser.ResolverOptions = { + const httpUrlReaderResolver: ResolverOptions = { canRead: ref => { const protocol = getProtocol(ref.url); return protocol === 'http' || protocol === 'https'; @@ -58,7 +62,7 @@ export async function bundleFileWithRefs( }, }; - const options: $RefParser.Options = { + const options: ParserOptions = { resolve: { file: fileUrlReaderResolver, http: httpUrlReaderResolver,