Commit Graph

322 Commits

Author SHA1 Message Date
Haoqun Jiang
8283f46d0b fix: fix config merging during vue invoke in Node.js v12 (#4148)
The root cause here is the same as #4095
The failing `loadModule` call will return `undefined` for a js config
read operation, which later caused config being overwritten.
2019-06-15 13:23:05 +08:00
Haoqun Jiang
82dbbeb07a docs: add description of babel plugin usage in TS plugin prompt (#4046)
closes #3206
2019-05-25 23:00:55 +08:00
Haoqun Jiang
649b564feb chore: update isbinaryfile to 4.x 2019-05-22 16:52:16 +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
f4e6c33044 chore!: default to dart sass for sass option of cssPreprocessor (#3921)
BREAKING CHANGE:
Preset generated before v3.4.0 may contain a `"cssPreprocessor": "sass"`
field. It now means dart-sass rather than node-sass.

`rootOptions.cssPreprocessor === 'sass'` now also means dart sass.
May affect those generator plugins who depends on this field
2019-04-30 23:33:37 +08:00
Haoqun Jiang
a6ceb8d0c1 feat: allow installing core plugins from next dist-tag 2019-04-30 22:48:50 +08:00
Haoqun Jiang
208a99728c fix: revert javascript-stringify to 1.x 2019-04-30 19:22:21 +08:00
Haoqun Jiang
a6fb9af614 fix: javascript-stringify v2 has changed its exports 2019-04-30 18:23:08 +08:00
Haoqun Jiang
3da799c8d8 feat: should support bare option in preset.json (#3848)
closes #3825
2019-04-27 20:05:20 +08:00
Haoqun Jiang
1a72e995e8 fix: fix vue add/invoke bug when user does not have yarn installed (#3806)
closes #3804
2019-04-14 23:01:52 +08:00
Guillaume Chau
022e17da57 fix: --dev shouldn't try to load dev assets, closes #3802 2019-04-13 19:44:14 +02:00
Haoqun Jiang
095067e912 feat: generate .npmrc when using pnpm as package manager 2019-04-11 17:28:51 +08:00
Haoqun Jiang
6740ca363d fix: should add --shamefully-flatten for pnpm install 2019-04-11 16:38:59 +08:00
Haoqun Jiang
94f3ca0e91 fix: better pnpm check
1. separate project pnpm check and global pnpm check
2. rename hasPnpm to hasPnpm3OrLater
2019-04-11 16:38:49 +08:00
Haoqun Jiang
f1807fd304 Merge pull request #3743 from vuejs/next-minor
3.6
2019-04-11 09:26:12 +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
Guillaume Chau
3479f21f12 refactor(plugin): invoke is now done in child process (#3778) 2019-04-08 21:08:07 +02:00
Haoqun Jiang
cb113971e2 feat: do not write undefined fields to config files (#3643)
closes #3058
2019-04-09 00:49:12 +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
Guillaume Chau
8c3ff11653 refactor(project create): run vue create in child process, closes #3664 2019-04-06 01:48:02 +02:00
Barthélémy Ledoux
6e9ba9beb1 fix: add missing package keys to the sort array (issue #3509) (#3510) 2019-02-26 23:52:18 +08:00
Haoqun Jiang
6a750564a8 fix: should check yarn when no pacakage manager specified
(`shouldUseTaobao` is called without arguments in `getPackageVersion`)

fixes #3393
2019-01-31 14:40:13 +08:00
Haoqun Jiang
9c1e797ac6 feat: support dart-sass as default sass implementation (#3321) 2019-01-28 18:51:55 +08:00
musicq
5d1ab5fe9c refactor: check support package manager befor install (#3368) 2019-01-28 11:02:36 +08:00
Haoqun Jiang
108d8011b3 fix: fix injectImports when there's no pre-existing import declarations
closes #2925
2019-01-18 16:12:37 +08:00
Haoqun Jiang
ae2a9bc145 fix: fix typo 2018-12-04 20:51:57 +08:00
Patrick
41443944c7 style: small style fixes (#3063)
* style(babel-prompt): Using else if instead of double blocks

* style(Creator): shouldInitGit doesn't need to be async
2018-12-03 20:04:17 +08:00
Haoqun Jiang
1f5f7c35e5 fix: fix cli version check cache 2018-11-30 01:55:06 +08:00
Haoqun Jiang
31ffcfe0ca feat: new release strategy (#3020)
## Summary
- Keep package minors in sync (`lerna publish --force-publish` when releasing a new minor)
- Patch on demand (`lerna publish` fixed mode)
- `eslint-config-*` packages are published manually

## Longer Description
1. We used to force publish every package till v3.1, this is due to the unbalanced update frequency among different plugins. In practice, some of them, like the pwa plugin, are quite stable and rarely need updating. So force publishing is overkill now.
2. We have switched to independent mode then, for two major benefits: 1) patching on demand and only on demand 2) eslint config packages needs a more aggressive update strategy in practice, due to the frequent breaking changes in the upstream packages. However, this also causes maintenance burden and confusion to end users. So it's far from ideal.
3. So now we choose to go back fixed versioning. By default lerna would skip untouched packages when publishing a new version. This might be confusing as we think. So to reduce the cognitive load, we still keep each package's minor field in sync.

## Implementation Detail

1. To selectively publish packages, we have to disable `useWorkspaces` in lerna so that these packages can be linked by yarn while being unrecognizable to lerna.
2. Due to an oversight in the old version checking code, version fields in `vue-cli-version-marker` needs to be exact versions, otherwise cli will throw on startup. So we have to publish `vue-cli-version-marker` manually after other package updates. This logic can be removed once all users have been upgrade to 3.2.0+ and we can then add it back to `packages` in `lerna.json`
3. We now use `~/.vuerc` to cache version check results. This also fixes #2956
2018-11-28 02:12:05 +08:00
Brandon Yeager
42c51c0f62 fix: display project name validation warnings (#2769) 2018-11-26 12:44:06 +08:00
Haoqun Jiang
d1cd4aa6a2 fix: plugin.options can be missing when runGenerator is directly called
fixes #2906
2018-11-12 15:29:40 +08:00
Haoqun Jiang
044f5b3b7e refactor: use a version map to determine the newest dependency versions
Now that lerna independent mode is used to release new versions, we can
no longer ensure the core service/plugin versions are in sync with
@vue/cli itself. So `vue-cli-version-marker` is now used to store the
latest version map of core packages.

In order to automate this process, all the core cli packages are listed
as `devDependencies` of `vue-cli-version-marker`. This will cause a
cyclic dependency warning in lerna bootstrap, and that warning can be
safely ignored because these are just `devDependencies` which won't
affect end users.

Another gotcha is that the version of `vue-cli-version-marker` will be
bumped each time we do a release. This may break the remote version
check logic before rc.12 (due to
1ae223dfc0 (diff-ac5fc3f8b11df9fc948b8e5aa52a074e)
the background version check might never get executed since rc.12)
2018-11-12 14:24:41 +08:00
Haoqun Jiang
b0f6ed8218 feat: support for --registry option in vue add & vue invoke commands (#2698)
closes #1868
2018-10-29 00:07:15 +08:00
Haoqun Jiang
78c7c129dd feat: support yarn for adding inline registry
closes #2809

Yarn supports `--registry` since v1.2.0
2018-10-28 23:28:57 +08:00
katashin
89edf0d341 fix(cli): avoid assertion error when vue.config.js includes assignment expression (#2770) 2018-10-28 11:51:46 +08:00
Yamagishi Kazutoshi
be814b3518 feat(ui): add --host option (#2568) 2018-10-20 19:57:28 +08:00
Haoqun Jiang
7c91a187e4 chore: add link to configuration reference in the generated README.md
fixes #2519
2018-10-09 17:47:37 +08:00
Amy
f99796e627 fix(preset): plugin invoke order don't sort by unicode order (#2656) 2018-10-09 16:59:15 +08:00
Pavan Kumar Sunkara
1a8394434a fix(cli): make sortObject consistent even when keyOrder is given (#2326) 2018-09-25 01:38:33 +08:00
Haoqun Jiang
5e261be0bb fix: show full project name in error message for vue create . 2018-09-19 21:36:17 +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
ba15fa26b2 fix: use sync fs methods in writeFileTree (#2341)
closes #2275

Iterating over async functions would put too many write calls in I/O
queue in the same time, leading to weird bugs.
2018-09-03 22:34:53 +08:00
The Jared Wilcurt
ff57b8f55f fix: names of Sass and Less (#2384)
* Sass, not SASS

* Update cssPreprocessors.spec.js
2018-08-29 10:25:09 +02:00
dailynodejs
53509e115f [polish] word mistake (#2331)
polish registry word mistake
2018-08-23 17:41:56 +09: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
a76bde100b test: do not call process.exit during tests 2018-08-11 16:11:13 -04:00
Evan You
f83f31a02e fix: fix local preset inference on Windows 2018-08-11 16:10:57 -04:00
Evan You
8ccea270d4 chore: ensure EOL on generated files
close #2127
2018-08-10 09:56:23 -04:00