Skip to content

Commit

Permalink
Merge branch 'master' into volar-1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Nov 29, 2023
2 parents 9c5d245 + 6f85019 commit 12d3e22
Show file tree
Hide file tree
Showing 50 changed files with 1,422 additions and 1,739 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18
version: latest

- run: npm i -g pnpm ovsx
- run: pnpm install --frozen-lockfile --no-optional
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- run: pnpm install -g ovsx
- run: pnpm install --frozen-lockfile
- run: pnpm run build:minify && pnpm ovsx publish
working-directory: extensions/vscode
env:
Expand Down
20 changes: 11 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: testing
name: test

on: [push, pull_request]

Expand All @@ -8,20 +8,22 @@ jobs:

strategy:
matrix:
node-version: [16.x]
node-version: [16]
os: [macos-latest, windows-latest, ubuntu-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
with:
version: latest

# install node
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: pnpm

# install pnpm
- run: npm i -g pnpm
- run: pnpm install --frozen-lockfile --no-optional
- run: pnpm run build-ci
- run: pnpm install --frozen-lockfile
- run: pnpm run build
- run: pnpm run test
15 changes: 9 additions & 6 deletions .github/workflows/update-html-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@ jobs:
update-html-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: pnpm/action-setup@v2
with:
node-version: 18
version: latest

# install deps
- run: npm i -g pnpm
- run: pnpm i
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm

- run: pnpm install

# update data
- name: Update HTML Data
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,24 @@
</tbody>
</table>

## 1.8.24 (2023/11/29)

- refactor(component-type-helpers): vue 2 types now move to `vue-component-type-helpers/vue2` ([#3404](https://github.com/vuejs/language-tools/issues/3404))
- feat(language-core): expose `defineEmits`'s `arg` and `typeArg` in `parseScriptSetupRanges` ([#3710](https://github.com/vuejs/language-tools/issues/3710)) - thanks @so1ve
- fix(language-core): `strictTemplates` fails to report unknown components ([#3539](https://github.com/vuejs/language-tools/issues/3539))
- fix(language-core): script syntax breaks if script options does not have trailing comma ([#3755](https://github.com/vuejs/language-tools/issues/3755))
- fix(language-core): script syntax breaks if options are enclosed in parentheses ([#3756](https://github.com/vuejs/language-tools/issues/3756))
- fix(language-core): allow using `as` with multiple `<script>` blocks ([#3733](https://github.com/vuejs/language-tools/issues/3733)) - thanks @so1ve
- fix(language-core): component type narrowing not working in template
- fix(language-core): incremental insertion incorrect if input `<script setup>` tag above `<script>` tag ([#3743](https://github.com/vuejs/language-tools/issues/3743)) - thanks @so1ve
- fix(language-core): don't camelize attributes for plain elements ([#3750](https://github.com/vuejs/language-tools/issues/3750)) - thanks @rchl
- fix(vscode): syntax highlighting for `.prop` shorthand ([#3729](https://github.com/vuejs/language-tools/issues/3729)) - thanks @so1ve

#### Volar.js 1.11.1 updates:

- fix: browser integration no longer requires node polyfill (https://github.com/volarjs/volar.js/pull/70)
- fix: document continuous change merge results are incorrect in WebStorm (https://github.com/volarjs/volar.js/pull/77) - thanks @browsnet

## 1.8.22 (2023/10/27)

- fix: `experimentalResolveStyleCssClasses: "always"` not working ([#3689](https://github.com/vuejs/language-tools/issues/3689)) - thanks @maIIady
Expand Down
4 changes: 2 additions & 2 deletions extensions/vscode-typescript-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "vscode-typescript-vue-plugin",
"version": "1.8.22",
"version": "1.8.24",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
"devDependencies": {
"esbuild": "latest",
"typescript-vue-plugin": "1.8.22",
"typescript-vue-plugin": "1.8.24",
"vsce": "latest"
}
}
8 changes: 4 additions & 4 deletions extensions/vscode/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "volar",
"version": "1.8.22",
"version": "1.8.24",
"repository": {
"type": "git",
"url": "https://github.com/vuejs/language-tools.git",
Expand Down Expand Up @@ -737,9 +737,9 @@
"devDependencies": {
"@types/semver": "^7.5.3",
"@types/vscode": "^1.82.0",
"@volar/vscode": "~1.11.0",
"@vue/language-core": "1.8.22",
"@vue/language-server": "1.8.22",
"@volar/vscode": "~1.11.1",
"@vue/language-core": "1.8.24",
"@vue/language-server": "1.8.24",
"esbuild": "latest",
"esbuild-plugin-copy": "latest",
"esbuild-visualizer": "latest",
Expand Down
2 changes: 1 addition & 1 deletion extensions/vscode/syntaxes/vue.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -953,7 +953,7 @@
]
},
"vue-directives-original": {
"begin": "(?:\\b(v-)|(:)|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*",
"begin": "(?:\\b(v-)|([:\\.])|(@)|(#))(\\[?)([\\w\\-]*)(\\]?)(?:\\.([\\w\\-]*))*",
"beginCaptures": {
"1": {
"name": "entity.other.attribute-name.html.vue"
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"packages/*",
"test-workspace"
],
"version": "1.8.22"
"version": "1.8.24"
}
9 changes: 3 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"private": true,
"scripts": {
"build": "tsc -b",
"build-ci": "tsc -b tsconfig.ci.json",
"watch": "npm run build && (npm run watch:base & npm run watch:vue & npm run watch:ts-plugin)",
"watch:base": "tsc -b -w",
"watch:vue": "cd ./extensions/vscode && npm run watch",
Expand All @@ -21,13 +20,11 @@
"chrome": "vscode-test-web --browserType=chromium --extensionDevelopmentPath=./extensions/vscode ../volar-starter"
},
"devDependencies": {
"@volar/language-service": "~1.11.0",
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest",
"@volar/language-service": "~1.11.1",
"typescript": "latest",
"vite": "latest",
"vitest": "latest"
},
"optionalDependencies": {
"@lerna-lite/cli": "latest",
"@lerna-lite/publish": "latest"
}
}
8 changes: 4 additions & 4 deletions packages/component-meta/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-component-meta",
"version": "1.8.22",
"version": "1.8.24",
"main": "out/index.js",
"license": "MIT",
"files": [
Expand All @@ -13,10 +13,10 @@
"directory": "packages/component-meta"
},
"dependencies": {
"@volar/typescript": "~1.11.0",
"@vue/language-core": "1.8.22",
"@volar/typescript": "~1.11.1",
"@vue/language-core": "1.8.24",
"path-browserify": "^1.0.1",
"vue-component-type-helpers": "1.8.22"
"vue-component-type-helpers": "1.8.24"
},
"peerDependencies": {
"typescript": "*"
Expand Down
14 changes: 7 additions & 7 deletions packages/component-meta/src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ export * from './types';

const windowsPathReg = /\\/g;

export function createCheckerByJsonBase(
export function createCheckerByJsonConfigBase(
ts: typeof import('typescript/lib/tsserverlibrary'),
rootPath: string,
rootDir: string,
json: any,
checkerOptions: MetaCheckerOptions = {},
) {
rootPath = rootPath.replace(windowsPathReg, '/');
rootDir = rootDir.replace(windowsPathReg, '/');
return createCheckerWorker(
ts,
() => vue.createParsedCommandLineByJson(ts, ts.sys, rootPath, json),
() => vue.createParsedCommandLineByJson(ts, ts.sys, rootDir, json),
checkerOptions,
rootPath,
path.join(rootPath, 'jsconfig.json.global.vue'),
undefined,
rootDir,
path.join(rootDir, 'jsconfig.json.global.vue'),
undefined
);
}

Expand Down
8 changes: 4 additions & 4 deletions packages/component-meta/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import * as ts from 'typescript';
import { createCheckerByJsonBase, createCheckerBase } from './base';
import { createCheckerByJsonConfigBase, createCheckerBase } from './base';
import type { MetaCheckerOptions } from './types';

export * from './types';

export function createCheckerByJson(
export function createComponentMetaCheckerByJsonConfig(
rootPath: string,
json: any,
checkerOptions: MetaCheckerOptions = {},
) {
return createCheckerByJsonBase(
return createCheckerByJsonConfigBase(
ts as any,
rootPath,
json,
checkerOptions,
);
}

export function createChecker(
export function createComponentMetaChecker(
tsconfig: string,
checkerOptions: MetaCheckerOptions = {},
) {
Expand Down
2 changes: 1 addition & 1 deletion packages/component-meta/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type * as ts from 'typescript/lib/tsserverlibrary';

export type Checker = ReturnType<typeof import('./base')['baseCreate']>;
export type ComponentMetaChecker = ReturnType<typeof import('./base')['baseCreate']>;

export interface Declaration {
file: string;
Expand Down
8 changes: 4 additions & 4 deletions packages/component-meta/tests/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import * as path from 'path';
import { describe, expect, test } from 'vitest';
import { createChecker, createCheckerByJson, MetaCheckerOptions, Checker, TypeMeta } from '../out';
import { createComponentMetaChecker, createComponentMetaCheckerByJsonConfig, MetaCheckerOptions, ComponentMetaChecker, TypeMeta } from '../out';

const worker = (checker: Checker, withTsconfig: boolean) => describe(`vue-component-meta ${withTsconfig ? 'with tsconfig' : 'without tsconfig'}`, () => {
const worker = (checker: ComponentMetaChecker, withTsconfig: boolean) => describe(`vue-component-meta ${withTsconfig ? 'with tsconfig' : 'without tsconfig'}`, () => {

test('empty-component', () => {
const componentPath = path.resolve(__dirname, '../../../test-workspace/component-meta/empty-component/component.vue');
Expand Down Expand Up @@ -761,11 +761,11 @@ const checkerOptions: MetaCheckerOptions = {
schema: { ignore: ['MyIgnoredNestedProps'] },
printer: { newLine: 1 },
};
const tsconfigChecker = createChecker(
const tsconfigChecker = createComponentMetaChecker(
path.resolve(__dirname, '../../../test-workspace/component-meta/tsconfig.json'),
checkerOptions,
);
const noTsConfigChecker = createCheckerByJson(
const noTsConfigChecker = createComponentMetaCheckerByJsonConfig(
path.resolve(__dirname, '../../../test-workspace/component-meta'),
{
"extends": "../tsconfig.json",
Expand Down
2 changes: 1 addition & 1 deletion packages/component-type-helpers/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-component-type-helpers",
"version": "1.8.22",
"version": "1.8.24",
"license": "MIT",
"files": [
"*.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/language-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vue/language-core",
"version": "1.8.22",
"version": "1.8.24",
"main": "out/index.js",
"license": "MIT",
"files": [
Expand All @@ -13,7 +13,7 @@
"directory": "packages/language-core"
},
"dependencies": {
"@volar/language-core": "~1.11.0",
"@volar/language-core": "~1.11.1",
"@vue/compiler-dom": "^3.3.0",
"@vue/shared": "^3.3.0",
"computeds": "^0.0.1",
Expand Down
Loading

0 comments on commit 12d3e22

Please sign in to comment.