From 9e91bafb9c2dfadd14560377374eaeb0f206e9d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leosvel=20P=C3=A9rez=20Espinosa?= Date: Wed, 8 Jun 2022 11:57:54 +0100 Subject: [PATCH] fix(angular): prevent deleting library's root package.json file on windows machines (#10635) --- .../update-14-2-0/update-libraries-secondary-entrypoints.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/angular/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.ts b/packages/angular/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.ts index 140e21d668ecf..22fbcb7346a6f 100644 --- a/packages/angular/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.ts +++ b/packages/angular/src/migrations/update-14-2-0/update-libraries-secondary-entrypoints.ts @@ -2,6 +2,7 @@ import { formatFiles, getProjects, joinPathFragments, + normalizePath, readJson, Tree, visitNotIgnoredFiles, @@ -30,7 +31,8 @@ export default async function (tree: Tree) { visitNotIgnoredFiles(tree, project.root, (filePath) => { if ( basename(filePath) !== 'package.json' || - filePath === joinPathFragments(project.root, 'package.json') + normalizePath(filePath) === + joinPathFragments(project.root, 'package.json') ) { return; }