@navikt/aksel 7.35.1 → 7.35.2
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.
|
@@ -134,30 +134,6 @@ exports.migrations = {
|
|
|
134
134
|
path: "v8.0.0/prop-deprecate/prop-deprecate",
|
|
135
135
|
ignoredExtensions: CSS_EXTENSIONS,
|
|
136
136
|
},
|
|
137
|
-
{
|
|
138
|
-
description: "Updates variant + data-color props on Tag based on current variant prop.",
|
|
139
|
-
value: "v8-tag-variant",
|
|
140
|
-
path: "v8.0.0/tag-variant/tag-variant",
|
|
141
|
-
ignoredExtensions: CSS_EXTENSIONS,
|
|
142
|
-
},
|
|
143
|
-
{
|
|
144
|
-
description: "Updates variant + data-color props on ToggleGroup based on current variant prop.",
|
|
145
|
-
value: "v8-toggle-group-variant",
|
|
146
|
-
path: "v8.0.0/toggle-group-variant/toggle-group-variant",
|
|
147
|
-
ignoredExtensions: CSS_EXTENSIONS,
|
|
148
|
-
},
|
|
149
|
-
{
|
|
150
|
-
description: "Updates variant + data-color props on Accordion based on current variant prop.",
|
|
151
|
-
value: "v8-accordion-variant",
|
|
152
|
-
path: "v8.0.0/accordion-variant/accordion-variant",
|
|
153
|
-
ignoredExtensions: CSS_EXTENSIONS,
|
|
154
|
-
},
|
|
155
|
-
{
|
|
156
|
-
description: "Updates variant + data-color props on Chips based on current variant prop.",
|
|
157
|
-
value: "v8-chips-variant",
|
|
158
|
-
path: "v8.0.0/chips-variant/chips-variant",
|
|
159
|
-
ignoredExtensions: CSS_EXTENSIONS,
|
|
160
|
-
},
|
|
161
137
|
{
|
|
162
138
|
description: "Tries to migrate List component moving 'title' and 'description' props to 'Heading' and 'BodyShort'.",
|
|
163
139
|
value: "v8-list",
|
|
@@ -182,6 +158,30 @@ exports.migrations = {
|
|
|
182
158
|
path: "v8.0.0/token-spacing-js/spacing",
|
|
183
159
|
ignoredExtensions: CSS_EXTENSIONS,
|
|
184
160
|
},
|
|
161
|
+
{
|
|
162
|
+
description: "Updates variant + data-color props on Tag based on current variant prop.",
|
|
163
|
+
value: "v8-tag-variant",
|
|
164
|
+
path: "v8.0.0/tag-variant/tag-variant",
|
|
165
|
+
ignoredExtensions: CSS_EXTENSIONS,
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
description: "Updates variant + data-color props on ToggleGroup based on current variant prop.",
|
|
169
|
+
value: "v8-toggle-group-variant",
|
|
170
|
+
path: "v8.0.0/toggle-group-variant/toggle-group-variant",
|
|
171
|
+
ignoredExtensions: CSS_EXTENSIONS,
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
description: "Updates variant + data-color props on Accordion based on current variant prop.",
|
|
175
|
+
value: "v8-accordion-variant",
|
|
176
|
+
path: "v8.0.0/accordion-variant/accordion-variant",
|
|
177
|
+
ignoredExtensions: CSS_EXTENSIONS,
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
description: "Updates variant + data-color props on Chips based on current variant prop.",
|
|
181
|
+
value: "v8-chips-variant",
|
|
182
|
+
path: "v8.0.0/chips-variant/chips-variant",
|
|
183
|
+
ignoredExtensions: CSS_EXTENSIONS,
|
|
184
|
+
},
|
|
185
185
|
],
|
|
186
186
|
};
|
|
187
187
|
/**
|
|
@@ -235,13 +235,13 @@ function getMigrationString() {
|
|
|
235
235
|
let str = "";
|
|
236
236
|
Object.entries(exports.migrations).forEach(([version, vMigrations]) => {
|
|
237
237
|
str += `\n${chalk_1.default.underline(version)}\n`;
|
|
238
|
-
vMigrations.forEach((migration) => {
|
|
239
|
-
str += `${chalk_1.default.blue(migration.value)}: ${migration.description}\n`;
|
|
240
|
-
});
|
|
241
238
|
const overrideMigrations = exports.migrationStringOverride[version] || [];
|
|
242
239
|
overrideMigrations.forEach((migration) => {
|
|
243
240
|
str += `${chalk_1.default.blue(migration.value)}: ${migration.description}\n`;
|
|
244
241
|
});
|
|
242
|
+
vMigrations.forEach((migration) => {
|
|
243
|
+
str += `${chalk_1.default.blue(migration.value)}: ${migration.description}\n`;
|
|
244
|
+
});
|
|
245
245
|
});
|
|
246
246
|
return str;
|
|
247
247
|
}
|
|
@@ -13,6 +13,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
};
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.printRemaining = printRemaining;
|
|
16
|
+
const chalk_1 = __importDefault(require("chalk"));
|
|
16
17
|
const clipboardy_1 = __importDefault(require("clipboardy"));
|
|
17
18
|
const enquirer_1 = __importDefault(require("enquirer"));
|
|
18
19
|
const node_path_1 = __importDefault(require("node:path"));
|
|
@@ -49,10 +50,6 @@ function printRemaining(files, status) {
|
|
|
49
50
|
]);
|
|
50
51
|
const { groupBy, copy } = response;
|
|
51
52
|
console.info("\n");
|
|
52
|
-
const log = (str, indent = 0) => {
|
|
53
|
-
const prefix = " ".repeat(indent);
|
|
54
|
-
console.info(prefix + str);
|
|
55
|
-
};
|
|
56
53
|
let jsonOutput;
|
|
57
54
|
/**
|
|
58
55
|
* Group by filename
|
|
@@ -70,7 +67,7 @@ function printRemaining(files, status) {
|
|
|
70
67
|
const fileOutput = [];
|
|
71
68
|
sortedFiles.forEach(([fileName, tokens]) => {
|
|
72
69
|
const fullPath = node_path_1.default.resolve(process.cwd(), fileName);
|
|
73
|
-
log(`${fileName} (${tokens.length} tokens)
|
|
70
|
+
log(`${fileName} (${tokens.length} tokens)`, 0, "blueBright");
|
|
74
71
|
/* Sort tokens in file by line number */
|
|
75
72
|
tokens.sort((a, b) => a.lineNumber - b.lineNumber);
|
|
76
73
|
const fileEntry = {
|
|
@@ -81,9 +78,9 @@ function printRemaining(files, status) {
|
|
|
81
78
|
};
|
|
82
79
|
tokens.forEach((token) => {
|
|
83
80
|
if (token.comment) {
|
|
84
|
-
log(`/* ${token.comment} */`, 1);
|
|
81
|
+
log(`/* ${token.comment} */`, 1, "gray");
|
|
85
82
|
}
|
|
86
|
-
log(`${token.name}: ${fullPath}:${token.lineNumber}:${token.columnNumber}`, 1);
|
|
83
|
+
log(`${chalk_1.default.blueBright(token.name)}: ${fullPath}:${token.lineNumber}:${token.columnNumber}`, 1);
|
|
87
84
|
fileEntry.tokens.push({
|
|
88
85
|
name: token.name,
|
|
89
86
|
line: token.lineNumber,
|
|
@@ -112,13 +109,13 @@ function printRemaining(files, status) {
|
|
|
112
109
|
const tokenOutput = [];
|
|
113
110
|
sortedTokens.forEach(([tokenName, tokens]) => {
|
|
114
111
|
var _a;
|
|
115
|
-
log(`${tokenName} (${tokens.length} occurrences)
|
|
112
|
+
log(`${chalk_1.default.blueBright(tokenName)} (${tokens.length} occurrences)`, 0, "blueBright");
|
|
116
113
|
/**
|
|
117
114
|
* We can assume all comments are the same for a "tokenName"
|
|
118
115
|
*/
|
|
119
116
|
const foundComment = (_a = tokens.find((t) => t.comment)) === null || _a === void 0 ? void 0 : _a.comment;
|
|
120
117
|
if (foundComment) {
|
|
121
|
-
log(`/* ${foundComment} */`, 1);
|
|
118
|
+
log(`/* ${foundComment} */`, 1, "gray");
|
|
122
119
|
}
|
|
123
120
|
const tokenEntry = {
|
|
124
121
|
token: tokenName,
|
|
@@ -154,3 +151,11 @@ function printRemaining(files, status) {
|
|
|
154
151
|
}
|
|
155
152
|
});
|
|
156
153
|
}
|
|
154
|
+
function log(str, indent = 0, chalkColor) {
|
|
155
|
+
const prefix = " ".repeat(indent);
|
|
156
|
+
if (chalkColor) {
|
|
157
|
+
console.info(prefix + chalk_1.default[chalkColor](str));
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
console.info(prefix + str);
|
|
161
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/aksel",
|
|
3
|
-
"version": "7.35.
|
|
3
|
+
"version": "7.35.2",
|
|
4
4
|
"description": "Aksel command line interface. Codemods and other utilities for Aksel users.",
|
|
5
5
|
"author": "Aksel | Nav designsystem team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,21 +32,20 @@
|
|
|
32
32
|
"url": "https://github.com/navikt/aksel/issues"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@navikt/ds-css": "^7.35.
|
|
36
|
-
"@navikt/ds-tokens": "^7.35.
|
|
35
|
+
"@navikt/ds-css": "^7.35.2",
|
|
36
|
+
"@navikt/ds-tokens": "^7.35.2",
|
|
37
37
|
"axios": "1.13.2",
|
|
38
38
|
"chalk": "5.6.2",
|
|
39
|
-
"cli-progress": "
|
|
40
|
-
"clipboardy": "
|
|
39
|
+
"cli-progress": "3.12.0",
|
|
40
|
+
"clipboardy": "5.0.1",
|
|
41
41
|
"commander": "10.0.1",
|
|
42
|
-
"enquirer": "
|
|
42
|
+
"enquirer": "2.4.1",
|
|
43
43
|
"fast-glob": "3.2.11",
|
|
44
44
|
"figlet": "1.8.0",
|
|
45
45
|
"is-git-clean": "1.1.0",
|
|
46
|
-
"jscodeshift": "
|
|
46
|
+
"jscodeshift": "0.15.2",
|
|
47
47
|
"jscodeshift-add-imports": "1.0.11",
|
|
48
|
-
"lodash": "
|
|
49
|
-
"react-scanner": "^1.1.0"
|
|
48
|
+
"lodash": "4.17.21"
|
|
50
49
|
},
|
|
51
50
|
"devDependencies": {
|
|
52
51
|
"@types/cli-progress": "3.11.6",
|