From e9f2254dd35d99f429903e7f5182b2fb6950f41d Mon Sep 17 00:00:00 2001 From: feugy Date: Sun, 18 Dec 2022 10:06:27 +0100 Subject: [PATCH] chore: updates sveltekit, atelier & vite --- .eslintignore | 1 + .prettierignore | 4 +- TODO.md | 2 + apps/cli/package.json | 6 +- apps/games/package.json | 2 +- apps/server/package.json | 6 +- .../server/tests/services/auth/github.test.js | 4 +- apps/web/package.json | 42 +- apps/web/src/app.html | 4 +- .../game/[gameId]/Parameters/Choice.svelte | 4 +- .../__snapshots__/Button.tools.shot | 72 + .../[gameid]/Parameters/Container.test.js | 22 +- package.json | 19 +- pnpm-lock.yaml | 1242 ++++++++++------- 14 files changed, 858 insertions(+), 572 deletions(-) diff --git a/.eslintignore b/.eslintignore index 64bfd4ef..84d75883 100644 --- a/.eslintignore +++ b/.eslintignore @@ -5,4 +5,5 @@ dist/ dist-atelier/ node_modules/ scans/ +.vercel/ !.storybook/ \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index fa02cc02..8d037e34 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1,6 +1,8 @@ coverage/ dist/ +dist-atelier/ node_modules/ scans/ .husky/ -.svelte-kit \ No newline at end of file +.svelte-kit +.vercel/ \ No newline at end of file diff --git a/TODO.md b/TODO.md index 4440b0ad..614ef011 100644 --- a/TODO.md +++ b/TODO.md @@ -74,6 +74,8 @@ AssertionError: expected 2nd "spy" call to have been called with [ 'anima' ] ## Refactor +- vitest@0.25.8: issue when loading peer deps, resolve in [next release](https://github.com/vitest-dev/vitest/pull/2463) +- @urql/core@3.1.1: receiveGameListUpdates subscribtion fails because urql's stringification sends the whole games.graphql file instead of the subscription as a payload. This is because [these lines](https://github.com/urql-graphql/urql/pull/2871/files#diff-425e8fcb48a8df1865f99ca1fb981873c6d0ef33ee3856e18f85a8b449bb81b7R41-R42) - add tests for web/src/utils/peer-connection - use node 18 when msw/interceptor will [handle it](https://github.com/mswjs/interceptors/pull/283) - ts-check all the things! diff --git a/apps/cli/package.json b/apps/cli/package.json index c2d174ca..f1988c50 100644 --- a/apps/cli/package.json +++ b/apps/cli/package.json @@ -13,11 +13,11 @@ }, "dependencies": { "@tabulous/cli": "workspace:^0.0.1", - "@urql/core": "^3.0.5", + "@urql/core": "^3.1.1", "add": "^2.0.6", "ajv": "^8.11.2", "arg": "^5.0.2", - "chalk": "^5.1.2", + "chalk": "^5.2.0", "chalk-template": "^0.4.0", "dotenv": "^16.0.3", "es-main": "^1.2.0", @@ -25,7 +25,7 @@ "graphql": "^16.6.0", "lodash.camelcase": "^4.3.0", "lodash.kebabcase": "^4.1.1", - "undici": "^5.13.0" + "undici": "^5.14.0" }, "devDependencies": { "strip-ansi": "^7.0.1" diff --git a/apps/games/package.json b/apps/games/package.json index fb1a9aa6..f81a65f7 100644 --- a/apps/games/package.json +++ b/apps/games/package.json @@ -4,6 +4,6 @@ "description": "Tabulous game descriptors and assets", "type": "module", "dependencies": { - "@tabulous/server": "workspace:0.0.1" + "@tabulous/server": "workspace:*" } } diff --git a/apps/server/package.json b/apps/server/package.json index a8c3b139..47778ae5 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -12,7 +12,7 @@ }, "dependencies": { "@fastify/cors": "^8.2.0", - "@fastify/static": "^6.5.1", + "@fastify/static": "^6.6.0", "@fastify/websocket": "^7.1.1", "@isaacs/ttlcache": "^1.2.1", "ajv": "^8.11.2", @@ -25,8 +25,8 @@ "mercurius": "^11.4.0", "mqemitter-redis": "^5.0.0", "pino-pretty": "^9.1.1", - "rxjs": "^7.6.0", - "undici": "^5.13.0" + "rxjs": "^7.8.0", + "undici": "^5.14.0" }, "devDependencies": { "nodemon": "^2.0.20", diff --git a/apps/server/tests/services/auth/github.test.js b/apps/server/tests/services/auth/github.test.js index bc18cc6c..f9542ede 100644 --- a/apps/server/tests/services/auth/github.test.js +++ b/apps/server/tests/services/auth/github.test.js @@ -88,7 +88,7 @@ describe('Github authentication service', () => { return { access_token: token } }) githubApiMock.intercept({ path: '/user' }).reply(200, req => { - userInvoked(req.headers.authorization) + userInvoked(req.headers.Authorization) return user }) const state = githubAuth.storeFinalLocation(location) @@ -151,7 +151,7 @@ describe('Github authentication service', () => { return { access_token: token } }) githubApiMock.intercept({ path: '/user' }).reply(500, req => { - userInvoked(req.headers.authorization) + userInvoked(req.headers.Authorization) return 'server error' }) const state = githubAuth.storeFinalLocation(location) diff --git a/apps/web/package.json b/apps/web/package.json index d9c5265f..71ff66f1 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -16,30 +16,30 @@ "test:integration:run": "playwright test" }, "devDependencies": { - "@atelier-wb/svelte": "^0.9.0", - "@atelier-wb/toolshot": "^0.9.0", - "@atelier-wb/vite-plugin-atelier": "^0.9.0", - "@babylonjs/core": "^5.35.1", - "@babylonjs/inspector": "^5.35.1", - "@babylonjs/loaders": "^5.35.1", + "@atelier-wb/svelte": "^0.10.1", + "@atelier-wb/toolshot": "^0.10.1", + "@atelier-wb/vite-plugin-atelier": "^0.10.1", + "@babylonjs/core": "^5.38.0", + "@babylonjs/inspector": "^5.38.0", + "@babylonjs/loaders": "^5.38.0", "@fastify/cors": "^8.2.0", - "@fastify/static": "^6.5.1", + "@fastify/static": "^6.6.0", "@fastify/websocket": "^7.1.1", - "@playwright/test": "^1.28.1", + "@playwright/test": "^1.29.0", "@rollup/plugin-graphql": "^2.0.2", "@rollup/plugin-yaml": "^4.0.1", - "@sveltejs/adapter-vercel": "^1.0.0-next.84", - "@sveltejs/kit": "^1.0.0-next.571", - "@sveltejs/vite-plugin-svelte": "^1.4.0", + "@sveltejs/adapter-vercel": "^1.0.0", + "@sveltejs/kit": "^1.0.1", + "@sveltejs/vite-plugin-svelte": "^2.0.2", "@testing-library/dom": "^8.19.0", "@testing-library/jest-dom": "^5.16.5", "@testing-library/svelte": "^3.2.2", "@testing-library/user-event": "^14.4.3", - "@urql/core": "^3.0.5", - "@vitejs/plugin-basic-ssl": "^0.1.2", + "@urql/core": "3.1.0", + "@vitejs/plugin-basic-ssl": "^1.0.1", "autoprefixer": "^10.4.13", - "babylonjs-gltf2interface": "^5.37.0", - "chalk": "^5.1.2", + "babylonjs-gltf2interface": "^5.38.0", + "chalk": "^5.2.0", "chalk-template": "^0.4.0", "cookie": "^0.5.0", "dotenv": "^16.0.3", @@ -57,21 +57,21 @@ "jsdom": "^20.0.3", "material-design-icons-iconfont": "^6.7.0", "ms": "^3.0.0-canary.1", - "msw": "^0.49.1", - "postcss": "^8.4.19", + "msw": "^0.49.2", + "postcss": "^8.4.20", "postcss-import": "^15.0.1", "postcss-nested": "^6.0.0", "rfdc": "^1.3.0", "rollup-plugin-svelte-svg": "^1.0.0-beta.6", - "rxjs": "^7.6.0", - "svelte": "^3.53.1", + "rxjs": "^7.8.0", + "svelte": "^3.55.0", "svelte-htm": "^1.2.0", "svelte-intl": "^1.1.4", "svelte-markdown": "^0.2.3", "svelte-portal": "^2.2.0", "v8-to-istanbul": "^9.0.1", - "vite": "^3.2.4", - "vite-plugin-windicss": "^1.8.8", + "vite": "^4.0.1", + "vite-plugin-windicss": "^1.8.10", "webrtc-adapter": "^8.2.0", "whatwg-fetch": "^3.6.2", "wonka": "^6.1.2" diff --git a/apps/web/src/app.html b/apps/web/src/app.html index 5f877d2c..a9c6d4ba 100644 --- a/apps/web/src/app.html +++ b/apps/web/src/app.html @@ -8,6 +8,8 @@ %sveltekit.head% -%sveltekit.body% + + %sveltekit.body% + \ No newline at end of file diff --git a/apps/web/src/routes/(auth)/game/[gameId]/Parameters/Choice.svelte b/apps/web/src/routes/(auth)/game/[gameId]/Parameters/Choice.svelte index 4dc0b43e..bbaab047 100644 --- a/apps/web/src/routes/(auth)/game/[gameId]/Parameters/Choice.svelte +++ b/apps/web/src/routes/(auth)/game/[gameId]/Parameters/Choice.svelte @@ -2,7 +2,7 @@ import { Dropdown } from '@src/components' import { gameAssetsUrl } from '@src/utils' import { _, locale } from 'svelte-intl' - + import { findViolations } from './utils' export let name @@ -21,7 +21,7 @@ // when defauling to first option, mutates values $: if (!value && options.length) { - handleSelection({ detail: options[0] }) + setTimeout(() => handleSelection({ detail: options[0] }), 0) } function handleSelection({ detail }) { diff --git a/apps/web/tests/components/__snapshots__/Button.tools.shot b/apps/web/tests/components/__snapshots__/Button.tools.shot index 92473102..c93230c6 100644 --- a/apps/web/tests/components/__snapshots__/Button.tools.shot +++ b/apps/web/tests/components/__snapshots__/Button.tools.shot @@ -1,5 +1,59 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`Empty 1`] = `undefined`; + +exports[`Multiple entries 1`] = ` +
    +
  1. + + home + +
  2. + +
  3. + > +
  4. + +
  5. + + account + +
  6. + +
  7. + > +
  8. + +
  9. + + details + +
  10. + + +
+`; + exports[`Primary image icon only 1`] = `