@adobe/spectrum-component-api-schemas 6.1.17 → 6.1.19
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 +14 -0
- package/index.js +2 -2
- package/package.json +4 -3
- package/scripts/convert-to-spec-format.mjs +2 -2
- package/test/schema-validation.test.js +8 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# [**@adobe/spectrum-component-api-schemas**](https://github.com/adobe/spectrum-component-api-schemas)
|
|
2
2
|
|
|
3
|
+
## 6.1.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`60a4835`](https://github.com/adobe/spectrum-design-data/commit/60a4835e245965639a4ac89b41d2884dd63a0bbb)]:
|
|
8
|
+
- @adobe/spectrum-design-data@0.3.0
|
|
9
|
+
|
|
10
|
+
## 6.1.18
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [[`073c22a`](https://github.com/adobe/spectrum-design-data/commit/073c22a75c27fbb44eb57eb6cb7311e294066d76), [`e23264e`](https://github.com/adobe/spectrum-design-data/commit/e23264e681c56077b5582bf019123b941862779a), [`e23264e`](https://github.com/adobe/spectrum-design-data/commit/e23264e681c56077b5582bf019123b941862779a), [`e23264e`](https://github.com/adobe/spectrum-design-data/commit/e23264e681c56077b5582bf019123b941862779a)]:
|
|
15
|
+
- @adobe/spectrum-design-data@0.2.0
|
|
16
|
+
|
|
3
17
|
## 6.1.17
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/index.js
CHANGED
|
@@ -26,9 +26,9 @@ export const readJson = async (fileName) =>
|
|
|
26
26
|
|
|
27
27
|
export const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
|
28
28
|
|
|
29
|
-
// Locate the design-data
|
|
29
|
+
// Locate the spectrum-design-data package's components directory
|
|
30
30
|
const specPkgPath = createRequire(import.meta.url).resolve(
|
|
31
|
-
"@adobe/design-data
|
|
31
|
+
"@adobe/spectrum-design-data/package.json",
|
|
32
32
|
);
|
|
33
33
|
export const componentsDir = resolve(specPkgPath, "..", "components");
|
|
34
34
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spectrum-component-api-schemas",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.19",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|
|
@@ -19,11 +19,12 @@
|
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"glob": "^10.3.12",
|
|
22
|
-
"@adobe/design-data
|
|
22
|
+
"@adobe/spectrum-design-data": "0.3.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"ajv": "^8.12.0",
|
|
26
|
-
"ajv-formats": "^3.0.1"
|
|
26
|
+
"ajv-formats": "^3.0.1",
|
|
27
|
+
"@adobe/design-data-spec": "2.2.0"
|
|
27
28
|
},
|
|
28
29
|
"scripts": {}
|
|
29
30
|
}
|
|
@@ -14,7 +14,7 @@ governing permissions and limitations under the License.
|
|
|
14
14
|
* One-time conversion script: old component-schemas format → new design-data-spec format.
|
|
15
15
|
*
|
|
16
16
|
* Reads packages/component-schemas/schemas/components/*.json (old format)
|
|
17
|
-
* and writes packages/design-data
|
|
17
|
+
* and writes packages/design-data/components/{name}.json (new format).
|
|
18
18
|
*
|
|
19
19
|
* Skips button.json (hand-crafted in Phase 6.4).
|
|
20
20
|
* Run: node packages/component-schemas/scripts/convert-to-spec-format.mjs
|
|
@@ -28,7 +28,7 @@ import { fileURLToPath } from "url";
|
|
|
28
28
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
29
29
|
const repoRoot = resolve(__dirname, "../../..");
|
|
30
30
|
const sourceDir = resolve(repoRoot, "packages/component-schemas/schemas/components");
|
|
31
|
-
const destDir = resolve(repoRoot, "packages/design-data
|
|
31
|
+
const destDir = resolve(repoRoot, "packages/design-data/components");
|
|
32
32
|
|
|
33
33
|
const SKIP = new Set(["button.json"]);
|
|
34
34
|
|
|
@@ -20,11 +20,18 @@ import * as url from "url";
|
|
|
20
20
|
|
|
21
21
|
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
|
22
22
|
|
|
23
|
+
// Component data lives in @adobe/spectrum-design-data
|
|
24
|
+
const dataPkgPath = createRequire(import.meta.url).resolve(
|
|
25
|
+
"@adobe/spectrum-design-data/package.json",
|
|
26
|
+
);
|
|
27
|
+
const dataPkgDir = resolve(dataPkgPath, "..");
|
|
28
|
+
const componentsDir = resolve(dataPkgDir, "components");
|
|
29
|
+
|
|
30
|
+
// JSON Schemas (component.schema.json etc.) live in @adobe/design-data-spec
|
|
23
31
|
const specPkgPath = createRequire(import.meta.url).resolve(
|
|
24
32
|
"@adobe/design-data-spec/package.json",
|
|
25
33
|
);
|
|
26
34
|
const specPkgDir = resolve(specPkgPath, "..");
|
|
27
|
-
const componentsDir = resolve(specPkgDir, "components");
|
|
28
35
|
|
|
29
36
|
const readJSON = async (filePath) =>
|
|
30
37
|
JSON.parse(await readFile(filePath, "utf8"));
|