Skip to content

Commit 8943fb3

Browse files
committed
chore: use lerna only for workspace calls
1 parent 0cbacf3 commit 8943fb3

File tree

10 files changed

+1488
-10611
lines changed

10 files changed

+1488
-10611
lines changed

.github/workflows/next-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Installation
3131
run: yarn --frozen-lockfile && yarn bootstrap-ci
3232
- name: Lint
33-
run: yarn workspaces run lint-fix
33+
run: yarn lerna-workspaces run lint-fix
3434
- name: Publish Next Release
3535
run: GITHUB_SHORT_SHA="$(git rev-parse --short $GITHUB_SHA)" yarn release-next
3636
env:

.github/workflows/rc-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Installation
3131
run: yarn --frozen-lockfile && yarn bootstrap-ci
3232
- name: Lint
33-
run: yarn workspaces run lint-fix
33+
run: yarn lerna-workspaces run lint-fix
3434
- name: Publish Release Candidate
3535
run: yarn release-rc
3636
env:

.github/workflows/release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
- name: Installation
2929
run: yarn --frozen-lockfile && yarn bootstrap-ci
3030
- name: Lint
31-
run: yarn workspaces run lint-fix
31+
run: yarn lerna-workspaces run lint-fix
3232
- name: Publish Release
3333
run: yarn release
3434
env:

dotgit/hooks/pre-commit-format.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
set -e
44

5-
if ! yarn workspaces run lint; then
6-
yarn workspaces run lint-fix
5+
if ! yarn lerna-workspaces run lint; then
6+
yarn lerna-workspaces run lint-fix
77
echo "some files were not formatted correctly (prettier/eslint) commit aborted!"
88
echo "your changes are still staged, you can accept formatting changes with git add or ignore them by adding --no-verify to git commit"
99
exit 1

examples/SampleApp/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"test": "jest",
1414
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
1515
"lint-fix": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
16-
"postinstall": "cp -r ./node_modules/@react-native-community/blur ../../node_modules && patch-package",
16+
"postinstall": "patch-package",
1717
"extract-changelog": "FILTER_PATH='examples/SampleApp' TAG_FORMAT=$npm_package_name'@${version}' node ../../release/extract-changelog.js",
1818
"bootstrap": "yarn install",
1919
"bootstrap-ci": "yarn install --frozen-lockfile",

examples/SampleApp/yarn.lock

+8-8
Original file line numberDiff line numberDiff line change
@@ -7091,14 +7091,10 @@ stream-buffers@~2.2.0:
70917091
resolved "https://registry.yarnpkg.com/stream-buffers/-/stream-buffers-2.2.0.tgz#91d5f5130d1cef96dcfa7f726945188741d09ee4"
70927092
integrity sha1-kdX1Ew0c75bc+n9yaUUYh0HQnuQ=
70937093

7094-
"stream-chat-react-native-core@link:../../package":
7095-
version "0.0.0"
7096-
uid ""
7097-
7098-
7099-
version "3.6.0"
7100-
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-3.6.0.tgz#f14dc837d9eb9b0a04bb3492e0d03ca43ac0ead9"
7101-
integrity sha512-9XnKSloJIc2+SoGaePIAHpFh0K7PTEN78tjiQGOf4ChGCjTWamLVcKGe9uhXR93DI7mvCl4aVjGf3ZUvjfOiuA==
7094+
7095+
version "3.6.4"
7096+
resolved "https://registry.yarnpkg.com/stream-chat-react-native-core/-/stream-chat-react-native-core-3.6.4.tgz#dd846d9995ee1f7171abc152acd2c76b9ff76965"
7097+
integrity sha512-0AoEtbEIPBnaCCsMJlUTJ7bQF6Wx3/wRfudOVV0vVjW8BRLgkSL4E1BXFyhvq1S0d2+msQO5izev7zcFT/mpQA==
71027098
dependencies:
71037099
"@babel/runtime" "7.13.10"
71047100
"@gorhom/bottom-sheet" "3.6.4"
@@ -7114,6 +7110,10 @@ [email protected]:
71147110
react-native-markdown-package "1.8.1"
71157111
stream-chat "3.9.0"
71167112

7113+
"stream-chat-react-native-core@link:../../package":
7114+
version "0.0.0"
7115+
uid ""
7116+
71177117
"stream-chat-react-native@link:../../package/native-package":
71187118
version "0.0.0"
71197119
uid ""

lerna.json

+1-7
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,4 @@
11
{
22
"packages": ["package", "examples/SampleApp"],
3-
"version": "independent",
4-
"command": {
5-
"version": {
6-
"message": "chore(release): version bump [skip ci]",
7-
"changelogPreset": "./changelog-preset.config.js"
8-
}
9-
}
3+
"version": "independent"
104
}

package.json

+8-10
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
"@semantic-release/git": "^9.0.0",
1313
"execa": "^5.1.1",
1414
"husky": "^6.0.0",
15+
"lerna": "^4.0.0",
1516
"semantic-release": "^17.4.4"
1617
},
1718
"husky": {
@@ -20,16 +21,13 @@
2021
"commit-msg": "npx commitlint --edit $1"
2122
}
2223
},
23-
"workspaces": [
24-
"package",
25-
"examples/SampleApp"
26-
],
2724
"scripts": {
28-
"release": "yarn workspaces run release",
29-
"release-rc": "yarn workspaces run release-rc",
30-
"release-next": "yarn workspaces run release-next",
31-
"extract-changelog": "rm -rf NEXT_RELEASE_CHANGELOG.md && yarn workspaces run extract-changelog",
32-
"bootstrap": "yarn workspaces run bootstrap",
33-
"bootstrap-ci": "yarn workspaces run bootstrap-ci"
25+
"lerna-workspaces": "lerna",
26+
"release": "yarn lerna-workspaces run release",
27+
"release-rc": "yarn lerna-workspaces run release-rc",
28+
"release-next": "yarn lerna-workspaces run release-next",
29+
"extract-changelog": "rm -rf NEXT_RELEASE_CHANGELOG.md && yarn lerna-workspaces run extract-changelog",
30+
"bootstrap": "yarn lerna-workspaces run bootstrap",
31+
"bootstrap-ci": "yarn lerna-workspaces run bootstrap-ci"
3432
}
3533
}

release/release.config.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,11 @@ module.exports = Promise.resolve().then(() => {
6868
}
6969

7070
const rootPackage = require('../package.json');
71+
const lernaPackage = require('../lerna.json');
7172

7273
return {
7374
extends: [`${__dirname}/monorepo-setup.js`],
74-
workspaces: rootPackage.workspaces,
75+
workspaces: lernaPackage.packages,
7576
filterRegex: mergeRegex,
7677
filterPath: process.env.FILTER_PATH,
7778
tagFormat: process.env.TAG_FORMAT,

0 commit comments

Comments
 (0)