Skip to content

Commit 99a6413

Browse files
committed
fix: remove script added
1 parent d49b7c2 commit 99a6413

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"!**/.*"
2828
],
2929
"scripts": {
30-
"postinstall": "grep -v 'yarnPath: .yarn/releases/yarn-3.6.1.cjs' .yarnrc.yml > temp.yml && mv temp.yml .yarnrc.yml",
30+
"postinstall": "node scripts/remove-yarn-path.js",
3131
"check-licenses": "yarn licenses list --production --json | grep table | ./check-license.js",
3232
"lint": "eslint \"**/*.{js,ts,tsx}\"",
3333
"lint:affected": "nx affected --target=lint",

scripts/remove-yarn-path.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/**
2+
* Created by Michael Avoyan on 05/02/2025.
3+
*
4+
* Copyright 2022 Velocity Career Labs inc.
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
const fs = require("fs");
8+
const path = require("path");
9+
10+
const filePath = path.resolve(__dirname, "../.yarnrc.yml");
11+
12+
try {
13+
if (fs.existsSync(filePath)) {
14+
const content = fs.readFileSync(filePath, "utf8");
15+
const updatedContent = content
16+
.split("\n")
17+
.filter(line => !line.includes("yarnPath: .yarn/releases/yarn-3.6.1.cjs"))
18+
.join("\n");
19+
20+
fs.writeFileSync(filePath, updatedContent, "utf8");
21+
console.log("✅ Removed 'yarnPath' from .yarnrc.yml");
22+
}
23+
} catch (error) {
24+
console.error("❌ Error updating .yarnrc.yml:", error);
25+
}

0 commit comments

Comments
 (0)