Commit Graph

67 Commits

Author SHA1 Message Date
James George
da8bd3970b chore: return with an exit code of 1 on supplying an unknown command (#6079) 2020-12-02 10:18:40 +08:00
Binwei Fang
9136696197 feat(eslint): support eslint7 and @babel/eslint-parser (#6059)
closes #5734 
closes #5981
2020-11-20 09:10:49 +08:00
Haoqun Jiang
5d002ccb07 fix: do not throw when api.render is called from an anonymous function (#5801)
Fixes #4774
2020-08-24 15:44:25 +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
b1772cadd2 feat: allow choosing vue version on creation (and in presets) (#5637) 2020-07-24 18:54:15 +08:00
Haoqun Jiang
75c398f04e fix(creator): do not override the README.md generated by plugins (#5472)
closes #4802
closes #4942
2020-05-16 22:09:56 +08:00
James George
8749f4b715 chore: test case for command suggestion (#5228) 2020-03-11 17:41:39 +08: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
James George
480ac7f84f chore: minor typographical fix (#5215) 2020-02-25 09:05:31 +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
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
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
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
Pavan Kumar Sunkara
1c269d22f5 fix: extendPackage object values should be string (#5038) 2020-01-13 21:22:21 +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
Haoqun Jiang
74fae4454b feat: implement a migrator to auto add eslint to deps (#4549) 2019-09-07 12:56:30 +08:00
Haoqun Jiang
b799b831b1 fix(upgrade): correctly update version range in package.json (#4546) 2019-09-07 00:30:29 +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
b6825756e9 test: fix failing tests that due to async support in Generator 2019-07-29 16:56:04 +08:00
阿平
74f629ea3f feat(cli): Generator support async (#3897) 2019-07-29 16:55:42 +08:00
Pavan Kumar Sunkara
544faee81e feat: more flexible hook system for generators (#2337) 2019-07-21 19:59:18 +08:00
Haoqun Jiang
7fc0f842e8 feat!: confirm for uncommitted changes before add/invoke/upgrade (#4275) 2019-07-12 20:04:08 +08:00
Haoqun Jiang
63452ef0e4 test: bump test timeout for upgrade tests 2019-07-06 19:47:32 +08:00
Haoqun Jiang
867c6eaf2c feat!: redesigns vue upgrade, supports code migration (#4090) 2019-07-02 16:23:34 +08:00
Haoqun Jiang
5460ca498f feat: add transformScript to GeneratorAPI (#4188) 2019-06-26 18:25:47 +08:00
Haoqun Jiang
af25ef75ce feat: make injectImports & injectRootOptions work for .vue files (#4168)
closes #1702
2019-06-21 17:20:53 +08:00
Haoqun Jiang
2e417b01d2 refactor: replace recast with jscodeshift for injectImportsAndOptions (#4003)
fixes #3309
2019-05-17 14:58:31 +08:00
Haoqun Jiang
15b5c8d4d7 chore!: change default value of lintOnSave option (#3975)
BREAKING CHANGE:
See https://github.com/vuejs/vue-cli/pull/3572
2019-05-14 11:20:20 +08:00
Steve Workman
f69339e816 feat: add makeJSOnlyValue to generator API (#3568)
Provides convenience method for passing JS into config files.
Closes issue #3535.
2019-04-09 19:54:17 +08:00
robertkruis
a02ef3988f feat: support PNPM as a package manager (#1531)
Enables vue-cli to use PNPM (https://pnpm.js.org/) as package manager
2019-04-09 00:43:47 +08:00
Armano
189ea54402 feat: update eslint-config-typescript to use @typescript-eslint (#3359) 2019-01-30 13:51:37 +08:00
Dobromir Hristov
3f434f69c6 fix(plugin api): fix generator dotfile rename for Windows. (#2427)
close #2424
2018-09-04 17:49:17 +08:00
Haoqun Jiang
ecb8c1801f fix: support generator/index.js in local presets (#2263)
fixes #2172
2018-08-20 11:31:04 -04:00
Evan You
8dfa2907a7 refactor: generate postcss.config.js instead of .postcssrc.js 2018-08-15 18:34:55 -04:00
Evan You
1892bcc251 fix(generator): handle directories starting with dot
close #2222
2018-08-15 18:34:55 -04:00
Evan You
3b21fad868 feat: support generator.js and prompts.js in preset 2018-08-08 16:35:57 -04:00
Evan You
6b77af600f ci: fix invoke spec 2018-07-28 17:03:02 -04:00
Evan You
ba4d0f285b refactor(generator): ensure proper deep merge of array values in api.extendPackage
Also fixes #970 by injecting eslint config when invoking ts plugin in an existing project
with eslint plugin installed.
2018-07-18 16:44:03 -04:00
Stephen Lam
e393be733d feat(generator): allow plugins to modify how configs are extracted (#1130)
* feat(generator): allow plugins to modify how configs are extracted

* refactor(cli): change addConfigTransform parameters

Allow plugin author to set config 'descriptions' instead of implementing their own transform functions.

* fix(cli): fix missed issues from changing types from array to set

* fix: use reserved config transforms to check in API

* fix: lines dedupe
2018-07-11 19:52:57 +02:00
Pavan Kumar Sunkara
8eb7fc3a97 fix: Don't allow duplicate injections of import statements and root options by plugins (#1774)
* feat(cli): Don't allow duplicate api.injectImports

* feat(cli): Don't allow duplicate api.injectRootOptions

* chore(cli): Added tests for duplicate injections
2018-07-11 14:05:29 +02:00
Thorsten Lünborg
7b3812e248 feat: Create .browserslistrc file when user chose "separate config files" (#1773)
* feat(cli): When selecting "separate config files",
cli should create .browserslistrc file

close #1236

* test(cli): add test for extracting .browserslistrc
2018-07-05 23:11:01 +02:00
Evan You
7fd5f255e0 test: fix test for windows 2018-05-22 10:28:41 -04:00
Evan You
8b32f4a60f feat: GeneratorAPI: addImports & addRootOptions 2018-05-21 14:25:49 -04:00
Evan You
be8d31710a test: fix stringifyJS import 2018-05-18 22:50:05 -04:00
Evan You
07ac887486 fix: stringifyJS should be used in all call sites 2018-05-18 18:49:58 -04:00
test
2de86cea70 test: fix generator tests after babel config change 2018-05-17 17:19:39 -04:00
Evan You
3139228008 chore: fix duplicate test project 2018-05-03 19:00:03 -04:00
Evan You
0f73a91162 refactor: use fs-extra 2018-04-30 18:19:02 -04:00
Derek Henscheid
0f76b8e4b4 feat(plugin-api): allow non-semver versioned dependencies (#1184)
close #1177
2018-04-27 17:54:54 -04:00
Evan You
5c5e0b8f7c test: fix invoke.spec.js on windows 2018-04-27 17:02:00 -04:00