Skip to content

Commit

Permalink
Remove Lerna, add Turborepo
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-konshin committed Feb 7, 2023
1 parent 33c05a9 commit c604117
Show file tree
Hide file tree
Showing 8 changed files with 272 additions and 3,891 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/publish.yml
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'

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

- run: yarn publish:release ${TAG} --yes
- run: yarn publish:release
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && !contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: yarn publish:release ${TAG} --yes --dist-tag next
- run: yarn publish:release -- --tag next
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && contains(env.TAG, '-') }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
@@ -1,6 +1,7 @@
.idea
.next
.tscache
.turbo
.eslint
coverage
es6
Expand Down
5 changes: 4 additions & 1 deletion lerna.json
@@ -1,5 +1,8 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "1.0.0",
"useWorkspaces": true,
"npmClient": "yarn"
"npmClient": "yarn",
"tagVersionPrefix": "",
"verifyAccess": false
}
14 changes: 6 additions & 8 deletions package.json
Expand Up @@ -6,13 +6,11 @@
"scripts": {
"doc": "doctoc --maxlevel 3 --notitle README.md",
"prepare": "husky install",
"clean": "lerna run clean && lerna clean --yes && rimraf node_modules",
"start": "yarn build && yarn start:all",
"start:all": "lerna run start --parallel",
"build": "lerna run build --stream",
"test": "lerna run test --stream --concurrency=1",
"test:quick": "lerna run test:quick --stream --concurrency=1",
"publish:release": "lerna publish --tag-version-prefix=\"\" --force-publish=* --no-push --no-git-tag-version",
"clean": "turbo run clean",
"start": "turbo run start",
"build": "turbo run build --concurrency=1",
"test": "turbo run test --concurrency=1",
"publish:release": "turbo run publish:release --concurrency=1",
"prettier": "prettier --write --ignore-path=.eslintignore --loglevel=warn",
"lint": "eslint --cache --cache-location node_modules/.cache/eslint --fix",
"lint:all": "yarn lint . && yarn prettier .",
Expand All @@ -23,10 +21,10 @@
"eslint": "8.33.0",
"eslint-config-ringcentral-typescript": "7.0.3",
"husky": "7.0.4",
"lerna": "4.0.0",
"lint-staged": "11.1.2",
"prettier": "2.8.3",
"rimraf": "4.1.2",
"turbo": "^1.7.3",
"typescript": "4.5.5"
},
"workspaces": [
Expand Down
2 changes: 2 additions & 0 deletions packages/wrapper/.npmignore
@@ -1,8 +1,10 @@
.turbo
__snapshots__
coverage
*.spec.ts
*.spec.js
jest.config.js
next-env.d.ts
tests
tsconfig.json
tsconfig.es6.json
10 changes: 6 additions & 4 deletions packages/wrapper/package.json
@@ -1,6 +1,6 @@
{
"name": "next-redux-wrapper",
"version": "7.0.0",
"version": "1.0.0",
"description": "Redux wrapper for Next.js",
"main": "lib/index.js",
"module": "es6/index.js",
Expand All @@ -10,14 +10,15 @@
"main:src": "src/index.tsx",
"scripts": {
"test": "jest",
"test:quick": "yarn test",
"clean": "rimraf lib es6 types coverage",
"build": "concurrently 'yarn:build:tsc:*'",
"build:tsc:es5": "tsc",
"build:tsc:es6": "tsc --project tsconfig.es6.json",
"start": "concurrently 'yarn:start:tsc:*'",
"start:tsc:es5": "yarn build:tsc:es5 --watch --preserveWatchOutput",
"start:tsc:es6": "yarn build:tsc:es6 --watch --preserveWatchOutput"
"start:tsc:es6": "yarn build:tsc:es6 --watch --preserveWatchOutput",
"wait": "wait-on -v es6/index.js es6/index.d.ts lib/index.js lib/index.d.ts",
"publish:release": "yarn wait && npm version ${TAG} && npm publish"
},
"devDependencies": {
"@testing-library/react-hooks": "8.0.1",
Expand All @@ -39,7 +40,8 @@
"redux-promise-middleware": "6.1.2",
"rimraf": "3.0.2",
"ts-jest": "27.0.7",
"typescript": "4.9.5"
"typescript": "4.9.5",
"wait-on": "7.0.1"
},
"peerDependencies": {
"next": ">=9",
Expand Down
40 changes: 40 additions & 0 deletions turbo.json
@@ -0,0 +1,40 @@
{
"$schema": "https://turbo.build/schema.json",
"pipeline": {
"start": {
"cache": false,
"persistent": true,
"dependsOn": [
"build"
]
},
"build": {
"dependsOn": [
"^build"
],
"outputs": [
"packages/*/lib/**",
"packages/*/es6/**",
"packages/*/.next/**"
]
},
"test": {
"dependsOn": [
"build"
],
"cache": false
},
"clean": {
"dependsOn": [
"^clean"
],
"cache": false
},
"publish:release": {
"dependsOn": [
"build"
],
"cache": false
}
}
}

0 comments on commit c604117

Please sign in to comment.