diff --git a/.circleci/config.yml b/.circleci/config.yml
deleted file mode 100644
index bb2a2df1752..00000000000
--- a/.circleci/config.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-version: 2
-
-defaults: &defaults
- docker:
- - image: vuejs/ci
-
-step_restore_cache: &restore_cache
- restore_cache:
- keys:
- - v1-dependencies-{{ checksum "yarn.lock" }}-1
- - v1-dependencies-
-
-step_install_deps: &install_deps
- run:
- name: Install Dependencies
- command: yarn --frozen-lockfile
-
-step_save_cache: &save_cache
- save_cache:
- paths:
- - node_modules
- - packages/compiler-core/node_modules
- - packages/compiler-sfc/node_modules
- - packages/vue/node_modules
- - ~/.cache/yarn
- key: v1-dependencies-{{ checksum "yarn.lock" }}-1
-
-jobs:
- test:
- <<: *defaults
- steps:
- - checkout
- - *restore_cache
- - *install_deps
- - *save_cache
- - run: yarn ls-lint
- - run: yarn test --ci
-
- test-dts:
- <<: *defaults
- steps:
- - checkout
- - *restore_cache
- - *install_deps
- - *save_cache
- - run: yarn test-dts
-
-workflows:
- version: 2
- ci:
- jobs:
- - test
- - test-dts
diff --git a/.eslintrc.cjs b/.eslintrc.cjs
new file mode 100644
index 00000000000..4296d0f39b6
--- /dev/null
+++ b/.eslintrc.cjs
@@ -0,0 +1,88 @@
+/* eslint-disable no-restricted-globals */
+
+const DOMGlobals = ['window', 'document']
+const NodeGlobals = ['module', 'require']
+
+module.exports = {
+ parser: '@typescript-eslint/parser',
+ parserOptions: {
+ sourceType: 'module'
+ },
+ plugins: ['jest'],
+ rules: {
+ 'no-debugger': 'error',
+ // most of the codebase are expected to be env agnostic
+ 'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
+
+ 'no-restricted-syntax': [
+ 'error',
+ // since we target ES2015 for baseline support, we need to forbid object
+ // rest spread usage in destructure as it compiles into a verbose helper.
+ 'ObjectPattern > RestElement',
+ // tsc compiles assignment spread into Object.assign() calls, but esbuild
+ // still generates verbose helpers, so spread assignment is also prohiboted
+ 'ObjectExpression > SpreadElement',
+ 'AwaitExpression'
+ ]
+ },
+ overrides: [
+ // tests, no restrictions (runs in Node / jest with jsdom)
+ {
+ files: ['**/__tests__/**', 'packages/dts-test/**'],
+ rules: {
+ 'no-restricted-globals': 'off',
+ 'no-restricted-syntax': 'off',
+ 'jest/no-disabled-tests': 'error',
+ 'jest/no-focused-tests': 'error'
+ }
+ },
+ // shared, may be used in any env
+ {
+ files: ['packages/shared/**'],
+ rules: {
+ 'no-restricted-globals': 'off'
+ }
+ },
+ // Packages targeting DOM
+ {
+ files: ['packages/{vue,vue-compat,runtime-dom}/**'],
+ rules: {
+ 'no-restricted-globals': ['error', ...NodeGlobals]
+ }
+ },
+ // Packages targeting Node
+ {
+ files: [
+ 'packages/{compiler-sfc,compiler-ssr,server-renderer,reactivity-transform}/**'
+ ],
+ rules: {
+ 'no-restricted-globals': ['error', ...DOMGlobals],
+ 'no-restricted-syntax': 'off'
+ }
+ },
+ // Private package, browser only + no syntax restrictions
+ {
+ files: ['packages/template-explorer/**', 'packages/sfc-playground/**'],
+ rules: {
+ 'no-restricted-globals': ['error', ...NodeGlobals],
+ 'no-restricted-syntax': 'off'
+ }
+ },
+ // JavaScript files
+ {
+ files: ['*.js', '*.cjs'],
+ rules: {
+ // We only do `no-unused-vars` checks for js files, TS files are checked by TypeScript itself.
+ 'no-unused-vars': ['error', { vars: 'all', args: 'none' }]
+ }
+ },
+ // Node scripts
+ {
+ files: ['scripts/**', '*.{js,ts}', 'packages/**/index.js'],
+ rules: {
+ 'no-restricted-globals': 'off',
+ 'no-restricted-syntax': 'off'
+ }
+ }
+ ]
+}
diff --git a/.eslintrc.js b/.eslintrc.js
deleted file mode 100644
index 98f42a74b9a..00000000000
--- a/.eslintrc.js
+++ /dev/null
@@ -1,66 +0,0 @@
-const DOMGlobals = ['window', 'document']
-const NodeGlobals = ['module', 'require']
-
-module.exports = {
- parser: '@typescript-eslint/parser',
- parserOptions: {
- sourceType: 'module'
- },
- rules: {
- 'no-unused-vars': [
- 'error',
- // we are only using this rule to check for unused arguments since TS
- // catches unused variables but not args.
- { varsIgnorePattern: '.*', args: 'none' }
- ],
- // most of the codebase are expected to be env agnostic
- 'no-restricted-globals': ['error', ...DOMGlobals, ...NodeGlobals],
- // since we target ES2015 for baseline support, we need to forbid object
- // rest spread usage (both assign and destructure)
- 'no-restricted-syntax': [
- 'error',
- 'ObjectExpression > SpreadElement',
- 'ObjectPattern > RestElement'
- ]
- },
- overrides: [
- // tests, no restrictions (runs in Node / jest with jsdom)
- {
- files: ['**/__tests__/**', 'test-dts/**'],
- rules: {
- 'no-restricted-globals': 'off',
- 'no-restricted-syntax': 'off'
- }
- },
- // shared, may be used in any env
- {
- files: ['packages/shared/**'],
- rules: {
- 'no-restricted-globals': 'off'
- }
- },
- // Packages targeting DOM
- {
- files: ['packages/{vue,runtime-dom}/**'],
- rules: {
- 'no-restricted-globals': ['error', ...NodeGlobals]
- }
- },
- // Packages targeting Node
- {
- files: ['packages/{compiler-sfc,compiler-ssr,server-renderer}/**'],
- rules: {
- 'no-restricted-globals': ['error', ...DOMGlobals],
- 'no-restricted-syntax': 'off'
- }
- },
- // Private package, browser only + no syntax restrictions
- {
- files: ['packages/template-explorer/**'],
- rules: {
- 'no-restricted-globals': ['error', ...NodeGlobals],
- 'no-restricted-syntax': 'off'
- }
- }
- ]
-}
diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
index 4a8f6fd424f..9288efdb9ac 100644
--- a/.github/FUNDING.yml
+++ b/.github/FUNDING.yml
@@ -1,3 +1,2 @@
-open_collective: vuejs
-patreon: evanyou
github: yyx990803
+open_collective: vuejs
diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml
new file mode 100644
index 00000000000..95e0ca79c07
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -0,0 +1,74 @@
+name: "\U0001F41E Bug report"
+description: Create a report to help us improve
+body:
+ - type: markdown
+ attributes:
+ value: |
+ **Before You Start...**
+
+ This form is only for submitting bug reports. If you have a usage question
+ or are unsure if this is really a bug, make sure to:
+
+ - Read the [docs](https://vuejs.org/)
+ - Ask on [Discord Chat](https://chat.vuejs.org/)
+ - Ask on [GitHub Discussions](https://github.com/vuejs/core/discussions)
+ - Look for / ask questions on [Stack Overflow](https://stackoverflow.com/questions/ask?tags=vue.js)
+
+ Also try to search for your issue - it may have already been answered or even fixed in the development branch.
+ However, if you find that an old, closed issue still persists in the latest version,
+ you should open a new issue using the form below instead of commenting on the old issue.
+ - type: input
+ id: version
+ attributes:
+ label: Vue version
+ validations:
+ required: true
+ - type: input
+ id: reproduction-link
+ attributes:
+ label: Link to minimal reproduction
+ description: |
+ The easiest way to provide a reproduction is by showing the bug in [The SFC Playground](https://play.vuejs.org/).
+ If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
+ If neither of these are suitable, you can always provide a GitHub repository.
+
+ The reproduction should be **minimal** - i.e. it should contain only the bare minimum amount of code needed
+ to show the bug. See [Bug Reproduction Guidelines](https://github.com/vuejs/core/blob/main/.github/bug-repro-guidelines.md) for more details.
+
+ Please do not just fill in a random link. The issue will be closed if no valid reproduction is provided.
+ placeholder: Reproduction Link
+ validations:
+ required: true
+ - type: textarea
+ id: steps-to-reproduce
+ attributes:
+ label: Steps to reproduce
+ description: |
+ What do we need to do after opening your repro in order to make the bug happen? Clear and concise reproduction instructions are important for us to be able to triage your issue in a timely manner. Note that you can use [Markdown](https://guides.github.com/features/mastering-markdown/) to format lists and code.
+ placeholder: Steps to reproduce
+ validations:
+ required: true
+ - type: textarea
+ id: expected
+ attributes:
+ label: What is expected?
+ validations:
+ required: true
+ - type: textarea
+ id: actually-happening
+ attributes:
+ label: What is actually happening?
+ validations:
+ required: true
+ - type: textarea
+ id: system-info
+ attributes:
+ label: System Info
+ description: Output of `npx envinfo --system --npmPackages vue --binaries --browsers`
+ render: shell
+ placeholder: System, Binaries, Browsers
+ - type: textarea
+ id: additional-comments
+ attributes:
+ label: Any additional comments?
+ description: e.g. some background/context of how you ran into this bug.
diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index ac8a00ef158..02f99c6bfbb 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,8 +1,14 @@
blank_issues_enabled: false
contact_links:
- - name: Create new issue
- url: https://new-issue.vuejs.org/?repo=vuejs/vue-next
- about: Please use the following link to create a new issue.
+ - name: Feature Request
+ url: https://github.com/vuejs/rfcs/discussions
+ about: Suggest new features for consideration
+ - name: Discord Chat
+ url: https://chat.vuejs.org
+ about: Ask questions and discuss with other Vue users in real time.
+ - name: Questions & Discussions
+ url: https://github.com/vuejs/core/discussions
+ about: Use GitHub discussions for message-board style questions and discussions.
- name: Patreon
url: https://www.patreon.com/evanyou
about: Love Vue.js? Please consider supporting us via Patreon.
diff --git a/.github/bug-repro-guidelines.md b/.github/bug-repro-guidelines.md
new file mode 100644
index 00000000000..90458b30741
--- /dev/null
+++ b/.github/bug-repro-guidelines.md
@@ -0,0 +1,29 @@
+## About Bug Reproductions
+
+A bug reproduction is a piece of code that can run and demonstrate how a bug can happen.
+
+### Text is not enough
+
+It's impossible to fix a bug from mere text descriptions. First, it's very difficult to precisely describe a technical problem while keeping it easy to follow; Second, the real cause may very well be something that you forgot to even mention. A reproduction is the only way that can reliably help us understand what is going on, so please provide one.
+
+### A repro must be runnable
+
+Screenshots or videos are NOT reproductions! They only show that the bug exists, but do not provide enough information on why it happens. Only runnable code provides the most complete context and allows us to properly debug the scenario. That said, in some cases videos/gifs can help explain interaction issues that are hard to describe in text.
+
+### A repro should be minimal
+
+Some users would give us a link to a real project and hope we can help them figure out what is wrong. We generally do not accept such requests because:
+
+You are already familiar with your codebase, but we are not. It is extremely time-consuming to hunt a bug in a big and unfamiliar codebase.
+
+The problematic behavior may very well be caused by your code rather than by a bug in Vue.
+
+A minimal reproduction means it demonstrates the bug, and the bug only. It should only contain the bare minimum amount of code that can reliably cause the bug. Try your best to get rid of anything that aren't directly related to the problem.
+
+### How to create a repro
+
+For Vue 3 core reproductions, try reproducing it in [The SFC Playground](https://play.vuejs.org/).
+
+If it cannot be reproduced in the playground and requires a proper build setup, try [StackBlitz](https://vite.new/vue).
+
+If neither of these are suitable, you can always provide a GitHub repository.
diff --git a/.github/contributing.md b/.github/contributing.md
index a64b89a2fcb..9c385f1bcc9 100644
--- a/.github/contributing.md
+++ b/.github/contributing.md
@@ -2,10 +2,11 @@
Hi! I'm really excited that you are interested in contributing to Vue.js. Before submitting your contribution, please make sure to take a moment and read through the following guidelines:
-- [Code of Conduct](https://github.com/vuejs/vue/blob/dev/.github/CODE_OF_CONDUCT.md)
+- [Code of Conduct](https://vuejs.org/about/coc.html)
- [Issue Reporting Guidelines](#issue-reporting-guidelines)
- [Pull Request Guidelines](#pull-request-guidelines)
- [Development Setup](#development-setup)
+- [Scripts](#scripts)
- [Project Structure](#project-structure)
- [Contributing Tests](#contributing-tests)
- [Financial Contribution](#financial-contribution)
@@ -16,7 +17,9 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
## Pull Request Guidelines
-- Checkout a topic branch from a base branch, e.g. `master`, and merge back against that branch.
+- Checkout a topic branch from a base branch, e.g. `main`, and merge back against that branch.
+
+- [Make sure to tick the "Allow edits from maintainers" box](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/allowing-changes-to-a-pull-request-branch-created-from-a-fork). This allows us to directly make minor edits / refactors and saves a lot of time.
- If adding a new feature:
@@ -27,36 +30,77 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before
- If you are resolving a special issue, add `(fix #xxxx[,#xxxx])` (#xxxx is the issue id) in your PR title for a better release log, e.g. `update entities encoding/decoding (fix #3899)`.
- Provide a detailed description of the bug in the PR. Live demo preferred.
- - Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `yarn test --coverage`.
+ - Add appropriate test coverage if applicable. You can check the coverage of your code addition by running `nr test-coverage`.
- It's OK to have multiple small commits as you work on the PR - GitHub can automatically squash them before merging.
- Make sure tests pass!
-- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
+- Commit messages must follow the [commit message convention](./commit-convention.md) so that changelogs can be automatically generated. Commit messages are automatically validated before commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
+
+- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks)).
+
+### Advanced Pull Request Tips
+
+- The PR should fix the intended bug **only** and not introduce unrelated changes. This includes unnecessary refactors - a PR should focus on the fix and not code style, this makes it easier to trace changes in the future.
+
+- Consider the performance / size impact of the changes, and whether the bug being fixes justifies the cost. If the bug being fixed is a very niche edge case, we should try to minimize the size / perf cost to make it worthwhile.
-- No need to worry about code style as long as you have installed the dev dependencies - modified files are automatically formatted with Prettier on commit (by invoking [Git Hooks](https://git-scm.com/docs/githooks) via [yorkie](https://github.com/yyx990803/yorkie)).
+ - Is the code perf-sensitive (e.g. in "hot paths" like component updates or the vdom patch function?)
+
+ - If the branch is dev-only, performance is less of a concern.
+
+ - Check how much extra bundle size the change introduces.
+ - Make sure to put dev-only code in `__DEV__` branches so they are tree-shakable.
+ - Runtime code is more sensitive to size increase than compiler code.
+ - Make sure it doesn't accidentally cause dev-only or compiler-only code branches to be included in the runtime build. Notable case is that some functions in `@vue/shared` are compiler-only and should not be used in runtime code, e.g. `isHTMLTag` and `isSVGTag`.
## Development Setup
-You will need [Node.js](http://nodejs.org) **version 10+**, and [Yarn 1.x](https://yarnpkg.com/en/docs/install).
+You will need [Node.js](https://nodejs.org) **version 18.12+**, and [PNPM](https://pnpm.io) **version 8+**.
+
+We also recommend installing [ni](https://github.com/antfu/ni) to help switching between repos using different package managers. `ni` also provides the handy `nr` command which running npm scripts easier.
After cloning the repo, run:
```bash
-$ yarn # install the dependencies of the project
+$ pnpm i # install the dependencies of the project
```
A high level overview of tools used:
- [TypeScript](https://www.typescriptlang.org/) as the development language
-- [Rollup](https://rollupjs.org) for bundling
-- [Jest](https://jestjs.io/) for unit testing
+- [Vite](https://vitejs.dev/) and [ESBuild](https://esbuild.github.io/) for development bundling
+- [Rollup](https://rollupjs.org) for production bundling
+- [Vitest](https://vitest.dev/) for unit testing
- [Prettier](https://prettier.io/) for code formatting
+- [ESLint](https://eslint.org/) for static error prevention (outside of types)
+
+## Git Hooks
+
+The project uses [simple-git-hooks](https://github.com/toplenboren/simple-git-hooks) to enforce the following on each commit:
+
+- Type check the entire project
+- Automatically format changed files using Prettier
+- Verify commit message format (logic in `scripts/verifyCommit.js`)
## Scripts
-### `yarn build`
+**The examples below will be using the `nr` command from the [ni](https://github.com/antfu/ni) package.** You can also use plain `npm run`, but you will need to pass all additional arguments after the command after an extra `--`. For example, `nr build runtime --all` is equivalent to `npm run build -- runtime --all`.
+
+The `run-s` and `run-p` commands found in some scripts are from [npm-run-all](https://github.com/mysticatea/npm-run-all) for orchestrating multiple scripts. `run-s` means "run in sequence" while `run-p` means "run in parallel".
+
+- [`nr build`](#nr-build)
+- [`nr build-dts`](#nr-build-dts)
+- [`nr check`](#nr-check)
+- [`nr dev`](#nr-dev)
+- [`nr dev-sfc`](#nr-dev-sfc)
+- [`nr dev-esm`](#nr-dev-esm)
+- [`nr dev-compiler`](#nr-dev-compiler)
+- [`nr test`](#nr-test)
+- [`nr test-dts`](#nr-test-dts)
+
+### `nr build`
The `build` script builds all public packages (packages without `private: true` in their `package.json`).
@@ -64,12 +108,14 @@ Packages to build can be specified with fuzzy matching:
```bash
# build runtime-core only
-yarn build runtime-core
+nr build runtime-core
# build all packages matching "runtime"
-yarn build runtime --all
+nr build runtime --all
```
+Note that `nr build` uses `rollup-plugin-esbuild` for transpiling typescript and **does not perform type checking**. To run type check on the entire codebase, run `nr check`. Type checks are also automatically run on each commit.
+
#### Build Formats
By default, each package will be built in multiple distribution formats as specified in the `buildOptions.formats` field in its `package.json`. These can be overwritten via the `-f` flag. The following formats are supported:
@@ -85,74 +131,89 @@ Additional formats that only apply to the main `vue` package:
- **`esm-bundler-runtime`**
- **`esm-browser-runtime`**
-More details about each of these formats can be found in the [`vue` package README](https://github.com/vuejs/vue-next/blob/master/packages/vue/README.md#which-dist-file-to-use) and the [Rollup config file](https://github.com/vuejs/vue-next/blob/master/rollup.config.js).
+More details about each of these formats can be found in the [`vue` package README](https://github.com/vuejs/core/blob/main/packages/vue/README.md#which-dist-file-to-use) and the [Rollup config file](https://github.com/vuejs/core/blob/main/rollup.config.js).
For example, to build `runtime-core` with the global build only:
```bash
-yarn build runtime-core -f global
+nr build runtime-core -f global
```
Multiple formats can be specified as a comma-separated list:
```bash
-yarn build runtime-core -f esm-browser,cjs
+nr build runtime-core -f esm-browser,cjs
```
#### Build with Source Maps
Use the `--sourcemap` or `-s` flag to build with source maps. Note this will make the build much slower.
-#### Build with Type Declarations
+### `nr build-dts`
-The `--types` or `-t` flag will generate type declarations during the build and in addition:
+This command builds the type declarations for all packages. It first generates the raw `.d.ts` files in the `temp` directory, then uses [rollup-plugin-dts](https://github.com/Swatinem/rollup-plugin-dts) to roll the types into a single `.d.ts` file for each package.
-- Roll the declarations into a single `.d.ts` file for each package;
-- Generate an API report in `
+
+
+
+
+ Sponsors & Backers
+
+Vue.js is an MIT-licensed open source project with its ongoing development made possible entirely by the support of the awesome sponsors and backers listed in this file. If you'd like to join them, please consider [ sponsoring Vue's development](https://vuejs.org/sponsor/).
+
+Special Sponsor
+
+ + + +
-## Changes from Vue 2 ++ + + +
-Please consult the [Migration Guide](https://v3.vuejs.org/guide/migration/introduction.html). +## Questions -- Note: IE11 support is still pending. +For questions and support please use [the official forum](https://forum.vuejs.org) or [community chat](https://chat.vuejs.org/). The issue list of this repo is **exclusively** for bug reports and feature requests. -## Supporting Libraries +## Issues -All of our official libraries and tools now support Vue 3, but most of them are still in beta status and distributed under the `next` dist tag on NPM. **We are planning to stabilize and switch all projects to use the `latest` dist tag by end of 2020.** +Please make sure to respect issue requirements and use [the new issue helper](https://new-issue.vuejs.org/) when opening an issue. Issues not conforming to the guidelines may be closed immediately. -### Vue CLI +## Stay In Touch -As of v4.5.0, `vue-cli` now provides built-in option to choose Vue 3 preset when creating a new project. You can upgrade `vue-cli` and run `vue create` to create a Vue 3 project today. +- [Twitter](https://twitter.com/vuejs) +- [Blog](https://blog.vuejs.org/) +- [Job Board](https://vuejobs.com/?ref=vuejs) -### Vue Router +## Contribution -Vue Router 4.0 provides Vue 3 support and has a number of breaking changes of its own. Check out its [Migration Guide](https://next.router.vuejs.org/guide/migration/) for full details. +Please make sure to read the [Contributing Guide](https://github.com/vuejs/core/blob/main/.github/contributing.md) before making a pull request. If you have a Vue-related project/component/tool, add it with a pull request to [this curated list](https://github.com/vuejs/awesome-vue)! -- [![beta](https://img.shields.io/npm/v/vue-router/next.svg)](https://www.npmjs.com/package/vue-router/v/next) -- [Github](https://github.com/vuejs/vue-router-next) -- [RFCs](https://github.com/vuejs/rfcs/pulls?q=is%3Apr+is%3Amerged+label%3Arouter) +Thank you to all the people who already contributed to Vue! -### Vuex + -Vuex 4.0 provides Vue 3 support with largely the same API as 3.x. The only breaking change is [how the plugin is installed](https://github.com/vuejs/vuex/tree/4.0#breaking-changes). +## License -- [![beta](https://img.shields.io/npm/v/vuex/next.svg)](https://www.npmjs.com/package/vuex/v/next) -- [Github](https://github.com/vuejs/vuex/tree/4.0) +[MIT](https://opensource.org/licenses/MIT) -### Devtools Extension - -We are working on a new version of the Devtools with a new UI and refactored internals to support multiple Vue versions. The new version is currently in beta and only supports Vue 3 (for now). Vuex and Router integration is also work in progress. - -- For Chrome: [Install from Chrome web store](https://chrome.google.com/webstore/detail/vuejs-devtools/ljjemllljcmogpfapbkkighbhhppjdbg?hl=en) - - - Note: the beta channel may conflict with the stable version of devtools so you may need to temporarily disable the stable version for the beta channel to work properly. - -- For Firefox: [Download the signed extension](https://github.com/vuejs/vue-devtools/releases/tag/v6.0.0-beta.2) (`.xpi` file under Assets) - -### IDE Support - -It is recommended to use [VSCode](https://code.visualstudio.com/) with our official extension [Vetur](https://marketplace.visualstudio.com/items?itemName=octref.vetur), which provides comprehensive IDE support for Vue 3. - -### Other Projects - -| Project | NPM | Repo | -| --------------------- | ----------------------------- | -------------------- | -| @vue/babel-plugin-jsx | [![rc][jsx-badge]][jsx-npm] | [[Github][jsx-code]] | -| eslint-plugin-vue | [![stable][epv-badge]][epv-npm] | [[Github][epv-code]] | -| @vue/test-utils | [![beta][vtu-badge]][vtu-npm] | [[Github][vtu-code]] | -| vue-class-component | [![beta][vcc-badge]][vcc-npm] | [[Github][vcc-code]] | -| vue-loader | [![beta][vl-badge]][vl-npm] | [[Github][vl-code]] | -| rollup-plugin-vue | [![beta][rpv-badge]][rpv-npm] | [[Github][rpv-code]] | - -[jsx-badge]: https://img.shields.io/npm/v/@vue/babel-plugin-jsx.svg -[jsx-npm]: https://www.npmjs.com/package/@vue/babel-plugin-jsx -[jsx-code]: https://github.com/vuejs/jsx-next -[vd-badge]: https://img.shields.io/npm/v/@vue/devtools/beta.svg -[vd-npm]: https://www.npmjs.com/package/@vue/devtools/v/beta -[vd-code]: https://github.com/vuejs/vue-devtools/tree/next -[epv-badge]: https://img.shields.io/npm/v/eslint-plugin-vue.svg -[epv-npm]: https://www.npmjs.com/package/eslint-plugin-vue -[epv-code]: https://github.com/vuejs/eslint-plugin-vue -[vtu-badge]: https://img.shields.io/npm/v/@vue/test-utils/next.svg -[vtu-npm]: https://www.npmjs.com/package/@vue/test-utils/v/next -[vtu-code]: https://github.com/vuejs/vue-test-utils-next -[jsx-badge]: https://img.shields.io/npm/v/@ant-design-vue/babel-plugin-jsx.svg -[jsx-npm]: https://www.npmjs.com/package/@ant-design-vue/babel-plugin-jsx -[jsx-code]: https://github.com/vueComponent/jsx -[vcc-badge]: https://img.shields.io/npm/v/vue-class-component/next.svg -[vcc-npm]: https://www.npmjs.com/package/vue-class-component/v/next -[vcc-code]: https://github.com/vuejs/vue-class-component/tree/next -[vl-badge]: https://img.shields.io/npm/v/vue-loader/next.svg -[vl-npm]: https://www.npmjs.com/package/vue-loader/v/next -[vl-code]: https://github.com/vuejs/vue-loader/tree/next -[rpv-badge]: https://img.shields.io/npm/v/rollup-plugin-vue/next.svg -[rpv-npm]: https://www.npmjs.com/package/rollup-plugin-vue/v/next -[rpv-code]: https://github.com/vuejs/rollup-plugin-vue/tree/next +Copyright (c) 2013-present, Yuxi (Evan) You diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000000..dac6018b5bc --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,7 @@ +# Reporting a Vulnerability + +To report a vulnerability, please email security@vuejs.org. + +While the discovery of new vulnerabilities is rare, we also recommend always using the latest versions of Vue and its official companion libraries to ensure your application remains as secure as possible. + +Please note that we do not consider XSS via template expressions a valid attack vector, because it can only happen if the user intentionally uses untrusted content as template compilation source. This is similar to knowingly pasting untrusted scripts into a browser console. We explicitly warn users against using untrusted content as template compilation source in our documentation. diff --git a/api-extractor.json b/api-extractor.json deleted file mode 100644 index 883bf47a3ae..00000000000 --- a/api-extractor.json +++ /dev/null @@ -1,50 +0,0 @@ -// this the shared base config for all packages. -{ - "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", - - "apiReport": { - "enabled": true, - "reportFolder": "() + `, + files + ) + expect(props).toStrictEqual({ + foo: ['Number'], + bar: ['String'] + }) + expect(deps && [...deps]).toStrictEqual(Object.keys(files)) + }) + + test.runIf(process.platform === 'win32')('relative ts on Windows', () => { + const files = { + 'C:\\Test\\foo.ts': 'export type P = { foo: number }', + 'C:\\Test\\bar.d.ts': + 'type X = { bar: string }; export { X as Y };' + + // verify that we can parse syntax that is only valid in d.ts + 'export const baz: boolean' + } + const { props, deps } = resolve( + ` + import { P } from './foo' + import { Y as PP } from './bar' + defineProps