ci: Upgrade vite, and vitest (no-changelog) (#10886)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-09-20 14:44:12 +02:00
committed by GitHub
parent 26a653a79a
commit ecb9ff9916
11 changed files with 444 additions and 484 deletions

View File

@@ -20,14 +20,14 @@
}, },
"devDependencies": { "devDependencies": {
"@n8n/storybook": "workspace:*", "@n8n/storybook": "workspace:*",
"@testing-library/jest-dom": "^6.1.5", "@testing-library/jest-dom": "^6.5.0",
"@testing-library/user-event": "^14.5.1", "@testing-library/user-event": "^14.5.2",
"@testing-library/vue": "^8.0.1", "@testing-library/vue": "^8.1.0",
"@types/markdown-it": "^13.0.9", "@types/markdown-it": "^13.0.9",
"@types/markdown-it-emoji": "^2.0.2", "@types/markdown-it-emoji": "^2.0.2",
"@types/markdown-it-link-attributes": "^3.0.5", "@types/markdown-it-link-attributes": "^3.0.5",
"@types/sanitize-html": "^2.11.0", "@types/sanitize-html": "^2.11.0",
"@vitejs/plugin-vue": "^5.0.4", "@vitejs/plugin-vue": "^5.1.4",
"@vitest/coverage-v8": "catalog:frontend", "@vitest/coverage-v8": "catalog:frontend",
"autoprefixer": "^10.4.19", "autoprefixer": "^10.4.19",
"postcss": "^8.4.38", "postcss": "^8.4.38",
@@ -53,7 +53,7 @@
"sanitize-html": "2.12.1", "sanitize-html": "2.12.1",
"vue": "catalog:frontend", "vue": "catalog:frontend",
"vue-boring-avatars": "^1.3.0", "vue-boring-avatars": "^1.3.0",
"vue-router": "^4.2.2", "vue-router": "catalog:frontend",
"xss": "^1.0.14" "xss": "^1.0.14"
} }
} }

View File

@@ -111,7 +111,7 @@ describe('AskAssistantChat', () => {
read: false, read: false,
}, },
], ],
isStreaming: true, streaming: true,
}, },
}); });
expect(container).toMatchSnapshot(); expect(container).toMatchSnapshot();

View File

@@ -1412,7 +1412,6 @@ exports[`AskAssistantChat > renders streaming chat correctly 1`] = `
<div> <div>
<div <div
class="container" class="container"
isstreaming="true"
> >
<div <div
class="header" class="header"
@@ -1552,7 +1551,9 @@ exports[`AskAssistantChat > renders streaming chat correctly 1`] = `
</div> </div>
<!--v-if--> <!--v-if-->
<!--v-if--> <span
class="blinking-cursor"
/>
</div> </div>
<!--v-if--> <!--v-if-->
</div> </div>

View File

@@ -6,7 +6,7 @@ describe('AssistantLoadingMessage', () => {
it('renders loading message correctly', () => { it('renders loading message correctly', () => {
const { container } = render(AssistantLoadingMessage, { const { container } = render(AssistantLoadingMessage, {
props: { props: {
loadingMessage: 'Thinking...', message: 'Thinking...',
}, },
}); });
expect(container).toMatchSnapshot(); expect(container).toMatchSnapshot();

View File

@@ -5,7 +5,6 @@ exports[`AssistantLoadingMessage > renders loading message correctly 1`] = `
<div <div
class="container" class="container"
data-v-4e90e01e="" data-v-4e90e01e=""
loadingmessage="Thinking..."
> >
<div <div
class="avatar" class="avatar"
@@ -63,7 +62,12 @@ exports[`AssistantLoadingMessage > renders loading message correctly 1`] = `
name="slide-vertical" name="slide-vertical"
persisted="false" persisted="false"
> >
<!--v-if--> <span
class="message"
data-v-4e90e01e=""
>
Thinking...
</span>
</transition-stub> </transition-stub>
</div> </div>
</div> </div>

View File

@@ -75,7 +75,7 @@
"vue-i18n": "^9.2.2", "vue-i18n": "^9.2.2",
"vue-json-pretty": "2.2.4", "vue-json-pretty": "2.2.4",
"vue-markdown-render": "catalog:frontend", "vue-markdown-render": "catalog:frontend",
"vue-router": "^4.2.2", "vue-router": "catalog:frontend",
"vue3-touch-events": "^4.1.3", "vue3-touch-events": "^4.1.3",
"xss": "^1.0.14" "xss": "^1.0.14"
}, },

View File

@@ -126,7 +126,7 @@ export const mockedStore = <TStoreDef extends () => unknown>(
Record<string, never>, Record<string, never>,
{ {
[K in keyof Actions]: Actions[K] extends (...args: infer Args) => infer ReturnT [K in keyof Actions]: Actions[K] extends (...args: infer Args) => infer ReturnT
? Mock<Args, ReturnT> ? Mock<(...args: Args) => ReturnT>
: Actions[K]; : Actions[K];
} }
> & { > & {

View File

@@ -1,6 +1,6 @@
import 'vue-router'; import 'vue-router';
import type { I18nClass } from '@/plugins/i18n'; import type { I18nClass } from '@/plugins/i18n';
import type { Route, RouteLocation } from 'vue-router'; import type { Route, Router, RouteLocation } from 'vue-router';
import type { Telemetry } from '@/plugins/telemetry'; import type { Telemetry } from '@/plugins/telemetry';
import type { VIEWS } from '@/constants'; import type { VIEWS } from '@/constants';
import type { IPermissions } from '@/Interface'; import type { IPermissions } from '@/Interface';
@@ -12,7 +12,7 @@ export {};
* @docs https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties * @docs https://vuejs.org/guide/typescript/options-api.html#augmenting-global-properties
*/ */
declare module 'vue' { declare module '@vue/runtime-core' {
interface ComponentCustomOptions { interface ComponentCustomOptions {
beforeRouteEnter?(to: Route, from: Route, next: () => void): void; beforeRouteEnter?(to: Route, from: Route, next: () => void): void;
beforeRouteLeave?(to: Route, from: Route, next: () => void): void; beforeRouteLeave?(to: Route, from: Route, next: () => void): void;
@@ -23,6 +23,8 @@ declare module 'vue' {
$style: Record<string, string>; $style: Record<string, string>;
$locale: I18nClass; $locale: I18nClass;
$telemetry: Telemetry; $telemetry: Telemetry;
$route: RouteLocation;
$router: Router;
} }
} }

View File

@@ -1,4 +1,4 @@
import type { SpyInstance } from 'vitest'; import type { MockInstance } from 'vitest';
import { createTestingPinia } from '@pinia/testing'; import { createTestingPinia } from '@pinia/testing';
import { waitFor, within } from '@testing-library/vue'; import { waitFor, within } from '@testing-library/vue';
import userEvent from '@testing-library/user-event'; import userEvent from '@testing-library/user-event';
@@ -72,7 +72,7 @@ let router: ReturnType<typeof useRouter>;
let route: ReturnType<typeof useRoute>; let route: ReturnType<typeof useRoute>;
let workflowHistoryStore: ReturnType<typeof useWorkflowHistoryStore>; let workflowHistoryStore: ReturnType<typeof useWorkflowHistoryStore>;
let workflowsStore: ReturnType<typeof useWorkflowsStore>; let workflowsStore: ReturnType<typeof useWorkflowsStore>;
let windowOpenSpy: SpyInstance; let windowOpenSpy: MockInstance;
describe('WorkflowHistory', () => { describe('WorkflowHistory', () => {
beforeEach(() => { beforeEach(() => {

878
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@@ -25,11 +25,12 @@ catalog:
catalogs: catalogs:
frontend: frontend:
'@vitest/coverage-v8': ^1.6.0 '@vitest/coverage-v8': ^2.0.5
vite: ^5.2.12 vite: ^5.4.6
vitest: ^1.6.0 vitest: ^2.1.1
vitest-mock-extended: ^1.3.1 vitest-mock-extended: ^2.0.2
vue: ^3.4.21 vue: ^3.4.21
vue-router: ^4.4.2
vue-tsc: ^2.0.19 vue-tsc: ^2.0.19
vue-markdown-render: ^2.2.1 vue-markdown-render: ^2.2.1
highlight.js: ^11.8.0 highlight.js: ^11.8.0