@swagger-api/apidom-ns-api-design-systems 1.0.0-beta.9 → 1.0.0-rc.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@swagger-api/apidom-ns-api-design-systems",
3
3
  "description": "API Design Systems 2021-05-07 namespace for ApiDOM.",
4
- "version": "1.0.0-beta.9",
4
+ "version": "1.0.0-rc.0",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org"
@@ -26,8 +26,8 @@
26
26
  "build:umd:browser": "cross-env BABEL_ENV=browser webpack --config config/webpack/browser.config.js --progress",
27
27
  "lint": "eslint ./",
28
28
  "lint:fix": "eslint ./ --fix",
29
- "clean": "rimraf --glob 'src/**/*.mjs' 'src/**/*.cjs' 'test/**/*.mjs' ./dist ./types",
30
- "test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
29
+ "clean": "rimraf --glob 'src/**/*.mjs' 'src/**/*.cjs' ./dist ./types",
30
+ "test": "NODE_ENV=test ts-mocha --exit",
31
31
  "test:update-snapshots": "cross-env UPDATE_SNAPSHOT=1 mocha",
32
32
  "typescript:check-types": "tsc --noEmit && tsc -p ./test/tsconfig.json --noEmit",
33
33
  "typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json 2>&1 | shx grep -v 'Visitor_base'",
@@ -41,10 +41,10 @@
41
41
  "author": "Vladimir Gorej",
42
42
  "license": "Apache-2.0",
43
43
  "dependencies": {
44
- "@babel/runtime-corejs3": "^7.20.7",
45
- "@swagger-api/apidom-core": "^1.0.0-beta.9",
46
- "@swagger-api/apidom-error": "^1.0.0-beta.9",
47
- "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-beta.9",
44
+ "@babel/runtime-corejs3": "^7.26.10",
45
+ "@swagger-api/apidom-core": "^1.0.0-rc.0",
46
+ "@swagger-api/apidom-error": "^1.0.0-rc.0",
47
+ "@swagger-api/apidom-ns-openapi-3-1": "^1.0.0-rc.0",
48
48
  "@types/ramda": "~0.30.0",
49
49
  "ramda": "~0.30.0",
50
50
  "ramda-adjunct": "^5.0.0",
@@ -60,5 +60,5 @@
60
60
  "README.md",
61
61
  "CHANGELOG.md"
62
62
  ],
63
- "gitHead": "2d97871bd8addd42274917c6d131a09eebe9b1f8"
63
+ "gitHead": "af4b6e0fcae489477729581c52036725ac57a412"
64
64
  }
@@ -20,10 +20,9 @@ class Visitor {
20
20
  copyMetaAndAttributes(from, to) {
21
21
  if (from.meta.length > 0 || to.meta.length > 0) {
22
22
  to.meta = (0, _apidomCore.deepmerge)(to.meta, from.meta);
23
- if ((0, _apidomCore.hasElementSourceMap)(from)) {
24
- // avoid deep merging of source maps
25
- to.meta.set('sourceMap', from.meta.get('sourceMap'));
26
- }
23
+ }
24
+ if ((0, _apidomCore.hasElementSourceMap)(from)) {
25
+ (0, _apidomCore.assignSourceMap)(to, from);
27
26
  }
28
27
  if (from.attributes.length > 0 || from.meta.length > 0) {
29
28
  to.attributes = (0, _apidomCore.deepmerge)(to.attributes, from.attributes); // eslint-disable-line no-param-reassign
@@ -1,4 +1,4 @@
1
- import { hasElementSourceMap, deepmerge } from '@swagger-api/apidom-core';
1
+ import { hasElementSourceMap, deepmerge, assignSourceMap } from '@swagger-api/apidom-core';
2
2
 
3
3
  /**
4
4
  * @public
@@ -17,10 +17,9 @@ class Visitor {
17
17
  copyMetaAndAttributes(from, to) {
18
18
  if (from.meta.length > 0 || to.meta.length > 0) {
19
19
  to.meta = deepmerge(to.meta, from.meta);
20
- if (hasElementSourceMap(from)) {
21
- // avoid deep merging of source maps
22
- to.meta.set('sourceMap', from.meta.get('sourceMap'));
23
- }
20
+ }
21
+ if (hasElementSourceMap(from)) {
22
+ assignSourceMap(to, from);
24
23
  }
25
24
  if (from.attributes.length > 0 || from.meta.length > 0) {
26
25
  to.attributes = deepmerge(to.attributes, from.attributes); // eslint-disable-line no-param-reassign
@@ -181,7 +181,6 @@ export declare const keyMap: {
181
181
  Annotation: never[];
182
182
  Comment: never[];
183
183
  ParseResultElement: string[];
184
- SourceMap: string[];
185
184
  /**
186
185
  * API Design Systems 2021-05-07 specification elements.
187
186
  */