Skip to content

Commit

Permalink
Update deps (#8959)
Browse files Browse the repository at this point in the history
* Update vue-tsc and @vue/test-utils

* Update ts-jest

* Update vite and @vitejs/plugin-vue

* Remove type workaround for @vue/test-utils

* Update jest related deps

* Fix SearchBar unit tests

---------

Co-authored-by: Jannik Stehle <[email protected]>
  • Loading branch information
dschmidt and JammingBen authored May 10, 2023
1 parent 1524733 commit be8a618
Show file tree
Hide file tree
Showing 9 changed files with 908 additions and 448 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@
"@types/lodash-es": "4.17.6",
"@types/node": "16.18.11",
"@types/node-fetch": "2.6.2",
"@vitejs/plugin-vue": "4.0.0",
"@vue/test-utils": "2.3.1",
"@vue/vue3-jest": "29.2.3",
"@vitejs/plugin-vue": "4.2.1",
"@vue/test-utils": "v2.4.0-alpha.0",
"@vue/vue3-jest": "29.2.4",
"autoprefixer": "10.4.13",
"babel-core": "7.0.0-bridge.0",
"babel-jest": "29.3.1",
"babel-jest": "29.5.0",
"browserslist-to-esbuild": "^1.2.0",
"browserslist-useragent-regexp": "^3.0.2",
"commander": "8.3.0",
Expand Down Expand Up @@ -107,14 +107,14 @@
"requirejs": "2.3.6",
"rollup-plugin-node-polyfills": "0.2.1",
"rollup-plugin-visualizer": "5.9.0",
"ts-jest": "29.0.5",
"ts-jest": "29.1.0",
"ts-node": "10.9.1",
"tslib": "2.5.0",
"typescript": "4.9.5",
"url-search-params-polyfill": "8.1.1",
"vite": "4.0.4",
"vite": "4.3.3",
"vite-plugin-environment": "^1.1.3",
"vue-tsc": "1.3.4",
"vue-tsc": "1.6.1",
"vue3-gettext": "^2.3.3",
"wait-for-expect": "3.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"eslint-config-prettier": "^8.8.0",
"eslint-config-standard": "^17.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.1",
"eslint-plugin-jest": "^27.2.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier-vue": "^4.2.0",
"eslint-plugin-promise": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/extension-sdk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"directory": "packages/extension-sdk"
},
"dependencies": {
"@vitejs/plugin-vue": "4.1.0",
"@vitejs/plugin-vue": "4.2.1",
"rollup-plugin-node-polyfills": "^0.2.1",
"rollup-plugin-serve": "^2.0.2"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web-app-search/src/service/index.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export { default as providerStore } from './providerStore'
export * from './providerStore'
4 changes: 2 additions & 2 deletions packages/web-app-search/src/service/providerStore.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { SearchProvider } from '../types'

class ProviderStore {
export class ProviderStore {
public providers: SearchProvider[]

constructor() {
Expand All @@ -16,4 +16,4 @@ class ProviderStore {
}
}

export default new ProviderStore()
export const providerStore = new ProviderStore()
17 changes: 11 additions & 6 deletions packages/web-app-search/tests/unit/portals/SearchBar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { createLocationCommon } from 'web-app-files/src/router'
import flushPromises from 'flush-promises'
import { defineComponent } from 'vue'
import { createStore, defaultPlugins, mount, defaultStoreMockOptions } from 'web-test-helpers'
import { ProviderStore } from 'web-app-search/src/service/providerStore'

const component = defineComponent({
emits: ['click', 'keyup'],
Expand Down Expand Up @@ -33,9 +34,9 @@ const providerContacts = {
available: true,
previewSearch: {
available: true,
search: jest.fn()
},
component
search: jest.fn(),
component
}
}

const selectors = {
Expand All @@ -51,6 +52,8 @@ const selectors = {

jest.mock('lodash-es/debounce', () => (fn) => fn)

const providerStore = new ProviderStore()

beforeEach(() => {
providerFiles.previewSearch.search.mockImplementation(() => {
return {
Expand All @@ -69,6 +72,10 @@ beforeEach(() => {
]
}
})

jest
.spyOn(providerStore, 'availableProviders', 'get')
.mockReturnValue([providerFiles, providerContacts])
})

let wrapper
Expand Down Expand Up @@ -255,9 +262,7 @@ function getMountedWrapper({ data = {}, mocks = {}, isUserContextReady = true }
attachTo: document.body,
data: () => {
return {
providerStore: {
availableProviders: [providerFiles, providerContacts]
},
providerStore,
...data
}
},
Expand Down
2 changes: 1 addition & 1 deletion packages/web-pkg/tests/unit/components/ItemFilter.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ function getWrapper({ props = {}, initialQuery = '' }: any = {}) {
...props
},
slots: {
item: function (data) {
item(data: any) {
return props.displayNameAttribute ? data.item[props.displayNameAttribute] : data.item.name
}
},
Expand Down
Loading

0 comments on commit be8a618

Please sign in to comment.