Skip to content

Commit

Permalink
chore: fix internal dependencies not bumped in main package.json
Browse files Browse the repository at this point in the history
Closes: INSTUI-4329

version bump is done with the lerna bump command, this does not touch the main package.json. Lerna's
recommended way is to use the workspace protocol instead, see
lerna/lerna#2153 (comment)
TEST PLAN:
try npm run bump, it should not alter version in the main package.json
  • Loading branch information
matyasf committed Oct 16, 2024
1 parent 40f8ca2 commit a0829ec
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"version": "10.3.0",
"npmClient": "npm",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@
"@emotion/react": "^11.13.3",
"@eslint/eslintrc": "^3.1.0",
"@eslint/js": "^9.11.1",
"@instructure/browserslist-config-instui": "10.3.0",
"@instructure/pkg-utils": "10.3.0",
"@instructure/browserslist-config-instui": "workspace:*",
"@instructure/pkg-utils": "workspace:*",
"@testing-library/dom": "^10.4.0",
"@testing-library/jest-dom": "^6.4.6",
"@testing-library/react": "^16.0.1",
Expand Down
5 changes: 5 additions & 0 deletions packages/ui-scripts/lib/utils/git.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ export const isReleaseCommit = (version) => {
}
}

/**
* Checks whether the folder has any changes with `git status`.
* If there are any the process exits with an error code
*/
export function checkWorkingDirectory() {
let result
try {
// --porcelain outputs in a machine-readable format
result = runGitCommand(['status', '--porcelain'])
} catch (e) {
error(e)
Expand Down
12 changes: 6 additions & 6 deletions packages/ui-scripts/lib/utils/npm.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ export async function bumpPackages(packageName, requestedVersion) {
await runCommandAsync('lerna', [
'version',
...args,
'--exact',
'--include-merged-tags',
'--no-push',
'--no-git-tag-version',
'--force-publish=*',
'--conventional-commits'
'--exact', // exact versions, no ^ when bumping
'--include-merged-tags', // Include tags from merged branches
'--no-push', // do not execute `git push`
'--no-git-tag-version', // do not add git tag or commit
'--force-publish=*', // bump all packages even if they have no changes
'--conventional-commits' // determines new version and updates Changelog
])

releaseVersion = await syncRootPackageVersion(true)
Expand Down

0 comments on commit a0829ec

Please sign in to comment.