@navikt/aksel 7.32.4 → 7.33.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.
@@ -49,7 +49,7 @@ exports.runCodeshift = runCodeshift;
49
49
  const chalk_1 = __importDefault(require("chalk"));
50
50
  const fast_glob_1 = __importDefault(require("fast-glob"));
51
51
  const jscodeshift = __importStar(require("jscodeshift/src/Runner"));
52
- const path_1 = __importDefault(require("path"));
52
+ const node_path_1 = __importDefault(require("node:path"));
53
53
  const codeshift_utils_1 = require("./codeshift.utils");
54
54
  const migrations_1 = require("./migrations");
55
55
  const ignoreNodeModules = [
@@ -62,7 +62,7 @@ const ignoreNodeModules = [
62
62
  function runCodeshift(input, options, program) {
63
63
  return __awaiter(this, void 0, void 0, function* () {
64
64
  var _a;
65
- const codemodPath = path_1.default.join(__dirname, `./transforms/${(0, migrations_1.getMigrationPath)(input)}.js`);
65
+ const codemodPath = node_path_1.default.join(__dirname, `./transforms/${(0, migrations_1.getMigrationPath)(input)}.js`);
66
66
  const filepaths = fast_glob_1.default.sync([(_a = options.glob) !== null && _a !== void 0 ? _a : (0, codeshift_utils_1.getDefaultGlob)(options === null || options === void 0 ? void 0 : options.ext)], {
67
67
  cwd: process.cwd(),
68
68
  ignore: codeshift_utils_1.GLOB_IGNORE_PATTERNS,
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  exports.getDirectories = getDirectories;
16
16
  const fast_glob_1 = __importDefault(require("fast-glob"));
17
- const path_1 = __importDefault(require("path"));
17
+ const node_path_1 = __importDefault(require("node:path"));
18
18
  function getDirectories() {
19
19
  return __awaiter(this, void 0, void 0, function* () {
20
20
  const baseDir = process.cwd();
@@ -29,6 +29,6 @@ function getDirectories() {
29
29
  ignore: ignoreNodeModules,
30
30
  });
31
31
  directories.sort((a, b) => a.length - b.length);
32
- return [baseDir, ...directories].map((x) => x.replace(baseDir, path_1.default.basename(baseDir)));
32
+ return [baseDir, ...directories].map((x) => x.replace(baseDir, node_path_1.default.basename(baseDir)));
33
33
  });
34
34
  }
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- const path_1 = __importDefault(require("path"));
15
+ const node_path_1 = __importDefault(require("node:path"));
16
16
  const react_scanner_1 = __importDefault(require("react-scanner"));
17
17
  run();
18
18
  function run() {
@@ -26,10 +26,10 @@ function scanCode() {
26
26
  const cwd = process.cwd();
27
27
  const config = {
28
28
  rootDir: cwd,
29
- crawlFrom: `${(_a = process.argv[2]) !== null && _a !== void 0 ? _a : ""}`.replace(path_1.default.basename(cwd), "."),
29
+ crawlFrom: `${(_a = process.argv[2]) !== null && _a !== void 0 ? _a : ""}`.replace(node_path_1.default.basename(cwd), "."),
30
30
  globs: ["**/!(*.test|*.spec|*.stories|*.story).@(jsx|tsx)"],
31
31
  exclude: (dirname) => dirname === "node_modules",
32
- getComponentName: ({ imported, moduleName, }) => imported || path_1.default.basename(moduleName),
32
+ getComponentName: ({ imported, moduleName, }) => imported || node_path_1.default.basename(moduleName),
33
33
  };
34
34
  let result = null;
35
35
  yield react_scanner_1.default
@@ -50,7 +50,7 @@ const chalk_1 = __importDefault(require("chalk"));
50
50
  const enquirer_1 = __importDefault(require("enquirer"));
51
51
  const fast_glob_1 = __importDefault(require("fast-glob"));
52
52
  const jscodeshift = __importStar(require("jscodeshift/src/Runner"));
53
- const path_1 = __importDefault(require("path"));
53
+ const node_path_1 = __importDefault(require("node:path"));
54
54
  const codeshift_utils_1 = require("../codemod/codeshift.utils");
55
55
  const validation_1 = require("../codemod/validation");
56
56
  const print_remaining_1 = require("./tasks/print-remaining");
@@ -200,7 +200,7 @@ function runCodeshift(task, filepaths, options) {
200
200
  if (!TRANSFORMS[task]) {
201
201
  throw new Error(`No transform found for task: ${task}`);
202
202
  }
203
- const codemodPath = path_1.default.join(__dirname, `${TRANSFORMS[task]}.js`);
203
+ const codemodPath = node_path_1.default.join(__dirname, `${TRANSFORMS[task]}.js`);
204
204
  yield jscodeshift.run(codemodPath, filepaths, {
205
205
  babel: true,
206
206
  ignorePattern: codeshift_utils_1.GLOB_IGNORE_PATTERNS,
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.printRemaining = printRemaining;
7
- const path_1 = __importDefault(require("path"));
7
+ const node_path_1 = __importDefault(require("node:path"));
8
8
  const status_1 = require("./status");
9
9
  function printRemaining(files) {
10
10
  process.stdout.write("\nAnalyzing...");
@@ -36,7 +36,7 @@ function printRemaining(files) {
36
36
  // Print the unique and sorted fileLinks as clickable links with full path
37
37
  uniqueFileLinks.forEach((link) => {
38
38
  const [tokenName, fileName, lineNumber, columnNumber] = link.split(":");
39
- const fullPath = path_1.default.resolve(process.cwd(), fileName);
39
+ const fullPath = node_path_1.default.resolve(process.cwd(), fileName);
40
40
  const withComment = data.legacy.find((token) => {
41
41
  return token.name === tokenName && token.comment;
42
42
  });
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.getStatus = getStatus;
7
7
  const cli_progress_1 = __importDefault(require("cli-progress"));
8
- const fs_1 = __importDefault(require("fs"));
8
+ const node_fs_1 = __importDefault(require("node:fs"));
9
9
  const TokenStatus_1 = require("../config/TokenStatus");
10
10
  const darkside_tokens_1 = require("../config/darkside.tokens");
11
11
  const legacy_component_tokens_1 = require("../config/legacy-component.tokens");
@@ -26,7 +26,7 @@ function getStatus(files, action = "print") {
26
26
  }
27
27
  StatusStore.initStatus();
28
28
  files.forEach((fileName, index) => {
29
- const fileSrc = fs_1.default.readFileSync(fileName, "utf8");
29
+ const fileSrc = node_fs_1.default.readFileSync(fileName, "utf8");
30
30
  /**
31
31
  * We first parse trough all legacy tokens (--a-) prefixed tokens
32
32
  */
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  };
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  const chalk_1 = __importDefault(require("chalk"));
17
- const fs_1 = __importDefault(require("fs"));
17
+ const node_fs_1 = __importDefault(require("node:fs"));
18
18
  const index_1 = require("./codemod/index");
19
19
  const index_2 = require("./css-imports/index");
20
20
  const darkside_1 = require("./darkside");
@@ -39,7 +39,7 @@ function run() {
39
39
  return;
40
40
  }
41
41
  if (process.argv[2] === "-v" || process.argv[2] === "--version") {
42
- const pkg = JSON.parse(fs_1.default.readFileSync("./package.json").toString()).version;
42
+ const pkg = JSON.parse(node_fs_1.default.readFileSync("./package.json").toString()).version;
43
43
  console.info(pkg);
44
44
  return;
45
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/aksel",
3
- "version": "7.32.4",
3
+ "version": "7.33.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",
@@ -28,9 +28,12 @@
28
28
  "directory": "@navikt/aksel"
29
29
  },
30
30
  "homepage": "https://aksel.nav.no/grunnleggende/kode/kommandolinje",
31
+ "bugs": {
32
+ "url": "https://github.com/navikt/aksel/issues"
33
+ },
31
34
  "dependencies": {
32
- "@navikt/ds-css": "^7.32.4",
33
- "@navikt/ds-tokens": "^7.32.4",
35
+ "@navikt/ds-css": "^7.33.0",
36
+ "@navikt/ds-tokens": "^7.33.0",
34
37
  "axios": "1.12.2",
35
38
  "chalk": "4.1.0",
36
39
  "cli-progress": "^3.12.0",