Skip to content
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

fix(js): ignore dependencies from non-index root files for create-package-json #17930

Merged
merged 4 commits into from
Jul 5, 2023

Conversation

meeroslav
Copy link
Contributor

@meeroslav meeroslav commented Jul 3, 2023

Current Behavior

The package json generation (and dependency checks linter rule) reads all the production files' dependencies, including files relevant only at the compile time - vite.config.ts, webpack.config.js etc. which includes dev packages in the resulting package.json

Expected Behavior

Only non-dev dependencies should be taken into account when constructing dependencies list if isProduction is set.

Related Issue(s)

Fixes #17905

@meeroslav meeroslav requested a review from a team as a code owner July 3, 2023 20:11
@meeroslav meeroslav self-assigned this Jul 3, 2023
@meeroslav meeroslav requested a review from a team as a code owner July 3, 2023 20:11
@vercel
Copy link

vercel bot commented Jul 3, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 5, 2023 2:56pm

@nx-cloud
Copy link

nx-cloud bot commented Jul 3, 2023

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1d65ee5. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@meeroslav meeroslav added scope: core core nx functionality scope: js scope: linter Issues related to Eslint support in Nx labels Jul 3, 2023
@meeroslav meeroslav changed the title fix(core): ignore dependencies from non-index root files for create-package-json fix(js): ignore dependencies from non-index root files for create-package-json Jul 3, 2023
packages/nx/src/devkit-exports.ts Outdated Show resolved Hide resolved
docs/generated/devkit/nx_devkit.md Outdated Show resolved Hide resolved
@meeroslav meeroslav merged commit 28a071f into nrwl:master Jul 5, 2023
15 checks passed
FrozenPandaz pushed a commit that referenced this pull request Jul 7, 2023
@github-actions
Copy link

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
scope: core core nx functionality scope: js scope: linter Issues related to Eslint support in Nx
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Builder helper files (vite.config.ts etc.) influence the package dependencies on create package json
4 participants