Skip to content

Commit

Permalink
Merge branch 'main' into bwsy/fix/vModel
Browse files Browse the repository at this point in the history
  • Loading branch information
baiwusanyu-c authored Aug 30, 2023
2 parents abbd0bd + 8998afa commit d70dee1
Show file tree
Hide file tree
Showing 201 changed files with 2,660 additions and 1,248 deletions.
7 changes: 1 addition & 6 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ module.exports = {
},
// Node scripts
{
files: [
'scripts/**',
'*.{js,ts}',
'packages/**/index.js',
'packages/size-check/**'
],
files: ['scripts/**', '*.{js,ts}', 'packages/**/index.js'],
rules: {
'no-restricted-globals': 'off',
'no-restricted-syntax': 'off'
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
blank_issues_enabled: false
contact_links:
- 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.
Expand Down
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/feature_request.yml

This file was deleted.

8 changes: 3 additions & 5 deletions .github/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Hi! I'm really excited that you are interested in contributing to Vue.js. Before

## Development Setup

You will need [Node.js](https://nodejs.org) **version 16+**, and [PNPM](https://pnpm.io) **version 7+**.
You will need [Node.js](https://nodejs.org) **version 16+**, 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.

Expand Down Expand Up @@ -248,8 +248,6 @@ This repository employs a [monorepo](https://en.wikipedia.org/wiki/Monorepo) set

- `template-explorer`: A development tool for debugging compiler output, continuously deployed at https://template-explorer.vuejs.org/. To run it locally, run [`nr dev-compiler`](#nr-dev-compiler).

- `size-check`: Used for checking built bundle sizes on CI.

### Importing Packages

The packages can import each other directly using their package names. Note that when importing a package, the name listed in its `package.json` should be used. Most of the time the `@vue/` prefix is needed:
Expand All @@ -261,7 +259,7 @@ import { h } from '@vue/runtime-core'
This is made possible via several configurations:

- For TypeScript, `compilerOptions.paths` in `tsconfig.json`
- Vitest and Rollup share the sae set of aliases from `scripts/aliases.js`
- Vitest and Rollup share the same set of aliases from `scripts/aliases.js`
- For plain Node.js, they are linked using [PNPM Workspaces](https://pnpm.io/workspaces).

### Package Dependencies
Expand Down Expand Up @@ -330,4 +328,4 @@ Funds donated via Patreon go directly to support Evan You's full-time work on Vu

Thank you to all the people who have already contributed to Vue.js!

<a href="https://github.com/vuejs/vue/graphs/contributors"><img src="https://opencollective.com/vuejs/contributors.svg?width=890" /></a>
<a href="https://github.com/vuejs/core/graphs/contributors"><img src="https://opencollective.com/vuejs/contributors.svg?width=890" /></a>
24 changes: 2 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,28 +109,8 @@ jobs:
- name: Run eslint
run: pnpm run lint

# - name: Run prettier
# run: pnpm run format-check
- name: Run prettier
run: pnpm run format-check

- name: Run type declaration tests
run: pnpm run test-dts

size:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to 18
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'pnpm'

- run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install
- run: pnpm run size
49 changes: 49 additions & 0 deletions .github/workflows/size-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: size data

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
upload:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm

- name: Install dependencies
run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install

- run: pnpm run size

- name: Upload Size Data
uses: actions/upload-artifact@v3
with:
name: size-data
path: temp/size

- name: Save PR number
if: ${{github.event_name == 'pull_request'}}
run: echo ${{ github.event.number }} > ./pr.txt

- uses: actions/upload-artifact@v2
if: ${{github.event_name == 'pull_request'}}
with:
name: pr-number
path: pr.txt
81 changes: 81 additions & 0 deletions .github/workflows/size-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: size report

on:
workflow_run:
workflows: ['size data']
types:
- completed

permissions:
contents: read
pull-requests: write
issues: write

jobs:
size-report:
runs-on: ubuntu-latest
if: >
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- uses: actions/checkout@v3

- name: Install pnpm
uses: pnpm/action-setup@v2

- name: Set node version to LTS
uses: actions/setup-node@v3
with:
node-version: lts/*
cache: pnpm

- name: Install dependencies
run: PUPPETEER_SKIP_DOWNLOAD=1 pnpm install

- name: Download PR number
uses: dawidd6/action-download-artifact@v2
with:
name: pr-number
run_id: ${{ github.event.workflow_run.id }}

- name: Read PR Number
id: pr-number
uses: juliangruber/read-file-action@v1
with:
path: ./pr.txt

- name: Download Size Data
uses: dawidd6/action-download-artifact@v2
with:
name: size-data
run_id: ${{ github.event.workflow_run.id }}
path: temp/size

- name: Download Previous Size Data
uses: dawidd6/action-download-artifact@v2
with:
branch: main
workflow: size-data.yml
event: push
name: size-data
path: temp/size-prev
if_no_artifact_found: warn

- name: Compare size
run: pnpm tsx scripts/size-report.ts > size-report.md

- name: Read Size Report
id: size-report
uses: juliangruber/read-file-action@v1
with:
path: ./size-report.md

- name: Create Comment
uses: actions-cool/maintain-one-comment@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr-number.outputs.content }}
body: |
${{ steps.size-report.outputs.content }}
<!-- VUE_CORE_SIZE -->
body-include: '<!-- VUE_CORE_SIZE -->'
2 changes: 1 addition & 1 deletion BACKERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ Vue.js is an MIT-licensed open source project with its ongoing development made

<p align="center">
<a target="_blank" href="https://sponsors.vuejs.org/backers.svg">
<img alt="sponsors" src="https://sponsors.vuejs.org/backers.svg">
<img alt="sponsors" src="https://sponsors.vuejs.org/backers.svg?v1">
</a>
</p>
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,31 @@
## [3.3.4](https://github.com/vuejs/core/compare/v3.3.3...v3.3.4) (2023-05-18)


### Bug Fixes

* **build:** ensure correct typing for node esm ([d621d4c](https://github.com/vuejs/core/commit/d621d4c646b2d7b190fbd44ad1fd04512b3de300))
* **build:** fix __DEV__ flag replacement edge case ([8b7c04b](https://github.com/vuejs/core/commit/8b7c04b18f73aad9a08dd57eba90101b5b2aef28)), closes [#8353](https://github.com/vuejs/core/issues/8353)
* **compiler-sfc:** handle imported types from default exports ([5aec717](https://github.com/vuejs/core/commit/5aec717a2402652306085f58432ba3ab91848a74)), closes [#8355](https://github.com/vuejs/core/issues/8355)



## [3.3.3](https://github.com/vuejs/core/compare/v3.3.2...v3.3.3) (2023-05-18)


### Bug Fixes

* avoid regex s flag for old browsers ([91f1c62](https://github.com/vuejs/core/commit/91f1c62e6384a8b09f90e7e43b8d347901e529a0)), closes [#8316](https://github.com/vuejs/core/issues/8316)
* **build:** fix dev flag replacement in esm-builder builds ([#8314](https://github.com/vuejs/core/issues/8314)) ([003836f](https://github.com/vuejs/core/commit/003836f90e1f00ebd04b77ec07ccfa4e649a2ff4)), closes [#8312](https://github.com/vuejs/core/issues/8312)
* **compiler-sfc:** don't hoist regexp literial ([#8300](https://github.com/vuejs/core/issues/8300)) ([8ec73a3](https://github.com/vuejs/core/commit/8ec73a3aea7a52e9479f107ae5737761166ddae6))
* **compiler-sfc:** fix props destructing default value type checking with unresolved type ([#8340](https://github.com/vuejs/core/issues/8340)) ([f69dbab](https://github.com/vuejs/core/commit/f69dbabf8794426c3e9ed33ae77dd8ce655eafd2)), closes [#8326](https://github.com/vuejs/core/issues/8326)
* **compiler-sfc:** fix type import from path aliased vue file ([fab9c72](https://github.com/vuejs/core/commit/fab9c727805c6186c490f99023e8cf5401b0b5a9)), closes [#8348](https://github.com/vuejs/core/issues/8348)
* **compiler-sfc:** handle ts files with relative imports with .js extension ([b36addd](https://github.com/vuejs/core/commit/b36addd3bde07467e9ff5641bd1c2bdc3085944c)), closes [#8339](https://github.com/vuejs/core/issues/8339)
* **compiler-sfc:** parses correctly when inline mode is off ([#8337](https://github.com/vuejs/core/issues/8337)) ([ecbd42a](https://github.com/vuejs/core/commit/ecbd42a1444e3c599e464dec002e43d548d99669)), closes [#6088](https://github.com/vuejs/core/issues/6088)
* **compiler-sfc:** support defineEmits type reference with unions ([#8299](https://github.com/vuejs/core/issues/8299)) ([b133e0f](https://github.com/vuejs/core/commit/b133e0fd97b0b4fabbb43151c19031b8fb47c05b)), closes [#7943](https://github.com/vuejs/core/issues/7943)
* **types:** support generic usage with withDefaults + defineProps ([#8335](https://github.com/vuejs/core/issues/8335)) ([216f269](https://github.com/vuejs/core/commit/216f26995b63c2df26ca0f39f390fe8d59cdabfa)), closes [#8310](https://github.com/vuejs/core/issues/8310) [#8331](https://github.com/vuejs/core/issues/8331) [#8325](https://github.com/vuejs/core/issues/8325)



## [3.3.2](https://github.com/vuejs/core/compare/v3.3.1...v3.3.2) (2023-05-12)


Expand Down
28 changes: 16 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"private": true,
"version": "3.3.2",
"packageManager": "pnpm@8.4.0",
"version": "3.3.4",
"packageManager": "pnpm@8.6.2",
"type": "module",
"scripts": {
"dev": "node scripts/dev.js",
"build": "node scripts/build.js",
"build-dts": "tsc -p tsconfig.build.json && rollup -c rollup.dts.config.js",
"size": "run-s size-global size-baseline",
"size-global": "node scripts/build.js vue runtime-dom -f global -p",
"size-baseline": "node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler && cd packages/size-check && vite build && node brotli",
"size": "run-s \"size-*\" && tsx scripts/usage-size.ts",
"size-global": "node scripts/build.js vue runtime-dom -f global -p --size",
"size-esm-runtime": "node scripts/build.js vue -f esm-bundler-runtime",
"size-esm": "node scripts/build.js runtime-dom runtime-core reactivity shared -f esm-bundler",
"check": "tsc --incremental --noEmit",
"lint": "eslint --cache --ext .ts packages/*/{src,__tests__}/**.ts",
"format": "prettier --write --cache --parser typescript \"**/*.[tj]s?(x)\"",
"format-check": "prettier --check --cache --parser typescript \"**/*.[tj]s?(x)\"",
"format": "prettier --write --cache \"**/*.[tj]s?(x)\"",
"format-check": "prettier --check --cache \"**/*.[tj]s?(x)\"",
"test": "vitest",
"test-unit": "vitest -c vitest.unit.config.ts",
"test-e2e": "node scripts/build.js vue -f global -d && vitest -c vitest.e2e.config.ts",
Expand All @@ -35,7 +36,7 @@
"build-runtime-esm": "node scripts/build.js runtime reactivity shared -af esm-bundler && node scripts/build.js vue -f esm-bundler-runtime && node scripts/build.js vue -f esm-browser-runtime",
"build-ssr-esm": "node scripts/build.js compiler-sfc server-renderer -f esm-browser",
"build-sfc-playground-self": "cd packages/sfc-playground && npm run build",
"preinstall": "node ./scripts/preinstall.js",
"preinstall": "npx only-allow pnpm",
"postinstall": "simple-git-hooks"
},
"simple-git-hooks": {
Expand Down Expand Up @@ -81,23 +82,26 @@
"lint-staged": "^10.2.10",
"lodash": "^4.17.15",
"magic-string": "^0.30.0",
"markdown-table": "^3.0.3",
"marked": "^4.0.10",
"minimist": "^1.2.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.7.1",
"prettier": "^3.0.1",
"pretty-bytes": "^6.1.1",
"pug": "^3.0.1",
"puppeteer": "~19.6.0",
"rollup": "^3.20.2",
"rollup": "^3.26.0",
"rollup-plugin-dts": "^5.3.0",
"rollup-plugin-esbuild": "^5.0.0",
"rollup-plugin-polyfill-node": "^0.12.0",
"semver": "^7.3.2",
"serve": "^12.0.0",
"simple-git-hooks": "^2.8.1",
"terser": "^5.15.1",
"terser": "^5.19.2",
"todomvc-app-css": "^2.3.0",
"tslib": "^2.5.0",
"typescript": "^5.0.0",
"tsx": "^3.12.7",
"typescript": "^5.1.6",
"vite": "^4.3.0",
"vitest": "^0.30.1"
}
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-core/__tests__/parse.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import { ParserOptions } from '../src/options'
import { baseParse, TextModes } from '../src/parse'
import { ErrorCodes } from '../src/errors'
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-core/__tests__/transform.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import { baseParse } from '../src/parse'
import { transform, NodeTransform } from '../src/transform'
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import {
CompilerOptions,
baseParse as parse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import {
baseParse as parse,
transform,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import {
CompilerOptions,
baseParse as parse,
Expand Down
1 change: 0 additions & 1 deletion packages/compiler-core/__tests__/transforms/vBind.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { vi } from 'vitest'
import {
baseParse as parse,
transform,
Expand Down
Loading

0 comments on commit d70dee1

Please sign in to comment.