diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84a77c38..c1f7d8fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,57 +4,57 @@ name: Test on: - push: - branches: ["main"] - pull_request: - branches: ["main"] + push: + branches: ['main'] + pull_request: + branches: ['main'] jobs: - test: - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [20.12.0] # Latest LTS - - steps: - - uses: actions/checkout@v4 - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - - name: Install pnpm - uses: pnpm/action-setup@v3 - with: - version: 8 # Latest major - run_install: false - - - name: Get pnpm store directory - shell: bash - run: | - echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV - - - uses: actions/cache@v3 - name: Setup pnpm cache - with: - path: ${{ env.STORE_PATH }} - key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} - restore-keys: | - ${{ runner.os }}-pnpm-store- - - - name: Install dependencies - run: pnpm install - - - name: Build Darkroom - run: pnpm build:darkroom - - - name: Build Timeline - run: pnpm build:timeline - - - name: Build safelight - run: pnpm build:safelight - - - name: Test - run: pnpm test:run + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.12.0] # Latest LTS + + steps: + - uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install pnpm + uses: pnpm/action-setup@v3 + with: + version: 8 # Latest major + run_install: false + + - name: Get pnpm store directory + shell: bash + run: | + echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV + + - uses: actions/cache@v3 + name: Setup pnpm cache + with: + path: ${{ env.STORE_PATH }} + key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} + restore-keys: | + ${{ runner.os }}-pnpm-store- + + - name: Install dependencies + run: pnpm install + + - name: Build Darkroom + run: pnpm build:darkroom + + - name: Build Timeline + run: pnpm build:timeline + + - name: Build safelight + run: pnpm build:safelight + + - name: Test + run: pnpm test diff --git a/package.json b/package.json index 1c9a179d..1b42fa9b 100644 --- a/package.json +++ b/package.json @@ -11,8 +11,7 @@ "build:darkroom": "cd packages/darkroom && pnpm build", "build:timeline": "cd packages/timeline && pnpm build", "build:safelight": "cd packages/safelight && pnpm build", - "test": "vitest", - "test:run": "vitest run --open false --ui false", + "test": "pnpm run -r test:run", "dev": "pnpm build:packages && cd packages/safelight && pnpm dev", "dev:darkroom": "pnpm build:packages && cd packages/darkroom && pnpm dev:web" }, diff --git a/packages/darkroom/package.json b/packages/darkroom/package.json index 525d4c07..7197a2b4 100644 --- a/packages/darkroom/package.json +++ b/packages/darkroom/package.json @@ -25,7 +25,8 @@ "build": "rimraf ./dist/ && vite build && tsc --emitDeclarationOnly", "build:vite": "vite build", "build:tsc": "tsc --emitDeclarationOnly", - "test": "vitest" + "test": "vitest", + "test:run": "vitest run --ui false" }, "dependencies": { "@endo/static-module-record": "^1.1.1", @@ -57,4 +58,4 @@ "vite-plugin-mkcert": "^1.17.5", "vue-codemirror": "^6.1.1" } -} +} \ No newline at end of file diff --git a/packages/darkroom/vitest.config.ts b/packages/darkroom/vitest.config.ts index 4b43c21c..b2b4ef14 100644 --- a/packages/darkroom/vitest.config.ts +++ b/packages/darkroom/vitest.config.ts @@ -4,6 +4,7 @@ export default defineProject({ test: { reporters: !process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : ['default'], globals: true, + name: 'Darkroom', browser: { enabled: true, headless: true, diff --git a/packages/shared/package.json b/packages/shared/package.json index 738142fa..47e9e867 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -6,6 +6,10 @@ "exports": { "./*": "./src/*.ts" }, + "scripts": { + "test": "vitest", + "test:run": "vitest run --ui false" + }, "dependencies": { "@vueuse/core": "^10.9.0", "@vueuse/shared": "^10.9.0", @@ -23,6 +27,8 @@ "@tsconfig/node20": "^20.1.4", "@types/luxon": "^3.4.2", "@types/uuid": "^9.0.8", - "@vue/tsconfig": "^0.5.1" + "@vue/tsconfig": "^0.5.1", + "fake-indexeddb": "^5.0.2", + "happy-dom": "^14.7.1" } } \ No newline at end of file diff --git a/packages/shared/src/Storage/db.ts b/packages/shared/src/Storage/db.ts index eeab657b..e33fe434 100644 --- a/packages/shared/src/Storage/db.ts +++ b/packages/shared/src/Storage/db.ts @@ -6,7 +6,13 @@ export class SafelightIndexedDB extends Dexie { project!: Table; constructor() { - super('SafelightIdb'); + // Only during tests + if (global?.vitest) { + super('SafelightIdb', { indexedDB: global.indexedDB, IDBKeyRange: global.IDBKeyRange }); + } else { + super('SafelightIdb'); + } + this.version(1).stores({ media: 'id, name, contentHash', project: 'id, name, type' diff --git a/packages/shared/test/Storage/indexedDB/Project.spec.ts b/packages/shared/test/Storage/indexedDB/Project.spec.ts new file mode 100644 index 00000000..8df311d0 --- /dev/null +++ b/packages/shared/test/Storage/indexedDB/Project.spec.ts @@ -0,0 +1,32 @@ +import { IDBKeyRange, indexedDB } from 'fake-indexeddb'; +import { expect, test } from 'vitest'; +import SimpleProject from '../../../src/Project/SimpleProject'; +import IndexedDbStorageController from '../../../src/Storage/IndexedDbStorage'; + +test('List projects', async () => { + global.indexedDB = indexedDB; + global.IDBKeyRange = IDBKeyRange; + + const storage = new IndexedDbStorageController(); + + const project = new SimpleProject(); + await storage.SaveProject(project); + + const projects = await storage.getProjects(); + + expect(projects[0].id).toBe(project.id); +}); + +test('Retrieve project', async () => { + global.indexedDB = indexedDB; + global.IDBKeyRange = IDBKeyRange; + + const storage = new IndexedDbStorageController(); + + const project = new SimpleProject(); + await storage.SaveProject(project); + + const loadedProject = await storage.LoadProject(project.id); + + expect(loadedProject?.id).toEqual(project.id); +}); diff --git a/packages/shared/vitest.config.ts b/packages/shared/vitest.config.ts index 27eec061..04202272 100644 --- a/packages/shared/vitest.config.ts +++ b/packages/shared/vitest.config.ts @@ -6,14 +6,12 @@ export default defineProject({ test: { reporters: !process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : ['default'], globals: true, - environment: 'jsdom', + environment: 'happy-dom', + name: 'shared', ui: true, + open: false, api: { port: 5125 - }, - browser: { - name: 'chrome', - enabled: false } } }); diff --git a/packages/timeline/package.json b/packages/timeline/package.json index 415d2ef0..cd1f88e1 100644 --- a/packages/timeline/package.json +++ b/packages/timeline/package.json @@ -27,7 +27,8 @@ "build": "pnpm \"/build:/\"", "build:vite": "vite build", "build:tsc": "vue-tsc --emitDeclarationOnly", - "test": "vitest" + "test": "vitest", + "test:run": "vitest run --ui false" }, "dependencies": { "@safelight/shared": "workspace:*", @@ -42,10 +43,10 @@ "@vitejs/plugin-vue": "^5.0.4", "@vue/test-utils": "^2.4.5", "@vue/tsconfig": "^0.5.1", - "jsdom": "^24.0.0", + "happy-dom": "^14.7.1", "typescript": "^5.4.5", "vite": "^5.2.8", "vitest": "^1.4.0", "vue-tsc": "^2.0.12" } -} +} \ No newline at end of file diff --git a/packages/timeline/vitest.config.ts b/packages/timeline/vitest.config.ts index 7e48206b..d6e73fad 100644 --- a/packages/timeline/vitest.config.ts +++ b/packages/timeline/vitest.config.ts @@ -6,7 +6,9 @@ export default defineProject({ test: { reporters: !process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : ['default'], globals: true, - environment: 'jsdom', - ui: true + name: 'timeline', + environment: 'happy-dom', + ui: true, + open: false } }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 08cd09db..a9b85915 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,7 +102,7 @@ importers: version: 3.8.1(@types/node@20.12.7)(typescript@5.4.5)(vite@5.2.8) vitest: specifier: ^1.4.0 - version: 1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(jsdom@24.0.0) + version: 1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(happy-dom@14.7.1) webdriverio: specifier: ^8.35.1 version: 8.35.1(typescript@5.4.5) @@ -347,6 +347,12 @@ importers: '@vue/tsconfig': specifier: ^0.5.1 version: 0.5.1 + fake-indexeddb: + specifier: ^5.0.2 + version: 5.0.2 + happy-dom: + specifier: ^14.7.1 + version: 14.7.1 packages/timeline: dependencies: @@ -381,9 +387,9 @@ importers: '@vue/tsconfig': specifier: ^0.5.1 version: 0.5.1 - jsdom: - specifier: ^24.0.0 - version: 24.0.0 + happy-dom: + specifier: ^14.7.1 + version: 14.7.1 typescript: specifier: ^5.4.5 version: 5.4.5 @@ -392,7 +398,7 @@ importers: version: 5.2.8(@types/node@20.12.7)(lightningcss@1.24.1)(sass@1.74.1) vitest: specifier: ^1.4.0 - version: 1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(jsdom@24.0.0) + version: 1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(happy-dom@14.7.1) vue-tsc: specifier: ^2.0.12 version: 2.0.12(typescript@5.4.5) @@ -2932,13 +2938,6 @@ packages: hasBin: true dev: true - /cssstyle@4.0.1: - resolution: {integrity: sha512-8ZYiJ3A/3OkDd093CBT/0UKDWry7ak4BdPTFP2+QEP7cmhouyq/Up709ASSj2cK02BbZiMgk7kYjZNS4QP5qrQ==} - engines: {node: '>=18'} - dependencies: - rrweb-cssom: 0.6.0 - dev: true - /csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} @@ -2952,14 +2951,6 @@ packages: engines: {node: '>= 14'} dev: true - /data-urls@5.0.0: - resolution: {integrity: sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==} - engines: {node: '>=18'} - dependencies: - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - dev: true - /de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} dev: true @@ -2980,10 +2971,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: true - /decimal.js@10.4.3: - resolution: {integrity: sha512-VBBaLc1MgL5XpzgIP7ny5Z6Nx3UrRkIViUkPUdtl9aya5amy3De1gsUUSB1g3+3sExYNjCAsAznmukyxCb1GRA==} - dev: true - /decompress-response@6.0.0: resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} engines: {node: '>=10'} @@ -3501,6 +3488,11 @@ packages: - supports-color dev: true + /fake-indexeddb@5.0.2: + resolution: {integrity: sha512-cB507r5T3D55DfclY01GLkninZLfU7HXV/mhVRTnTRm5k2u+fY7Fof2dBkr80p5t7G7dlA/G5dI87QiMdPpMCQ==} + engines: {node: '>=18'} + dev: true + /fast-deep-equal@2.0.1: resolution: {integrity: sha512-bCK/2Z4zLidyB4ReuIsvALH6w31YfAQDmXMqMx6FyfHqvBxtjC0eRumeSu4Bs3XtXwpyIywtSTrVT99BxY1f9w==} dev: true @@ -3892,6 +3884,15 @@ packages: - uWebSockets.js dev: true + /happy-dom@14.7.1: + resolution: {integrity: sha512-v60Q0evZ4clvMcrAh5/F8EdxDdfHdFrtffz/CNe10jKD+nFweZVxM91tW+UyY2L4AtpgIaXdZ7TQmiO1pfcwbg==} + engines: {node: '>=16.0.0'} + dependencies: + entities: 4.5.0 + webidl-conversions: 7.0.0 + whatwg-mimetype: 3.0.0 + dev: true + /has-flag@3.0.0: resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} engines: {node: '>=4'} @@ -3948,13 +3949,6 @@ packages: hasBin: true dev: true - /html-encoding-sniffer@4.0.0: - resolution: {integrity: sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==} - engines: {node: '>=18'} - dependencies: - whatwg-encoding: 3.1.1 - dev: true - /http-cache-semantics@4.1.1: resolution: {integrity: sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==} dev: true @@ -3992,13 +3986,6 @@ packages: engines: {node: '>=16.17.0'} dev: true - /iconv-lite@0.6.3: - resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} - engines: {node: '>=0.10.0'} - dependencies: - safer-buffer: 2.1.2 - dev: true - /ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} dev: true @@ -4131,10 +4118,6 @@ packages: engines: {node: '>=12'} dev: true - /is-potential-custom-element-name@1.0.1: - resolution: {integrity: sha512-bCYeRA2rVibKZd+s2625gGnGF/t7DSqDs4dP7CrLA1m7jKWz6pps0LpYLJN8Q64HtmPKJ1hrN3nzPNKFEKOUiQ==} - dev: true - /is-stream@2.0.1: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} @@ -4228,42 +4211,6 @@ packages: resolution: {integrity: sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A==} dev: true - /jsdom@24.0.0: - resolution: {integrity: sha512-UDS2NayCvmXSXVP6mpTj+73JnNQadZlr9N68189xib2tx5Mls7swlTNao26IoHv46BZJFvXygyRtyXd1feAk1A==} - engines: {node: '>=18'} - peerDependencies: - canvas: ^2.11.2 - peerDependenciesMeta: - canvas: - optional: true - dependencies: - cssstyle: 4.0.1 - data-urls: 5.0.0 - decimal.js: 10.4.3 - form-data: 4.0.0 - html-encoding-sniffer: 4.0.0 - http-proxy-agent: 7.0.2 - https-proxy-agent: 7.0.4 - is-potential-custom-element-name: 1.0.1 - nwsapi: 2.2.7 - parse5: 7.1.2 - rrweb-cssom: 0.6.0 - saxes: 6.0.0 - symbol-tree: 3.2.4 - tough-cookie: 4.1.3 - w3c-xmlserializer: 5.0.0 - webidl-conversions: 7.0.0 - whatwg-encoding: 3.1.1 - whatwg-mimetype: 4.0.0 - whatwg-url: 14.0.0 - ws: 8.16.0 - xml-name-validator: 5.0.0 - transitivePeerDependencies: - - bufferutil - - supports-color - - utf-8-validate - dev: true - /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} @@ -4847,10 +4794,6 @@ packages: boolbase: 1.0.0 dev: true - /nwsapi@2.2.7: - resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} - dev: true - /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -4955,12 +4898,6 @@ packages: callsites: 3.1.0 dev: true - /parse5@7.1.2: - resolution: {integrity: sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==} - dependencies: - entities: 4.5.0 - dev: true - /path-browserify@1.0.1: resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} @@ -5275,10 +5212,6 @@ packages: /proxy-from-env@1.1.0: resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} - /psl@1.9.0: - resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} - dev: true - /pump@3.0.0: resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} dependencies: @@ -5318,10 +5251,6 @@ packages: resolution: {integrity: sha512-lT5yCqEBgfoMYpf3F2xQRK7zEr1rhIIZuceDK6+xRkJQ4NMbHTwXqk4NkwDwQMNqXgG9r9fyHnzwNVs6zV5KRw==} dev: true - /querystringify@2.2.0: - resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} - dev: true - /queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} dev: true @@ -5392,10 +5321,6 @@ packages: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} - /requires-port@1.0.0: - resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} - dev: true - /resolve-alpn@1.2.1: resolution: {integrity: sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==} dev: true @@ -5509,10 +5434,6 @@ packages: '@rollup/rollup-win32-x64-msvc': 4.14.1 fsevents: 2.3.3 - /rrweb-cssom@0.6.0: - resolution: {integrity: sha512-APM0Gt1KoXBz0iIkkdB/kfvGOwC4UuJFeG/c+yV7wSc7q96cG/kJ0HiYCnzivD9SB53cLV1MlHFNfOuPaadYSw==} - dev: true - /run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} dependencies: @@ -5537,10 +5458,6 @@ packages: resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} dev: true - /safer-buffer@2.1.2: - resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - dev: true - /sass@1.74.1: resolution: {integrity: sha512-w0Z9p/rWZWelb88ISOLyvqTWGmtmu2QJICqDBGyNnfG4OUnPX9BBjjYIXUpXCMOOg5MQWNpqzt876la1fsTvUA==} engines: {node: '>=14.0.0'} @@ -5550,13 +5467,6 @@ packages: immutable: 4.3.5 source-map-js: 1.2.0 - /saxes@6.0.0: - resolution: {integrity: sha512-xAg7SOnEhrm5zI3puOOKyy1OMcMlIJZYNJY7xLBwSze0UjhPLnWfj2GF2EpT0jmzaJKIWKHLsaSSajf35bcYnA==} - engines: {node: '>=v12.22.7'} - dependencies: - xmlchars: 2.2.0 - dev: true - /scule@1.3.0: resolution: {integrity: sha512-6FtHJEvt+pVMIB9IBY+IcCJ6Z5f1iQnytgyfKMhDKgmzYG+TeH/wx1y3l27rshSbLiSanrR9ffZDrEsmjlQF2g==} dev: true @@ -5864,10 +5774,6 @@ packages: engines: {node: '>= 0.4'} dev: true - /symbol-tree@3.2.4: - resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==} - dev: true - /synckit@0.8.8: resolution: {integrity: sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==} engines: {node: ^14.18.0 || >=16.0.0} @@ -5991,27 +5897,10 @@ packages: engines: {node: '>=6'} dev: true - /tough-cookie@4.1.3: - resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} - engines: {node: '>=6'} - dependencies: - psl: 1.9.0 - punycode: 2.3.1 - universalify: 0.2.0 - url-parse: 1.5.10 - dev: true - /tr46@0.0.3: resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} dev: true - /tr46@5.0.0: - resolution: {integrity: sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==} - engines: {node: '>=18'} - dependencies: - punycode: 2.3.1 - dev: true - /traverse@0.3.9: resolution: {integrity: sha512-iawgk0hLP3SxGKDfnDJf8wTz4p2qImnyihM5Hh/sGvQ3K37dPi/w8sRhdNIxYA1TwFwc5mDhIJq+O0RsvXBKdQ==} dev: true @@ -6233,11 +6122,6 @@ packages: engines: {node: '>= 4.0.0'} dev: true - /universalify@0.2.0: - resolution: {integrity: sha512-CJ1QgKmNg3CwvAv/kOFmtnEN05f0D/cn9QntgNOQlQF9dgvVTHj3t+8JPdjqawCHk7V/KA+fbUqzZ9XWhcqPUg==} - engines: {node: '>= 4.0.0'} - dev: true - /universalify@2.0.1: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} @@ -6415,13 +6299,6 @@ packages: punycode: 2.3.1 dev: true - /url-parse@1.5.10: - resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} - dependencies: - querystringify: 2.2.0 - requires-port: 1.0.0 - dev: true - /userhome@1.0.0: resolution: {integrity: sha512-ayFKY3H+Pwfy4W98yPdtH1VqH4psDeyW8lYYFzfecR9d6hqLpqhecktvYR3SEEXt7vG0S1JEpciI3g94pMErig==} engines: {node: '>= 0.8.0'} @@ -6554,7 +6431,7 @@ packages: optionalDependencies: fsevents: 2.3.3 - /vitest@1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(jsdom@24.0.0): + /vitest@1.4.0(@types/node@20.12.7)(@vitest/browser@1.4.0)(@vitest/ui@1.4.0)(happy-dom@14.7.1): resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true @@ -6591,7 +6468,7 @@ packages: chai: 4.4.1 debug: 4.3.4 execa: 8.0.1 - jsdom: 24.0.0 + happy-dom: 14.7.1 local-pkg: 0.5.0 magic-string: 0.30.9 pathe: 1.1.2 @@ -6791,13 +6668,6 @@ packages: dev: false optional: true - /w3c-xmlserializer@5.0.0: - resolution: {integrity: sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==} - engines: {node: '>=18'} - dependencies: - xml-name-validator: 5.0.0 - dev: true - /wait-port@1.1.0: resolution: {integrity: sha512-3e04qkoN3LxTMLakdqeWth8nih8usyg+sf1Bgdf9wwUkp05iuK1eSY/QpLvscT/+F/gA89+LpUmmgBtesbqI2Q==} engines: {node: '>=10'} @@ -6895,24 +6765,9 @@ packages: resolution: {integrity: sha512-poXpCylU7ExuvZK8z+On3kX+S8o/2dQ/SVYueKA0D4WEMXROXgY8Ez50/bQEUmvoSMMrWcrJqCHuhAbsiwg7Dg==} dev: true - /whatwg-encoding@3.1.1: - resolution: {integrity: sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==} - engines: {node: '>=18'} - dependencies: - iconv-lite: 0.6.3 - dev: true - - /whatwg-mimetype@4.0.0: - resolution: {integrity: sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==} - engines: {node: '>=18'} - dev: true - - /whatwg-url@14.0.0: - resolution: {integrity: sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==} - engines: {node: '>=18'} - dependencies: - tr46: 5.0.0 - webidl-conversions: 7.0.0 + /whatwg-mimetype@3.0.0: + resolution: {integrity: sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==} + engines: {node: '>=12'} dev: true /whatwg-url@5.0.0: @@ -7011,15 +6866,6 @@ packages: engines: {node: '>=12'} dev: true - /xml-name-validator@5.0.0: - resolution: {integrity: sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==} - engines: {node: '>=18'} - dev: true - - /xmlchars@2.2.0: - resolution: {integrity: sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==} - dev: true - /xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} diff --git a/vitest.config.ts b/vitest.config.ts deleted file mode 100644 index af3d4bc2..00000000 --- a/vitest.config.ts +++ /dev/null @@ -1,21 +0,0 @@ -import Vue from '@vitejs/plugin-vue'; -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - plugins: [Vue()], - test: { - reporters: process.env.GITHUB_ACTIONS ? ['default', 'github-actions'] : ['default'], - globals: true, - environment: 'jsdom', - open: false, - ui: true, - api: { - port: 5125 - }, - browser: { - enabled: true, - headless: true, - name: 'chrome' - } - } -}); diff --git a/vitest.workspace.json b/vitest.workspace.json deleted file mode 100644 index 41f7966a..00000000 --- a/vitest.workspace.json +++ /dev/null @@ -1,3 +0,0 @@ -[ - "packages/*/vitest.config.{e2e,unit}.ts" -] \ No newline at end of file