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
@meeroslav meeroslav requested review from Cammisuli and AgentEnder 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
@meeroslav meeroslav force-pushed the fix-create-package-json-non-prod branch from 64618b0 to 6596799 Compare July 5, 2023 09:36
@meeroslav meeroslav enabled auto-merge (squash) July 5, 2023 12:57
packages/nx/src/devkit-exports.ts Outdated Show resolved Hide resolved
docs/generated/devkit/nx_devkit.md Outdated Show resolved Hide resolved
@meeroslav meeroslav removed the request for review from a team July 5, 2023 14:56
@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