fix(deps): update dependency @apidevtools/json-schema-ref-parser to v15#1429
fix(deps): update dependency @apidevtools/json-schema-ref-parser to v15#1429renovate[bot] wants to merge 14 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 7a666fb The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
8195bf3 to
0946f0e
Compare
ab97967 to
11b2ac7
Compare
11b2ac7 to
cf2f130
Compare
e27ede5 to
08299c3
Compare
1ccfbf1 to
4f67810
Compare
4f67810 to
774d6ac
Compare
64dc935 to
6add044
Compare
4217272 to
e0b4bdc
Compare
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
|
@copilot fix this issue per APIDevTools/json-schema-ref-parser#405 |
Fixed in b72346a. The security fix in json-schema-ref-parser v15 (the commit referenced in issue #405) blocks localhost URLs by default via |
Pull Request Test Coverage Report for Build 23771126199Details
💛 - Coveralls |
|
@copilot CI is failing on Windows. Probably because \s didn't get changed to /s somewhere. Look for exiting replaceAll() functions that fix that issue and add replaceAll()s where they're missing. |
…ser v15 Windows compatibility Agent-Logs-Url: https://github.com/pmcelhaney/counterfact/sessions/ed1bb836-8839-47a2-ab23-9dd8e09d36e5
Fixed in 109494b. The issue was that json-schema-ref-parser v15's internal The fix converts filesystem paths to proper |
|
@copilot some tests are failing now |
Fixed in 161ad32. The issue was that The root cause is v15's The fix adds a |
|
@copilot resolve conflicts |
Summary
Upgrades
@apidevtools/json-schema-ref-parserfrom13.0.5to15.1.3and fixes two breaking changes introduced by v15:Localhost/internal URL blocking: v15 added a security fix that blocks HTTP requests to internal/localhost URLs by default (
safeUrlResolver: true). Counterfact legitimately needs to load OpenAPI specs from localhost, sosafeUrlResolver: falseis passed tobundle()inspecification.ts.Windows path handling: v15's internal
isAbsoluteWin32Pathregex (/^[a-zA-Z]:\\/) only matches paths with backslashes. When paths are normalized to forward slashes (e.g.,C:/Users/...), the library incorrectly treats them as relative paths and prepends the CWD. Fixed by patching the library viapatch-packageto change the regex to/^[a-zA-Z]:[/\\]/, recognizing bothC:\...andC:/...as absolute Windows paths.Original Prompt
This PR contains the following updates:
@apidevtools/json-schema-ref-parser13.0.5→15.1.3Change needed to fix this: APIDevTools/json-schema-ref-parser#405
Manual acceptance tests
npx counterfact@latest https://petstore3.swagger.io/api/v3/openapi.json apigenerates route files without errorslocalhostURL (e.g., a locally running API server) resolves correctly without throwing aSyntaxError/counterfact/openapiendpoint correctly serves the OpenAPI document with the injected Counterfact server entryTasks
@apidevtools/json-schema-ref-parserfrom13.0.5to15.1.3inpackage.json{ resolve: { http: { safeUrlResolver: false } } }tobundle()insrc/typescript-generator/specification.tsto allow localhost URL resolution (file was converted from.jsto.tsas part of a broader TypeScript migration inmain)patch-packagepatch (patches/@apidevtools+json-schema-ref-parser+15.1.3.patch) to fix theisAbsoluteWin32Pathregex from/^[a-zA-Z]:\\/to/^[a-zA-Z]:[/\\]/, so forward-slash Windows paths (C:/...) are correctly detected as absolute rather than having the CWD prependedmain, which had migratedsrc/typescript-generator/specification.js→specification.tsas part of a full TypeScript conversion of thetypescript-generator/directory