Skip to content

Commit

Permalink
feat: Vue 2.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
adamberecz committed Jul 11, 2022
1 parent 3673d4b commit 12289dc
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 26 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## v2.1.1

> `2022-07-11`
### 🎉 Features
- Vue.js `2.7` compatibility

## v2.1.0

> `2022-07-11`
Expand Down
9 changes: 1 addition & 8 deletions build/vue2.rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import vue from 'vue-prev-rollup-plugin-vue'
import alias from '@rollup/plugin-alias'
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
Expand All @@ -14,11 +13,6 @@ export default [
},
plugins: [
vue(),
alias({
entries: [
{ find: 'composition-api', replacement: 'vue' },
]
}),
nodeResolve({
resolveOnly: ['wnumb', 'nouislider']
}),
Expand All @@ -38,7 +32,6 @@ export default [
format: 'iife',
name: 'VueformSlider',
globals: {
'composition-api': 'Vue',
'vue': 'Vue',
}
},
Expand All @@ -53,6 +46,6 @@ export default [
}),
terser()
],
external: ['composition-api', 'vue'],
external: ['vue'],
}
]
9 changes: 1 addition & 8 deletions build/vue3.rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import vue from 'vue-next-rollup-plugin-vue'
import alias from '@rollup/plugin-alias'
import babel from '@rollup/plugin-babel'
import commonjs from '@rollup/plugin-commonjs'
import { nodeResolve } from '@rollup/plugin-node-resolve'
Expand All @@ -14,11 +13,6 @@ export default [
},
plugins: [
vue(),
alias({
entries: [
{ find: 'composition-api', replacement: 'vue' },
]
}),
nodeResolve({
resolveOnly: ['wnumb', 'nouislider']
}),
Expand All @@ -38,7 +32,6 @@ export default [
format: 'iife',
name: 'VueformSlider',
globals: {
'composition-api': 'Vue',
'vue': 'Vue',
}
},
Expand All @@ -53,6 +46,6 @@ export default [
}),
terser()
],
external: ['composition-api', 'vue'],
external: ['vue'],
}
]
1 change: 0 additions & 1 deletion jest/jest.config.vue2.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ module.exports = {
"/node_modules/"
],
"moduleNameMapper": {
"^composition-api$": "<rootDir>/node_modules/vue-prev",
"^@vue/test-utils$": "<rootDir>/node_modules/vue-prev-test-utils",
"^vue$": "<rootDir>/node_modules/vue-prev",
'^vue-jest$': "<rootDir>/node_modules/vue-prev-jest",
Expand Down
1 change: 0 additions & 1 deletion jest/jest.config.vue3.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ module.exports = Object.assign({}, base, {
"^.+\\.js$": "babel-jest",
},
"moduleNameMapper": {
"^composition-api$": "<rootDir>/node_modules/vue-next",
"^@vue/test-utils$": "<rootDir>/node_modules/vue-next-test-utils",
"^vue$": "<rootDir>/node_modules/vue-next",
'^vue-jest$': "<rootDir>/node_modules/vue-next-jest",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@vueform/slider",
"version": "2.1.0",
"version": "2.1.1",
"private": false,
"description": "Vue 3 slider component with multihandles, tooltips merging and formatting.",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useClasses.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { computed, ref, toRefs } from 'composition-api'
import { computed, ref, toRefs } from 'vue'

export default function useClasses (props, context, dependencies)
{
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useSlider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref, computed, toRefs, watch, onMounted, onUnmounted, nextTick } from 'composition-api'
import { ref, computed, toRefs, watch, onMounted, onUnmounted, nextTick } from 'vue'
import nouislider from 'nouislider'
import isNullish from './../utils/isNullish'
import arraysEqual from './../utils/arraysEqual'
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useTooltip.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { computed, toRefs } from 'composition-api'
import { computed, toRefs } from 'vue'
import wnumb from 'wnumb'

export default function useTooltip (props, context, dependencies)
Expand Down
2 changes: 1 addition & 1 deletion src/composables/useValue.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ref, toRefs } from 'composition-api'
import { ref, toRefs } from 'vue'
import isNullish from './../utils/isNullish'

export default function useValue (props, context, dependencies)
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/composables/useClasses.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlider, getValue, destroy, findAllComponents, findAll, setProp } from 'unit-test-helpers'
import { nextTick } from 'composition-api'
import { nextTick } from 'vue'

describe('useClasses', () => {
describe('classList', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/composables/useSlider.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlider, getValue, destroy, findAllComponents, findAll, setProp } from 'unit-test-helpers'
import { nextTick } from 'composition-api'
import { nextTick } from 'vue'

describe('useSlider', () => {
describe('slider', () => {
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/composables/useTooltip.spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createSlider, getValue, findAll, setProp } from 'unit-test-helpers'
import { nextTick } from 'composition-api'
import { nextTick } from 'vue'

describe('useTooltip', () => {
describe('tooltipsFormat', () => {
Expand Down

0 comments on commit 12289dc

Please sign in to comment.