Skip to content

Commit e586cb7

Browse files
Remove Lerna, add Turborepo
1 parent 33c05a9 commit e586cb7

File tree

8 files changed

+272
-3891
lines changed

8 files changed

+272
-3891
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
- uses: actions/setup-node@v3
1919
with:
2020
node-version: '16.x'
21+
registry-url: 'https://registry.npmjs.org'
2122

2223
- id: yarn-cache-dir-path
2324
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
@@ -52,12 +53,12 @@ jobs:
5253
5354
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
5455

55-
- run: yarn publish:release ${TAG} --yes
56+
- run: yarn publish:release
5657
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
5758
env:
5859
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5960

60-
- run: yarn publish:release ${TAG} --yes --dist-tag next
61+
- run: yarn publish:release -- --tag next
6162
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
6263
env:
6364
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
.idea
22
.next
33
.tscache
4+
.turbo
45
.eslint
56
coverage
67
es6

lerna.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
2+
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
23
"version": "1.0.0",
34
"useWorkspaces": true,
4-
"npmClient": "yarn"
5+
"npmClient": "yarn",
6+
"tagVersionPrefix": "",
7+
"verifyAccess": false
58
}

package.json

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,11 @@
66
"scripts": {
77
"doc": "doctoc --maxlevel 3 --notitle README.md",
88
"prepare": "husky install",
9-
"clean": "lerna run clean && lerna clean --yes && rimraf node_modules",
10-
"start": "yarn build && yarn start:all",
11-
"start:all": "lerna run start --parallel",
12-
"build": "lerna run build --stream",
13-
"test": "lerna run test --stream --concurrency=1",
14-
"test:quick": "lerna run test:quick --stream --concurrency=1",
15-
"publish:release": "lerna publish --tag-version-prefix=\"\" --force-publish=* --no-push --no-git-tag-version",
9+
"clean": "turbo run clean",
10+
"start": "turbo run start",
11+
"build": "turbo run build --concurrency=1",
12+
"test": "turbo run test --concurrency=1",
13+
"publish:release": "turbo run publish:release --concurrency=1",
1614
"prettier": "prettier --write --ignore-path=.eslintignore --loglevel=warn",
1715
"lint": "eslint --cache --cache-location node_modules/.cache/eslint --fix",
1816
"lint:all": "yarn lint . && yarn prettier .",
@@ -23,10 +21,10 @@
2321
"eslint": "8.33.0",
2422
"eslint-config-ringcentral-typescript": "7.0.3",
2523
"husky": "7.0.4",
26-
"lerna": "4.0.0",
2724
"lint-staged": "11.1.2",
2825
"prettier": "2.8.3",
2926
"rimraf": "4.1.2",
27+
"turbo": "^1.7.3",
3028
"typescript": "4.5.5"
3129
},
3230
"workspaces": [

packages/wrapper/.npmignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
.turbo
12
__snapshots__
23
coverage
34
*.spec.ts
45
*.spec.js
56
jest.config.js
7+
next-env.d.ts
68
tests
79
tsconfig.json
810
tsconfig.es6.json

packages/wrapper/package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "next-redux-wrapper",
3-
"version": "7.0.0",
3+
"version": "8.0.0-rc.1",
44
"description": "Redux wrapper for Next.js",
55
"main": "lib/index.js",
66
"module": "es6/index.js",
@@ -10,14 +10,15 @@
1010
"main:src": "src/index.tsx",
1111
"scripts": {
1212
"test": "jest",
13-
"test:quick": "yarn test",
1413
"clean": "rimraf lib es6 types coverage",
1514
"build": "concurrently 'yarn:build:tsc:*'",
1615
"build:tsc:es5": "tsc",
1716
"build:tsc:es6": "tsc --project tsconfig.es6.json",
1817
"start": "concurrently 'yarn:start:tsc:*'",
1918
"start:tsc:es5": "yarn build:tsc:es5 --watch --preserveWatchOutput",
20-
"start:tsc:es6": "yarn build:tsc:es6 --watch --preserveWatchOutput"
19+
"start:tsc:es6": "yarn build:tsc:es6 --watch --preserveWatchOutput",
20+
"wait": "wait-on -v es6/index.js es6/index.d.ts lib/index.js lib/index.d.ts",
21+
"publish:release": "yarn wait && npm version ${TAG} && npm publish"
2122
},
2223
"devDependencies": {
2324
"@testing-library/react-hooks": "8.0.1",
@@ -39,7 +40,8 @@
3940
"redux-promise-middleware": "6.1.2",
4041
"rimraf": "3.0.2",
4142
"ts-jest": "27.0.7",
42-
"typescript": "4.9.5"
43+
"typescript": "4.9.5",
44+
"wait-on": "7.0.1"
4345
},
4446
"peerDependencies": {
4547
"next": ">=9",

turbo.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"$schema": "https://turbo.build/schema.json",
3+
"pipeline": {
4+
"start": {
5+
"cache": false,
6+
"persistent": true,
7+
"dependsOn": [
8+
"build"
9+
]
10+
},
11+
"build": {
12+
"dependsOn": [
13+
"^build"
14+
],
15+
"outputs": [
16+
"packages/*/lib/**",
17+
"packages/*/es6/**",
18+
"packages/*/.next/**"
19+
]
20+
},
21+
"test": {
22+
"dependsOn": [
23+
"build"
24+
],
25+
"cache": false
26+
},
27+
"clean": {
28+
"dependsOn": [
29+
"^clean"
30+
],
31+
"cache": false
32+
},
33+
"publish:release": {
34+
"dependsOn": [
35+
"build"
36+
],
37+
"cache": false
38+
}
39+
}
40+
}

0 commit comments

Comments
 (0)