Commit Graph

213 Commits

Author SHA1 Message Date
Haoqun Jiang
8670997258 chore: bump js-yaml version 2021-02-23 15:58:10 +08:00
Haoqun Jiang
df00b3e0bc feat(GeneratorAPI): forceOverwrite option for extendPackage (#6307) 2021-02-23 14:44:22 +08:00
Superman
a27e33bef8 fix: dependent package nickname (#6304) 2021-02-22 14:29:46 +08:00
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
Binwei Fang
dc4c4559b6 fix(generator): avoid doing redundant write operations (#6011)
Avoid overwriting the file which is not modified when executing `vue add/invoke`
This will reduce the chance of encountering issues like #5939
2020-12-20 19:56:33 +08:00
Haoqun Jiang
0372160524 chore: some trivial dependency version bumps (#6152) 2020-12-17 16:24:10 +08:00
Haoqun Jiang
a672585807 fix: fix cypress mirror url for cypress version > 3 (#6145) 2020-12-14 10:08:14 +08:00
Binwei Fang
663bbd7639 fix: fix usage of cmd-shim (#6137) 2020-12-10 20:48:08 +08:00
Haoqun Jiang
1e5ba6b831 feat!: make vue serve/build aliases to npm run serve/build (#6115)
To avoid user confusion. Also allows us to focus more on CLI's core
functionalities.
2020-12-08 11:08:07 +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
Haoqun Jiang
3656416bd0 chore: merge branch 'next' into dev 2020-10-09 15:12:38 +08:00
Haoqun Jiang
8578567c35 fix: more accurate warning message for missing global peer dependencies (#5871) 2020-09-28 17:15:43 +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
393e79b890 fixup! chore!: some trivial major version bumps for dependencies 2020-09-08 16:12:11 +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
Necmettin Karakaya
5baec1fdc5 chore: fix common misspelling errors (#5694)
Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
2020-08-10 01:17:01 +08:00
Haoqun Jiang
77f4489f2d fix: ignore .svn/** when reading and writing files (#5744)
Fixes #5689
2020-08-04 15:42:59 +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
7f56846a2e refactor: replace jscodeshift with vue-codemod (#5629) 2020-07-01 15:06:55 +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
Mike
74ca541e27 Improve package.json not found error  (#5238) 2020-03-07 00:23:08 +01:00
Cédric Exbrayat
5cb988cb27 fix(GeneratorAPI): remove warning when using extendPackage with prune (#5202)
Currently, if we use `api.extendPackage({foo: null}, {prune: true})` the dependency is removed but a warning is logged as the range is invalid:

```
 WARN  invalid version range for dependency "foo":

- null injected by generator "my-plugin"
```
2020-02-27 11:10:14 +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
f5f4de0aa3 feat(GeneratorAPI): allow passing options to api.extendPackage (#5149)
Currently, 3 options are implemented:

- options.prune (defaults to `false`) - Remove null or undefined
fields from the object after merging.
- options.merge (defaults to `true`) deep-merge nested fields, note
that dependency fields are always deep merged regardless of this option.
- options.warnIncompatibleVersions (defaults to `true`) Output warning
if two dependency version ranges don't intersect.

Closes #4779
2020-02-06 14:28:00 +08:00
Haoqun Jiang
e4410b8e8d fixup! fix: fix duplicate slash in metadata url 2020-02-05 14:45:10 +08:00
Haoqun Jiang
813680eced fix: should use the local version number if the cache falls behind 2020-02-05 14:39:52 +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
97650b7ef9 refactor: extract the utility to detect changed files in git 2020-01-16 21:23:13 +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
Pavan Kumar Sunkara
1c269d22f5 fix: extendPackage object values should be string (#5038) 2020-01-13 21:22:21 +08:00
Haoqun Jiang
f7b95acb9b fix: should download to different directories for different pre… (#4922)
fixes #4778
2019-12-12 21:08:09 +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
b7f83b45ce fix: support parser option for codemods, and enable ts parsing by default (#4883)
fixes #4861
2019-11-26 15:52:50 +08:00