-
Notifications
You must be signed in to change notification settings - Fork 26
feat: numerous bug fixes #601
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #601 +/- ##
==========================================
- Coverage 80.59% 80.54% -0.05%
==========================================
Files 126 126
Lines 12134 12148 +14
Branches 874 874
==========================================
+ Hits 9779 9785 +6
- Misses 2352 2360 +8
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates the web generator output and bundling configuration to align with recent @node-core/ui-components changes, improving heading anchors/ToC rendering and adding stability badge tooltips, while also adjusting the build pipeline to consume precompiled UI component assets.
Changes:
- Update Rolldown bundling config to use a
rolldownexport condition and suppress plugin timing logs. - Change generated heading markup to put
idon the heading element and add an.anchorlink for CSS-driven#indicators and improved scroll behavior. - Propagate heading
typemetadata for monospace ToC entries and add tooltip/ARIA attributes to stability badges in MetaBar; plus minor type/dependency cleanup.
Reviewed changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/generators/web/utils/bundle.mjs | Adjust Rolldown build options and export-condition resolution. |
| src/generators/web/ui/components/MetaBar/index.jsx | Add tooltip/ARIA support for stability badges via a small helper component. |
| src/generators/types.d.ts | Remove unused type import. |
| src/generators/jsx-ast/utils/buildContent.mjs | Change heading/anchor structure to support CSS-only # indicator and correct scroll targeting. |
| src/generators/jsx-ast/utils/buildBarProps.mjs | Add type to heading metadata for downstream ToC/MetaBar styling decisions. |
| package.json | Add @types/semver dev dependency. |
Files not reviewed (1)
- npm-shrinkwrap.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| createElement( | ||
| `h${depth}`, | ||
| { id: slug }, | ||
| createElement( | ||
| 'a', | ||
| { href: `#${slug}`, className: ['anchor'] }, | ||
| headingContent | ||
| ) | ||
| ), |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The heading anchor structure changed (id moved to the hN element and .anchor class added). Since buildContent.mjs already has unit tests, it would be good to add/extend a test to assert the generated HAST for a heading contains h{depth} with properties.id === slug and an a child with properties.href === #${slug}andproperties.classNameincludinganchor`, to prevent regressions in anchor behavior and styling.
| return { | ||
| depth: entry.heading.depth, | ||
| value: heading, | ||
| stability: parseInt(entry.stability?.children[0]?.data.index ?? 2), | ||
| slug: data.slug, | ||
| data: { id: data.slug }, | ||
| data: { id: data.slug, type: data.type }, | ||
| }; |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extractHeading() now adds data.type to the heading metadata to drive monospace styling in the ToC/MetaBar. Since buildBarProps.mjs has existing unit tests, consider adding an assertion in buildBarProps.test.mjs that buildMetaBarProps(...).headings[0].data.type is set when the input heading.data.type is present, so this new contract is covered.
| "@reporters/github": "^1.12.0", | ||
| "@types/mdast": "^4.0.4", | ||
| "@types/node": "^24.10.1", | ||
| "@types/semver": "^7.7.1", |
Copilot
AI
Feb 11, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
package.json adds a new dependency (@types/semver), but the repo also commits npm-shrinkwrap.json. If the shrinkwrap file isn’t updated in the same PR, npm ci/install steps will typically fail due to the lockfile being out of sync. Please regenerate/update npm-shrinkwrap.json to include this new package (and any transitive changes).
| "@types/semver": "^7.7.1", |
|
| File | Base | Head | Diff |
|---|---|---|---|
errors.js |
394.91 KB | 414.40 KB | +19.49 KB (+4.94%) |
fs.js |
1.33 MB | 1.33 MB | +10.04 KB (+0.74%) |
cli.js |
316.81 KB | 326.74 KB | +9.93 KB (+3.13%) |
deprecations.js |
298.93 KB | 307.33 KB | +8.40 KB (+2.81%) |
http.js |
736.86 KB | 745.17 KB | +8.31 KB (+1.13%) |
crypto.js |
1.24 MB | 1.24 MB | +7.58 KB (+0.60%) |
n-api.js |
718.60 KB | 725.76 KB | +7.16 KB (+1.00%) |
quic.js |
213.24 KB | 220.39 KB | +7.16 KB (+3.36%) |
errors.html |
449.48 KB | 456.39 KB | +6.90 KB (+1.54%) |
cli.html |
491.96 KB | 497.80 KB | +5.85 KB (+1.19%) |
process.js |
745.31 KB | 751.12 KB | +5.81 KB (+0.78%) |
buffer.js |
1.13 MB | 1.14 MB | +5.70 KB (+0.49%) |
test.js |
877.65 KB | 883.24 KB | +5.60 KB (+0.64%) |
util.js |
795.73 KB | 800.95 KB | +5.22 KB (+0.66%) |
webcrypto.js |
460.15 KB | 465.35 KB | +5.20 KB (+1.13%) |
perf_hooks.js |
401.99 KB | 407.02 KB | +5.03 KB (+1.25%) |
net.js |
317.58 KB | 322.23 KB | +4.65 KB (+1.47%) |
http2.js |
855.06 KB | 859.35 KB | +4.30 KB (+0.50%) |
fs.html |
1.26 MB | 1.27 MB | +4.27 KB (+0.33%) |
globals.js |
135.40 KB | 139.54 KB | +4.13 KB (+3.05%) |
stream.js |
908.74 KB | 912.67 KB | +3.93 KB (+0.43%) |
tls.js |
346.66 KB | 350.22 KB | +3.56 KB (+1.03%) |
n-api.html |
819.12 KB | 822.41 KB | +3.29 KB (+0.40%) |
zlib.js |
331.93 KB | 335.12 KB | +3.19 KB (+0.96%) |
worker_threads.js |
419.45 KB | 422.63 KB | +3.18 KB (+0.76%) |
http.html |
697.97 KB | 701.05 KB | +3.08 KB (+0.44%) |
events.js |
575.78 KB | 578.74 KB | +2.96 KB (+0.51%) |
process.html |
643.55 KB | 646.38 KB | +2.84 KB (+0.44%) |
webcrypto.html |
511.27 KB | 514.00 KB | +2.72 KB (+0.53%) |
v8.js |
353.56 KB | 356.22 KB | +2.67 KB (+0.75%) |
webstreams.js |
319.24 KB | 321.84 KB | +2.60 KB (+0.82%) |
crypto.html |
972.52 KB | 975.12 KB | +2.60 KB (+0.27%) |
deprecations.html |
503.65 KB | 506.18 KB | +2.54 KB (+0.50%) |
dns.js |
290.89 KB | 293.39 KB | +2.50 KB (+0.86%) |
sqlite.js |
239.83 KB | 242.21 KB | +2.38 KB (+0.99%) |
http2.html |
722.49 KB | 724.83 KB | +2.34 KB (+0.32%) |
quic.html |
345.34 KB | 347.68 KB | +2.34 KB (+0.68%) |
buffer.html |
844.88 KB | 847.05 KB | +2.16 KB (+0.26%) |
vm.js |
379.42 KB | 381.56 KB | +2.14 KB (+0.56%) |
url.js |
354.23 KB | 356.27 KB | +2.04 KB (+0.57%) |
globals.html |
222.32 KB | 224.32 KB | +2.00 KB (+0.90%) |
stream.html |
813.73 KB | 815.72 KB | +1.99 KB (+0.24%) |
test.html |
675.99 KB | 677.98 KB | +1.99 KB (+0.29%) |
child_process.js |
489.15 KB | 491.10 KB | +1.95 KB (+0.40%) |
util.html |
649.99 KB | 651.90 KB | +1.91 KB (+0.29%) |
readline.js |
237.93 KB | 239.83 KB | +1.91 KB (+0.80%) |
esm.js |
138.68 KB | 140.40 KB | +1.72 KB (+1.24%) |
module.js |
351.39 KB | 353.11 KB | +1.72 KB (+0.49%) |
dgram.js |
183.96 KB | 185.67 KB | +1.71 KB (+0.93%) |
zlib.html |
273.22 KB | 274.90 KB | +1.69 KB (+0.62%) |
modules.js |
157.39 KB | 159.04 KB | +1.66 KB (+1.05%) |
inspector.js |
131.56 KB | 133.21 KB | +1.66 KB (+1.26%) |
cluster.js |
206.04 KB | 207.65 KB | +1.61 KB (+0.78%) |
diagnostics_channel.js |
252.55 KB | 254.15 KB | +1.60 KB (+0.63%) |
net.html |
345.25 KB | 346.79 KB | +1.55 KB (+0.45%) |
perf_hooks.html |
360.73 KB | 362.24 KB | +1.51 KB (+0.42%) |
os.js |
115.03 KB | 116.42 KB | +1.40 KB (+1.22%) |
webstreams.html |
331.76 KB | 333.13 KB | +1.37 KB (+0.41%) |
assert.js |
468.33 KB | 469.67 KB | +1.34 KB (+0.29%) |
timers.js |
106.96 KB | 108.22 KB | +1.27 KB (+1.18%) |
url.html |
330.92 KB | 332.18 KB | +1.26 KB (+0.38%) |
console.js |
113.96 KB | 115.18 KB | +1.22 KB (+1.07%) |
module.html |
308.74 KB | 309.95 KB | +1.22 KB (+0.39%) |
packages.js |
126.04 KB | 127.21 KB | +1.17 KB (+0.93%) |
repl.js |
215.42 KB | 216.54 KB | +1.12 KB (+0.52%) |
async_context.js |
193.69 KB | 194.79 KB | +1.10 KB (+0.57%) |
events.html |
431.62 KB | 432.70 KB | +1.08 KB (+0.25%) |
worker_threads.html |
348.86 KB | 349.93 KB | +1.07 KB (+0.31%) |
diagnostics_channel.html |
214.61 KB | 215.66 KB | +1.05 KB (+0.49%) |
https.js |
165.99 KB | 167.03 KB | +1.04 KB (+0.62%) |
vm.html |
327.39 KB | 328.42 KB | +1.03 KB (+0.31%) |
tls.html |
347.47 KB | 348.48 KB | +1.02 KB (+0.29%) |
async_hooks.js |
201.38 KB | 202.38 KB | +1.00 KB (+0.50%) |
v8.html |
299.58 KB | 300.53 KB | +975.00 B (+0.32%) |
single-executable-applications.js |
83.03 KB | 83.98 KB | +971.00 B (+1.14%) |
esm.html |
153.12 KB | 154.07 KB | +968.00 B (+0.62%) |
tty.js |
53.37 KB | 54.29 KB | +942.00 B (+1.72%) |
path.js |
105.24 KB | 106.08 KB | +854.00 B (+0.79%) |
inspector.html |
163.86 KB | 164.69 KB | +846.00 B (+0.50%) |
domain.js |
92.62 KB | 93.34 KB | +730.00 B (+0.77%) |
dns.html |
278.79 KB | 279.49 KB | +715.00 B (+0.25%) |
addons.js |
300.12 KB | 300.81 KB | +707.00 B (+0.23%) |
sqlite.html |
235.62 KB | 236.31 KB | +702.00 B (+0.29%) |
modules.html |
176.11 KB | 176.76 KB | +665.00 B (+0.37%) |
assert.html |
321.08 KB | 321.70 KB | +638.00 B (+0.19%) |
readline.html |
237.22 KB | 237.85 KB | +637.00 B (+0.26%) |
child_process.html |
360.64 KB | 361.22 KB | +598.00 B (+0.16%) |
cluster.html |
187.94 KB | 188.52 KB | +595.00 B (+0.31%) |
timers.html |
122.66 KB | 123.22 KB | +574.00 B (+0.46%) |
async_context.html |
157.04 KB | 157.56 KB | +534.00 B (+0.33%) |
dgram.html |
181.46 KB | 181.96 KB | +520.00 B (+0.28%) |
repl.html |
177.25 KB | 177.71 KB | +473.00 B (+0.26%) |
typescript.js |
25.59 KB | 26.05 KB | +473.00 B (+1.81%) |
packages.html |
154.20 KB | 154.66 KB | +464.00 B (+0.29%) |
debugger.js |
30.81 KB | 31.23 KB | +430.00 B (+1.36%) |
punycode.js |
29.93 KB | 30.34 KB | +427.00 B (+1.39%) |
os.html |
133.88 KB | 134.29 KB | +416.00 B (+0.30%) |
wasi.js |
44.54 KB | 44.94 KB | +413.00 B (+0.91%) |
environment_variables.js |
15.00 KB | 15.40 KB | +404.00 B (+2.63%) |
tracing.js |
78.86 KB | 79.23 KB | +385.00 B (+0.48%) |
async_hooks.html |
155.31 KB | 155.67 KB | +364.00 B (+0.23%) |
report.js |
188.55 KB | 188.89 KB | +353.00 B (+0.18%) |
console.html |
138.53 KB | 138.87 KB | +351.00 B (+0.25%) |
querystring.js |
32.80 KB | 33.11 KB | +325.00 B (+0.97%) |
single-executable-applications.html |
105.18 KB | 105.49 KB | +325.00 B (+0.30%) |
intl.js |
36.87 KB | 37.18 KB | +320.00 B (+0.85%) |
https.html |
143.24 KB | 143.53 KB | +299.00 B (+0.20%) |
permissions.js |
28.37 KB | 28.62 KB | +262.00 B (+0.90%) |
tty.html |
87.54 KB | 87.79 KB | +260.00 B (+0.29%) |
documentation.js |
9.47 KB | 9.72 KB | +258.00 B (+2.66%) |
path.html |
131.86 KB | 132.09 KB | +234.00 B (+0.17%) |
string_decoder.js |
32.25 KB | 32.47 KB | +225.00 B (+0.68%) |
addons.html |
264.92 KB | 265.13 KB | +221.00 B (+0.08%) |
domain.html |
101.47 KB | 101.67 KB | +208.00 B (+0.20%) |
embedding.js |
37.18 KB | 37.34 KB | +172.00 B (+0.45%) |
environment_variables.html |
43.78 KB | 43.93 KB | +156.00 B (+0.35%) |
report.html |
175.85 KB | 175.99 KB | +143.00 B (+0.08%) |
tracing.html |
82.99 KB | 83.13 KB | +143.00 B (+0.17%) |
typescript.html |
54.00 KB | 54.14 KB | +143.00 B (+0.26%) |
debugger.html |
53.59 KB | 53.72 KB | +130.00 B (+0.24%) |
permissions.html |
56.45 KB | 56.58 KB | +130.00 B (+0.22%) |
synopsis.js |
15.67 KB | 15.80 KB | +129.00 B (+0.80%) |
punycode.html |
61.17 KB | 61.28 KB | +117.00 B (+0.19%) |
wasi.html |
67.29 KB | 67.40 KB | +117.00 B (+0.17%) |
intl.html |
59.58 KB | 59.69 KB | +104.00 B (+0.17%) |
querystring.html |
60.91 KB | 60.99 KB | +91.00 B (+0.15%) |
documentation.html |
37.08 KB | 37.16 KB | +78.00 B (+0.21%) |
styles.css |
125.95 KB | 125.88 KB | -67.00 B (-0.05%) |
string_decoder.html |
53.45 KB | 53.51 KB | +65.00 B (+0.12%) |
embedding.html |
58.53 KB | 58.58 KB | +52.00 B (+0.09%) |
synopsis.html |
42.55 KB | 42.58 KB | +39.00 B (+0.09%) |
index.js |
9.48 KB | 9.51 KB | +25.00 B (+0.26%) |
index.html |
35.19 KB | 35.21 KB | +16.00 B (+0.04%) |
Description
This PR implements design improvements and infrastructure changes for the web generator, addressing feedback tracked in #596.
Depends on nodejs/nodejs.org#8618 (Build will fail before this PR gets merged)
Summary of Changes
1. Resolve
@node-core/ui-componentscompiled dist via Rolldown conditionAdded
conditionNames: ['rolldown']to the Rolldown resolve configuration inbundle.mjs. This makes Rolldown resolve from thedist/directory of@node-core/ui-componentsvia the new"rolldown"export condition, consuming pre-compiled JS and CSS instead of raw Tailwind source files.Also disabled
pluginTimingschecks for cleaner build output.2. Heading anchor structure for
#indicatorChanged the heading generation in
buildContent.mjsfrom:to:
This enables the CSS-only
#anchor indicator added in@node-core/ui-components(.anchor::after { content: '#' }) and properscroll-margin-topbehavior on headings.3. Heading type data for monospace ToC entries
Added the
typefield to heading data inbuildBarProps.mjsso that theMetaBarandTableOfContentscomponents can apply monospace font (IBM Plex Mono) to code-like headings (methods, constructors, class methods, functions).4. Stability badge tooltips in MetaBar
Added tooltip text to stability badges in the MetaBar heading list. The
HeadingValuecomponent now passesdata-tooltip(e.g. "Deprecated", "Experimental", "Legacy") andaria-labeltoBadge, leveraging the new CSS-only tooltip support added in@node-core/ui-components.5. Type cleanup
ApiDocReleaseEntryimport fromtypes.d.ts@types/semverdev dependencyRefs: #596
Refs: nodejs/node#52343