update patch 0003-fix_preinstall.mjs-to-avoid-removing-node_modules-dir.patch

File updated
No changes to the scripts we want to modify

- Simplify fileURLToPath usage in scripts
  https://gitlab.com/gitlab-org/gitlab/-/merge_requests/173402
  especially in commit 462273d2ba
  first contained in : v17.7.0-ee
This commit is contained in:
Kazunori Kimura 2025-01-19 17:57:48 +09:00 committed by Steven Achilles
parent b95972568a
commit 3cde3caf98

View File

@ -1,16 +1,15 @@
diff --git a/scripts/frontend/preinstall.mjs b/scripts/frontend/preinstall.mjs
index 09d980344eac..b1514e803b75 100644
index e86525cd20d2..f849c423f1b6 100644
--- a/scripts/frontend/preinstall.mjs
+++ b/scripts/frontend/preinstall.mjs
@@ -1,6 +1,6 @@
import { dirname, join } from 'node:path';
import { fileURLToPath } from 'node:url';
@@ -1,5 +1,5 @@
import { join } from 'node:path';
-import { readFile, rm } from 'node:fs/promises';
+import { readdir, readFile, rm, stat } from 'node:fs/promises';
const ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..');
const ROOT_PATH = join(import.meta.dirname, '..', '..');
const NODE_MODULES = join(ROOT_PATH, 'node_modules');
@@ -55,5 +55,14 @@ if (!arraysHaveSameItems(prevTopLevelPatterns, currentTopLevelPatterns)) {
@@ -54,5 +54,14 @@ if (!arraysHaveSameItems(prevTopLevelPatterns, currentTopLevelPatterns)) {
console.error(
'[WARNING] package.json changed significantly. Removing node_modules to be sure there are no problems.',
);