Skip to content

fix(app-tools-extensions): trace deploy output with @vercel/nft 1.x - #166

Merged
BleedingDev merged 3 commits into
main-ultramodernfrom
fix/um-sc-nft
Sep 27, 2026
Merged

BleedingDev merged 3 commits into
main-ultramodernfrom
fix/um-sc-nft

Conversation

@BleedingDev

@BleedingDev BleedingDev commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

web-infra-dev/nde#9 (ndepe: nft ^1.11.0)

Why the change

Deploy output was traced with ndepe's pinned @vercel/nft 0.29.2, so nft fixes only arrived through downstream patches, and dynamic home/tmp/system paths could make the trace glob the whole build host and run out of memory.

Special things to note

  • ndepe still installs nft 0.29.2 until fix(deps): upgrade @vercel/nft to 1.11.5 web-infra-dev/nde#9 ships; it is just no longer used for tracing.
  • The three preset edits are recorded as inline patches in FORK-DIVERGENCE.md (budgets raised with --record-growth); drop them once ndepe uses nft ^1.11.
  • Not run: a full real-app deploy, or Windows (the system-path ignore list is POSIX only).

Change outline

A new fork-owned tracer, plugged into ndepe's existing traceFiles hook:

 packages/solutions/
   app-tools-extensions/
+    src/deploy-output/trace-files.ts     traceDeployFiles() on @vercel/nft ^1.11.0
+    tests/deploy-output/trace-files.test.ts   host-path fixture, asserts nothing outside it is traced
~    package.json                          export ./deploy-output/trace-files, add nft dep
   app-tools/src/plugins/deploy/platforms/
~    node.ts | netlify.ts | vercel.ts      +traceFiles: traceDeployFiles (2 lines each)
~ packages/cli/plugin-bff-build-extensions/tests/...   trace via the same function
~ .github/renovate.json5                   stop ignoring @vercel/nft

How a deploy trace runs now:

 deploy preset (node | netlify | vercel)
   └─ ndepe.handleDependencies({ ..., 
-        /* internal nft 0.29.2 */
+        traceFiles: traceDeployFiles })
+          └─ nft 1.x nodeFileTrace(files, { base: '/', ignore })

The ignore predicate keeps nft from expanding build-host paths:

ignore(path):
  under /dev /etc /proc /run /sys /var/run      -> skip
  glob of the whole root, home or temp dir      -> skip
  concrete files inside home or temp            -> keep (package stores live there)

Without ignore, the new test crashes out of memory on fs.readFileSync(path.join(os.homedir(), name)).

Tests: app-tools-extensions tests/deploy-output, app-tools tests/deploy, and bff node-deploy-conditional-entries pass. tsgo --noEmit is clean and the divergence gate passes.

🤖 Generated with Claude Code

ndepe pins @vercel/nft to exactly 0.29.2, so deploy tracing could only
pick up nft fixes through downstream overrides or patches. Pass ndepe's
traceFiles hook an app-tools tracer that calls @vercel/nft ^1.11.0.

nft statically evaluates os.homedir(), os.tmpdir() and literal system
paths, so code like fs.readFileSync(path.join(os.homedir(), name)) turned
into a glob of the whole home directory; with base '/' the trace ran out
of memory. The tracer's ignore predicate skips paths under /dev, /etc,
/proc, /run, /sys and /var/run, and globs of the whole root, home or temp
directory. Files inside home and temp are still traced.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-27T16:43:18.856396Z 1d582e6 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ad128900cd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

UltraModern Debug and others added 2 commits September 27, 2026 18:33
Move the nft 1.x deploy tracer and its tests into the fork-owned
@modern-js/app-tools-extensions/deploy-output/trace-files entry, and keep
app-tools to passing it through ndepe's native traceFiles option. Record
the three preset lines as inline patches in the fork ledger.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@BleedingDev BleedingDev changed the title fix(app-tools): trace deploy output with @vercel/nft 1.x fix(app-tools-extensions): trace deploy output with @vercel/nft 1.x Sep 27, 2026
@github-actions

Copy link
Copy Markdown

Rsdoctor Bundle Diff Analysis

📊 Quick Summary
Project Total Size Change
bundle-diff 533.0 KB -
📋 Detailed Reports (Click to expand)

📁 bundle-diff

Path: benchmark/bundle-diff/dist/rsdoctor-data.json

⚠️ No baseline data found - Unable to perform comparison analysis

Metric Current Baseline Change
📊 Total Size 533.0 KB - -
📄 JavaScript 525.5 KB - -
🎨 CSS 1.2 KB - -
🌐 HTML 5.5 KB - -
📁 Other Assets 751.0 B - -

Generated by Rsdoctor GitHub Action

@BleedingDev
BleedingDev merged commit f0ddaa3 into main-ultramodern Sep 27, 2026
11 checks passed
@BleedingDev
BleedingDev deleted the fix/um-sc-nft branch September 27, 2026 17:50
BleedingDev added a commit to TechsioCZ/ontos that referenced this pull request Sep 28, 2026
…t 1.x

UltraModern 3.9.0-ultramodern.20 traces deploy output through its own
traceDeployFiles on @vercel/nft 1.11 (ultramodernjs/ultramodern.js#166),
which ignores build-host system roots and whole home/temp globs. The
patched 0.29.2 copy and the root devDependency that pinned it are no
longer on the trace path.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.

1 participant