Skip to content

Commit

Permalink
Move to core monorepo to pnpm (vercel#810)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaredpalmer authored Mar 2, 2022
1 parent 92befb5 commit fd17151
Show file tree
Hide file tree
Showing 21 changed files with 8,998 additions and 9,706 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ module.exports = {
rootDir: ["docs/", "create-turbo/"],
},
},
rules: {
"@next/next/no-html-link-for-pages": "off",
},
};
35 changes: 21 additions & 14 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,27 @@ jobs:
go-version: 1.17.6
id: go

- uses: pnpm/[email protected]
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
cache: yarn
cache-dependency-path: yarn.lock
node-version: 16
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Build & Unit Test
run: yarn turbo run test --scope=cli
run: pnpm turbo run test --scope=cli

- name: Lint
run: yarn turbo run lint --scope=cli
run: pnpm turbo run lint --scope=cli

- name: E2E Tests
run: |
npm install -g pnpm
cd cli && make e2e
- name: Benchmark and Smoke Tests
Expand All @@ -68,12 +73,15 @@ jobs:
go-version: 1.17.6
id: wingo

- uses: pnpm/[email protected]
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
cache: yarn
cache-dependency-path: yarn.lock
node-version: 16
cache: pnpm

- name: go test
run: cd cli && go test ./cmd/... ./internal/...
Expand All @@ -85,9 +93,7 @@ jobs:
run: cd cli && go build ./cmd/turbo/...

- name: E2E Tests
run: |
npm install -g pnpm
cd cli && make e2e
run: cd cli && make e2e

- name: Benchmark and Smoke Tests
run: cd cli && make bench/turbo
Expand Down Expand Up @@ -125,14 +131,15 @@ jobs:
go-version: 1.17.6
id: go

- uses: pnpm/[email protected]
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
cache: yarn
cache-dependency-path: yarn.lock
node-version: 16

- run: npm i -g pnpm
cache: pnpm

- name: Check examples
shell: bash
Expand Down
19 changes: 13 additions & 6 deletions .github/workflows/large-monorepo.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Large Repo Benchmark

on:
on:
schedule:
- cron: '0 0 * * *'
- cron: "0 0 * * *"

jobs:
build:
Expand All @@ -25,17 +25,24 @@ jobs:
go-version: 1.17.6
id: go

- name: Build
run: cd cli && make turbo
- uses: pnpm/[email protected]
with:
version: 6.32.2

- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version: 16
cache: pnpm

- name: Build
run: cd cli && make turbo

- name: Install dependencies
run: cd benchmark && yarn
run: pnpm install --filter=benchmark

- name: Run benchmarks
run: cd benchmark && yarn benchmark
run: cd benchmark && pnpm benchmark

- name: Store Benchmark Result
uses: benchmark-action/github-action-benchmark@v1
Expand Down
156 changes: 0 additions & 156 deletions benchmark/yarn.lock

This file was deleted.

23 changes: 9 additions & 14 deletions cli/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ turbo: cmd/turbo/version.go cmd/turbo/*.go internal/*/*.go go.mod
# These tests are for development
test: test-go vet-go



ewatch: | scripts/node_modules
ewatch: scripts/...
nodemon --exec "make turbo && make e2e" -e .ts,.go

check-go-version:
Expand All @@ -37,14 +35,11 @@ vet-go:
fmt-go:
go fmt ./cmd/... ./internal/...

scripts/node_modules:
cd scripts && yarn

scripts: | scripts/node_modules
cd scripts && yarn install
install: | ./package.json
pnpm i --filter=cli...

e2e: | scripts/node_modules
cd scripts && yarn uvu -r esbuild-register e2e
e2e: install
pnpm e2e

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

demo/lage: | scripts/node_modules
demo/lage: | node_modules
node scripts/generate.mjs lage

demo/lerna: | scripts/node_modules
demo/lerna: | node_modules
node scripts/generate.mjs lerna

demo/nx: | scripts/node_modules
demo/nx: | node_modules
node scripts/generate.mjs nx

demo/turbo: | scripts/node_modules
demo/turbo: | node_modules
node scripts/generate.mjs turbo

bench/lerna: demo/lerna
Expand Down
19 changes: 18 additions & 1 deletion cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@
"clean": "make clean",
"build": "cross-env CGO_ENABLED=0 go build ./cmd/turbo",
"test": "go test -race ./internal/...",
"e2e": "node -r esbuild-register scripts/e2e/e2e.ts",
"watch": "watchlist e2e -- pnpm test",
"publish": "make publish-all",
"format": "go fmt ./cmd/... ./internal/...",
"lint": "go vet ./cmd/... ./internal/..."
},
"devDependencies": {
"cross-env": "^7.0.3"
"cross-env": "^7.0.3",
"copy-template-dir": "^1.4.0",
"esbuild": "^0.8.54",
"esbuild-register": "^2.5.0",
"execa": "^5.0.0",
"expect": "^26.6.2",
"faker": "^5.1.0",
"find-up": "^5.0.0",
"fs-extra": "^9.1.0",
"globby": "11.1.0",
"ngraph.generators": "^19.3.0",
"parse-package-name": "^0.1.0",
"shelljs": "^0.8.4",
"tempy": "^1.0.0",
"uvu": "^0.5.3",
"watchlist": "^0.2.3"
}
}
24 changes: 0 additions & 24 deletions cli/scripts/package.json

This file was deleted.

Loading

0 comments on commit fd17151

Please sign in to comment.