Commit Graph

2218 Commits

Author SHA1 Message Date
Haoqun Jiang
1b64ff8464 fix: fix eslint errors for typescript + e2e-nightwatch setup 2020-02-05 17:51:50 +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
02a4799256 chore: update vue & vue-template-compiler to 2.6.11 2020-02-05 14:27:40 +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
3ee096ec35 fix: don't output warning message on eslint deps upgrade 2020-02-04 21:52:05 +08:00
Haoqun Jiang
45013906de test: uncomment the airbnb eslint migrator test 2020-02-04 20:04:20 +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
c8cecffedb refactor: remove usage of deprecated babel functions, preparing for babel 8 (#5133)
* refactor: use babel.loadPartialConfigSync (added in babel 7.8)

As planned in https://github.com/babel/babel/issues/10746,
in babel 8 the old `loadPartialConfig` can't be used synchronously.

* refactor: remove dependence on internal babel files, preparing for babel 8

See
https://github.com/babel/babel/issues/10746
https://github.com/babel/babel/pull/10899
2020-02-03 19:52:42 +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
b381c752c7 feat: upgrade to typescript@~3.7.5 (#5128) 2020-02-02 21:23:18 +08:00
Thorsten Lünborg
f7ad307059 fix(e2e-cypress): make --headless work with --browser chrome (#5108)
* fix(e2e-cypress): make —headless work with —browser chrome

fix #5103

* fix: increase cypress minimum version to 3.8

this version onwards supports using --browser chrome --headless
2020-02-01 15:24:38 +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
5bf6051b75 fix: vue-template-compiler can be optional if @vue/compiler-sfc presents (#5123) 2020-01-30 20:38:39 +01:00
Haoqun Jiang
d11ecc2151 fix: correctly calculate cacheIdentifier from lockfiles (#5113)
* fix: correctly calculate cacheIdentifier from lockfiles

follow up of #3865
fixes #4438

* Revert "fix: correctly calculate cacheIdentifier from lockfiles"

This reverts commit dbce88b7cc.

* fix: should take all configFiles and lockfiles into account

The previous implementation is based on the assumption that config files
have precendences, e.g. `.eslintrc.js` will take higher precendence
over `.eslintrc`, and only one will take effect.

This is not accurate however. For example, babel relies on both babel
config and browserslist config, so we need to deal with 2 config files.
2020-01-30 20:36:56 +01:00
Thomas Kint
b12574d2c0 fix: pwa-plugin avoid generating manifest when path is an URL (#5089) 2020-01-28 17:01:39 +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
592b305d7e chore: add newline in prompt message 2020-01-27 23:19:42 +08:00
Haoqun Jiang
c6151103b4 test: fix mock module in upgrader test 2020-01-27 23:19:42 +08:00
Haoqun Jiang
51cdebdadf fix applyESLint when eslint plugin is added after unit test plugins (#5028)
* fix: fix applyESLint when eslint plugin is added after unit test plugins

closes #5017

* test: update test for mocha generator
2020-01-27 21:44:36 +08:00
Haoqun Jiang
103d0f125f test: skip the eslint migrator test that constantly times out for now 2020-01-27 21:23:44 +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
be06858bc6 test: remove .only 2020-01-27 20:03:02 +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
15679de2bf refactor: use createRequire to load/resolve modules (#5092)
* refactor: use createRequire to resolve modules

* fix: use file path as createRequire argument; fix loadModule.
2020-01-23 07:08:50 +01:00
Maël Nison
8fcea225b7 feat: adds transparent PnP support to Webpack (#4953)
* feat: adds transparent PnP support to Webpack

* fix: add the plugin name

* fix: now pass tests
2020-01-19 08:18:37 +05:30
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
bc3e4af3c0 refactor: use the title option in the html template, instead… (#5060)
closes #5056
2020-01-13 19:34:41 +05:30
Dan Hogan
9ac7ce5b09 Added rel="noopener noreferrer" to external links (#4744)
* Added rel="noopener noreferrer" to external links

* Added rel="noopener noreferrer" to external links

* Added rel="noopener noreferrer" to external links
2020-01-13 19:27:42 +05:30
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
Daniel Bächtold
7e54d935f4 feat: adaptive icon support with maskable icons (#5053) 2020-01-13 19:20:05 +05:30
plantainX
4e154ac5ad feat(cli-service-global): to know if the build has finished (#5061) 2020-01-13 19:15:25 +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
Bogdan Luca
7b17d6132c fix: use a single websocket connection for HMR (#5069)
* fix(hmr-websocket): add failing test

* fix(hmr-websocket): set injectClient to false, as we inject our own client

* fix(hmr-websocket): change test project name
2020-01-13 21:20:53 +08:00
Marcel Lindig
fff9caaca5 feat(cli): add stdin flag to serve (#2411)
* feat(cli): add stdin flag to serve

* add back --public help

* reorder help
2020-01-10 18:12:01 +08:00
Tao Wei
cb3db60aa8 style: unified components' naming style (#4991) 2020-01-09 20:19:57 +08:00
Yingya Zhang
eaa2b7341f feat: respect existing package.json (#4827) 2020-01-09 20:19:06 +08:00
Yingya Zhang
9ec2d34e65 feat: specify babel runtime version (#4959) 2020-01-06 16:11:03 +08:00
Haoqun Jiang
413470de24 feat: don't throw on console/debugger statements for vue serve (#5029)
1. they're useful in development
2. to be in line with the default preset
2020-01-06 07:47:51 +05:30
Yingya Zhang
2531d10086 feat: add option merge to command create (#4828) 2020-01-06 07:46:34 +05:30
Cédric Exbrayat
1ae53e5c95 fix: comment eslint disable in cypress config (#4910)
The current cypress config has a global eslint-disable:

typescript
```
/* eslint-disable import/no-extraneous-dependencies, global-require, arrow-body-style */
// const webpack = require('@cypress/webpack-preprocessor')
```

But this assumes that `eslint-import-plugin` is present, whereas this is only true when the selected preset is the Airbnb one.
In other cases, this fails `yarn lint` right away with:

```
error: Definition for rule 'import/no-extraneous-dependencies' was not found (import/no-extraneous-dependencies) at tests/e2e/plugins/index.js```

Even if using the Airbnb preset, the comment does not have any effect, as, by default, the `require` call is commented.

This commit now splits the rules disabling in two:

- one commented for the people using Airbnb and who will uncomment the require call below, as it is only useful for them.
- one activated that disables `arrow-body-style` as it will fail the linting for people using Airbnb preset with the current config.
2020-01-03 14:55:19 +08:00