fix: change vite version to 3 for playwright

Playwright requires Vite 3, previously we were using Vite 2. Package.json updated accordingly
This commit is contained in:
Zane Schaffer 2022-07-19 08:43:42 -07:00
parent 68248215ac
commit b4f8ae3f0f
7 changed files with 4051 additions and 42543 deletions

32034
backend/package-lock.json generated

File diff suppressed because it is too large Load Diff

10501
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -21,6 +21,7 @@
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"autoprefixer": "^10.4.7",
"cz-conventional-changelog": "3.3.0",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-svelte3": "^4.0.0",
@ -33,12 +34,17 @@
"tailwindcss": "^3.1.5",
"tslib": "^2.3.1",
"typescript": "^4.7.2",
"vite": "^2.9.13"
"vite": "^3"
},
"type": "module",
"dependencies": {
"@sanity/client": "^3.3.2",
"@sanity/image-url": "^1.0.1",
"@sanity/types": "^2.29.5"
},
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}

View File

@ -1,14 +1,15 @@
import { client } from '$lib/sanityClient';
/** @type {import('@sveltejs/kit').RequestHandler} */
export async function get() {
export async function GET() {
const products = await client.fetch('*[_type == "product"]');
const tags = await client.fetch('*[_type == "tag"]');
const emotions = await client.fetch('*[_type == "emotion"]');
const data = {
products,tags,emotions
}
products,
tags,
emotions
};
if (data) {
return {

View File

@ -2,5 +2,5 @@ import { expect, test } from '@playwright/test';
test('index page has expected h1', async ({ page }) => {
await page.goto('/');
expect(await page.textContent('h1')).toBe('Welcome to SvelteKit');
expect(await page.textContent('main')).toBe('Welcome to SvelteKit');
});

View File

@ -15,8 +15,6 @@ const config = {
allow: ['backend']
}
}
};
export default config;

4038
yarn.lock Normal file

File diff suppressed because it is too large Load Diff