Skip to content

Commit fd17151

Browse files
authored
Move to core monorepo to pnpm (#810)
1 parent 92befb5 commit fd17151

File tree

21 files changed

+8998
-9706
lines changed

21 files changed

+8998
-9706
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ module.exports = {
66
rootDir: ["docs/", "create-turbo/"],
77
},
88
},
9+
rules: {
10+
"@next/next/no-html-link-for-pages": "off",
11+
},
912
};

.github/workflows/ci-go.yml

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -27,22 +27,27 @@ jobs:
2727
go-version: 1.17.6
2828
id: go
2929

30+
- uses: pnpm/action-setup@v2.0.1
31+
with:
32+
version: 6.32.2
33+
3034
- name: Setup Node.js environment
3135
uses: actions/setup-node@v2
3236
with:
33-
cache: yarn
34-
cache-dependency-path: yarn.lock
3537
node-version: 16
38+
cache: pnpm
39+
40+
- name: Install dependencies
41+
run: pnpm install
3642

3743
- name: Build & Unit Test
38-
run: yarn turbo run test --scope=cli
44+
run: pnpm turbo run test --scope=cli
3945

4046
- name: Lint
41-
run: yarn turbo run lint --scope=cli
47+
run: pnpm turbo run lint --scope=cli
4248

4349
- name: E2E Tests
4450
run: |
45-
npm install -g pnpm
4651
cd cli && make e2e
4752
4853
- name: Benchmark and Smoke Tests
@@ -68,12 +73,15 @@ jobs:
6873
go-version: 1.17.6
6974
id: wingo
7075

76+
- uses: pnpm/action-setup@v2.0.1
77+
with:
78+
version: 6.32.2
79+
7180
- name: Setup Node.js environment
7281
uses: actions/setup-node@v2
7382
with:
74-
cache: yarn
75-
cache-dependency-path: yarn.lock
7683
node-version: 16
84+
cache: pnpm
7785

7886
- name: go test
7987
run: cd cli && go test ./cmd/... ./internal/...
@@ -85,9 +93,7 @@ jobs:
8593
run: cd cli && go build ./cmd/turbo/...
8694

8795
- name: E2E Tests
88-
run: |
89-
npm install -g pnpm
90-
cd cli && make e2e
96+
run: cd cli && make e2e
9197

9298
- name: Benchmark and Smoke Tests
9399
run: cd cli && make bench/turbo
@@ -125,14 +131,15 @@ jobs:
125131
go-version: 1.17.6
126132
id: go
127133

134+
- uses: pnpm/action-setup@v2.0.1
135+
with:
136+
version: 6.32.2
137+
128138
- name: Setup Node.js environment
129139
uses: actions/setup-node@v2
130140
with:
131-
cache: yarn
132-
cache-dependency-path: yarn.lock
133141
node-version: 16
134-
135-
- run: npm i -g pnpm
142+
cache: pnpm
136143

137144
- name: Check examples
138145
shell: bash

.github/workflows/large-monorepo.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Large Repo Benchmark
22

3-
on:
3+
on:
44
schedule:
5-
- cron: '0 0 * * *'
5+
- cron: "0 0 * * *"
66

77
jobs:
88
build:
@@ -25,17 +25,24 @@ jobs:
2525
go-version: 1.17.6
2626
id: go
2727

28-
- name: Build
29-
run: cd cli && make turbo
28+
- uses: pnpm/action-setup@v2.0.1
29+
with:
30+
version: 6.32.2
3031

3132
- name: Setup Node.js environment
3233
uses: actions/setup-node@v2
34+
with:
35+
node-version: 16
36+
cache: pnpm
37+
38+
- name: Build
39+
run: cd cli && make turbo
3340

3441
- name: Install dependencies
35-
run: cd benchmark && yarn
42+
run: pnpm install --filter=benchmark
3643

3744
- name: Run benchmarks
38-
run: cd benchmark && yarn benchmark
45+
run: cd benchmark && pnpm benchmark
3946

4047
- name: Store Benchmark Result
4148
uses: benchmark-action/github-action-benchmark@v1

benchmark/yarn.lock

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

cli/Makefile

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ turbo: cmd/turbo/version.go cmd/turbo/*.go internal/*/*.go go.mod
1414
# These tests are for development
1515
test: test-go vet-go
1616

17-
18-
19-
ewatch: | scripts/node_modules
17+
ewatch: scripts/...
2018
nodemon --exec "make turbo && make e2e" -e .ts,.go
2119

2220
check-go-version:
@@ -37,14 +35,11 @@ vet-go:
3735
fmt-go:
3836
go fmt ./cmd/... ./internal/...
3937

40-
scripts/node_modules:
41-
cd scripts && yarn
42-
43-
scripts: | scripts/node_modules
44-
cd scripts && yarn install
38+
install: | ./package.json
39+
pnpm i --filter=cli...
4540

46-
e2e: | scripts/node_modules
47-
cd scripts && yarn uvu -r esbuild-register e2e
41+
e2e: install
42+
pnpm e2e
4843

4944
cmd/turbo/version.go: version.txt
5045
# Update this atomically to avoid issues with this being overwritten during use
@@ -235,16 +230,16 @@ publish-create-turbo: platform-create-turbo
235230
publish-turbo-codemod: platform-turbo-codemod
236231
cd ../packages/turbo-codemod && npm publish --tag $(TURBO_TAG)
237232

238-
demo/lage: | scripts/node_modules
233+
demo/lage: | node_modules
239234
node scripts/generate.mjs lage
240235

241-
demo/lerna: | scripts/node_modules
236+
demo/lerna: | node_modules
242237
node scripts/generate.mjs lerna
243238

244-
demo/nx: | scripts/node_modules
239+
demo/nx: | node_modules
245240
node scripts/generate.mjs nx
246241

247-
demo/turbo: | scripts/node_modules
242+
demo/turbo: | node_modules
248243
node scripts/generate.mjs turbo
249244

250245
bench/lerna: demo/lerna

cli/package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,28 @@
66
"clean": "make clean",
77
"build": "cross-env CGO_ENABLED=0 go build ./cmd/turbo",
88
"test": "go test -race ./internal/...",
9+
"e2e": "node -r esbuild-register scripts/e2e/e2e.ts",
10+
"watch": "watchlist e2e -- pnpm test",
911
"publish": "make publish-all",
1012
"format": "go fmt ./cmd/... ./internal/...",
1113
"lint": "go vet ./cmd/... ./internal/..."
1214
},
1315
"devDependencies": {
14-
"cross-env": "^7.0.3"
16+
"cross-env": "^7.0.3",
17+
"copy-template-dir": "^1.4.0",
18+
"esbuild": "^0.8.54",
19+
"esbuild-register": "^2.5.0",
20+
"execa": "^5.0.0",
21+
"expect": "^26.6.2",
22+
"faker": "^5.1.0",
23+
"find-up": "^5.0.0",
24+
"fs-extra": "^9.1.0",
25+
"globby": "11.1.0",
26+
"ngraph.generators": "^19.3.0",
27+
"parse-package-name": "^0.1.0",
28+
"shelljs": "^0.8.4",
29+
"tempy": "^1.0.0",
30+
"uvu": "^0.5.3",
31+
"watchlist": "^0.2.3"
1532
}
1633
}

cli/scripts/package.json

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

0 commit comments

Comments
 (0)