Skip to content

Commit 3cde3ca

Browse files
kkimuraksachilles
authored andcommitted
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 https://gitlab.com/gitlab-org/gitlab/-/commit/462273d2ba17d2a506caf962830344798b1598cc first contained in : v17.7.0-ee
1 parent b959725 commit 3cde3ca

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

assets/build/patches/gitlabhq/0003-fix_preinstall.mjs-to-avoid-removing-node_modules_dir.patch

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,15 @@
11
diff --git a/scripts/frontend/preinstall.mjs b/scripts/frontend/preinstall.mjs
2-
index 09d980344eac..b1514e803b75 100644
2+
index e86525cd20d2..f849c423f1b6 100644
33
--- a/scripts/frontend/preinstall.mjs
44
+++ b/scripts/frontend/preinstall.mjs
5-
@@ -1,6 +1,6 @@
6-
import { dirname, join } from 'node:path';
7-
import { fileURLToPath } from 'node:url';
5+
@@ -1,5 +1,5 @@
6+
import { join } from 'node:path';
87
-import { readFile, rm } from 'node:fs/promises';
98
+import { readdir, readFile, rm, stat } from 'node:fs/promises';
109

11-
const ROOT_PATH = join(dirname(fileURLToPath(import.meta.url)), '..', '..');
10+
const ROOT_PATH = join(import.meta.dirname, '..', '..');
1211
const NODE_MODULES = join(ROOT_PATH, 'node_modules');
13-
@@ -55,5 +55,14 @@ if (!arraysHaveSameItems(prevTopLevelPatterns, currentTopLevelPatterns)) {
12+
@@ -54,5 +54,14 @@ if (!arraysHaveSameItems(prevTopLevelPatterns, currentTopLevelPatterns)) {
1413
console.error(
1514
'[WARNING] package.json changed significantly. Removing node_modules to be sure there are no problems.',
1615
);

0 commit comments

Comments
 (0)