Skip to content

Commit

Permalink
fix: Automatically set canvas dependency version to the latest one to…
Browse files Browse the repository at this point in the history
… avoid build errors during `yarn install`
  • Loading branch information
Nitive committed Jun 22, 2023
1 parent 4aa6cee commit 7083481
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/tools/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ const upgradeCommand = (context) => ({
async handler(args) {
const config = getConfig()
const releaseChannel = config.releaseChannel || 'latest'

updateJsonFile({
filePath: path.join(getProjectRootDir(), 'package.json'),
update(config) {
if (!config.resolutions) config.resolutions = {}
if (!config.resolutions.canvas) config.resolutions.canvas = '^2.11.2'
return config
},
})

const info = await getPackageInfo(toolsPackageInfo.name, {
version: releaseChannel,
})
Expand Down

0 comments on commit 7083481

Please sign in to comment.