@navikt/aksel 6.16.2 → 6.17.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/dist/codemod/run-codeshift.js +3 -3
- package/dist/codemod/transforms/v3.0.0/copybutton/copybutton.js +1 -1
- package/dist/codemod/validation.js +1 -1
- package/dist/css-imports/generate-output.js +8 -8
- package/dist/css-imports/inquiry.js +1 -1
- package/dist/css-imports/scan-code.js +1 -1
- package/dist/help.js +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
|
@@ -56,8 +56,8 @@ function runCodeshift(input, options, program) {
|
|
|
56
56
|
cwd: process.cwd(),
|
|
57
57
|
ignore: ignoreNodeModules,
|
|
58
58
|
});
|
|
59
|
-
console.
|
|
60
|
-
(options === null || options === void 0 ? void 0 : options.glob) && console.
|
|
59
|
+
console.info("\nRunning migration:", chalk_1.default.green("input"));
|
|
60
|
+
(options === null || options === void 0 ? void 0 : options.glob) && console.info(`Using glob: ${chalk_1.default.green(options.glob)}\n`);
|
|
61
61
|
const warning = (0, migrations_1.getWarning)(input);
|
|
62
62
|
try {
|
|
63
63
|
yield jscodeshift.run(codemodPath, filepaths, {
|
|
@@ -73,7 +73,7 @@ function runCodeshift(input, options, program) {
|
|
|
73
73
|
force: options === null || options === void 0 ? void 0 : options.force,
|
|
74
74
|
print: options === null || options === void 0 ? void 0 : options.print,
|
|
75
75
|
});
|
|
76
|
-
warning && console.
|
|
76
|
+
warning && console.info(`\n${chalk_1.default.yellow(warning)}\n`);
|
|
77
77
|
}
|
|
78
78
|
catch (error) {
|
|
79
79
|
program.error(chalk_1.default.red("Error:", error.message));
|
|
@@ -51,7 +51,7 @@ function transformer(file, api) {
|
|
|
51
51
|
}
|
|
52
52
|
else {
|
|
53
53
|
flagged = true;
|
|
54
|
-
console.
|
|
54
|
+
console.info(chalk_1.default.yellow(`\n\nWarning: Detected advanced children-type!\nCodemod can't convert into "text" prop so you will need to update this manually.`));
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
if (!flagged) {
|
|
@@ -22,7 +22,7 @@ function validateGit(options, program) {
|
|
|
22
22
|
return;
|
|
23
23
|
}
|
|
24
24
|
if (options.force) {
|
|
25
|
-
console.
|
|
25
|
+
console.info(chalk_1.default.yellow("Forcing migration without git check"));
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
28
|
let clean = false;
|
|
@@ -54,24 +54,24 @@ ${imports.join("\n")}
|
|
|
54
54
|
importStr = imports.join("\n");
|
|
55
55
|
}
|
|
56
56
|
if (answers.output.includes("print")) {
|
|
57
|
-
console.
|
|
58
|
-
console.
|
|
57
|
+
console.info(chalk_1.default.bold.cyan(`\nImports 🚀 \n`));
|
|
58
|
+
console.info(chalk_1.default.green(`${importStr}`));
|
|
59
59
|
}
|
|
60
60
|
if (useCdn) {
|
|
61
|
-
console.
|
|
62
|
-
console.
|
|
61
|
+
console.info(chalk_1.default.bold.underline.cyan(`\nNotes on CDN-usage 📝`));
|
|
62
|
+
console.info(`We recommend using Static imports, then uploading the your bundled static-files to your own CDN-instance.
|
|
63
63
|
✔︎ This allows you to control the version of the CSS-files with package.json, and avoids desync between ds-react/ds-css.
|
|
64
64
|
✔︎ Remember to add 'https://cdn.nav.no' to your applications CSP!`);
|
|
65
65
|
}
|
|
66
66
|
if (useTailwind) {
|
|
67
|
-
console.
|
|
68
|
-
console.
|
|
67
|
+
console.info(chalk_1.default.bold.underline.cyan(`\nNotes on Tailwind-use 📝`));
|
|
68
|
+
console.info(`When using tailwind with Aksel, you will need to add the postcss plugin ${chalk_1.default.cyan("postcss-import")}
|
|
69
69
|
✔︎ NPM: https://www.npmjs.com/package/postcss-import
|
|
70
70
|
✔︎ Read more here: https://aksel.nav.no/grunnleggende/kode/tailwind`);
|
|
71
71
|
}
|
|
72
72
|
if (answers.layers === "yes") {
|
|
73
|
-
console.
|
|
74
|
-
console.
|
|
73
|
+
console.info(chalk_1.default.bold.underline.cyan(`\nNotes on Layers 📝`));
|
|
74
|
+
console.info(`Layers is not yet supported in Safari <= 15.3. (https://caniuse.com/css-cascade-layers)`);
|
|
75
75
|
}
|
|
76
76
|
answers.output.includes("clipboard") && clipboardy_1.default.writeSync(importStr);
|
|
77
77
|
});
|
|
@@ -25,7 +25,7 @@ function inquiry(answers, questions) {
|
|
|
25
25
|
})
|
|
26
26
|
.catch((error) => {
|
|
27
27
|
if (error.isTtyError) {
|
|
28
|
-
console.
|
|
28
|
+
console.info("Oops, something went wrong! Looks like @navikt/aksel-cli can't run in this terminal. Contact Aksel");
|
|
29
29
|
}
|
|
30
30
|
else {
|
|
31
31
|
console.error(error);
|
package/dist/help.js
CHANGED
|
@@ -7,8 +7,8 @@ exports.helpCommand = helpCommand;
|
|
|
7
7
|
const chalk_1 = __importDefault(require("chalk"));
|
|
8
8
|
const figlet_1 = __importDefault(require("figlet"));
|
|
9
9
|
function helpCommand() {
|
|
10
|
-
console.
|
|
11
|
-
console.
|
|
10
|
+
console.info(figlet_1.default.textSync("Aksel CLI"));
|
|
11
|
+
console.info(`
|
|
12
12
|
📝 Documentation
|
|
13
13
|
- ${chalk_1.default.blueBright("https://aksel.nav.no/grunnleggende/kode/kommandolinje")}
|
|
14
14
|
|
package/dist/index.js
CHANGED
|
@@ -35,9 +35,9 @@ function run() {
|
|
|
35
35
|
}
|
|
36
36
|
if (process.argv[2] === "-v" || process.argv[2] === "--version") {
|
|
37
37
|
const pkg = JSON.parse(fs_1.default.readFileSync("./package.json").toString()).version;
|
|
38
|
-
console.
|
|
38
|
+
console.info(pkg);
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
|
-
console.
|
|
41
|
+
console.info(chalk_1.default.red(`Unknown command: ${process.argv[2]}.\nRun ${chalk_1.default.cyan("npx @navikt/aksel help")} for all available commands.`));
|
|
42
42
|
});
|
|
43
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@navikt/aksel",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.17.0",
|
|
4
4
|
"description": "Aksel command line interface. Handles css-imports, codemods and more",
|
|
5
5
|
"author": "Aksel | NAV designsystem team",
|
|
6
6
|
"license": "MIT",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@navikt/ds-css": "6.
|
|
32
|
+
"@navikt/ds-css": "6.17.0",
|
|
33
33
|
"axios": "1.7.4",
|
|
34
34
|
"chalk": "4.1.0",
|
|
35
35
|
"clipboardy": "^2.3.0",
|