发布

  • chore(repo): finish migrating builds off the workspace-root dist (#35915)

    frostbyte_neo 发布于 2026-06-09 22:01:46 +00:00

    Current Behavior

    Following the local-dist migration (#35900), several projects were still
    writing build or typecheck output to the shared workspace-root dist/:

    • Five packages' spec configs@nx/angular-rspack,
      @nx/angular-rspack-compiler, @nx/dotnet, @nx/maven, and nx
      kept their tsconfig.spec.json outDir pointing at
      dist/packages/<name>/spec even though their lib output had been
      migrated to a local dist.
    • tools/workspace-plugin built to the shared
      dist/workspace-plugin (its conformance rules are loaded from the built
      output).
    • The graph client bundled to dist/apps/graph and emitted its
      typecheck declarations to dist/graph/client; the graph libs wrote
      spec/storybook typecheck output under dist/out-tsc.
    • nx-dev lib/spec tsconfigs pointed their outDir at
      dist/out-tsc/....

    Separately, astro-docs documentation generation resolved each plugin's
    schema.json from its built dist (the migrated
    generators.json/executors.json refs point at ./dist/src/...).
    Reading another project's build output tripped the task sandbox with
    undeclared dist/**/schema.json reads.

    Expected Behavior

    Each project builds to its own local directory, leaving the
    workspace-root dist/ alone:

    • The five spec configs now emit to local dist/spec.
    • tools/workspace-plugin builds to tools/workspace-plugin/dist; the
      seven conformance rule paths in nx.json are updated, and
      main/typings are repointed into dist so the @nx/js/typescript
      plugin still infers its build target.
    • The graph client bundles to graph/client/dist (the nx package's
      assets.json input is updated to match); its typecheck output goes to a
      local out-tsc so the emitted declarations stay out of the copied
      bundle dir. Graph lib spec/storybook output moves to local dist.
    • nx-dev lib/spec outputs move to local dist / dist/spec
      (preventative — these were vestigial as no target runs tsc on most
      nx-dev libs today).

    astro-docs now reads plugin schema.json from source (the verbatim
    copy), which also matches astro-docs:build's already-declared
    packages/*/src/.../schema.json inputs — removing the sandbox violation
    without weakening cache correctness.

    Validation: nx build workspace-plugin + nx conformance pass from the
    new path; the graph client builds and copies into
    packages/nx/dist/src/core/graph with no declaration leakage; nx build astro-docs is green (753 pages, no schema-resolution errors); affected
    graph and nx-dev typecheck/lint/test pass.

    Related Issue(s)

    Follow-up to #35900 (local-dist build migration). No separate issue.


    Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>

    下载附件