diff --git a/package.json b/package.json
index fba8cb01..6da0aadc 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"private": true,
- "packageManager": "pnpm@8.6.2",
+ "packageManager": "pnpm@8.6.3",
"scripts": {
"build": "pnpm run -r build",
"test": "vitest",
@@ -18,7 +18,7 @@
"@rollup/plugin-babel": "^6.0.3",
"@types/babel__core": "^7.20.1",
"@types/node": "^20.3.1",
- "@typescript-eslint/eslint-plugin": "^5.59.11",
+ "@typescript-eslint/eslint-plugin": "^5.60.0",
"@vitest/coverage-v8": "^0.32.2",
"bumpp": "^9.1.1",
"eslint": "^8.43.0",
diff --git a/packages/babel-plugin-jsx/package.json b/packages/babel-plugin-jsx/package.json
index b4050518..ea605253 100644
--- a/packages/babel-plugin-jsx/package.json
+++ b/packages/babel-plugin-jsx/package.json
@@ -40,7 +40,7 @@
"@types/babel__traverse": "^7.20.1",
"@types/svg-tags": "^1.0.0",
"@vue/runtime-dom": "^3.3.4",
- "@vue/test-utils": "^2.3.2",
+ "@vue/test-utils": "^2.4.0",
"regenerator-runtime": "^0.13.11",
"vue": "^3.3.4"
},
diff --git a/packages/babel-plugin-jsx/test/index.test.tsx b/packages/babel-plugin-jsx/test/index.test.tsx
index 162c7933..f136224f 100644
--- a/packages/babel-plugin-jsx/test/index.test.tsx
+++ b/packages/babel-plugin-jsx/test/index.test.tsx
@@ -429,32 +429,34 @@ describe('variables outside slots', () => {
});
test('forwarded', async () => {
- const wrapper = mount({
- data() {
- return {
- val: 0,
- };
- },
- methods: {
- inc() {
- this.val += 1;
+ const wrapper = mount(
+ defineComponent({
+ data() {
+ return {
+ val: 0,
+ };
},
- },
- render() {
- const attrs = {
- innerHTML: `${this.val}`,
- };
- const textarea = ;
- return (
-
- {textarea}
-
-
- );
- },
- });
+ methods: {
+ inc() {
+ this.val += 1;
+ },
+ },
+ render() {
+ const attrs = {
+ innerHTML: `${this.val}`,
+ };
+ const textarea = ;
+ return (
+
+ {textarea}
+
+
+ );
+ },
+ })
+ );
expect(wrapper.get('#textarea').element.innerHTML).toBe('0');
await wrapper.get('#button').trigger('click');
diff --git a/packages/babel-plugin-jsx/test/v-model.test.tsx b/packages/babel-plugin-jsx/test/v-model.test.tsx
index 371d8044..2b7b9022 100644
--- a/packages/babel-plugin-jsx/test/v-model.test.tsx
+++ b/packages/babel-plugin-jsx/test/v-model.test.tsx
@@ -3,7 +3,7 @@ import { type VNode, defineComponent } from '@vue/runtime-dom';
test('input[type="checkbox"] should work', async () => {
const wrapper = shallowMount(
- {
+ defineComponent({
data() {
return {
test: true,
@@ -12,7 +12,7 @@ test('input[type="checkbox"] should work', async () => {
render() {
return ;
},
- },
+ }),
{ attachTo: document.body }
);
@@ -28,7 +28,7 @@ test('input[type="checkbox"] should work', async () => {
test('input[type="radio"] should work', async () => {
const wrapper = shallowMount(
- {
+ defineComponent({
data: () => ({
test: '1',
}),
@@ -40,7 +40,7 @@ test('input[type="radio"] should work', async () => {
>
);
},
- },
+ }),
{ attachTo: document.body }
);
@@ -58,20 +58,22 @@ test('input[type="radio"] should work', async () => {
});
test('select should work with value bindings', async () => {
- const wrapper = shallowMount({
- data: () => ({
- test: 2,
- }),
- render() {
- return (
-
- );
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data: () => ({
+ test: 2,
+ }),
+ render() {
+ return (
+
+ );
+ },
+ })
+ );
const el = wrapper.vm.$el;
@@ -92,14 +94,16 @@ test('select should work with value bindings', async () => {
});
test('textarea should update value both ways', async () => {
- const wrapper = shallowMount({
- data: () => ({
- test: 'b',
- }),
- render() {
- return ;
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data: () => ({
+ test: 'b',
+ }),
+ render() {
+ return ;
+ },
+ })
+ );
const el = wrapper.vm.$el;
expect(el.value).toBe('b');
@@ -112,14 +116,16 @@ test('textarea should update value both ways', async () => {
});
test('input[type="text"] should update value both ways', async () => {
- const wrapper = shallowMount({
- data: () => ({
- test: 'b',
- }),
- render() {
- return ;
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data: () => ({
+ test: 'b',
+ }),
+ render() {
+ return ;
+ },
+ })
+ );
const el = wrapper.vm.$el;
expect(el.value).toBe('b');
@@ -132,14 +138,16 @@ test('input[type="text"] should update value both ways', async () => {
});
test('input[type="text"] .lazy modifier', async () => {
- const wrapper = shallowMount({
- data: () => ({
- test: 'b',
- }),
- render() {
- return ;
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data: () => ({
+ test: 'b',
+ }),
+ render() {
+ return ;
+ },
+ })
+ );
const el = wrapper.vm.$el;
expect(el.value).toBe('b');
@@ -153,17 +161,19 @@ test('input[type="text"] .lazy modifier', async () => {
});
test('dynamic type should work', async () => {
- const wrapper = shallowMount({
- data() {
- return {
- test: true,
- type: 'checkbox',
- };
- },
- render() {
- return ;
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data() {
+ return {
+ test: true,
+ type: 'checkbox',
+ };
+ },
+ render() {
+ return ;
+ },
+ })
+ );
expect(wrapper.vm.$el.checked).toBe(true);
wrapper.vm.test = false;
@@ -172,14 +182,16 @@ test('dynamic type should work', async () => {
});
test('underscore modifier should work', async () => {
- const wrapper = shallowMount({
- data: () => ({
- test: 'b',
- }),
- render() {
- return ;
- },
- });
+ const wrapper = shallowMount(
+ defineComponent({
+ data: () => ({
+ test: 'b',
+ }),
+ render() {
+ return ;
+ },
+ })
+ );
const el = wrapper.vm.$el;
expect(el.value).toBe('b');
@@ -218,16 +230,18 @@ test('underscore modifier should work in custom component', async () => {
},
});
- const wrapper = mount({
- data() {
- return {
- foo: 1,
- };
- },
- render() {
- return ;
- },
- });
+ const wrapper = mount(
+ defineComponent({
+ data() {
+ return {
+ foo: 1,
+ };
+ },
+ render() {
+ return ;
+ },
+ })
+ );
expect(wrapper.html()).toBe('
2
');
wrapper.vm.$data.foo += 1;
@@ -254,14 +268,16 @@ test('Named model', async () => {
},
});
- const wrapper = mount({
- data: () => ({
- foo: 0,
- }),
- render() {
- return ;
- },
- });
+ const wrapper = mount(
+ defineComponent({
+ data: () => ({
+ foo: 0,
+ }),
+ render() {
+ return ;
+ },
+ })
+ );
expect(wrapper.html()).toBe('0
');
wrapper.vm.$data.foo += 1;
diff --git a/packages/babel-plugin-jsx/test/v-models.test.tsx b/packages/babel-plugin-jsx/test/v-models.test.tsx
index 9b8305a5..a78ea534 100644
--- a/packages/babel-plugin-jsx/test/v-models.test.tsx
+++ b/packages/babel-plugin-jsx/test/v-models.test.tsx
@@ -15,16 +15,18 @@ test('single value binding should work', async () => {
},
});
- const wrapper = mount({
- data() {
- return {
- foo: 1,
- };
- },
- render() {
- return ;
- },
- });
+ const wrapper = mount(
+ defineComponent({
+ data() {
+ return {
+ foo: 1,
+ };
+ },
+ render() {
+ return ;
+ },
+ })
+ );
expect(wrapper.html()).toBe('1
');
wrapper.vm.$data.foo += 1;
@@ -54,24 +56,26 @@ test('multiple values binding should work', async () => {
},
});
- const wrapper = mount({
- data() {
- return {
- foo: 1,
- bar: 0,
- };
- },
- render() {
- return (
-
- );
- },
- });
+ const wrapper = mount(
+ defineComponent({
+ data() {
+ return {
+ foo: 1,
+ bar: 0,
+ };
+ },
+ render() {
+ return (
+
+ );
+ },
+ })
+ );
expect(wrapper.html()).toBe('1,0
');
wrapper.vm.$data.foo += 1;
@@ -106,16 +110,18 @@ test('modifier should work', async () => {
},
});
- const wrapper = mount({
- data() {
- return {
- foo: 1,
- };
- },
- render() {
- return ;
- },
- });
+ const wrapper = mount(
+ defineComponent({
+ data() {
+ return {
+ foo: 1,
+ };
+ },
+ render() {
+ return ;
+ },
+ })
+ );
expect(wrapper.html()).toBe('2
');
wrapper.vm.$data.foo += 1;
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index bccf05fd..31523cdc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -18,8 +18,8 @@ importers:
specifier: ^20.3.1
version: 20.3.1
'@typescript-eslint/eslint-plugin':
- specifier: ^5.59.11
- version: 5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3)
+ specifier: ^5.60.0
+ version: 5.60.0(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3)
'@vitest/coverage-v8':
specifier: ^0.32.2
version: 0.32.2(vitest@0.32.2)
@@ -105,8 +105,8 @@ importers:
specifier: ^3.3.4
version: 3.3.4
'@vue/test-utils':
- specifier: ^2.3.2
- version: 2.3.2(vue@3.3.4)
+ specifier: ^2.4.0
+ version: 2.4.0(vue@3.3.4)
regenerator-runtime:
specifier: ^0.13.11
version: 0.13.11
@@ -1979,8 +1979,8 @@ packages:
resolution: {integrity: sha512-PlLI3u2hocS4nbzd9WUzQn/EyFl+NifbssU9QV40XzWOpwf5R7cDod2dmTUKYN7awE9jMrhy9FCO904ZYwaBDw==}
dev: true
- /@typescript-eslint/eslint-plugin@5.59.11(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3):
- resolution: {integrity: sha512-XxuOfTkCUiOSyBWIvHlUraLw/JT/6Io1365RO6ZuI88STKMavJZPNMU0lFcUTeQXEhHiv64CbxYxBNoDVSmghg==}
+ /@typescript-eslint/eslint-plugin@5.60.0(@typescript-eslint/parser@5.59.11)(eslint@8.43.0)(typescript@5.1.3):
+ resolution: {integrity: sha512-78B+anHLF1TI8Jn/cD0Q00TBYdMgjdOn980JfAVa9yw5sop8nyTfVOQAv6LWywkOGLclDBtv5z3oxN4w7jxyNg==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
'@typescript-eslint/parser': ^5.0.0
@@ -1992,9 +1992,9 @@ packages:
dependencies:
'@eslint-community/regexpp': 4.5.1
'@typescript-eslint/parser': 5.59.11(eslint@8.43.0)(typescript@5.1.3)
- '@typescript-eslint/scope-manager': 5.59.11
- '@typescript-eslint/type-utils': 5.59.11(eslint@8.43.0)(typescript@5.1.3)
- '@typescript-eslint/utils': 5.59.11(eslint@8.43.0)(typescript@5.1.3)
+ '@typescript-eslint/scope-manager': 5.60.0
+ '@typescript-eslint/type-utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3)
+ '@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3)
debug: 4.3.4
eslint: 8.43.0
grapheme-splitter: 1.0.4
@@ -2035,8 +2035,16 @@ packages:
'@typescript-eslint/visitor-keys': 5.59.11
dev: true
- /@typescript-eslint/type-utils@5.59.11(eslint@8.43.0)(typescript@5.1.3):
- resolution: {integrity: sha512-LZqVY8hMiVRF2a7/swmkStMYSoXMFlzL6sXV6U/2gL5cwnLWQgLEG8tjWPpaE4rMIdZ6VKWwcffPlo1jPfk43g==}
+ /@typescript-eslint/scope-manager@5.60.0:
+ resolution: {integrity: sha512-hakuzcxPwXi2ihf9WQu1BbRj1e/Pd8ZZwVTG9kfbxAMZstKz8/9OoexIwnmLzShtsdap5U/CoQGRCWlSuPbYxQ==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ '@typescript-eslint/types': 5.60.0
+ '@typescript-eslint/visitor-keys': 5.60.0
+ dev: true
+
+ /@typescript-eslint/type-utils@5.60.0(eslint@8.43.0)(typescript@5.1.3):
+ resolution: {integrity: sha512-X7NsRQddORMYRFH7FWo6sA9Y/zbJ8s1x1RIAtnlj6YprbToTiQnM6vxcMu7iYhdunmoC0rUWlca13D5DVHkK2g==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: '*'
@@ -2045,8 +2053,8 @@ packages:
typescript:
optional: true
dependencies:
- '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.1.3)
- '@typescript-eslint/utils': 5.59.11(eslint@8.43.0)(typescript@5.1.3)
+ '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.3)
+ '@typescript-eslint/utils': 5.60.0(eslint@8.43.0)(typescript@5.1.3)
debug: 4.3.4
eslint: 8.43.0
tsutils: 3.21.0(typescript@5.1.3)
@@ -2060,6 +2068,11 @@ packages:
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
dev: true
+ /@typescript-eslint/types@5.60.0:
+ resolution: {integrity: sha512-ascOuoCpNZBccFVNJRSC6rPq4EmJ2NkuoKnd6LDNyAQmdDnziAtxbCGWCbefG1CNzmDvd05zO36AmB7H8RzKPA==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dev: true
+
/@typescript-eslint/typescript-estree@5.59.11(typescript@5.1.3):
resolution: {integrity: sha512-YupOpot5hJO0maupJXixi6l5ETdrITxeo5eBOeuV7RSKgYdU3G5cxO49/9WRnJq9EMrB7AuTSLH/bqOsXi7wPA==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
@@ -2081,8 +2094,29 @@ packages:
- supports-color
dev: true
- /@typescript-eslint/utils@5.59.11(eslint@8.43.0)(typescript@5.1.3):
- resolution: {integrity: sha512-didu2rHSOMUdJThLk4aZ1Or8IcO3HzCw/ZvEjTTIfjIrcdd5cvSIwwDy2AOlE7htSNp7QIZ10fLMyRCveesMLg==}
+ /@typescript-eslint/typescript-estree@5.60.0(typescript@5.1.3):
+ resolution: {integrity: sha512-R43thAuwarC99SnvrBmh26tc7F6sPa2B3evkXp/8q954kYL6Ro56AwASYWtEEi+4j09GbiNAHqYwNNZuNlARGQ==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ peerDependencies:
+ typescript: '*'
+ peerDependenciesMeta:
+ typescript:
+ optional: true
+ dependencies:
+ '@typescript-eslint/types': 5.60.0
+ '@typescript-eslint/visitor-keys': 5.60.0
+ debug: 4.3.4
+ globby: 11.1.0
+ is-glob: 4.0.3
+ semver: 7.5.2
+ tsutils: 3.21.0(typescript@5.1.3)
+ typescript: 5.1.3
+ transitivePeerDependencies:
+ - supports-color
+ dev: true
+
+ /@typescript-eslint/utils@5.60.0(eslint@8.43.0)(typescript@5.1.3):
+ resolution: {integrity: sha512-ba51uMqDtfLQ5+xHtwlO84vkdjrqNzOnqrnwbMHMRY8Tqeme8C2Q8Fc7LajfGR+e3/4LoYiWXUM6BpIIbHJ4hQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || ^8.0.0
@@ -2090,9 +2124,9 @@ packages:
'@eslint-community/eslint-utils': 4.4.0(eslint@8.43.0)
'@types/json-schema': 7.0.12
'@types/semver': 7.5.0
- '@typescript-eslint/scope-manager': 5.59.11
- '@typescript-eslint/types': 5.59.11
- '@typescript-eslint/typescript-estree': 5.59.11(typescript@5.1.3)
+ '@typescript-eslint/scope-manager': 5.60.0
+ '@typescript-eslint/types': 5.60.0
+ '@typescript-eslint/typescript-estree': 5.60.0(typescript@5.1.3)
eslint: 8.43.0
eslint-scope: 5.1.1
semver: 7.5.2
@@ -2109,6 +2143,14 @@ packages:
eslint-visitor-keys: 3.4.1
dev: true
+ /@typescript-eslint/visitor-keys@5.60.0:
+ resolution: {integrity: sha512-wm9Uz71SbCyhUKgcaPRauBdTegUyY/ZWl8gLwD/i/ybJqscrrdVSFImpvUz16BLPChIeKBK5Fa9s6KDQjsjyWw==}
+ engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
+ dependencies:
+ '@typescript-eslint/types': 5.60.0
+ eslint-visitor-keys: 3.4.1
+ dev: true
+
/@vitest/coverage-v8@0.32.2(vitest@0.32.2):
resolution: {integrity: sha512-/+V3nB3fyeuuSeKxCfi6XmWjDIxpky7AWSkGVfaMjAk7di8igBwRsThLjultwIZdTDH1RAxpjmCXEfSqsMFZOA==}
peerDependencies:
@@ -2242,16 +2284,21 @@ packages:
/@vue/shared@3.3.4:
resolution: {integrity: sha512-7OjdcV8vQ74eiz1TZLzZP4JwqM5fA94K6yntPS5Z25r9HDuGNzaGdgvwKYq6S+MxwF0TFRwe50fIR/MYnakdkQ==}
- /@vue/test-utils@2.3.2(vue@3.3.4):
- resolution: {integrity: sha512-hJnVaYhbrIm0yBS0+e1Y0Sj85cMyAi+PAbK4JHqMRUZ6S622Goa+G7QzkRSyvCteG8wop7tipuEbHoZo26wsSA==}
+ /@vue/test-utils@2.4.0(vue@3.3.4):
+ resolution: {integrity: sha512-BKB9aj1yky63/I3IwSr1FjUeHYsKXI7D6S9F378AHt7a5vC0dLkOBtSsFXoRGC/7BfHmiB9HRhT+i9xrUHoAKw==}
peerDependencies:
+ '@vue/compiler-dom': ^3.0.1
+ '@vue/server-renderer': ^3.0.1
vue: ^3.0.1
+ peerDependenciesMeta:
+ '@vue/compiler-dom':
+ optional: true
+ '@vue/server-renderer':
+ optional: true
dependencies:
js-beautify: 1.14.6
vue: 3.3.4
- optionalDependencies:
- '@vue/compiler-dom': 3.3.4
- '@vue/server-renderer': 3.3.4(vue@3.3.4)
+ vue-component-type-helpers: 1.6.5
dev: true
/abab@2.0.6:
@@ -5572,6 +5619,10 @@ packages:
resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==}
dev: true
+ /vue-component-type-helpers@1.6.5:
+ resolution: {integrity: sha512-iGdlqtajmiqed8ptURKPJ/Olz0/mwripVZszg6tygfZSIL9kYFPJTNY6+Q6OjWGznl2L06vxG5HvNvAnWrnzbg==}
+ dev: true
+
/vue@3.3.4:
resolution: {integrity: sha512-VTyEYn3yvIeY1Py0WaYGZsXnz3y5UnGi62GjVEqvEGPl6nxbOrCXbVOTQWBEJUqAyTUk2uJ5JLVnYJ6ZzGbrSw==}
dependencies: