Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: bump lerna version #9523

Merged
merged 3 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ echo "Doing a release..."
LOG=$(git log --format="%s" -1 | grep -Poe "#\d+")
PR_NUM=${LOG:1}

yarn run lerna publish prerelease --conventional-commits --conventional-prerelease --preid=prerelease --dist-tag=prerelease --yes --no-private 2>&1 | tee lerna-output.txt
yarn run lerna publish prerelease --preid=prerelease --dist-tag=prerelease --yes --no-private 2>&1 --dryRun | tee lerna-output.txt

# use lerna command below for dry run
# yarn run lerna version prerelease --conventional-prerelease --preid=prerelease --no-private --yes --no-git-tag-version --no-push | tee lerna-output.txt
# yarn run lerna publish prerelease --conventional-prerelease --preid=prerelease --no-private --yes --no-git-tag-version --no-push | tee lerna-output.txt

if grep -i "Successfully published" lerna-output.txt; # Leave a Github comment
then
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,10 @@ jobs:
if: always()
- name: a11y tests
run: yarn serve:docs & yarn test:a11y
if: !contains(github.event.head_commit.message, 'skip-a11y')
- name: Upload a11y results
run: node .github/upload-preview.js packages/react-docs/coverage
if: always()
if: !contains(github.event.head_commit.message, 'skip-a11y')
demo_app:
runs-on: ubuntu-latest
env:
Expand Down
5 changes: 2 additions & 3 deletions lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"lerna": "3.10.5",
"npmClient": "yarn",
"publishConfig": {
"access": "public",
Expand All @@ -25,7 +24,7 @@
}
},
"version": "independent",
"useWorkspaces": true,
"allowBranch": ["main", "v5"],
"packages": ["packages/*"]
"packages": ["packages/*"],
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"husky": "^4.3.0",
"jest": "27.2.5",
"jest-cli": "27.2.5",
"lerna": "^6.4.1",
"lerna": "^7.1.5",
"lint-staged": "^14.0.0",
"mutation-observer": "^1.0.3",
"plop": "^3.1.2",
Expand Down
6 changes: 5 additions & 1 deletion packages/react-integration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
"cypress:open": "cypress open",
"cypress:run": "cypress run",
"serve:integration": "cd demo-app-ts && yarn serve:demo-app",
"test:integration": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run"
"test:integration": "node --max-old-space-size=4096 ./node_modules/.bin/cypress run",
"build:demo-app": "cd demo-app-ts && yarn build:demo-app",
"start:demo-app": "cd demo-app-ts && yarn start:demo-app",
"start:demo-app:hot": "cd demo-app-ts && yarn start:demo-app:hot",
"serve:demo-app": "cd demo-app-ts && yarn serve:demo-app"
},
"devDependencies": {
"cypress": "^8.0.0",
Expand Down
18 changes: 9 additions & 9 deletions scripts/verifyPatternflyVersions.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* eslint-disable no-console */
const semver = require('semver');
const Project = require('@lerna/project');
const { detectProjects } = require("lerna/utils");

// '@patternfly/patternfly': {'4.0.4': ['@patternfly/react-styles', ...]},
// '@patternfly/react-core': {'^4.0.3': ['@patternfly/react-docs', ...]]
Expand All @@ -27,9 +27,9 @@ function setDependency(dependencies, package, version) {
}

async function verifyPatternflyVersions() {
const packages = await Project.getPackages();

packages.forEach((package) => {
const { projectGraph, projectFileMap } = await detectProjects();
Object.values(projectGraph.nodes).forEach((node) => {
const package = node.package;
accumulateDependencies(package.name, { [package.name]: `^${package.version}` });
accumulateDependencies(package.name, package.dependencies);
accumulateDependencies(package.name, package.devDependencies);
Expand Down Expand Up @@ -57,12 +57,12 @@ async function verifyPatternflyVersions() {
.forEach((mismatchedPackages) => {
console.log(`Writing ${dep}@${highestVersion}:`);
mismatchedPackages
.map((package) => packages.find((p) => p.name === package))
.map((package) => projectGraph.nodes[package])
.forEach((package) => {
console.log(package.manifestLocation);
setDependency(package.dependencies, dep, highestVersion);
setDependency(package.devDependencies, dep, highestVersion);
package.serialize();
console.log(package.package.manifestLocation);
setDependency(package.package.dependencies, dep, highestVersion);
setDependency(package.package.devDependencies, dep, highestVersion);
package.package.serialize();
});
});
});
Expand Down
Loading
Loading