Skip to content

Conversation

@matejchalk
Copy link
Collaborator

This PR fixes a slightly annoying local development problem.

The models:generate-docs target is being run automatically for each models:build, which is fairly frequent because other tasks often depend on build (e.g. e2e-test, or recently lint). This itself is fine, but because the Markdown generated by zod2md is 100% the same as how Prettier would format it, you often end up having a local change to models-reference.md. It disappears once you commit, because our pre-commit hook formats files with prettier, which effectively reverts the file changes. So it's not a big deal, but it still happens often enough to be a nuisance.

diff --git a/packages/models/docs/models-reference.md b/packages/models/docs/models-reference.md
index 0782c525..9013123d 100644
--- a/packages/models/docs/models-reference.md
+++ b/packages/models/docs/models-reference.md
@@ -308,7 +308,7 @@ _Enum, one of the following possible values:_
 
 ## GlobPath
 
-Schema for a glob pattern (supports wildcards like \*, \*\*, {}, !, etc.)
+Schema for a glob pattern (supports wildcards like *, **, {}, !, etc.)
 
 _String which has a minimum length of 1 and matches the regular expression `/^!?[^<>"|]+$/`._
 
@@ -1316,7 +1316,7 @@ _Object record with dynamic keys:_
 
 - _keys of type_ `string`
 - _values of type_ `unknown`
-  (_optional_)
+ (_optional_)
 
 ## PluginMeta
 
@@ -1364,7 +1364,7 @@ _Union of the following possible types:_
 
 - `number` (_≥0, ≤1_) (_optional_)
 - _Object with dynamic keys of type_ `string` _and values of type_ `number` (_≥0, ≤1_)
-  (_optional_)
+ (_optional_)
 
 ## Report
 

I've tweaked the generate-docs target to run prettier immediately after zod2md, so there are no intermediate file changes anymore. 😌

@nx-cloud
Copy link

nx-cloud bot commented Sep 25, 2025

View your CI Pipeline Execution ↗ for commit 796e9d9

Command Status Duration Result
nx code-pushup --nx-bail -- compare ✅ Succeeded 49s View ↗
nx code-pushup --nx-bail -- ✅ Succeeded 58s View ↗
nx code-pushup --nx-bail -- print-config --outp... ✅ Succeeded 3m 38s View ↗

☁️ Nx Cloud last updated this comment at 2025-09-25 17:01:00 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 25, 2025

Open in StackBlitz

@code-pushup/ci

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/ci@1123

@code-pushup/cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/cli@1123

@code-pushup/core

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/core@1123

@code-pushup/create-cli

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/create-cli@1123

@code-pushup/models

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models@1123

@code-pushup/nx-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/nx-plugin@1123

@code-pushup/coverage-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/coverage-plugin@1123

@code-pushup/eslint-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/eslint-plugin@1123

@code-pushup/js-packages-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/js-packages-plugin@1123

@code-pushup/jsdocs-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/jsdocs-plugin@1123

@code-pushup/lighthouse-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/lighthouse-plugin@1123

@code-pushup/typescript-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/typescript-plugin@1123

@code-pushup/utils

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/utils@1123

@code-pushup/models-transformers

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/models-transformers@1123

commit: 796e9d9

@github-actions
Copy link
Contributor

Code PushUp

😟 Code PushUp report has regressed – compared current commit 8f32f5e with previous commit 38b04e4.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 42 🔴 40 ↓ −1.7
Updates 🟡 85 🟡 84 ↓ −1.1
Code coverage 🟡 90 🟡 90 ↓ −0.1
Security 🟡 56 🟡 56
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟡 61 🟡 61
Type Safety 🟢 100 🟢 100
Bug prevention 🟢 100 🟢 100
Miscellaneous 🟢 100 🟢 100
Code style 🟢 100 🟢 100
Documentation 🔴 24 🔴 24
👎 3 groups regressed, 👎 5 audits regressed, 13 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Lighthouse Performance 🔴 42 🔴 40 ↓ −1.7
JS Packages NPM outdated dependencies 🟡 85 🟡 84 ↓ −1.1
Code coverage Code coverage metrics 🟡 90 🟡 90 ↓ −0.1

18 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
JS Packages Outdated NPM dev dependencies. 🟨 58 outdated package versions (22 major, 28 minor, 8 patch) 🟨 58 outdated package versions (27 major, 23 minor, 8 patch)  +0 %
Lighthouse Speed Index 🟥 5.9 s 🟥 6.2 s ↑ +5.3 %
Lighthouse Total Blocking Time 🟥 1,080 ms 🟥 1,220 ms ↑ +12.1 %
Lighthouse Max Potential First Input Delay 🟥 820 ms 🟥 940 ms ↑ +15.5 %
Code coverage Branch coverage 🟨 85.5 % 🟨 85.5 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,032 KiB 🟩 Total size was 2,037 KiB ↑ +0.2 %
Lighthouse JavaScript execution time 🟥 3.4 s 🟥 4.1 s ↑ +21.9 %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↓ −0.1 %
Lighthouse Minimizes main-thread work 🟥 9.3 s 🟥 9.7 s ↑ +4.6 %
Lighthouse Server Backend Latencies 🟩 1,740 ms 🟩 1,540 ms ↓ −11.8 %
Lighthouse Reduce unused CSS 🟥 Potential savings of 81 KiB 🟥 Potential savings of 102 KiB ↑ +53.3 %
Lighthouse Metrics 🟩 100% 🟩 100% ↑ +1.2 %
Lighthouse Time to Interactive 🟥 12.4 s 🟥 12.6 s ↑ +1.2 %
Lighthouse Largest Contentful Paint 🟥 10.9 s 🟥 11.0 s ↑ +0.8 %
Lighthouse Initial server response time was short 🟩 Root document took 520 ms 🟩 Root document took 510 ms ↓ −1.9 %
Lighthouse Avoids an excessive DOM size 🟥 2,265 elements 🟥 2,261 elements ↓ −0.2 %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 20 ms ↓ −16.3 %
Lighthouse First Contentful Paint 🟥 3.0 s 🟥 3.0 s ↑ +0.1 %

592 other audits are unchanged.

@matejchalk matejchalk merged commit b7ce5c6 into main Sep 26, 2025
20 of 21 checks passed
@matejchalk matejchalk deleted the format-generated-docs branch September 26, 2025 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants