Breaking changes in `nx print-affected` when moving from 14.1.9 to 14.2.2
See original GitHub issueCurrent Behavior
We use nx print-affected
and pipe it to a JSON file. We then use that to implement linting around our local package dependencies.
In 14.2.2 a the affected json file might look like:
{
"tasks": [],
"projects": [],
"projectGraph": {
"nodes": [
"myApp",
"myLib",
],
"dependencies": {
"myApp": [
{
"source": "myApp",
"target": "npm:axios",
"type": "static"
},
]
// …
}
Expected Behavior
{
"tasks": [],
"projects": [],
"projectGraph": {
"nodes": [
"myApp",
"myLib",
],
"dependencies": {
"myApp": [
{
"source": "myApp",
"target": "myLib", // THIS IS MISSING IN 14.2.2
"type": "static"
},
{
"source": "myApp",
"target": "npm:axios",
"type": "static"
},
]
// …
}
Notice the key difference – that a local dependency on myLib is no longer exposed in the print-affected project graph.
Steps to Reproduce
- make a project using nx <= 14.1.9
- make the project have at least 1 application target that depends on at least 1 local library target
- examine the output of
nx print-affected
- notice that the dependency on the local library targets are documented via a
"target"
line that does not includenpm:
- upgrade to nx 14.2.2 & compare the output of
nx print-affected
- Notice that the local dependencies are no longer described in the
projectGraph::dependencies
node
Failure Logs
No failure logs present – just undocumented breaking changes
Environment
> NX Report complete - copy this into the issue template
Node : 16.12.0
OS : darwin x64
yarn : 1.22.17
nx : 14.2.2
@nrwl/angular : Not Found
@nrwl/cypress : 14.2.2
@nrwl/detox : Not Found
@nrwl/devkit : 14.2.2
@nrwl/eslint-plugin-nx : 14.2.2
@nrwl/express : 14.2.2
@nrwl/jest : 14.2.2
@nrwl/js : 14.2.2
@nrwl/linter : 14.2.2
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : 14.2.2
@nrwl/nx-cloud : 14.0.8
@nrwl/nx-plugin : 14.2.2
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : Not Found
@nrwl/web : 14.2.2
@nrwl/workspace : 14.2.2
typescript : 4.7.3
---------------------------------------
Community plugins:
✨ Done in 0.72s.
Issue Analytics
- State:
- Created a year ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Serena PVCS Version Manager Release Notes - Micro Focus
This file lists the defects fixed, enhancements made, and behaviors changed in each release of Version Manager. For information on installing and using...
Read more >Debugging with gdb - GCC for Renesas
the gdb commands set environment and unset environment to change parts of the environment that affect your program. See Section 4.4 [Your Program's....
Read more >APEX Calculus
sensitive to changes in the radius or the height? 14. Projectile Motion: The x-value of an object moving under the principles of projectile....
Read more >ECMAScript® 2021 Language Specification - TC39
ECMAScript usage has moved beyond simple scripting and it is now used for the full spectrum of programming tasks in many different environments...
Read more >Objective Grid User's Guide - Documentation
6.1 How Objective Grid Affects the Size of Your Application 155 ... 20.2 Adding Page Break and Scaled Printing Support 428.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
nx migrate latest --from 14.1.9
would recreate a migrations json with thoseThanks for the help @AgentEnder! Closing the ticket.
Idea: documentation on the recommended way to integrate
nx migrate
with dependabot would have helped us avoid this mistake (unclear how it happened still, if it was a manual error or a bug somewhere).