@forsakringskassan/vue-lib-template 1.2.10 → 1.2.11

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.
@@ -6,25 +6,7 @@ import "@fkui/theme-default";
6
6
  import "./main.scss";
7
7
  import "./common";
8
8
 
9
- Cypress.Commands.add("mount", (component, options = {}) => {
10
- options.global ??= {};
11
- options.global.plugins ??= [];
12
-
13
- /* handle warnings as errors */
14
- options.global.plugins.push({
15
- install(app) {
16
- app.config.warnHandler = (msg) => {
17
- const mochaRunner = Cypress.mocha.getRunner();
18
- const body = mochaRunner.test?.body ?? "";
19
- if (!body.includes("<expectedException")) {
20
- cy.wrap(`Vue warning: ${msg}`).should("be.empty");
21
- }
22
- };
23
- },
24
- });
25
-
26
- return mount(component, options);
27
- });
9
+ Cypress.Commands.add("mount", mount);
28
10
 
29
11
  const uncaughtErrors: string[] = [];
30
12
 
@@ -14,6 +14,7 @@
14
14
  ],
15
15
  "typeRoots": ["../node_modules", "../node_modules/@types", "./types"],
16
16
  "paths": {
17
+ // prettier-ignore
17
18
  "@forsakringskassan/vue-lib-template/selectors": [
18
19
  "./src/selectors/index.ts"
19
20
  ],
@@ -1,7 +1,7 @@
1
1
  /* This file is managed by @forsakringskassan/vue-lib-template. Changes will be overwritten! */
2
2
 
3
- import { copyFileSync } from "node:fs";
4
3
  import path from "node:path";
4
+ import { fileURLToPath } from "node:url";
5
5
  import {
6
6
  Generator,
7
7
  frontMatterFileReader,
@@ -34,10 +34,20 @@ docs.compileStyle("main", "./src/main.scss", {
34
34
  appendTo: "head",
35
35
  });
36
36
 
37
+ const styleUrl = import.meta.resolve(`../dist/esm/style.css`);
38
+ const stylePath = fileURLToPath(styleUrl); // workaround for https://github.com/Forsakringskassan/docs-generator/issues/499
39
+ docs.compileStyle("lib", stylePath, {
40
+ appendTo: "head",
41
+ });
42
+
37
43
  docs.compileScript("mocks", "./src/bundle-mocks.mjs", {
38
44
  appendTo: "head",
39
45
  });
40
46
 
47
+ const mswUrl = import.meta.resolve("msw/mockServiceWorker.js");
48
+ const mswPath = fileURLToPath(mswUrl); // workaround for https://github.com/Forsakringskassan/docs-generator/issues/499
49
+ docs.compileWorker("msw", mswPath);
50
+
41
51
  await docs.build([
42
52
  {
43
53
  include: ["**/*.md"],
@@ -49,8 +59,3 @@ await docs.build([
49
59
  fileReader: vueFileReader,
50
60
  },
51
61
  ]);
52
-
53
- copyFileSync(
54
- "../node_modules/msw/lib/mockServiceWorker.js",
55
- "./public/mock-service-worker.js",
56
- );
@@ -10,7 +10,7 @@
10
10
  "@fkui/icon-lib-default": "6.58.0",
11
11
  "@fkui/vue": "6.58.0",
12
12
  "@forsakringskassan/apimock-express": "4.1.0",
13
- "@forsakringskassan/docs-generator": "3.9.0",
13
+ "@forsakringskassan/docs-generator": "3.10.1",
14
14
  "@tsconfig/node24": "24.0.5",
15
15
  "@tsconfig/recommended": "1.0.13",
16
16
  "http-server": "14.1.1",
@@ -11,7 +11,7 @@ const handlers = [
11
11
  const worker = setupWorker(...handlers);
12
12
  // eslint-disable-next-line no-undef -- technical debt
13
13
  const rootUrl = document.documentElement.dataset["rootUrl"];
14
- const url = `${rootUrl}/mock-service-worker.js`;
14
+ const url = `${rootUrl}/msw.js`;
15
15
 
16
16
  // Used in setup.ts
17
17
  // eslint-disable-next-line unicorn/no-global-object-property-assignment, no-undef -- technical debt
@@ -24,7 +24,7 @@
24
24
  "types": "./dist/types/selectors.d.ts",
25
25
  "import": "./dist/esm/selectors.esm.js"
26
26
  },
27
- "./style.css": "./dist/esm/vue-lib-template.css",
27
+ "./style.css": "./dist/esm/style.css",
28
28
  "./package.json": "./package.json"
29
29
  },
30
30
  "main": "dist/esm/index.esm.js",
@@ -89,9 +89,9 @@
89
89
  "@fkui/vue": "6.58.0",
90
90
  "@forsakringskassan/apimock-express": "4.1.0",
91
91
  "@forsakringskassan/commitlint-config": "4.2.8",
92
- "@forsakringskassan/cypress-config": "1.9.2",
92
+ "@forsakringskassan/cypress-config": "1.10.0",
93
93
  "@forsakringskassan/cypress-visual-regression": "5.2.0",
94
- "@forsakringskassan/docs-generator": "3.9.0",
94
+ "@forsakringskassan/docs-generator": "3.10.1",
95
95
  "@forsakringskassan/docs-live-example": "3.0.2",
96
96
  "@forsakringskassan/eslint-config": "15.9.10",
97
97
  "@forsakringskassan/eslint-config-cli": "15.9.3",
@@ -103,15 +103,15 @@
103
103
  "@forsakringskassan/eslint-config-vue": "15.9.8",
104
104
  "@forsakringskassan/prettier-config": "3.7.8",
105
105
  "@forsakringskassan/stylelint-config": "3.4.6",
106
- "@forsakringskassan/vite-lib-config": "5.12.1",
106
+ "@forsakringskassan/vite-lib-config": "5.12.4",
107
107
  "@forsakringskassan/vitest-config-jsdom": "5.0.0",
108
- "@forsakringskassan/vue-lib-template": "1.2.10",
108
+ "@forsakringskassan/vue-lib-template": "1.2.11",
109
109
  "@html-validate/release-scripts": "7.6.11",
110
110
  "@types/node": "24.13.4",
111
111
  "@typescript/native": "npm:typescript@7.0.2",
112
112
  "@vue/server-renderer": "3.5.42",
113
113
  "@vue/test-utils": "2.5.0",
114
- "cloneman": "1.24.0",
114
+ "cloneman": "1.24.1",
115
115
  "core-js": "3.50.0",
116
116
  "cypress": "16.0.0",
117
117
  "html-validate": "11.15.0",
@@ -7,9 +7,11 @@
7
7
  ],
8
8
  "compilerOptions": {
9
9
  "paths": {
10
+ // prettier-ignore
10
11
  "@forsakringskassan/vue-lib-template/selectors": [
11
12
  "./src/selectors/index.ts"
12
13
  ],
14
+ // prettier-ignore
13
15
  "@forsakringskassan/vue-lib-template": ["./src/index.ts"]
14
16
  }
15
17
  }
@@ -4,9 +4,11 @@
4
4
  "extends": "@forsakringskassan/vite-lib-config/tsconfig.lib.json",
5
5
  "compilerOptions": {
6
6
  "paths": {
7
+ // prettier-ignore
7
8
  "@forsakringskassan/vue-lib-template/selectors": [
8
9
  "./src/selectors/index.ts"
9
10
  ],
11
+ // prettier-ignore
10
12
  "@forsakringskassan/vue-lib-template": ["./src/index.ts"]
11
13
  }
12
14
  }
package/hooks/install.mjs CHANGED
@@ -1,9 +1,8 @@
1
1
 
2
2
 
3
3
  export async function install(context ) {
4
- const { updateJsonFile, getApplicationName, replaceInFile } = context;
4
+ const { getApplicationName, replaceInFile } = context;
5
5
  const scopedName = getApplicationName();
6
- const unscopedName = getApplicationName({ unscoped: true });
7
6
 
8
7
  /* update placeholder names with the real application name (from package.json) */
9
8
  const placeholder = /"@forsakringskassan\/vue-lib-template(\/[^"]+)?"/g;
@@ -14,11 +13,4 @@ export async function install(context ) {
14
13
  await replaceInFile("tsconfig.lib.json", placeholder, quotedName);
15
14
  await replaceInFile("tsconfig.cypress.json", placeholder, quotedName);
16
15
  await replaceInFile("tsconfig.selectors.json", placeholder, quotedName);
17
-
18
- /* correct exported subpath "style.css" */
19
- await updateJsonFile("package.json", {
20
- exports: {
21
- "./style.css": `./dist/esm/${unscopedName}.css`,
22
- },
23
- });
24
16
  }
package/index.js CHANGED
@@ -7,7 +7,7 @@
7
7
 
8
8
  const options = {
9
9
  ...packageJson.cloneman,
10
- fileHash: "2ee3be5e7c82414646fd3310bff404d2d9441920ddcdc0c78457e8f783479049",
10
+ fileHash: "c8696b477625b5dc20f234843d09017230ad3dbd962739042e8d0f82b0166b2a",
11
11
  filesDir: path.join(import.meta.dirname, "files"),
12
12
  hooksDir: path.join(import.meta.dirname, "hooks"),
13
13
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forsakringskassan/vue-lib-template",
3
- "version": "1.2.10",
3
+ "version": "1.2.11",
4
4
  "description": "Vue library template based on Cloneman",
5
5
  "keywords": [
6
6
  "template",