Skip to content

Commit 94ef39b

Browse files
authored
refactor: change ApiDOM mappings (#24)
1 parent b7352f6 commit 94ef39b

File tree

3 files changed

+95
-31
lines changed

3 files changed

+95
-31
lines changed

package-lock.json

Lines changed: 59 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/react-scripts/config/webpack.config.js

Lines changed: 34 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -364,63 +364,67 @@ module.exports = function (webpackEnv) {
364364
// swagger-client uses ApiDOM as well, and might come with different ApiDOM version.
365365
// SwaggerEditor ApiDOM dependency takes precendence in the resolution.
366366
'@swagger-api/apidom-ast$':
367-
'/node_modules/@swagger-api/apidom-ast/es/index.js',
367+
'/node_modules/@swagger-api/apidom-ast/es/index.mjs',
368368
'@swagger-api/apidom-core$':
369-
'/node_modules/@swagger-api/apidom-core/es/index.js',
369+
'/node_modules/@swagger-api/apidom-core/es/index.mjs',
370+
'@swagger-api/apidom-error$':
371+
'/node_modules/@swagger-api/apidom-error/es/index.mjs',
372+
'@swagger-api/apidom-json-path$':
373+
'/node_modules/@swagger-api/apidom-json-path/es/index.mjs',
370374
'@swagger-api/apidom-json-pointer$':
371-
'/node_modules/@swagger-api/apidom-json-pointer/es/index.js',
375+
'/node_modules/@swagger-api/apidom-json-pointer/es/index.mjs',
372376
'@swagger-api/apidom-ls$':
373-
'/node_modules/@swagger-api/apidom-ls/es/index.js',
377+
'/node_modules/@swagger-api/apidom-ls/es/index.mjs',
374378
'@swagger-api/apidom-ns-api-design-systems$':
375-
'/node_modules/@swagger-api/apidom-ns-api-design-systems/es/index.js',
379+
'/node_modules/@swagger-api/apidom-ns-api-design-systems/es/index.mjs',
376380
'@swagger-api/apidom-ns-asyncapi-2$':
377-
'/node_modules/@swagger-api/apidom-ns-asyncapi-2/es/index.js',
381+
'/node_modules/@swagger-api/apidom-ns-asyncapi-2/es/index.mjs',
378382
'@swagger-api/apidom-ns-json-schema-draft-4$':
379-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-4/es/index.js',
383+
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-4/es/index.mjs',
380384
'@swagger-api/apidom-ns-json-schema-draft-6$':
381-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-6/es/index.js',
385+
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-6/es/index.mjs',
382386
'@swagger-api/apidom-ns-json-schema-draft-7$':
383-
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-7/es/index.js',
387+
'/node_modules/@swagger-api/apidom-ns-json-schema-draft-7/es/index.mjs',
384388
'@swagger-api/apidom-ns-openapi-3-0$':
385-
'/node_modules/@swagger-api/apidom-ns-openapi-3-0/es/index.js',
389+
'/node_modules/@swagger-api/apidom-ns-openapi-3-0/es/index.mjs',
386390
'@swagger-api/apidom-ns-openapi-3-1$':
387-
'/node_modules/@swagger-api/apidom-ns-openapi-3-1/es/index.js',
391+
'/node_modules/@swagger-api/apidom-ns-openapi-3-1/es/index.mjs',
388392
'@swagger-api/apidom-parser$':
389-
'/node_modules/@swagger-api/apidom-parser/es/parser.js',
393+
'/node_modules/@swagger-api/apidom-parser/es/parser.mjs',
390394
'@swagger-api/apidom-parser-adapter-api-design-systems-json$':
391-
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json/es/adapter.js',
395+
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-json/es/adapter.mjs',
392396
'@swagger-api/apidom-parser-adapter-api-design-systems-yaml$':
393-
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/es/adapter.js',
397+
'/node_modules/@swagger-api/apidom-parser-adapter-api-design-systems-yaml/es/adapter.mjs',
394398
'@swagger-api/apidom-parser-adapter-asyncapi-json-2$':
395-
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2/es/adapter.js',
399+
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-json-2/es/adapter.mjs',
396400
'@swagger-api/apidom-parser-adapter-asyncapi-yaml-2$':
397-
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/es/adapter.js',
401+
'/node_modules/@swagger-api/apidom-parser-adapter-asyncapi-yaml-2/es/adapter.mjs',
398402
'@swagger-api/apidom-parser-adapter-json$':
399-
'/node_modules/@swagger-api/apidom-parser-adapter-json/es/adapter-browser.js',
403+
'/node_modules/@swagger-api/apidom-parser-adapter-json/es/adapter-browser.mjs',
400404
'@swagger-api/apidom-parser-adapter-openapi-json-3-0$':
401-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0/es/adapter.js',
405+
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-0/es/adapter.mjs',
402406
'@swagger-api/apidom-parser-adapter-openapi-json-3-1$':
403-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1/es/adapter.js',
407+
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-json-3-1/es/adapter.mjs',
404408
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-0$':
405-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/es/adapter.js',
409+
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-0/es/adapter.mjs',
406410
'@swagger-api/apidom-parser-adapter-openapi-yaml-3-1$':
407-
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/es/adapter.js',
411+
'/node_modules/@swagger-api/apidom-parser-adapter-openapi-yaml-3-1/es/adapter.mjs',
408412
'@swagger-api/apidom-parser-adapter-yaml-1-2$':
409-
'/node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/es/adapter-browser.js',
413+
'/node_modules/@swagger-api/apidom-parser-adapter-yaml-1-2/es/adapter-browser.mjs',
410414
'@swagger-api/apidom-reference$':
411-
'/node_modules/@swagger-api/apidom-reference/es/configuration/saturated.js',
415+
'/node_modules/@swagger-api/apidom-reference/es/configuration/saturated.mjs',
412416
'@swagger-api/apidom-reference/configuration/empty$':
413-
'/node_modules/@swagger-api/apidom-reference/es/configuration/empty.js',
417+
'/node_modules/@swagger-api/apidom-reference/es/configuration/empty.mjs',
414418
'@swagger-api/apidom-reference/resolve/strategies/openapi-3-1$':
415-
'/node_modules/@swagger-api/apidom-reference/es/resolve/strategies/openapi-3-1/index.js',
419+
'/node_modules/@swagger-api/apidom-reference/es/resolve/strategies/openapi-3-1/index.mjs',
416420
'@swagger-api/apidom-reference/parse/parsers/binary$':
417-
'/node_modules/@swagger-api/apidom-reference/es/parse/parsers/binary/index-browser.js',
421+
'/node_modules/@swagger-api/apidom-reference/es/parse/parsers/binary/index-browser.mjs',
418422
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/$anchor$':
419-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/$anchor/index.js',
423+
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/$anchor/index.mjs',
420424
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1/selectors/uri$':
421-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/uri/index.js',
425+
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/selectors/uri/index.mjs',
422426
'@swagger-api/apidom-reference/dereference/strategies/openapi-3-1$':
423-
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/index.js',
427+
'/node_modules/@swagger-api/apidom-reference/es/dereference/strategies/openapi-3-1/index.mjs',
424428
...(modules.webpackAliases || {}),
425429
},
426430
plugins: [
@@ -445,6 +449,7 @@ module.exports = function (webpackEnv) {
445449
https: require.resolve('https-browserify'), // required for asyncapi parser
446450
stream: require.resolve('stream-browserify'),
447451
util: require.resolve('util'),
452+
url: require.resolve('url'),
448453
zlib: false,
449454
},
450455
},

packages/react-scripts/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@
9696
"typescript": "^3.2.1 || ^4",
9797
"monaco-editor": ">= 0.34.1",
9898
"stream-browserify": "^3.0.0",
99-
"stream-http": "^3.2.0"
99+
"stream-http": "^3.2.0",
100+
"url": ">=0.11.2"
100101
},
101102
"peerDependenciesMeta": {
102103
"typescript": {

0 commit comments

Comments
 (0)