quasar
quasar copied to clipboard
Better cli command 'quasar upgrade' url
What kind of change does this PR introduce?
- [ ] Bugfix
- [ ] Feature
- [ ] Documentation
- [ ] Code style update
- [ ] Refactor
- [ ] Build-related changes
- [x] Other, please describe: Improvement of cli upgrade command
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No
The PR fulfills these requirements:
- [ ] It's submitted to the
dev
branch (orv[X]
branch) - [ ] When resolving a specific issue, it's referenced in the PR's title (e.g.
fix: #xxx[,#xxx]
, where "xxx" is the issue number) - [ ] It's been tested on a Cordova (iOS, Android) app
- [ ] It's been tested on an Electron app
- [ ] Any necessary documentation has been added or updated in the docs or explained in the PR's description.
If adding a new feature, the PR's description includes:
- [ ] A convincing reason for adding this feature (to avoid wasting your time, it's best to start a new feature discussion first and wait for approval before working on it)
Other information:
One cannot access https://www.npmjs.com/
Users(For example, in China) may receive this prompt during updates like I do
Because currently cli does not reference the config registry
in .npmrc
.
This PR will solve this problem, as these users who cannot open web page npmjs.com
usually configure npm registry
For users who have not configured 'registry', the output result of npm config get registry
is https://registry.npmjs.org/
I configured . npmrc
registry=https://registry.npmmirror.com/
Using the updated command line, I am able to update correctly
Does this works on a Windows machine?
Does this works on a Windows machine?
yes , my computer is windows 11
What shell are you using?
looks like PowerShell
using [email protected]
I just tested on [email protected]
,windows CMD
, [email protected]
I think this command should work for every user who has installed NPM
PowerShell 7.3.10
A new PowerShell stable release is available: v7.4.1
Upgrade now, or check out the release page at:
https://aka.ms/PowerShell-Release?tag=v7.4.1
PS C:\Users\wyb> npm config get registry
https://registry.npmjs.org/
PS C:\Users\wyb>
Microsoft Windows [Version 10.0.22631.3007]
(c) Microsoft Corporation. All rights reserved.
C:\Users\wyb>npm config get registry
https://registry.npmjs.org/
C:\Users\wyb>
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSWindows
PS C:\Users\wyb> $psversiontable
Name Value
---- -----
PSVersion 5.1.22621.2506
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.22621.2506
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
PS C:\Users\wyb> npm config get registry
https://registry.npmjs.org/
PS C:\Users\wyb>
Will do some tweaks to the PR and merge it in a few days.
Pushed:
feat(cli): keep account of npm registry url; improve algorithm (run only once); add --registry (-r) param to override; console.log() registry url for security purposes #16703