Skip to content

Commit d45efed

Browse files
committed
fix(cli): Small regression on "upgrade" command -- hangs on determining if upgradable pkg is pinned or not quasarframework#5917
1 parent 2a742a2 commit d45efed

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

cli/bin/quasar-upgrade

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,13 @@ function upgradeQuasar () {
170170
// installing the new version might fail on Windows
171171
removeSync(path.join(root, 'node_modules', dep.packageName))
172172

173-
const notPinned = pkg.dependencies[dep.packageName].startsWith('^')
174-
params.push(`${dep.packageName}@${notPinned ? '^' : ''}${dep.latestVersion}`)
173+
const pinned = /^\d/.test(
174+
pkg.dependencies[dep.packageName] ||
175+
pkg.devDependencies[dep.packageName] ||
176+
'^' // fallback, just in case
177+
)
178+
179+
params.push(`${dep.packageName}@${pinned ? '' : '^'}${dep.latestVersion}`)
175180
})
176181

177182
console.log()

cli/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@quasar/cli",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "Quasar Framework global CLI",
55
"bin": {
66
"quasar": "./bin/quasar"

0 commit comments

Comments
 (0)