Commit Graph

622 Commits

Author SHA1 Message Date
James George
480ac7f84f chore: minor typographical fix (#5215) 2020-02-25 09:05:31 +08:00
James George
1423553a6d chore: Minor typographical fix (#5189)
* chore: typographical fix

* chore: update test
2020-02-16 20:52:17 +08:00
James George
130bcfb730 chore: switch over to leven for command suggestion (#5166)
* chore: switch to leven

* chore: update lock file

* chore: iterate through all the available commands and find closest match

* chore: update yarn.lock

* fix: lint

* chore: find the best possible match
2020-02-13 17:31:04 +08:00
Haoqun Jiang
94da5243be v4.2.2 2020-02-07 19:10:35 +08:00
Haoqun Jiang
0d0168bf28 fix(ui): fix the incorrect RegExp used for CORS check 2020-02-07 19:04:35 +08:00
Haoqun Jiang
8b951f81d5 v4.2.1 2020-02-07 18:09:45 +08:00
Haoqun Jiang
079a451f18 v4.2.0 2020-02-07 15:44:52 +08:00
Haoqun Jiang
6d680bc012 fix(migrator): correctly extract config fields to files 2020-02-06 19:40:50 +08:00
Haoqun Jiang
246c1973ab fix: clear require cache after upgrade, before migrate 2020-02-06 19:02:35 +08:00
Haoqun Jiang
ef15316591 fix: preserve the tilde version range after vue upgrade 2020-02-06 19:02:35 +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
ce64455996 fix(cors): fixup #4985, allow same-origin ws requests of any domain (#5142)
* fix: followup of #4985, allow same-site ws requests of any domain

* fix: match whole string
2020-02-04 22:51:06 +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
Guillaume Chau
da43343329 fix(CORS): only allow connections from the designated host (#4985)
* fix(cors): only allow localhost

* fix: use host so it's configurable

* fix: use cors options object

* feat: use a custom graphql-server instead of the one from apollo plugin

exports the httpServer instance

* fix: add CORS validation in the http upgrade request

Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
2020-02-03 19:35:40 +08:00
Haoqun Jiang
8028d9fff7 chore: dependency maintenance 2020-02-02 23:08:35 +08:00
Haoqun Jiang
3f212bb5af chore: remove redundant devDependencies 2020-02-02 21:25:04 +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
a468abfa6c feat: implement a migrator to upgrade to eslint 6 (#5085)
* refactor: extract deps & config logic to separate files

* feat: implement a migrator to upgrade to eslint 6

* fix: add required deps for eslint v4

* test: move migrator tests to each standalone plugins

* refactor: use spread operator instead of Object.assign
2020-01-27 14:00:16 +08:00
Haoqun Jiang
04b0bfe3ac test: add legacy plugin versions to dev deps, speeding up the upgrader test 2020-01-16 22:22:11 +08:00
Haoqun Jiang
97650b7ef9 refactor: extract the utility to detect changed files in git 2020-01-16 21:23:13 +08:00
Eduardo San Martin Morote
3cfbd00e13 feat: enforce emoji variation in logs for gear (#5082) 2020-01-16 13:20:37 +05:30
Haoqun Jiang
0f377bd31d feat: upgrade to eslint 6 (#4933)
* feat: scaffold projects with eslint 6

* style: eslint fix

* refactor: do not use hard-coded ecmaVersion, use babel-eslint for now

* fix: upgrade to @vue/eslint-config-standard

* style: continue fix lint errors

* chore: upgrade to eslint-plugin-vue@^6.1.2

* refactor: use `ecmaVersion: 2020` for dynamic import syntax support

* test: fix baseESLintConfig

* chore: also update yarn.lock to fix CI caches

* chore: update lockfile again, fix babel regressions

* test: nightwatch tests should fail if lint errors occur

* chore: update the lockfile (again), fixing a bug in airbnb config
2020-01-14 10:13:54 +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
42bd09f962 fix afterInvoke/onCreateComplete callbacks in Migrator (#5062)
closes #4837
2020-01-13 19:10:40 +05:30
Pavan Kumar Sunkara
1c269d22f5 fix: extendPackage object values should be string (#5038) 2020-01-13 21:22:21 +08:00
Yingya Zhang
eaa2b7341f feat: respect existing package.json (#4827) 2020-01-09 20:19:06 +08:00
Yingya Zhang
2531d10086 feat: add option merge to command create (#4828) 2020-01-06 07:46:34 +05:30
Haoqun Jiang
3b7227d544 v4.1.2 2019-12-28 20:54:27 +08:00
James George
00acca5f14 refactor: use inline approach (#4904) 2019-12-12 21:12:11 +05:30
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
3873d02382 chore: dependency maintenance 2019-11-29 15:15:17 +08:00
Haoqun Jiang
2ddcc65dfe v4.1.1 2019-11-27 23:14:15 +08:00
Haoqun Jiang
d316a18789 v4.1.0 2019-11-27 14:58:46 +08:00
Haoqun Jiang
84aed8ef10 chore: dependency maintenance 2019-11-27 00:34:22 +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
Yann Bertrand
ef2cbae66f fix: invalid version error when modules not installed (#4859)
fix #4781
2019-11-26 15:38:57 +08:00
Haoqun Jiang
2652ab6a6b fix: include prereleases for assert*Version calls 2019-11-13 00:14:24 +08:00
Haoqun Jiang
1c41371a42 v4.1.0-beta.0 2019-11-09 21:49:23 +08:00
Haoqun Jiang
1124b62bdd fix: vue add should not throw if plugin has no generator
The bug was introduced in #2337.
2019-11-08 23:25:29 +08:00
Haoqun Jiang
30f72420e2 fix: vue add should not crash when executed under Yarn PnP
TODO: should fix `loadModule` in PnP environment
2019-11-08 23:25:13 +08:00
Haoqun Jiang
1e663df1ca feat(GeneratorAPI): accept multiple arguments for the resolve method (#4715)
* feat(GeneratorAPI): accept multiple arguments for the resolve method

To make its signature conform to  the standard `path.resolve`, avoid
confusions.

There's already a bug in the downstream plugin that was caused by such
confusion: a742953b83/generator/index.js (L163-L171)

* docs: update descriptions of the `resolve` api [ci skip]
2019-11-07 10:29:06 +08:00