@o3r/style-dictionary 12.5.0-prerelease.4 → 12.5.0-prerelease.6

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/migration.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "https://raw.githubusercontent.com/angular/angular-cli/master/packages/angular_devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "migration": {
5
+ "version": "*",
6
+ "description": "Migration of @o3r/style-dictionary to new scope",
7
+ "factory": "./schematics/ng-update/index#updateAll"
8
+ }
9
+ }
10
+ }
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@o3r/style-dictionary",
3
- "version": "12.5.0-prerelease.4",
3
+ "version": "12.5.0-prerelease.6",
4
+ "deprecated": "This package will be removed in Otter v14. Please use @ama-styling/style-dictionary instead.",
4
5
  "type": "module",
5
6
  "publishConfig": {
6
7
  "access": "public"
@@ -22,7 +23,7 @@
22
23
  "build:builders": "tsc -b tsconfig.builders.json --pretty && yarn generate-cjs-manifest",
23
24
  "build:source": "tsc -b tsconfig.build.json && yarn cpy package.json dist/",
24
25
  "build": "yarn nx build design",
25
- "prepare:build:builders": "yarn cpy 'schematics/**/*.json' dist/schematics && yarn cpy 'collection.json' dist && yarn copy:templates",
26
+ "prepare:build:builders": "yarn cpy 'schematics/**/*.json' dist/schematics && yarn cpy 'migration.json' dist && yarn cpy 'collection.json' dist && yarn copy:templates",
26
27
  "postbuild": "patch-package-json-main"
27
28
  },
28
29
  "exports": {
@@ -41,14 +42,14 @@
41
42
  "dependencies": {
42
43
  "@angular-devkit/architect": "~0.1902.0",
43
44
  "@angular-devkit/schematics": "~19.2.0",
44
- "@o3r/schematics": "^12.5.0-prerelease.4",
45
+ "@o3r/schematics": "^12.5.0-prerelease.6",
45
46
  "@schematics/angular": "~19.2.0",
46
47
  "tslib": "^2.6.2"
47
48
  },
48
49
  "peerDependencies": {
49
- "@o3r/core": "^12.5.0-prerelease.4",
50
- "@o3r/schematics": "^12.5.0-prerelease.4",
51
- "@o3r/telemetry": "^12.5.0-prerelease.4",
50
+ "@o3r/core": "^12.5.0-prerelease.6",
51
+ "@o3r/schematics": "^12.5.0-prerelease.6",
52
+ "@o3r/telemetry": "^12.5.0-prerelease.6",
52
53
  "style-dictionary": "^4.3.2",
53
54
  "type-fest": "^4.30.1"
54
55
  },
@@ -82,11 +83,11 @@
82
83
  "@nx/eslint-plugin": "~20.8.0",
83
84
  "@nx/jest": "~20.8.0",
84
85
  "@nx/js": "~20.8.0",
85
- "@o3r/build-helpers": "^12.5.0-prerelease.4",
86
- "@o3r/core": "^12.5.0-prerelease.4",
87
- "@o3r/eslint-plugin": "^12.5.0-prerelease.4",
88
- "@o3r/telemetry": "^12.5.0-prerelease.4",
89
- "@o3r/test-helpers": "^12.5.0-prerelease.4",
86
+ "@o3r/build-helpers": "^12.5.0-prerelease.6",
87
+ "@o3r/core": "^12.5.0-prerelease.6",
88
+ "@o3r/eslint-plugin": "^12.5.0-prerelease.6",
89
+ "@o3r/telemetry": "^12.5.0-prerelease.6",
90
+ "@o3r/test-helpers": "^12.5.0-prerelease.6",
90
91
  "@schematics/angular": "~19.2.0",
91
92
  "@stylistic/eslint-plugin": "~3.1.0",
92
93
  "@types/jest": "~29.5.2",
@@ -127,6 +128,10 @@
127
128
  "node": "^20.11.1 || >=22.0.0"
128
129
  },
129
130
  "schematics": "./collection.json",
131
+ "ng-update": {
132
+ "migrations": "./migration.json",
133
+ "requirements": "^12.0.0"
134
+ },
130
135
  "contributors": [
131
136
  {
132
137
  "name": "Yannick Adam",
@@ -0,0 +1,6 @@
1
+ import type { Rule } from '@angular-devkit/schematics';
2
+ /**
3
+ * Update of Otter library V13.0
4
+ */
5
+ export declare const updateAll: (options: any) => Rule;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../schematics/ng-update/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,IAAI,EACL,MAAM,4BAA4B,CAAC;AA0BpC;;GAEG;AACH,eAAO,MAAM,SAAS,wBAMnB,CAAC"}
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.updateAll = void 0;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const schematics_2 = require("@o3r/schematics");
6
+ /**
7
+ * Rule to update the Style-dictionary configuration to new scope
8
+ * @param tree
9
+ * @param context
10
+ */
11
+ const updateStyleDictionaryConfig = (tree, context) => {
12
+ const excludes = ['**/node_modules/**', '**/.cache/**'];
13
+ const extensionMatcher = /config\.[mc]?js$/;
14
+ const configFiles = (0, schematics_2.getAllFilesInTree)(tree, '/', excludes)
15
+ .filter((filePath) => extensionMatcher.test(filePath));
16
+ configFiles.forEach((file) => {
17
+ const text = tree.readText(file);
18
+ if (text.includes('@o3r/style-dictionary')) {
19
+ context.logger.debug(`Update ${file}`);
20
+ tree.overwrite(file, text.replace(/o3r/g, 'ama'));
21
+ }
22
+ });
23
+ };
24
+ /**
25
+ * Update of Otter library V13.0
26
+ */
27
+ exports.updateAll = (0, schematics_2.createOtterSchematic)(() => (0, schematics_1.chain)([
28
+ updateStyleDictionaryConfig,
29
+ (_, context) => {
30
+ context.logger.warn('The package "@o3r/style-dictionary" is deprecated, please install "@ama-styling/style-dictionary" with the following command:');
31
+ context.logger.warn('ng add @ama-styling/style-dictionary');
32
+ }
33
+ ]));
34
+ //# sourceMappingURL=index.js.map