Skip to content

Conversation

@BioPhoton
Copy link
Collaborator

@BioPhoton BioPhoton commented Dec 2, 2025

Followup of #1163

This PR includes:

  • create nx plugin under zod2md-jsdocs
  • logic to add target config if file matches zod2md.config.ts
  • plugin docs
  • remove old config
  • remove file reference from production inputs as changes in the config may impact build output

A potential followup PR could implement a nx plugin for our build target and add dependsOn settings automatically. This is also noted in a clean up issue.

Note

This is tooling code and it is not planned to get released

Related:
#1168

@github-actions github-actions bot added 📖 Project documentation improvements or additions to the project documentation 🛠️ tooling labels Dec 2, 2025
@nx-cloud
Copy link

nx-cloud bot commented Dec 2, 2025

View your CI Pipeline Execution ↗ for commit b2c3729

Command Status Duration Result
nx run-many --targets=code-pushup --parallel=fa... ❌ Failed 10m 1s View ↗
nx run-many -t unit-test,int-test ❌ Failed 1m 14s View ↗

☁️ Nx Cloud last updated this comment at 2025-12-15 13:57:42 UTC

@pkg-pr-new
Copy link

pkg-pr-new bot commented Dec 2, 2025

Open in StackBlitz

@code-pushup/ci

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

@code-pushup/cli

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

@code-pushup/core

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

@code-pushup/create-cli

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

@code-pushup/models

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

@code-pushup/nx-plugin

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

@code-pushup/axe-plugin

npm i https://pkg.pr.new/code-pushup/cli/@code-pushup/axe-plugin@1162

@code-pushup/coverage-plugin

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

@code-pushup/eslint-plugin

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

@code-pushup/js-packages-plugin

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

@code-pushup/jsdocs-plugin

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

@code-pushup/lighthouse-plugin

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

@code-pushup/typescript-plugin

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

@code-pushup/utils

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

commit: df99141

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Code PushUp

🤨 Code PushUp report has both improvements and regressions – compared current commit e2d4ebf with previous commit 7b82402.

🕵️ See full comparison in Code PushUp portal 🔍

🏷️ Categories

🏷️ Category ⭐ Previous score ⭐ Current score 🔄 Score change
Performance 🔴 29 🔴 40 ↑ +11.1
Axe Accessibility 🟢 96 🟡 88 ↓ −8.4
Bug prevention 🟡 67 🟡 66 ↓ −0.3
Code coverage 🟡 89 🟡 89 ↓ −0.1
Code style 🟢 99 🟢 99
Security 🔴 43 🔴 43
Updates 🟡 71 🟡 71
Type Safety 🟡 56 🟡 56
Miscellaneous 🟡 67 🟡 67
Documentation 🔴 35 🔴 35
Accessibility 🟢 92 🟢 92
Best Practices 🟢 100 🟢 100
SEO 🟢 92 🟢 92
👍 3 groups improved, 👎 7 groups regressed, 👍 7 audits improved, 👎 11 audits regressed, 40 audits changed without impacting score

🗃️ Groups

🔌 Plugin 🗃️ Group ⭐ Previous score ⭐ Current score 🔄 Score change
Axe Accessibility Color & Contrast 🟢 100 🟡 50 ↓ −50
Axe Accessibility Semantics 🟢 100 🟡 50 ↓ −50
Axe Accessibility Language 🟡 75 🟢 100 ↑ +25
Axe Accessibility Tables 🟢 100 🟡 75 ↓ −25
Axe Accessibility Names & Labels 🟢 100 🟡 80 ↓ −20
Axe Accessibility Structure 🟡 83 🟢 100 ↑ +16.7
Lighthouse Performance 🔴 29 🔴 40 ↑ +11.1
Axe Accessibility ARIA 🟢 100 🟢 95 ↓ −5.3
ESLint Problems 🟢 100 🟢 99 ↓ −1.3
Code coverage Code coverage metrics 🟡 89 🟡 89 ↓ −0.1

24 other groups are unchanged.

🛡️ Audits

🔌 Plugin 🛡️ Audit 📏 Previous value 📏 Current value 🔄 Value change
Axe Accessibility ARIA attributes must conform to valid values 🟩 0 elements 🟥 9 errors ↑ +∞ %
Axe Accessibility Images must have alternative text 🟩 0 elements 🟥 6 errors ↑ +∞ %
Axe Accessibility Links must have discernible text 🟩 0 elements 🟥 6 errors ↑ +∞ %
Axe Accessibility Elements must meet minimum color contrast ratio thresholds 🟩 2 elements 🟥 5 errors ↑ +150 %
Axe Accessibility Elements must have their visible text as part of their accessible name 🟩 0 elements 🟥 2 errors ↑ +∞ %
ESLint Disallow unused variables 🟩 passed 🟥 1 error ↑ +∞ %
ESLint Disallow duplicate module imports 🟩 passed 🟥 1 warning ↑ +∞ %
Axe Accessibility Table headers in a data table must refer to data cells 🟩 0 elements 🟥 1 error ↑ +∞ %
Axe Accessibility Documents must have <title> element to aid in navigation 🟥 1 error 🟩 1 element  +0 %
Axe Accessibility <html> element must have a lang attribute 🟥 1 error 🟩 1 element  +0 %
Axe Accessibility CSS Media queries must not lock display orientation 🟥 1 error 🟩 1 element  +0 %
Lighthouse First Contentful Paint 🟥 10.3 s 🟥 3.1 s ↓ −70 %
Lighthouse Speed Index 🟥 16.9 s 🟥 6.4 s ↓ −62.4 %
Lighthouse Time to Interactive 🟥 20.2 s 🟥 12.9 s ↓ −36.3 %
Lighthouse Total Blocking Time 🟥 1,580 ms 🟥 1,230 ms ↓ −22.5 %
Code coverage Line coverage 🟨 84.9 % 🟨 84.5 % ↓ −0.4 %
Code coverage Function coverage 🟩 90.6 % 🟩 90.5 % ↓ −0.1 %
Code coverage Branch coverage 🟨 87.1 % 🟨 87.1 % ↓ −0.1 %
Lighthouse Avoids enormous network payloads 🟩 Total size was 2,047 KiB 🟩 Total size was 2,059 KiB ↑ +0.6 %
Lighthouse Metrics 🟩 100% 🟩 100% ↓ −36.3 %
Lighthouse Server Backend Latencies 🟩 7,160 ms 🟩 1,670 ms ↓ −76.7 %
Lighthouse Minimizes main-thread work 🟥 13.4 s 🟥 8.2 s ↓ −39.2 %
Lighthouse Largest Contentful Paint 🟥 17.0 s 🟥 11.7 s ↓ −31 %
Lighthouse Initial server response time was short 🟥 Root document took 5,660 ms 🟥 Root document took 630 ms ↓ −88.9 %
Lighthouse JavaScript execution time 🟥 4.4 s 🟥 3.4 s ↓ −22.8 %
Lighthouse Max Potential First Input Delay 🟥 1,380 ms 🟥 1,010 ms ↓ −26.5 %
Axe Accessibility ARIA hidden element must not be focusable or contain focusable elements 🟩 0 elements 🟩 202 elements ↑ +∞ %
Lighthouse Reduce unused CSS 🟥 Potential savings of 94 KiB 🟥 Potential savings of 94 KiB ↓ −26.2 %
Lighthouse Reduce unused JavaScript 🟥 Potential savings of 187 KiB 🟥 Potential savings of 187 KiB ↑ +19.7 %
Lighthouse Remove duplicate modules in JavaScript bundles 🟥 Potential savings of 104 KiB 🟥 Potential savings of 104 KiB ↑ +50 %
Axe Accessibility Elements must only use supported ARIA attributes 🟩 0 elements 🟩 96 elements ↑ +∞ %
Axe Accessibility ARIA attributes must be used as specified for the element's role 🟩 0 elements 🟩 96 elements ↑ +∞ %
Axe Accessibility Elements must only use permitted ARIA attributes 🟩 0 elements 🟩 96 elements ↑ +∞ %
Axe Accessibility ARIA attributes must conform to valid names 🟩 0 elements 🟩 96 elements ↑ +∞ %
Lighthouse Uses efficient cache policy on static assets 🟨 30 resources found 🟨 30 resources found ↓ −0.1 %
Axe Accessibility <li> elements must be contained in a <ul> or <ol> 🟩 0 elements 🟩 65 elements ↑ +∞ %
Axe Accessibility Interactive controls must not be nested 🟩 0 elements 🟩 60 elements ↑ +∞ %
Axe Accessibility Inline text spacing must be adjustable with custom stylesheets 🟩 0 elements 🟩 41 elements ↑ +∞ %
Axe Accessibility IDs used in ARIA and labels must be unique 🟩 0 elements 🟩 29 elements ↑ +∞ %
Axe Accessibility Buttons must have discernible text 🟩 0 elements 🟩 14 elements ↑ +∞ %
Axe Accessibility <ul> and <ol> must only directly contain <li>, <script> or <template> elements 🟩 0 elements 🟩 13 elements ↑ +∞ %
Axe Accessibility Links must be distinguishable without relying on color 🟩 0 elements 🟩 7 elements ↑ +∞ %
Axe Accessibility Deprecated ARIA roles must not be used 🟩 0 elements 🟩 6 elements ↑ +∞ %
Axe Accessibility Required ARIA attributes must be provided 🟩 0 elements 🟩 6 elements ↑ +∞ %
Axe Accessibility ARIA roles used must conform to valid values 🟩 0 elements 🟩 6 elements ↑ +∞ %
Lighthouse Avoids an excessive DOM size 🟥 2,351 elements 🟥 2,356 elements ↑ +0.2 %
Axe Accessibility Data or header cells must not be used to give caption to a data table. 🟩 0 elements 🟩 4 elements ↑ +∞ %
Axe Accessibility Table cell headers attributes must refer to other <th> elements in the same table 🟩 0 elements 🟩 4 elements ↑ +∞ %
Axe Accessibility Styled <p> elements must not be used as headings 🟩 0 elements 🟩 2 elements ↑ +∞ %
Axe Accessibility Non-empty <td> elements in larger <table> must have an associated table header 🟩 0 elements 🟩 2 elements ↑ +∞ %
Lighthouse Network Round Trip Times 🟩 20 ms 🟩 20 ms ↑ +5.9 %
Axe Accessibility Certain ARIA roles must contain particular children 🟩 0 elements 🟩 1 element ↑ +∞ %
Axe Accessibility Page must have means to bypass repeated blocks 🟩 0 elements 🟩 1 element ↑ +∞ %
Axe Accessibility Form field must not have multiple label elements 🟩 0 elements 🟩 1 element ↑ +∞ %
Axe Accessibility <html> element must have a valid value for the lang attribute 🟩 0 elements 🟩 1 element ↑ +∞ %
Axe Accessibility Form elements must have labels 🟩 0 elements 🟩 1 element ↑ +∞ %
Axe Accessibility Zooming and scaling must not be disabled 🟩 0 elements 🟩 1 element ↑ +∞ %
Lighthouse Cumulative Layout Shift 🟩 0 🟩 0 ↓ −100 %

621 other audits are unchanged.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 2, 2025

Code PushUp

😐 Code PushUp report is unchanged – compared current commit c35dd16 with previous commit f74d2dd.


All of 14 projects are unchanged.

@BioPhoton BioPhoton marked this pull request as ready for review December 2, 2025 23:41
@BioPhoton BioPhoton requested a review from matejchalk December 2, 2025 23:41
BioPhoton and others added 7 commits December 3, 2025 16:20
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
BioPhoton added a commit that referenced this pull request Dec 5, 2025
This PR moves the transformer logic into tools and makes it configurable

Followup PR: #1162

---------

Co-authored-by: John Doe <john.doe@example.com>
Co-authored-by: Matěj Chalk <34691111+matejchalk@users.noreply.github.com>
@github-actions github-actions bot added the 🔬 testing writing tests label Dec 5, 2025
@BioPhoton BioPhoton requested a review from matejchalk December 5, 2025 16:45
@BioPhoton BioPhoton mentioned this pull request Dec 5, 2025
10 tasks
@BioPhoton BioPhoton enabled auto-merge (squash) December 10, 2025 12:41
Comment on lines 10 to 11
"generate-docs",
"ts-patch",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't the plugin add these dependencies? The whole idea is that each project creates a config file (zod2md.config.ts), and the Nx plugin (zod2md-jsdocs) takes care of everything else.

Also, I wouldn't place the ts-patch here. The previous setup was simpler, as there was a single tspatch (actually called pre-build before) target in zod2md-jsdocs, and it was a dependency of zod2md-jsdocs's build target. This way, there's only 1 target in 1 project. Which makes sense, because installing ts-patch isn't something that needs to run per project, our development dependencies are installed globally.

// nx.json
{
//...
"plugins": ["./tools/zod2md-jsdocs-nx-plugin/src/lib/plugin.js"],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path ./tools/zod2md-jsdocs-nx-plugin/src/lib/plugin.js is incorrect; it's actually ./tools/zod2md-jsdocs/dist/src (as used in nx.json). It appears several times in this document.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A plugin cant depend on a dist folder as it would need to build with Nx first (or have our build manually replicated in a post install script or so).
I adjusted the plugin format to .ts and referenced it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🧹 maintenance 📖 Project documentation improvements or additions to the project documentation 🔬 testing writing tests 🛠️ tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants