Skip to content

Commit b4d2ddb

Browse files
committed
chore!: Remove vue2 support
1 parent f77386c commit b4d2ddb

File tree

14 files changed

+242
-210
lines changed

14 files changed

+242
-210
lines changed

packages/axios/package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,9 @@
4242
"size": "size-limit",
4343
"lint": "eslint . --cache",
4444
"lint:fix": "eslint . --cache --fix",
45-
"test:ui": "vue-demi-switch 3 && vitest --ui --api 9527",
46-
"test:watch": "vue-demi-switch 3 && vitest --watch",
47-
"test:2": "vue-demi-switch 2 vue2 && vitest --run",
48-
"test:3": "vue-demi-switch 3 && vitest --run",
45+
"test:ui": "vitest --ui --api 9527",
46+
"test:watch": "vitest --watch",
47+
"test:3": "vitest --run",
4948
"test": "pnpm run test:3"
5049
},
5150
"author": {
@@ -72,7 +71,7 @@
7271
"typescript": "^5.5.3",
7372
"unbuild": "^3.1.0",
7473
"vitest": "^3.0.5",
75-
"vue-demi": "^0.14.8"
74+
"vue": "^3.5.13"
7675
},
7776
"size-limit": [
7877
{

packages/axios/test/setup.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
11
import { createPinia, setActivePinia } from 'pinia'
2-
import { beforeAll, beforeEach } from 'vitest'
3-
import { Vue2, createApp, install, isVue2 } from 'vue-demi'
2+
import { beforeEach } from 'vitest'
3+
import { createApp } from 'vue'
44
import { Model, createORM, useRepo } from 'pinia-orm'
55
import axios from 'axios'
66
import { createPiniaOrmAxios } from '../src'
77

8-
beforeAll(() => {
9-
if (isVue2) {
10-
Vue2.config.productionTip = false
11-
Vue2.config.devtools = false
12-
install(Vue2)
13-
}
14-
})
15-
168
beforeEach(() => {
179
const app = createApp({})
1810
const pinia = createPinia()

packages/nuxt/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"std-env": "^3.7.0",
6161
"typescript": "^5.5.3",
6262
"vite": "^5.3.3",
63-
"vue": "^3.4.31"
63+
"vue": "^3.5.13"
6464
},
6565
"repository": {
6666
"type": "git",

packages/pinia-orm/build.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export default defineBuildConfig({
1818
declaration: true,
1919
failOnWarn: false,
2020
clean: true,
21-
externals: ['@/composables', 'nanoid', 'uuid', 'nanoid/async', 'nanoid/non-secure', 'pinia', 'vue-demi', 'vue', '@vue/composition-api'],
21+
externals: ['@/composables', 'nanoid', 'uuid', 'nanoid/async', 'nanoid/non-secure', 'pinia', 'vue', '@vue/composition-api'],
2222
rollup: {
2323
emitCJS: true,
2424
},

packages/pinia-orm/package.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,19 @@
4545
"scripts": {
4646
"build": "unbuild",
4747
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . -l pinia-orm -r 1",
48-
"coverage": "vue-demi-switch 3 && vitest --run --coverage",
48+
"coverage": "vitest --run --coverage",
4949
"size": "size-limit",
5050
"lint": "eslint . --cache",
5151
"lint:fix": "eslint . --cache --fix",
52-
"test:ui": "vue-demi-switch 3 && vitest --ui --api 9527",
53-
"test:watch": "vue-demi-switch 3 && vitest --watch",
54-
"test:2": "vue-demi-switch 2 vue2 && vitest --run",
55-
"test:3": "vue-demi-switch 3 && vitest --run",
56-
"test": "pnpm run test:3"
52+
"test:ui": "vitest --ui --api 9527",
53+
"test:watch": "vitest --watch",
54+
"test": "vitest --run"
5755
},
5856
"peerDependencies": {
5957
"pinia": "^3.0.1"
6058
},
6159
"dependencies": {
62-
"@pinia-orm/normalizr": "workspace:*",
63-
"vue-demi": "^0.14.10"
60+
"@pinia-orm/normalizr": "workspace:*"
6461
},
6562
"devDependencies": {
6663
"@nuxt/eslint-config": "^0.3.13",
@@ -91,8 +88,7 @@
9188
"uuid": "^10.0.0",
9289
"vite": "^5.3.3",
9390
"vitest": "^3.0.5",
94-
"vue": "^3.4.31",
95-
"vue2": "npm:vue@^2.7.3"
91+
"vue": "^3.5.13"
9692
},
9793
"size-limit": [
9894
{

packages/pinia-orm/src/composables/useDataStore.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { DefineSetupStoreOptions, DefineStoreOptionsBase } from 'pinia'
22
import { defineStore } from 'pinia'
3-
import { ref } from 'vue-demi'
3+
import { ref } from 'vue'
44
import type { Query } from '../'
55
import { config } from '../'
66
import { useStoreActions } from './useStoreActions'

packages/pinia-orm/tests/feature/reactivity/reactivity.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { computed } from 'vue-demi'
2+
import { computed } from 'vue'
33

44
import { Model, useRepo } from '../../../src'
55
import { Attr, Str } from '../../../src/decorators'

packages/pinia-orm/tests/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { v1, v4 } from 'uuid'
66
import type { Mock } from 'vitest'
77
import { expect, vi } from 'vitest'
88

9-
import { createApp } from 'vue-demi'
9+
import { createApp } from 'vue'
1010
import type { Collection, Elements, InstallOptions, Model, PiniaOrmPlugin } from '../src'
1111
import * as Utils from '../src/support/Utils'
1212
import { createORM } from '../src'

packages/pinia-orm/tests/performance/prevent_rerender_of_child_components.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { describe, expect, it, vi } from 'vitest'
22
import { mount } from '@vue/test-utils'
33
import { createTestingPinia } from '@pinia/testing'
4-
import { computed, defineComponent, nextTick, onUpdated } from 'vue-demi'
4+
import { computed, defineComponent, nextTick, onUpdated } from 'vue'
55

66
import { Model, useRepo } from '../../src'
77
import { Num, Str } from '../../src/decorators'

packages/pinia-orm/tests/performance/speed_find.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { ref } from 'vue-demi'
2+
import { ref } from 'vue'
33

44
import { Model, useRepo } from '../../src'
55

packages/pinia-orm/tests/setup.ts

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { createPinia, setActivePinia } from 'pinia'
2-
import { beforeAll, beforeEach, vi } from 'vitest'
3-
import { Vue2, createApp, install, isVue2 } from 'vue-demi'
2+
import { beforeEach, vi } from 'vitest'
3+
import { createApp } from 'vue'
44

55
import { Model, createORM, useRepo } from '../src'
66

@@ -24,14 +24,6 @@ vi.mock('uuid', () => ({
2424
v4: vi.fn(),
2525
}))
2626

27-
beforeAll(() => {
28-
if (isVue2) {
29-
Vue2.config.productionTip = false
30-
Vue2.config.devtools = false
31-
install(Vue2)
32-
}
33-
})
34-
3527
beforeEach(() => {
3628
const app = createApp({})
3729
const pinia = createPinia()

packages/pinia-orm/tests/unit/PiniaORM.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { ref } from 'vue-demi'
2+
import { ref } from 'vue'
33
import { Model, useRepo } from '../../src'
44
import { Attr, BelongsTo, BelongsToMany, Num, Str } from '../../src/decorators'
55
import { createPiniaORM } from '../helpers'

packages/pinia-orm/tests/unit/model/Model.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it } from 'vitest'
2-
import { computed } from 'vue-demi'
2+
import { computed } from 'vue'
33

44
import { Model, useRepo } from '../../../src'
55
import { Attr } from '../../../src/decorators'

0 commit comments

Comments
 (0)