@devopsplaybook.io/common-web 0.8.1 → 0.9.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/CHANGELOG.md CHANGED
@@ -5,6 +5,33 @@ All notable changes to this project are documented here.
5
5
  This project follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
6
6
  and [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.9.0] - 2026-11-01
9
+
10
+ ### Added
11
+
12
+ - Type-check gate: `npm run typecheck` runs `nuxi typecheck` (`vue-tsc --noEmit`)
13
+ over the layer, playground and tests. TypeScript 6.0.3, vue-tsc 3.3.14 and
14
+ Node 22 types are pinned in `devDependencies`; both CI workflows run the gate.
15
+ - Node-environment SSR smoke test (`tests/ssr.spec.ts`) rendering the shipped
16
+ components with `createSSRApp` and `renderToString` as part of `npm test`.
17
+
18
+ ### Changed
19
+
20
+ - Production dependency audit is clean again: `follow-redirects` is pinned to
21
+ 1.16.2 through the lockfile (GHSA-mrwp-f3q8-3g9p). The full dev-only audit
22
+ and its accepted advisories are documented in `CONTRIBUTING.md`.
23
+ - Packaging metadata: `vue` is now an explicit peer dependency and `pinia` is
24
+ optional through `peerDependenciesMeta` (still a devDependency for tests).
25
+ - `pretest` and `prebuild` run `nuxi prepare` so the generated Nuxt tsconfig
26
+ that the root `tsconfig.json` extends exists before the test and playground
27
+ build steps, which also runs in CI after a clean install.
28
+ - The type-check gate required mechanical type annotations in
29
+ `tests/contrast.spec.ts`; no runtime behaviour or public API changed.
30
+
31
+ ### Fixed
32
+
33
+ - `npm audit --omit=dev --audit-level=high` no longer fails on `main`.
34
+
8
35
  ## [0.8.1] - 2026-10-29
9
36
 
10
37
  ### Changed
package/CONTRIBUTING.md CHANGED
@@ -7,6 +7,7 @@ Use Node.js 22 and run the repository checks before opening a pull request:
7
7
  ```sh
8
8
  npm ci
9
9
  npm run lint
10
+ npm run typecheck
10
11
  npm test
11
12
  npm run build
12
13
  npm audit --omit=dev --audit-level=high
@@ -15,7 +16,13 @@ npm audit --omit=dev --audit-level=high
15
16
  The tests consume the generated npm tarball, not only the working tree.
16
17
  `npm run build` checks the publish file list and builds the Nuxt playground.
17
18
 
18
- Two quality gates run with `npm test`:
19
+ `npm run typecheck` runs `nuxi typecheck` (`vue-tsc --noEmit`) over the shipped
20
+ sources, the playground and the tests, and fails on any type error. `PR Check`
21
+ and `Main Build` run it right after linting. The package ships raw TypeScript
22
+ and Vue sources, so this gate catches type regressions that would otherwise
23
+ surface only in a consuming application's build.
24
+
25
+ Three quality gates run with `npm test`:
19
26
 
20
27
  - **Coverage thresholds** are enforced in `vitest.config.ts` (statements 95%,
21
28
  branches 88%, functions 99%, lines 97%) over the composables, services and
@@ -26,6 +33,9 @@ Two quality gates run with `npm test`:
26
33
  `color-contrast` rule is disabled there because jsdom cannot compute rendered
27
34
  contrast; WCAG AA color pairs are already gated by `tests/contrast.spec.ts`
28
35
  against the packed tokens.
36
+ - **SSR**: `tests/ssr.spec.ts` renders the shipped components in a Node
37
+ environment with `createSSRApp` and `renderToString`, so the SSR
38
+ compatibility promised by the README is exercised on every test run.
29
39
 
30
40
  ## Scope and compatibility
31
41
 
@@ -66,20 +76,28 @@ shipped or executed inside a consuming application. A vulnerability that exists
66
76
  only in that toolchain is a build-environment risk, not a runtime risk for
67
77
  consumers.
68
78
 
69
- Accepted development-only advisories (2026-10-24, after the Nuxt 4.6.2 /
70
- Vitest 5.0.5 refresh):
79
+ Accepted development-only advisories (2026-11-01, after the
80
+ `follow-redirects` lockfile fix and the type-check toolchain):
71
81
 
72
82
  | Advisory | Package | Severity | Path | Status |
73
83
  | --- | --- | --- | --- | --- |
74
- | GHSA-86w9-cpqp-85rv | node-forge 1.4.0 | high | nuxt → @nuxt/nitro-server → nitropack → listhen → node-forge | No fixed release (1.4.0 is latest); npm's only suggested fix is downgrading Nuxt to 4.1.3, rejected |
75
-
76
- `npm audit` lists this single advisory as seven high entries because it is also
77
- aggregated through `@nuxt/nitro-server`, `@nuxt/vite-builder`,
78
- `@nuxt/vite-server`, `nitropack`, `listhen`, and `nuxt`.
84
+ | GHSA-gcqx-w48m-w2h4 | `deepmerge` 4.3.1 (affected 4.2.0–4.3.1) | low | nuxt → @nuxt/nitro-server → nitropack → @rollup/plugin-node-resolve → deepmerge | No compatible release; npm's only suggested fix is downgrading Nuxt to 4.1.3, rejected |
85
+ | GHSA-3g3m-2fjr-6pw4 | `glob` (affected 9.0.0–14.0.1) | moderate | Nuxt toolchain (@nuxt/nitro-server, nitropack, @vercel/nft, archiver, archiver-utils, zip-stream) and @vue/test-utils → js-beautify | npm's fix is downgrading @vue/test-utils to 2.4.11 or Nuxt to 4.1.3, rejected |
86
+ | GHSA-g3hv-75wg-m249 | `minimatch` (affected <11.0.1) | moderate | @vue/test-utils → js-beautify → editorconfig → minimatch; also readdir-glob and archiver-utils | Same downgrade suggested, rejected |
87
+
88
+ `npm audit` reports these three advisories as 17 entries (2 low, 15 moderate)
89
+ because they are also aggregated through `@nuxt/nitro-server`,
90
+ `@nuxt/vite-builder`, `@nuxt/vite-server`, `nitropack`, `nuxt`,
91
+ `@vue/test-utils`, `archiver`, `archiver-utils`, `zip-stream`, `readdir-glob`,
92
+ `@vercel/nft`, `@rollup/plugin-node-resolve`, `glob`, `minimatch`,
93
+ `editorconfig`, `js-beautify` and `deepmerge`. Every entry is reachable only
94
+ through `devDependencies`.
79
95
 
80
96
  Do not silence advisories with `npm audit fix --force`, npm `overrides`, or a
81
- Nuxt downgrade. Re-run both audits after every dependency update and update this
82
- table when the tree changes (remove the exception once `node-forge` ships a fix).
97
+ Nuxt or `@vue/test-utils` downgrade. Re-run both audits after every dependency
98
+ update and refresh this table when the tree changes; remove an entry once its
99
+ toolchain ships a compatible fix. The production audit (0 vulnerabilities at
100
+ this revision) is re-checked by `PR Check` and `Main Build` on every change.
83
101
 
84
102
  `PR Check` and `Main Build` run repository-local copies of the shared
85
103
  `common-utils` npm workflows because the shared versions still gate on a full
package/README.md CHANGED
@@ -196,6 +196,10 @@ authentication state to become meaningful only after hydration.
196
196
  unguarded and must only be called in the browser (a client plugin or a
197
197
  composable hook, never during SSR).
198
198
 
199
+ `tests/ssr.spec.ts` renders the shipped components with `createSSRApp` and
200
+ `renderToString` in a Node environment, so this server-rendering contract is
201
+ exercised by `npm test` and by both CI workflows.
202
+
199
203
  ## Tokens and app-shell styles
200
204
 
201
205
  The layer loads `assets/css/tokens.css` and `assets/css/app-shell.css`.
@@ -235,8 +239,11 @@ import Loading from "@devopsplaybook.io/common-web/components/Loading.vue";
235
239
 
236
240
  ## Compatibility and release policy
237
241
 
238
- This release supports Nuxt `^4.0.0` and Pinia
239
- `^2.0.0 || ^3.0.0 || ^4.0.0`. Pinia 4 is ESM-only and requires the consuming
242
+ This release supports Nuxt `^4.0.0` and Vue `^3.5.0`; Nuxt provides Vue, so a
243
+ Nuxt 4 application already satisfies that peer. Pinia
244
+ `^2.0.0 || ^3.0.0 || ^4.0.0` is an optional peer: only
245
+ `stores/AuthenticationStore` needs it, so applications that do not use the
246
+ store do not have to install it. Pinia 4 is ESM-only and requires the consuming
240
247
  application to install its `@vue/devtools-api` peer dependency. Nuxt 3
241
248
  applications (including Telepathy) are not supported.
242
249
 
@@ -271,11 +278,14 @@ archive is what `npm test` runs against.
271
278
  ```sh
272
279
  npm ci
273
280
  npm run lint
281
+ npm run typecheck
274
282
  npm test
275
283
  npm run build
276
284
  npm run dev
277
285
  ```
278
286
 
279
- `npm test` packs the library and runs component and service tests against that
280
- archive. `npm run build` validates its contents and builds the playground.
287
+ `npm run typecheck` runs `nuxi typecheck` (`vue-tsc --noEmit`) over the layer,
288
+ the playground and the tests and fails on type errors. `npm test` packs the
289
+ library and runs component, service and SSR tests against that archive.
290
+ `npm run build` validates its contents and builds the playground.
281
291
  See [CONTRIBUTING.md](CONTRIBUTING.md) for contribution and release details.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devopsplaybook.io/common-web",
3
- "version": "0.8.1",
3
+ "version": "0.9.0",
4
4
  "description": "Shared Nuxt layer for DevOpsPlaybook web applications",
5
5
  "license": "ISC",
6
6
  "repository": {
@@ -40,19 +40,29 @@
40
40
  "scripts": {
41
41
  "dev": "nuxi dev playground",
42
42
  "lint": "oxlint components composables services stores tests scripts playground vitest.config.ts nuxt.config.ts",
43
+ "typecheck": "nuxi typecheck",
44
+ "pretest": "nuxi prepare",
43
45
  "test": "node scripts/test-packed.mjs",
46
+ "prebuild": "nuxi prepare",
44
47
  "build": "node scripts/build-package.mjs"
45
48
  },
46
49
  "peerDependencies": {
47
50
  "nuxt": "^4.0.0",
51
+ "vue": "^3.5.0",
48
52
  "pinia": "^2.0.0 || ^3.0.0 || ^4.0.0"
49
53
  },
54
+ "peerDependenciesMeta": {
55
+ "pinia": {
56
+ "optional": true
57
+ }
58
+ },
50
59
  "dependencies": {
51
60
  "axios": "^1.21.0",
52
61
  "jwt-decode": "^4.0.0",
53
62
  "mitt": "^3.0.1"
54
63
  },
55
64
  "devDependencies": {
65
+ "@types/node": "^22.20.5",
56
66
  "@vitejs/plugin-vue": "^6.0.10",
57
67
  "@vitest/coverage-v8": "^5.0.5",
58
68
  "@vue/test-utils": "^2.5.1",
@@ -61,7 +71,9 @@
61
71
  "nuxt": "^4.6.3",
62
72
  "oxlint": "^1.90.0",
63
73
  "pinia": "^4.1.0",
64
- "vitest": "^5.0.5"
74
+ "typescript": "^6.0.3",
75
+ "vitest": "^5.0.5",
76
+ "vue-tsc": "^3.3.14"
65
77
  },
66
78
  "publishConfig": {
67
79
  "access": "public"