@networkpro/web 1.12.5 → 1.12.6

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
@@ -22,6 +22,52 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
22
22
 
23
23
  ---
24
24
 
25
+ ## [1.12.6] - 2025-06-09
26
+
27
+ ### Added
28
+
29
+ - Enabled non-blocking Lighthouse CI budget assertions to track performance/resource regressions without blocking the build.
30
+ - Added GitHub Actions step to annotate PRs with budget-related audit failures and post a markdown summary comment.
31
+ - Introduced a dedicated `Authenticate GitHub CLI` step in the Lighthouse workflow to ensure proper auth for comment posting.
32
+ - Added `/legal`, `/legal/`, and `/legal/*` redirects to Netlify `_redirects` file, pointing to `/license`.
33
+ - Added `/privacy-policy/` and `/privacy-policy/*` redirects to match existing `/privacy-policy` route.
34
+ - Created `scripts/openReport.js`, a cross-platform Node.js utility for opening HTML coverage reports for client and server test runs. Executed via `coverage:client` and `coverage:server` scripts in `package.json`.
35
+ - Added `coverage:client`, `coverage:server`, and `coverage:open` scripts to `package.json` to simplify access to generated test coverage reports from the CLI.
36
+
37
+ ### Changed
38
+
39
+ - Bumped patch version to `v1.12.6`.
40
+ - Updated Lighthouse CI workflow to upload the entire `.lighthouseci/` directory as a single artifact instead of renaming individual files.
41
+ - Updated ESLint config (`eslint.config.mjs`) to ignore `**/playwright-report/**` and `**/test-results/**`.
42
+ - Updated `lint:md` script in `package.json` to exclude `playwright-report/` and `test-results/` from markdownlint.
43
+ - Added `playwright-report/` and `test-results/` to `.stylelintignore` to suppress stylelint noise on generated reports.
44
+ - Upgraded `@lhci/cli` from `v0.14.0` to `v0.15.0`.
45
+ - Upgraded `@vitest/coverage-v8` from `v3.2.2` to `v3.2.3`.
46
+ - Upgraded `posthog-js` from `v1.249.4` to `v1.249.5`.
47
+ - Upgraded `vitest` from `v3.2.2` to `v3.2.3`.
48
+
49
+ ### Fixed
50
+
51
+ - Updated Lighthouse CI annotation step to explicitly select only valid Lighthouse report files (e.g., `*.report.json`, `lhr-*.json`) and ignore `assertion-results.json`, which caused `jq` parsing errors during CI runs.
52
+ - Scoped Lighthouse assertions in `.lighthouserc.cjs` to `resource-summary` only, preventing unwanted failures from default performance audits.
53
+ - Resolved malformed PR comment formatting in the Lighthouse GitHub Actions workflow by replacing Markdown tables with plain-text bullet lists.
54
+
55
+ ### Docs
56
+
57
+ - Updated `README.md` with improved context and phrasing around the CHANGELOG reference.
58
+ - Added `CHANGELOG.md` to the documented project structure with a descriptive label:
59
+
60
+ ```markdown
61
+ ├── CHANGELOG.md # Chronological record of notable project changes
62
+ ```
63
+
64
+ ### Misc
65
+
66
+ - Confirmed that `Authenticate GitHub CLI` is not needed in `build-and-publish.yml`, as only the `check-codeql` job uses the GitHub CLI and is already authenticated.
67
+ - Verified that `scripts/openReport.js` does not require unit testing, as it performs side-effect-only CLI actions. Linting and manual testing are sufficient.
68
+
69
+ ---
70
+
25
71
  ## [1.12.5] - 2025-06-08
26
72
 
27
73
  ### Added
@@ -135,7 +181,8 @@ This project attempts to follow [Keep a Changelog](https://keepachangelog.com/en
135
181
 
136
182
  <!-- Link references -->
137
183
 
138
- [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.12.5...HEAD
184
+ [Unreleased]: https://github.com/netwk-pro/netwk-pro.github.io/compare/v1.12.6...HEAD
185
+ [1.12.6]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.12.6
139
186
  [1.12.5]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.12.5
140
187
  [1.12.4]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.12.4
141
188
  [1.12.3]: https://github.com/netwk-pro/netwk-pro.github.io/releases/tag/v1.12.3
package/README.md CHANGED
@@ -51,10 +51,14 @@ All infrastructure and data flows are designed with **maximum transparency, self
51
51
 
52
52
  ## 📝 Changelog
53
53
 
54
- For a history of changes to the Network Pro Web Presence, see the [CHANGELOG](https://github.com/netwk-pro/netwk-pro.github.io/blob/master/CHANGELOG.md).
54
+ For a history of changes to the Network Pro&trade; Web Presence, see the **[CHANGELOG](https://github.com/netwk-pro/netwk-pro.github.io/blob/master/CHANGELOG.md)**. All notable updates are documented there.
55
+
56
+ This project follows the principles of [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), though formatting and versioning may occasionally vary.
55
57
 
56
58
  </section>
57
59
 
60
+ ---
61
+
58
62
  <section id="structure">
59
63
 
60
64
  ## 📁 Repository Structure
@@ -93,6 +97,7 @@ For a history of changes to the Network Pro Web Presence, see the [CHANGELOG](ht
93
97
  │ │ └── auditCoverage.test.js # Warns about untested source modules
94
98
  │ └── unit/ # Vitest unit tests
95
99
  ├── _redirects # Netlify redirect rules
100
+ ├── CHANGELOG.md # Chronological record of notable project changes
96
101
  ├── netlify.toml # Netlify configuration
97
102
  ├── package.json # Project manifest (scripts, deps, etc.)
98
103
  └── ...
package/_redirects CHANGED
@@ -1,5 +1,15 @@
1
- https://www.netwk.pro/* https://netwk.pro/:splat 301
2
- /privacy-policy /privacy 301
1
+ # Redirect all www.netwk.pro traffic to bare domain
2
+ https://www.netwk.pro/* https://netwk.pro/:splat 301
3
3
 
4
- # New redirect for Netlify function proxy
5
- /api/* /.netlify/functions/:splat 200
4
+ # Redirect /privacy-policy (and variants) to /privacy
5
+ /privacy-policy /privacy 301
6
+ /privacy-policy/ /privacy 301
7
+ /privacy-policy/* /privacy/:splat 301
8
+
9
+ # Redirect /legal (and variants) to /license
10
+ /legal /license 301
11
+ /legal/ /license 301
12
+ /legal/* /license/:splat 301
13
+
14
+ # Redirect for Netlify function proxy
15
+ /api/* /.netlify/functions/:splat 200
package/eslint.config.mjs CHANGED
@@ -41,7 +41,9 @@ export default [
41
41
  "**/build/**", // Distribution files
42
42
  "package.json", // NPM package manifest
43
43
  "package-lock.json", // NPM lockfile
44
+ "**/playwright-report/**", // Playwright report files
44
45
  "node_modules/", // Node.js dependencies
46
+ "**/test-results/**", // Test results
45
47
  ".vite/", // Vite-specific cache directory
46
48
  "*.lock", // Lock files
47
49
  ".env*", // Environment files
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@networkpro/web",
3
3
  "private": false,
4
- "version": "1.12.5",
4
+ "version": "1.12.6",
5
5
  "description": "Locking Down Networks, Unlocking Confidence™ | Security, Networking, Privacy — Network Pro Strategies",
6
6
  "keywords": [
7
7
  "advisory",
@@ -60,11 +60,14 @@
60
60
  "test:watch": "vitest --config vitest.config.client.js --watch",
61
61
  "test:coverage": "npm run test:client -- --run --coverage && npm run test:server -- --run --coverage",
62
62
  "test:e2e": "npx playwright test --retries=1",
63
+ "coverage:client": "node scripts/openReport.js client",
64
+ "coverage:server": "node scripts/openReport.js server",
65
+ "coverage:open": "npm run coverage:client && npm run coverage:server",
63
66
  "lint": "eslint . --ext .mjs,.js,.svelte",
64
67
  "lint:fix": "eslint . --ext .mjs,.js,.svelte --fix",
65
68
  "lint:jsdoc": "eslint . --ext .js,.mjs,.svelte --max-warnings=0",
66
69
  "lint:css": "stylelint \"**/*.{css,svelte}\" --ignore-path .stylelintignore",
67
- "lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#build/**\" \"#.netlify/**\"",
70
+ "lint:md": "npx markdownlint-cli2 \"**/*.{md,markdown}\" \"#node_modules/**\" \"#build/**\" \"#.netlify/**\" \"#playwright-report/**\" \"#test-results/**\"",
68
71
  "lint:all": "npm run lint && npm run lint:md && npm run lint:css && npm run format",
69
72
  "format": "prettier --check .",
70
73
  "format:fix": "prettier --write .",
@@ -77,21 +80,21 @@
77
80
  },
78
81
  "dependencies": {
79
82
  "dompurify": "^3.2.6",
80
- "posthog-js": "^1.249.4",
83
+ "posthog-js": "^1.249.5",
81
84
  "semver": "^7.7.2",
82
85
  "svelte": "5.33.18"
83
86
  },
84
87
  "devDependencies": {
85
88
  "@eslint/compat": "^1.2.9",
86
89
  "@eslint/js": "^9.28.0",
87
- "@lhci/cli": "^0.14.0",
90
+ "@lhci/cli": "^0.15.0",
88
91
  "@playwright/test": "^1.52.0",
89
92
  "@sveltejs/adapter-netlify": "^5.0.2",
90
93
  "@sveltejs/kit": "2.21.3",
91
94
  "@sveltejs/vite-plugin-svelte": "5.1.0",
92
95
  "@testing-library/jest-dom": "^6.6.3",
93
96
  "@testing-library/svelte": "^5.2.8",
94
- "@vitest/coverage-v8": "^3.2.2",
97
+ "@vitest/coverage-v8": "^3.2.3",
95
98
  "autoprefixer": "^10.4.21",
96
99
  "browserslist": "^4.25.0",
97
100
  "eslint": "^9.28.0",
@@ -119,7 +122,7 @@
119
122
  "vite": "^6.3.5",
120
123
  "vite-plugin-lightningcss": "^0.0.5",
121
124
  "vite-tsconfig-paths": "^5.1.4",
122
- "vitest": "^3.2.2"
125
+ "vitest": "^3.2.3"
123
126
  },
124
127
  "overrides": {
125
128
  "@sveltejs/kit": {
@@ -0,0 +1,65 @@
1
+ /* ==========================================================================
2
+ scripts/openReport.js
3
+
4
+ Copyright © 2025 Network Pro Strategies (Network Pro™)
5
+ SPDX-License-Identifier: CC-BY-4.0 OR GPL-3.0-or-later
6
+ This file is part of Network Pro.
7
+ ========================================================================== */
8
+
9
+ /**
10
+ * @file openReport.js
11
+ * @description Opens the HTML code coverage report for a specified target (client or server).
12
+ * Handles platform-specific commands to launch the report in the default browser.
13
+ *
14
+ * @module scripts/
15
+ * @author SunDevil311
16
+ * @updated 2025-06-09
17
+ */
18
+
19
+ import { exec } from "child_process";
20
+ import { dirname, join } from "path";
21
+ import { fileURLToPath } from "url";
22
+
23
+ // ESM replacement for __dirname
24
+ const __dirname = dirname(fileURLToPath(import.meta.url));
25
+
26
+ // Read the CLI argument: "client" or "server"
27
+ const target = process.argv[2];
28
+
29
+ if (!target) {
30
+ console.error("❌ Please specify 'client' or 'server'");
31
+ process.exit(1);
32
+ }
33
+
34
+ // Resolve the full path to the HTML report
35
+ const filePath = join(__dirname, `../reports/${target}/coverage/index.html`);
36
+
37
+ /**
38
+ * Platform-specific shell commands to open the report in the default browser.
39
+ * - Windows: uses `start`
40
+ * - macOS: uses `open`
41
+ * - Linux: uses `xdg-open`
42
+ */
43
+ const open = {
44
+ win32: `start "" "${filePath}"`,
45
+ darwin: `open "${filePath}"`,
46
+ linux: `xdg-open "${filePath}"`,
47
+ };
48
+
49
+ const platform = process.platform;
50
+ const command = open[platform];
51
+
52
+ if (!command) {
53
+ console.error(`❌ Unsupported platform: ${platform}`);
54
+ process.exit(1);
55
+ }
56
+
57
+ // Execute the shell command to open the report
58
+ exec(command, (err) => {
59
+ if (err) {
60
+ console.error(`❌ Failed to open coverage report: ${err.message}`);
61
+ process.exit(1);
62
+ } else {
63
+ console.log(`✅ Opened coverage report for "${target}"`);
64
+ }
65
+ });