fix(js): build to local dist and use nodenext#35538
Draft
FrozenPandaz wants to merge 2 commits intomasterfrom
Draft
fix(js): build to local dist and use nodenext#35538FrozenPandaz wants to merge 2 commits intomasterfrom
FrozenPandaz wants to merge 2 commits intomasterfrom
Conversation
✅ Deploy Preview for nx-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for nx-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
|
View your CI Pipeline Execution ↗ for commit 27b3380
☁️ Nx Cloud last updated this comment at |
d75d151 to
768eee1
Compare
Migrates @nx/workspace to the local-dist build pattern, matching nx and @nx/devkit. Required for the @nx/js migration in this PR to work end-to-end — without it, @nx/js publishes with an unresolvable @nx/workspace@0.0.1 dep and the local registry install in e2e fails. Also adds a preflight step to the dist-build-migration skill that warns about workspace:* deps on not-yet-migrated packages.
768eee1 to
27b3380
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current Behavior
@nx/jsbuilds to the shared workspace-rootdist/packages/js/directory, uses CommonJSmodule/moduleResolution, has noexportsmap, and relies on.npmignore-style filtering through assets.json copies. This makes the package layout diverge from the new pattern already adopted bynxand@nx/devkit.Expected Behavior
@nx/jsfollows the same local-dist build pattern asnxand@nx/devkit:packages/js/dist/instead ofdist/packages/js/.tsconfig.lib.jsonusesmodule/moduleResolution: "nodenext"withcomposite,rootDir: ".", anddeclarationDir: "dist".package.jsondeclares anexportsmap with the@nx/nx-sourcecondition (workspace consumers resolve to.tssource, published consumers get built.js), plus a./src/*wildcard so the ~296 existing internal imports of@nx/js/src/...keep working.typesVersionsadded for legacymoduleResolution: "node"consumers.filesfield onpackage.jsoninstead of asset-copying the root JSONs.generators.json,executors.json,migrations.jsonfactory/schema paths rewritten./src/...→./dist/src/...(matchesnx). Workspace dev still works via thetryResolveFromSourcefallback inpackages/nx/src/config/schema-utils.ts.README.md→readme-template.md; build command writes the rendered README topackages/js/README.md. Root.gitignorenow ignorespackages/js/README.mdandpackages/js/**/*.d.ts(with!packages/js/src/**/schema.d.tsexception for committed schema declarations).distand**/*.d.ts.project.jsonaddsrelease.versionconfig andnx-release-publish.packageRoot. Thebuildtarget keeps its existingdependsOn: ["build-base"](cannot use^buildbecause js'simplicitDependenciescreate a cycle througheslint/eslint-plugin).Related Issue(s)
Part of the ongoing migration of Nx packages to the local-dist build layout (following
nxand@nx/devkit).