@navikt/aksel 5.3.5 → 5.4.1

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.
@@ -43,14 +43,13 @@ const applyTransform = require("jscodeshift/dist/testUtils").applyTransform;
43
43
  function check(dirName, { fixture, migration, extension = "js", options = {} }) {
44
44
  describe(migration, () => {
45
45
  it(fixture, () => __awaiter(this, void 0, void 0, function* () {
46
- var _a;
47
46
  const fixtureDir = node_path_1.default.join(dirName);
48
47
  const inputPath = node_path_1.default.join(fixtureDir, `${fixture}.input.${extension}`);
49
48
  const parser = extension;
50
49
  const source = node_fs_1.default.readFileSync(inputPath, "utf8");
51
50
  const expected = node_fs_1.default.readFileSync(node_path_1.default.join(fixtureDir, `${fixture}.output.${extension}`), "utf8");
52
51
  // Assumes transform is one level up from tests directory
53
- const module = yield (_a = node_path_1.default.join(dirName, "..", migration), Promise.resolve().then(() => __importStar(require(_a))));
52
+ const module = yield Promise.resolve(`${node_path_1.default.join(dirName, "..", migration)}`).then(s => __importStar(require(s)));
54
53
  const output = applyTransform(Object.assign(Object.assign({}, module), { parser: "tsx" }), options, {
55
54
  source,
56
55
  });
@@ -117,6 +117,10 @@ function advancedOutput(answers, cdn, layers, version) {
117
117
  componentImportsList = componentImportsList.filter((x) => x !== _mappings_1.formCss);
118
118
  componentImportsList.unshift(_mappings_1.formCss);
119
119
  }
120
+ if (componentImportsList.find((x) => x === _mappings_1.primitivesCss)) {
121
+ componentImportsList = componentImportsList.filter((x) => x !== _mappings_1.primitivesCss);
122
+ componentImportsList.unshift(_mappings_1.primitivesCss);
123
+ }
120
124
  if (componentImportsList.find((x) => x === _mappings_1.typoCss)) {
121
125
  componentImportsList = componentImportsList.filter((x) => x !== _mappings_1.typoCss);
122
126
  componentImportsList.unshift(_mappings_1.typoCss);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@navikt/aksel",
3
- "version": "5.3.5",
3
+ "version": "5.4.1",
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": "5.3.5",
32
+ "@navikt/ds-css": "5.4.1",
33
33
  "axios": "1.3.6",
34
34
  "chalk": "4.1.0",
35
35
  "clipboardy": "^2.3.0",
@@ -49,7 +49,7 @@
49
49
  "jest": "^29.0.0",
50
50
  "rimraf": "3.0.2",
51
51
  "ts-jest": "^29.0.0",
52
- "typescript": "^4.8.0"
52
+ "typescript": "^5.1.6"
53
53
  },
54
54
  "sideEffects": false,
55
55
  "engines": {