Skip to content

feat: add preview:docs & preview:node scripts - #1082

Open
btea wants to merge 1 commit into
nodejs:mainfrom
btea:feat/add-preview-script
Open

feat: add preview:docs & preview:node scripts#1082
btea wants to merge 1 commit into
nodejs:mainfrom
btea:feat/add-preview-script

Conversation

@btea

@btea btea commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

Description

Add a unified startup preview script to facilitate quick previewing and verification of changes on the page after modifying the code logic.

Validation

Related Issues

Check List

  • I have read the Contributing Guidelines and made commit messages that follow the guideline.
  • I have run node --run test and all tests passed.
  • I have check code formatting with node --run format:check & node --run lint.
  • I've covered new added functionality with unit tests if necessary.

@btea
btea requested a review from a team as a code owner September 4, 2026 05:07
@vercel

vercel Bot commented Sep 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-docs-tooling Ready Ready Preview Sep 4, 2026 5:08am UTC

Request Review

@codecov

codecov Bot commented Sep 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 140 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.99%. Comparing base (da5d8e6) to head (410795f).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
scripts/preview.mjs 0.00% 140 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1082      +/-   ##
==========================================
- Coverage   90.57%   89.99%   -0.58%     
==========================================
  Files         217      218       +1     
  Lines       20755    20942     +187     
  Branches     1969     1974       +5     
==========================================
+ Hits        18799    18847      +48     
- Misses       1949     2088     +139     
  Partials        7        7              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor

api-links Generator

Output: 1 file differs

apilinks.json
Expected values to be strictly deep-equal:
+ actual - expected
... Skipped lines

  {
    'Agent.defaultMaxSockets': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L300',
    'Buffer.alloc': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L451',
    'Buffer.allocUnsafe': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L470',
    'Buffer.allocUnsafeSlow': 'https://github.com/{repository}/blob/HEAD/lib/buffer.js#L493',
...
    'agent.addRequest': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L365',
+   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L304',
-   'agent.createConnection': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L345',
    'agent.createSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L446',
    'agent.destroy': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L679',
+   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L334',
+   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L635',
-   'agent.getName': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L528',
-   'agent.keepSocketAlive': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L497',
    'agent.removeSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L574',
    'agent.reuseSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_agent.js#L671',
    'assert.assert': 'https://github.com/{repository}/blob/HEAD/lib/assert.js#L185',
    'asyncResource.asyncId': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L243',
    'asyncResource.bind': 'https://github.com/{repository}/blob/HEAD/lib/async_hooks.js#L275',
...
    'server.address': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2703',
+   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L681',
+   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L691',
+   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L703',
-   'server.close': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2836',
-   'server.closeAllConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L125',
-   'server.closeIdleConnections': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L127',
    'server.getConnections': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2798',
    'server.listen': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2500',
    'server.ref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2949',
+   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L719',
-   'server.setTimeout': 'https://github.com/{repository}/blob/HEAD/lib/https.js#L129',
    'server.unref': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2958',
+   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L687',
-   'server[SymbolAsyncDispose]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2876',
    'server[SymbolAsyncIterator]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2883',
    'server[kDeserialize]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2423',
    'server[kTransferList]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2396',
    'server[kTransfer]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2401',
+   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L726',
-   'server[undefined]': 'https://github.com/{repository}/blob/HEAD/lib/net.js#L2913',
    'serverresponse._finish': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L254',
    'serverresponse._implicitHeader': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L411',
    'serverresponse.assignSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L304',
    'serverresponse.detachSocket': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L315',
    'serverresponse.statusCode': 'https://github.com/{repository}/blob/HEAD/lib/_http_server.js#L277',

Performance estimate (single CI run)

  • Generation time: 50.5% slower (930.00 ms → 1.40 s)
  • Peak memory: 10.6% higher (370.80 MB → 410.15 MB)

legacy-html Generator

Performance estimate (single CI run)

  • Generation time: 2.7% faster (42.34 s → 41.19 s)
  • Peak memory: 0.1% lower (2.57 GB → 2.56 GB)

legacy-json Generator

Performance estimate (single CI run)

  • Generation time: 12.9% faster (22.24 s → 19.38 s)
  • Peak memory: 3.4% higher (1.89 GB → 1.95 GB)

llms-txt Generator

Performance estimate (single CI run)

  • Generation time: 0.2% faster (20.41 s → 20.37 s)
  • Peak memory: 2.3% lower (1.92 GB → 1.88 GB)

orama-db Generator

Output size: 1 file changed · net +111.00 B

File size details
File Main PR Change
orama-db.json 9.34 MB 9.34 MB +111.00 B (+0.0%)

Performance estimate (single CI run)

  • Generation time: 45.7% slower (14.38 s → 20.95 s)
  • Peak memory: 5.4% lower (2.04 GB → 1.93 GB)

web Generator

Performance estimate (single CI run)

  • Generation time: 0.4% slower (128.17 s → 128.62 s)
  • Peak memory: 0.1% lower (5.41 GB → 5.40 GB)

Comment thread scripts/preview.mjs

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Out of curiosity, is this meant to facilitate local development? I think in the past we decided against such scripts. I do believe we could make instructions easier tho.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants