Skip to content

Commit 3719e83

Browse files
committed
refactor: remove manual symlink scripts, rely on pnpm workspace linking
- Remove symlink and postinstall scripts from root package.json - Remove symlink-workspace dependency from all package.json files - Replace lerna commands with pnpm commands in templates - Delete scripts/symlink-workspace.js (no longer needed) - Update workspace templates to use pnpm native workspace commands pnpm automatically handles workspace package linking via workspace:^ protocol, so manual symlink scripts are unnecessary.
1 parent a78ee06 commit 3719e83

5 files changed

Lines changed: 10 additions & 91 deletions

File tree

boilerplates/workspace/package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,10 @@
1515
"packages/*"
1616
],
1717
"scripts": {
18-
"clean": "lerna run clean",
19-
"build": "lerna run build --stream",
20-
"build:dev": "lerna run build:dev --stream; pnpm run symlink",
21-
"lint": "lerna run lint --parallel",
22-
"symlink": "symlink-workspace --logLevel error",
23-
"postinstall": "pnpm run symlink"
18+
"clean": "pnpm -r run clean",
19+
"build": "pnpm -r run build",
20+
"build:dev": "pnpm -r run build:dev",
21+
"lint": "pnpm -r run lint"
2422
},
2523
"devDependencies": {
2624
"@types/jest": "^29.5.11",
@@ -37,7 +35,6 @@
3735
"prettier": "^3.0.2",
3836
"rimraf": "4.4.1",
3937
"strip-ansi": "^6",
40-
"symlink-workspace": "^1.9.0",
4138
"ts-jest": "^29.1.1",
4239
"ts-node": "^10.9.2",
4340
"typescript": "^5.1.6"

package.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
"scripts": {
2222
"clean": "pnpm -r run clean",
2323
"build": "pnpm -r run build",
24-
"build:dev": "pnpm -r run build:dev; pnpm run symlink",
25-
"lint": "pnpm -r run lint",
26-
"symlink": "node scripts/symlink-workspace.js",
27-
"postinstall": "pnpm run symlink"
24+
"build:dev": "pnpm -r run build:dev",
25+
"lint": "pnpm -r run lint"
2826
},
2927
"devDependencies": {
3028
"@types/jest": "^29.5.11",
@@ -44,7 +42,6 @@
4442
"prettier": "^3.0.2",
4543
"rimraf": "4.4.1",
4644
"strip-ansi": "^6",
47-
"symlink-workspace": "^1.9.0",
4845
"ts-jest": "^29.1.1",
4946
"ts-node": "^10.9.2",
5047
"typescript": "^5.1.6"

packages/templatizer/src/generated/workspace.ts

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,10 @@ export default [
4242
"packages/*"
4343
],
4444
"scripts": {
45-
"clean": "lerna run clean",
46-
"build": "lerna run build --stream",
47-
"build:dev": "lerna run build:dev --stream; pnpm run symlink",
48-
"lint": "lerna run lint --parallel",
49-
"symlink": "symlink-workspace --logLevel error",
50-
"postinstall": "pnpm run symlink"
45+
"clean": "pnpm -r run clean",
46+
"build": "pnpm -r run build",
47+
"build:dev": "pnpm -r run build:dev",
48+
"lint": "pnpm -r run lint"
5149
},
5250
"devDependencies": {
5351
"@types/jest": "^29.5.11",
@@ -64,7 +62,6 @@ export default [
6462
"prettier": "^3.0.2",
6563
"rimraf": "4.4.1",
6664
"strip-ansi": "^6",
67-
"symlink-workspace": "^1.9.0",
6865
"ts-jest": "^29.1.1",
6966
"ts-node": "^10.9.2",
7067
"typescript": "^5.1.6"

pnpm-lock.yaml

Lines changed: 0 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/symlink-workspace.js

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)