Commit Graph

37 Commits

Author SHA1 Message Date
Haoqun Jiang
e1eba098ae fix: discard NODE_ENV when installing project dependencies (#6224)
Avoid empty `node_modules` when the user has set `NODE_ENV` to
`production` in the shell environment.

In the long run we should have a more comprehensive preflight check
for execution environment though.
2021-01-21 16:31:19 +08:00
Bodo Graumann
2503ba6421 fix: support basic auth for npm registry access (#6207)
When username and password are configured in the .npmrc for the
respective scope, use basic auth when getting package metadata from the
npm registry.

Closes #6206
2021-01-14 16:42:00 +08:00
Haoqun Jiang
4378c8df26 style: replace eslint-plugin-vue-libs with standard config (#6148) 2021-01-06 14:29:12 +08:00
Haoqun Jiang
a672585807 fix: fix cypress mirror url for cypress version > 3 (#6145) 2020-12-14 10:08:14 +08:00
Andrei
bd1f1b774b chore!: remove deprecated node-sass (#6090) 2020-12-02 15:11:49 +08:00
Haoqun Jiang
f5359bdf36 workflow: test migrator / vue 3 scenarios with verdaccio (#6071) 2020-11-19 11:12:48 +08:00
Haoqun Jiang
66a87f2c1a chore!: drop support of NPM 5 (#6051) 2020-11-14 13:19:34 +08:00
Yazhe Wang
ba6cb7c5b3 refactor!: replace request with node-fetch (#6009) 2020-11-13 13:26:57 +08:00
Haoqun Jiang
b8d593ab59 fix: npm 7 compat by turning on legacy-peer-deps flag (#5961) 2020-10-15 15:23:24 +08:00
kzhang
286d0688d6 fix: incorrectly read Taobao binary mirror configuration. (#5902)
Co-authored-by: zhangke <zhangke12@zybank.com.cn>
2020-09-28 10:11:09 +08:00
Bodo Graumann
5b70fc2f10 fix: respect scope when resolving package metadata (#5892)
This should fix the remaining issue reported in #5411.
In particular, if the user configured a dedicated npm registry for a
specific scope, this setting was previously disregarded by vue-cli.
Thus it was impossible to use vue upgrade if the packages were not also
published to the official npm registry.
2020-09-23 13:35:48 +08:00
Haoqun Jiang
9641d6d254 fix: fix support for Node.js v8 and deprecate it (#5827)
Fixes #5800
2020-08-27 16:29:01 +08:00
Haoqun Jiang
27db6bfaa8 fix: strip non-ansi characters from registry config (#5808)
To deal with malformed stdout result retrieved from child processes.

Fixes #5802
2020-08-24 15:52:37 +08:00
Haoqun Jiang
b1772cadd2 feat: allow choosing vue version on creation (and in presets) (#5637) 2020-07-24 18:54:15 +08:00
Haoqun Jiang
09cdf51c5e fix: fix support for some legacy registry servers (#5609)
Some registry servers do not recognize `application/vnd.npm.install-v1+json`
in the Accept header, so here we add `application/json` as fallback.
2020-06-24 10:35:55 +08:00
Haoqun Jiang
c889073c7f chore: improve error message when get metadata failed (#5604) 2020-06-24 10:35:01 +08:00
Haoqun Jiang
4891d91d3c fix: support auth token when retrieving package metadata (#5586) 2020-06-19 15:47:13 +08:00
Romain
e2f00d2867 fix(ui): fix "update all plugins/dependencies" utility (#5395) 2020-05-08 16:42:45 +08:00
Haoqun Jiang
51a4da7e9f fix: should infer package manager from config if there's no lockfile in the project (#5150)
* fix: should infer package manager from config if there's no lockfile in the project

* fixup! fix: should infer package manager from config if there's no lockfile in the project
2020-02-06 16:25:28 +08:00
Haoqun Jiang
e4410b8e8d fixup! fix: fix duplicate slash in metadata url 2020-02-05 14:45:10 +08:00
Haoqun Jiang
e1b8519183 fix: fix duplicate slash in metadata url 2020-02-05 14:31:22 +08:00
Haoqun Jiang
773f8a47e9 feat: lock minor versions when creating projects / adding plugins (#5134)
* feat: lock minor versions when creating projects / adding plugins

closes #5012

* refactor: also calculate latestMinor version

* feat: support add packages with tilde version range

* refactor: make the `runCommand` invocations more concise

* refactor: use the `getVersions` utility function to get latestMinor

* feat: when adding plugins, use tilde range by default

* fix: allow empty args
2020-02-04 16:26:32 +08:00
Haoqun Jiang
76c173693e fix: correctly catch errors of offline install 2020-02-01 14:41:14 +08:00
Haoqun Jiang
eeb1491c64 test: use offline install for test projects (for vue upgrade) 2020-02-01 14:26:53 +08:00
Haoqun Jiang
170e63ecfc test: don't check for taobao registry during tests 2020-02-01 14:10:11 +08:00
Haoqun Jiang
02a0e8a187 feat: vue upgrade monorepo support, --from option, and a new vue migrate --from command (#5091)
* refactor(migrator): rename `installed` to `baseVersion`

* feat: `vue upgrade --from` option and a new `vue migrate` command

* fix: fix support for `vuePlugins.resolveFrom` option

* chore: add a fixme comment

* fix: use loadModule instead of manually calculating the package.json path

This also fixes support for monorepo.
(TODO: tests)

* fix: treat `resolveFrom` as `context`, fixing edge cases

* fix: use read-pkg instead of loadModule, avoid messing up require cache

* fix: getInstalledVersion still requires `loadModule` to support monorepo
2020-01-28 16:32:35 +08:00
Haoqun Jiang
b049e999d7 refactor: use env variables to set registry for package managers (#5110)
also fixes compatibility with Yarn 2
2020-01-27 20:03:50 +08:00
Haoqun Jiang
d7cbe5f0f1 refactor: use a plain http request to get package metadata (#5045)
* refactor: use a plain http request to get package metadata

fixes #4895
fixes #4995

* chore: add link to the package metadata documentation
2020-01-13 19:25:38 +05:30
Haoqun Jiang
1a0b59142a refactor: use dependencies from @vue/cli-share-utils whenver possible 2019-11-29 15:41:18 +08:00
Haoqun Jiang
2565c5d07e feat: support binary mirrors for taobao registry (#4767)
* feat: support binary mirrors for taobao registry

fixes issues like #4718

* fix: only install cypress 3, for now

* fix: do not override user defined `CYPRESS_INSTALL_BINARY` env
2019-11-01 23:39:56 +08:00
Haoqun Jiang
5d2c8da754 refactor: replace --disturl option with NODEJS_ORG_MIRROR env variable
for better compatibility with pnpm 4 (which does not allow the
`--disturl` option)
2019-10-16 13:18:14 +08:00
B4rtware
badf63d7f0 fix: add pnpm v4 support (#4677)
* fix: add pnpm v4 support

in pnpm v4 the option '--loglevel' is no longer available instead '--reporter' is used.

* refactor: remove 'v' from PNPM constants for linting

* refactor: rename variable

* fix: typo in _hasPnpm4orLater

Co-Authored-By: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>

* refactor: reduce the amount of duplicate code for pnpm version check

* refactor: remove return-assignment

* refactor: add explicit return value instead of using array access

Co-Authored-By: Pavan Kumar Sunkara <pavan.sss1991@gmail.com>

* fix: remove return value from checkPnpmVersion

* fix: pnpmVersion variable

* refactor: cache pnpm version number

* refactor: fix function name and revert api break

* fix: function call correction

* refactor: export hasPnpmVersionOrLater and use this in favor of hasPnpm4OrLater

* refactor: move cache getter into getPnpmVersion

* refactor: add comment

* refactor: remove comment
2019-10-16 13:15:58 +08:00
Yingya Zhang
8869a01d48 feat: support custom package manager (#4621)
Closes #4483

* feat: support custom package manager

* feat: refine warning msg for unknown package manager

* feat: refine blank lines

* feat: refine warning msg for unknown package manager

* feat: refine warning msg for unknown package manager
2019-09-30 14:01:43 +08:00
Haoqun Jiang
ed2b888782 Revert "feat: allow custom packageManager other than npm/yarn/p… (#4632)
This reverts commit e0f846984a.
2019-09-30 14:00:31 +08:00
Yingya Zhang
e0f846984a feat: allow custom packageManager other than npm/yarn/pnpm (#4620)
Closes #4483
2019-09-30 13:59:21 +08:00
Haoqun Jiang
29b93834f8 refactor: extract Upgrader to a standalone file for easier testing 2019-08-04 22:29:33 +08:00
Haoqun Jiang
4af27247cc refactor: unify package manager related logic (#4256) 2019-07-13 00:29:39 +08:00