Commit Graph

2691 Commits

Author SHA1 Message Date
Haoqun Jiang 759d77fd5c refactor: use babel overrides to transpile babel runtime helpers (#4777)
* refactor: use babel overrides to transpile babel runtime helpers

As recommended in babel/babel#9903.
Get rid of the module-resolver plugin, may fix #3928.
Seems to have fixed #4742 as well.

There may be a small breaking change: as we now use `excludes` & `includes`, babel requires `filename` option to be present (introduced in https://github.com/babel/babel/pull/10181/files). So users who call `babel.transformSync` directly may encounter an error.

However, as we explicitly stated that this preset is only used for Vue CLI internally, I don't expect too many such use cases there. And the error messages are clear enough.
Considering the benefits that this PR brings, I think it's an acceptable tradeoff.


 test: update tests for babel

* test: fix windows tests

* test: remove unused variables

* fix: fix scope package paths on Windows

* test: wait some time in router tests in case dom hasn't updated in time
2019-11-04 16:29:06 +08:00
Maël Nison 0a5c79be52 Enforces require.resolve for loaders (#4532)
* Enforces require.resolve for loaders

* Updates the lockfile

* Fixes more things

* Adds an extra check

* test(loaders): fix the tests

* style(cli): fix the linting

* style(cli): fix the linting (on windows)

* Update package.json

* Updates the lockfile

* chore: sync dependency versions

* chore: sync dependency versions

* chore: don't introduce unnecessary changes in yarn.lock

* extraneous space
2019-11-04 16:26:33 +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
Guillaume Chau 698c0d63a7 docs: add 'Browse plugins' link to header (#4760) 2019-11-01 16:53:25 +08:00
Haoqun Jiang 17925c6ae6 v4.0.5 v4.0.5 2019-10-22 19:53:34 +08:00
Haoqun Jiang 964fad5968 fix: should tolerate cli version check error (#4741)
* fix: should tolerate cli version check error

* fix: add the error message after the DEBUG indicator
2019-10-22 19:08:32 +08:00
Haoqun Jiang 31df36d85f fix(eslint): autofix code style after scaffolding on older versions of cli (#4740) 2019-10-22 16:47:36 +08:00
Haoqun Jiang 8093630c08 fix(ui): "add router" button should not require prompt in terminal (#4739) 2019-10-22 15:38:41 +08:00
Haoqun Jiang 6904e3bbf1 chore: lockfile maintenance 2019-10-21 20:53:20 +08:00
Haoqun Jiang b35a8d3e1e fix(ui): fix latest version check without yarn (#4724)
Fixes #4710
2019-10-21 20:29:25 +08:00
Mulia Nasution 2cdb50c802 Fix indentation of --inline-vue description (#4733) 2019-10-21 20:13:48 +08:00
Haoqun Jiang 86c500fd4b chore: dependency maintenance (#4734)
* chore: dependency maintenance

* Revert "test: replace `waitForFunction` with `waitForXPath`"

This reverts commit b2848aeeaf.
2019-10-21 20:13:21 +08:00
Haoqun Jiang 96890b526f fix: do not install core plugins that have major version bumps (#4720)
* fix: fix version check for core plugins in v4

* fix: fix the error when the diff result is null
2019-10-21 17:20:23 +08:00
Haoqun Jiang 85c9cbfeda fix: fix eslint not found error in vue serve command (#4728) 2019-10-21 17:19:56 +08:00
Haoqun Jiang d82a2bbe26 v4.0.4 v4.0.4 2019-10-18 15:48:03 +08:00
Haoqun Jiang 718f9d6090 chore: Merge branch 'master' into dev 2019-10-18 15:37:02 +08:00
Haoqun Jiang 0953057b22 fix: fix a typo that caused router failed to install in older versions (#4711) 2019-10-18 15:34:09 +08:00
Marco Pöhler 48dd88affa docs: added instructions for yarn (#4706) [ci skip] 2019-10-18 14:16:37 +08:00
Philipp Gildein 0d75de6c51 Fix link to eslint PR (#4702) 2019-10-17 19:23:39 +08:00
Haoqun Jiang aa29fd1526 v4.0.3 v4.0.3 2019-10-17 15:59:03 +08:00
Haoqun Jiang 048003c334 fix: fix vue add router command in v3 projects (#4698)
fixes #4692
2019-10-17 15:42:44 +08:00
Haoqun Jiang a759af1c2a fix: allow v3 cli to invoke vuex & router plugin from inside cli-service (#4696) 2019-10-17 15:36:53 +08:00
Haoqun Jiang eec84c0d49 fix: fix "lint on commit" projects generation error (#4697)
Fixes #4694
Fixes #4695

Fix the "ENOENT: no such file or directory … debugnode_module/sms/index.js" error.

The problem are caused by 2 issues:
1. The `lint-staged` packages introduced an old version of debug,
causing node_module deduping, thus changing the node_module layout
2. The dependencies required in the cached `lint` module is no longer at
its originial position, thus the "ENOENT" error.

This change still does not fix the PNPM 4 issue, considering its smaller
user base, we'll fix it later.
2019-10-17 15:36:31 +08:00
Haoqun Jiang 8b08c73e8e v4.0.2 v4.0.2 2019-10-17 10:22:54 +08:00
Haoqun Jiang f99269be6d workflow: correctly set releaseType 2019-10-17 10:18:28 +08:00
Haoqun Jiang dc318c5830 fix: add a compatibility layer for router & vuex for CLI v3 (#4693)
fixes #4691
2019-10-17 10:15:34 +08:00
Haoqun Jiang 14ec578cef workflow: keep all packages' versions in sync to reduce cognitive load 2019-10-17 09:39:26 +08:00
Haoqun Jiang cbda149bd1 chore: 4.0.1 changelog [ci skip] 2019-10-16 21:34:42 +08:00
Haoqun Jiang 9770808411 v4.0.1 v4.0.1 2019-10-16 20:33:29 +08:00
Haoqun Jiang fec160ff96 fix: no need to assertCliVersion. avoid breaking old versions 2019-10-16 20:31:18 +08:00
Haoqun Jiang 81f84577e4 v4.0.0 v4.0.0 2019-10-16 19:19:06 +08:00
Haoqun Jiang 0603f1eed9 chore: pre release sync 2019-10-16 19:18:38 +08:00
Haoqun Jiang 15c86f0f9b docs: preparing v4 stable release [ci skip] 2019-10-16 19:13:47 +08:00
Haoqun Jiang c80fb6ab26 fix: pin typescript version to 3.5 until we support typescript-eslint 2 2019-10-16 18:53:04 +08:00
Haoqun Jiang 4de59d06ac fix(types): update css options interface to reflect v4 changes 2019-10-16 17:52:38 +08:00
Haoqun Jiang 2601fece02 docs: add notes about vue --version output format [ci skip] 2019-10-16 14:36:33 +08:00
Haoqun Jiang 28fd1db9d0 chore: merge branch 'next' into dev 2019-10-16 14:15:09 +08:00
Haoqun Jiang d72b453728 fix: fix afterAnyInvoke hook compatibility with pnpm 4
Maybe caused by the change of resolve mechanism in pnpm 4,
calling the hook from the creator would get a `Cannot find module`
error. As a workaround, we now require and cache the module outside the
callback function.
2019-10-16 13:28:00 +08:00
Haoqun Jiang 953a080c19 fix: update .npmrc for pnpm 4 2019-10-16 13:22:04 +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
Nathaniel Blackburn b65b24e8e5 fix: correct typo in babel migrator (#4683) 2019-10-16 11:16:03 +08:00
Haoqun Jiang 36774935a5 chore!: add @vue/cli in --version output, to avoid confusion (#4681)
* feat!: add `Vue CLI` in `--version` output, to avoid confusion

* chore: should use `@vue/cli` as the correct branding
2019-10-16 11:14:42 +08:00
Haoqun Jiang 469d3d8825 docs: migration guide from v3 to v4 (#4552) [ci skip]
* docs: [wip] migration guide from v3 to v4

* docs: migration -> migrating

* docs: `--all` is not required

* docs: add more content

* docs: fix typo [ci skip]

* docs: fix jest changelog link [ci skip]

* docs: elaborate on babel plugin changes

* docs: elaborate on the less-loader version issue

* docs: finish eslint changelog [ci skip]

* docs: more on webpack configs [ci skip]

* docs: move migrating-to-v3 to first-level nav

* docs: elaborate on css-loader changes [ci skip]

* docs: finish nightwatch guide [ci skip]

* docs: link to workbox v4 release notes [ci skip]

* docs: [wip] detailed explanation on vue.config.js

* docs: add examples for terser; add router & vuex directory change

* docs: mention `api.hasPlugin('vue-router')` [ci skip]

* docs: add subtitles [ci skip]

* docs: update descriptions to reflect rc.8 changes

* docs: some grammar corrections [ci skip]

* docs: add whitespace handling changes [ci skip]

* docs: @4 -> @next [ci skip]

* docs: blank lines [ci skip]

* Update docs/migrating-from-v3/README.md

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>

* Update docs/migrating-from-v3/README.md

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>

* Update docs/migrating-from-v3/README.md

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>

* Update docs/migrating-from-v3/README.md

Co-Authored-By: Natalia Tepluhina <NataliaTepluhina@users.noreply.github.com>
2019-10-15 20:24:34 +08:00
René Eschke c76091075f missing documentation for building with vuex (#2319)
I really needed this tip and luckily got it from this awesome community in a github issue.
This definitely needs to be in the docs aswell:
https://github.com/vuejs/vue-cli/issues/2304#issuecomment-414702510
2019-10-11 22:18:43 +02:00
Maël Nison 3aa513ace5 Add a variant for config get registry (#4530)
* Update shouldUseTaobao.js

* Fixes linting
2019-10-11 22:01:07 +02:00
Haoqun Jiang 5cce80c2f7 v4.0.0-rc.8 v4.0.0-rc.8 2019-10-11 16:11:02 +08:00
Haoqun Jiang 3fcff0268a chore: pre release sync 2019-10-11 16:08:49 +08:00
Haoqun Jiang 0ddad86161 chore: lockfile maintenance 2019-10-11 15:37:41 +08:00
Phan An 81d0245dd6 chore: better upgrade messages (#3926)
* chore: better upgrade messages

* feat: try to find the right command to update
2019-10-11 15:34:22 +08:00