-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): handle file renames properly for affected (#15340)
- Loading branch information
1 parent
c9244d2
commit 7aac67c
Showing
2 changed files
with
20 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -180,8 +180,6 @@ describe('Nx Affected and Graph Tests', () => { | |
mylib = uniq('mylib'); | ||
const nxJson: NxJsonConfiguration = readJson('nx.json'); | ||
|
||
delete nxJson.implicitDependencies; | ||
|
||
updateFile('nx.json', JSON.stringify(nxJson)); | ||
runCommand(`git init`); | ||
runCommand(`git config user.email "[email protected]"`); | ||
|
@@ -266,6 +264,24 @@ describe('Nx Affected and Graph Tests', () => { | |
implicitDependencies: [], | ||
})); | ||
}); | ||
|
||
it('should handle file renames', () => { | ||
generateAll(); | ||
|
||
// Move file | ||
updateFile( | ||
`apps/${myapp2}/src/index.html`, | ||
readFile(`apps/${myapp}/src/index.html`) | ||
); | ||
removeFile(`apps/${myapp}/src/index.html`); | ||
|
||
const affectedProjects = runCLI( | ||
'print-affected --uncommitted --select projects' | ||
).split(', '); | ||
|
||
expect(affectedProjects).toContain(myapp); | ||
expect(affectedProjects).toContain(myapp2); | ||
}); | ||
}); | ||
|
||
describe('print-affected', () => { | ||
|
This file contains 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
7aac67c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
nx-dev – ./
nx-dev-git-master-nrwl.vercel.app
nx-five.vercel.app
nx-dev-nrwl.vercel.app
nx.dev