diff --git a/cypress.config.ts b/cypress.config.ts index 8fef68f..ef44da1 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from 'cypress' export default defineConfig({ projectId: 'j7s91r', e2e: { - specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', + specPattern: 'cypress/e2e/**/*.cy.{js,jsx,ts,tsx}', baseUrl: 'http://localhost:4173', defaultCommandTimeout: 8000, }, diff --git a/cypress/e2e/article.cy.ts b/cypress/e2e/article.cy.ts index 104450e..844d107 100644 --- a/cypress/e2e/article.cy.ts +++ b/cypress/e2e/article.cy.ts @@ -32,6 +32,9 @@ describe('Article', () => { }) it('should render markdown correctly', () => { + cy.login() + cy.visit(ROUTES.ARTICLE) + cy.get('.article-content').within(() => { cy.get('h1') .should('contain', 'Article body') diff --git a/cypress/e2e/auth.cy.ts b/cypress/e2e/auth.cy.ts index 9adc2e3..ff73c87 100644 --- a/cypress/e2e/auth.cy.ts +++ b/cypress/e2e/auth.cy.ts @@ -9,6 +9,7 @@ describe('Auth', () => { }) it('should logout when click logout button', () => { + cy.login() cy.get(`[href="${ROUTES.SETTINGS}"]`).click() cy.get('button.btn-outline-danger') diff --git a/cypress/e2e/home.cy.ts b/cypress/e2e/home.cy.ts index e6a682c..043a21e 100644 --- a/cypress/e2e/home.cy.ts +++ b/cypress/e2e/home.cy.ts @@ -16,18 +16,21 @@ describe('Homepage', () => { }) it('should highlight Global Feed when home page loaded', () => { + cy.visit(ROUTES.HOME) cy.get('.articles-toggle > .nav') .contains('Global Feed') .should('have.class', 'active') }) it('should display article when page loaded', () => { + cy.visit(ROUTES.HOME) cy.get('.article-preview:first') .find('h1') .should('contain.text', 'abc123') }) it('should read more information of the first articles', () => { + cy.visit(ROUTES.HOME) cy.get('div.article-preview:first span') .contains('Read more...') .click() @@ -45,6 +48,9 @@ describe('Homepage', () => { }) it('should jump to next page when click page 2 in pagination', () => { + cy.visit(ROUTES.HOME) + cy.wait('@getArticles') + cy.get('ul.pagination li.page-item:nth-child(2) a.page-link') .click() diff --git a/cypress/e2e/tag.cy.ts b/cypress/e2e/tag.cy.ts index 5832b78..9f7e797 100644 --- a/cypress/e2e/tag.cy.ts +++ b/cypress/e2e/tag.cy.ts @@ -21,6 +21,9 @@ describe('Tag', () => { }) it('should show right articles of tag', () => { + cy.visit(ROUTES.HOME) + cy.wait('@getTags') + cy.get('a.tag-pill.tag-default:last').click() cy.wait('@getArticlesOfTag') diff --git a/cypress/e2e/tsconfig.json b/cypress/e2e/tsconfig.json index 9b781a9..1227d2c 100644 --- a/cypress/e2e/tsconfig.json +++ b/cypress/e2e/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@vue/tsconfig/tsconfig.web.json", + "extends": "../../tsconfig.json", "include": [ "./**/*", "../fixtures/**/*", @@ -8,10 +8,10 @@ ], "exclude": ["../../src"], "compilerOptions": { - "baseUrl": "./", + "baseUrl": ".", "isolatedModules": false, - "target": "es5", - "lib": ["es5", "dom"], + "target": "ESNext", + "lib": ["ESNext", "DOM"], "types": ["cypress", "@testing-library/cypress"] } } diff --git a/cypress/support/component-index.html b/cypress/support/component-index.html deleted file mode 100644 index 957c9fc..0000000 --- a/cypress/support/component-index.html +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - Components App - - - - - - - - -
- - diff --git a/cypress/support/component.ts b/cypress/support/component.ts deleted file mode 100644 index e1cf587..0000000 --- a/cypress/support/component.ts +++ /dev/null @@ -1,101 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types */ -// noinspection ES6PreferShortImport - -// *********************************************************** -// This example support/component.ts is processed and -// loaded automatically before your test files. -// -// This is a great place to put global configuration and -// behavior that modifies Cypress. -// -// You can change the location of this file or turn off -// automatically serving support files with the -// 'supportFile' configuration option. -// -// You can read more here: -// https://on.cypress.io/configuration -// *********************************************************** -import './commands' -import type { StyleOptions } from '@cypress/mount-utils' -import type { MountingOptions } from '@vue/test-utils' -import { mount } from 'cypress/vue' -import registerGlobalComponents from 'src/plugins/global-components' -import { routes } from 'src/router' -import type { - ComponentOptionsWithArrayProps, ComponentOptionsWithObjectProps, - ComponentOptionsWithoutProps, ComponentPropsOptions, FunctionalComponent, - DefineComponent, ExtractDefaultPropTypes, MethodOptions, - AllowedComponentProps, ComponentCustomProps, VNodeProps, - ComponentOptionsMixin, ComputedOptions, EmitsOptions, ExtractPropTypes, App, -} from 'vue' -import type { Router } from 'vue-router' -import { createMemoryHistory, createRouter } from 'vue-router' - -type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps -type RouterOptions = { router?: Router } - -export declare type CyMountOptions = - & Omit, 'attachTo'> - & { log?: boolean } - & Partial - & RouterOptions - -interface Mount { - (originalComponent: { - new(...args: any[]): V - registerHooks(keys: string[]): void - }, options?: MountingOptions): Cypress.Chainable - - (originalComponent: { - new(...args: any[]): V - props(Props: P): any - registerHooks(keys: string[]): void - }, options?: CyMountOptions

): Cypress.Chainable - - (originalComponent: FunctionalComponent, options?: CyMountOptions): Cypress.Chainable - - , EE extends string = string, PP = PublicProps, Props = Readonly>, Defaults = ExtractDefaultPropTypes>(component: DefineComponent, options?: CyMountOptions & Omit, D>): Cypress.Chainable - - (componentOptions: ComponentOptionsWithoutProps, options?: CyMountOptions): Cypress.Chainable - - = {}, E extends EmitsOptions = Record, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string, Props extends Readonly<{ [key in PropNames]?: any; }> = Readonly<{ [key in PropNames]?: any; }>>(componentOptions: ComponentOptionsWithArrayProps, options?: CyMountOptions): Cypress.Chainable - - , RawBindings, D, C extends ComputedOptions = {}, M extends Record = {}, E extends EmitsOptions = Record, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, EE extends string = string>(componentOptions: ComponentOptionsWithObjectProps, options?: CyMountOptions & PublicProps, D>): Cypress.Chainable -} - -type MountParams = Parameters - -declare global { - namespace Cypress { - // noinspection JSUnusedGlobalSymbols - interface Chainable { - mount: Mount - } - } -} - -Cypress.Commands.add('mount', (component: MountParams[0], options: MountParams[1] = {}) => { - options.global = options.global || {} - options.global.plugins = options.global.plugins || [] - - if (!options.router) { - options.router = createRouter({ - routes, - history: createMemoryHistory(), - }) - } - - options.global.plugins.push({ - install (app: App) { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - app.use(options.router!) - }, - }, - { - install (app: App) { - registerGlobalComponents(app) - }, - }) - - return mount(component as any, options) -}) diff --git a/package.json b/package.json index a6e708e..3c0e450 100644 --- a/package.json +++ b/package.json @@ -28,18 +28,18 @@ "devDependencies": { "@mutoe/eslint-config-preset-vue": "~2.1.2", "@pinia/testing": "^0.1.3", - "@testing-library/cypress": "^8.0.7", + "@testing-library/cypress": "^9.0.0", "@testing-library/user-event": "^14.4.3", "@testing-library/vue": "^7.0.0", "@types/marked": "^4.0.8", "@vitejs/plugin-vue": "^4.3.4", "@vitest/coverage-v8": "^0.34.3", "concurrently": "^7.6.0", - "cypress": "^11.2.0", + "cypress": "^13.1.0", "eslint": "^8.31.0", "eslint-plugin-chai-friendly": "^0.7.2", - "eslint-plugin-cypress": "^2.12.1", - "happy-dom": "^10.11.2", + "eslint-plugin-cypress": "^2.14.0", + "happy-dom": "^11.0.2", "husky": "^8.0.2", "lint-staged": "^13.1.0", "msw": "^1.3.0", @@ -51,8 +51,13 @@ "vitest-dom": "^0.1.0", "vue-tsc": "^1.8.8" }, + "overrides": { + "@testing-library/cypress": { + "cypress": "^13" + } + }, "lint-staged": { - "src/**/*.{ts,vue}": "eslint --fix", - "cypress/**/*.ts": "eslint --fix" + "src/**/*.{ts,vue,js}": "eslint --fix", + "cypress/**/*.{ts,js}": "eslint --fix" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f26871d..097c70e 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -29,8 +29,8 @@ devDependencies: specifier: ^0.1.3 version: 0.1.3(pinia@2.1.6)(vue@3.3.4) '@testing-library/cypress': - specifier: ^8.0.7 - version: 8.0.7(cypress@11.2.0) + specifier: ^9.0.0 + version: 9.0.0(cypress@13.1.0) '@testing-library/user-event': specifier: ^14.4.3 version: 14.4.3(@testing-library/dom@9.3.1) @@ -50,8 +50,8 @@ devDependencies: specifier: ^7.6.0 version: 7.6.0 cypress: - specifier: ^11.2.0 - version: 11.2.0 + specifier: ^13.1.0 + version: 13.1.0 eslint: specifier: ^8.31.0 version: 8.31.0 @@ -59,11 +59,11 @@ devDependencies: specifier: ^0.7.2 version: 0.7.2(eslint@8.31.0) eslint-plugin-cypress: - specifier: ^2.12.1 - version: 2.12.1(eslint@8.31.0) + specifier: ^2.14.0 + version: 2.14.0(eslint@8.31.0) happy-dom: - specifier: ^10.11.2 - version: 10.11.2 + specifier: ^11.0.2 + version: 11.0.2 husky: specifier: ^8.0.2 version: 8.0.2 @@ -87,7 +87,7 @@ devDependencies: version: 4.4.9(@types/node@14.18.36) vitest: specifier: ^0.34.3 - version: 0.34.3(happy-dom@10.11.2) + version: 0.34.3(happy-dom@11.0.2) vitest-dom: specifier: ^0.1.0 version: 0.1.0(vitest@0.34.3) @@ -136,13 +136,6 @@ packages: dependencies: '@babel/types': 7.20.7 - /@babel/runtime@7.20.7: - resolution: {integrity: sha512-UF0tvkUtxwAgZ5W/KrkHf0Rn0fdnLDU9ScxBrEVNUprE/MzirjK4MJUX1/BVDv00Sv8cljtukVK1aky++X1SjQ==} - engines: {node: '>=6.9.0'} - dependencies: - regenerator-runtime: 0.13.11 - dev: true - /@babel/runtime@7.22.15: resolution: {integrity: sha512-T0O+aa+4w0u06iNmapipJXMV4HoUir03hpx3/YqXXhu9xim3w+dVphjFWl1OH8NbZHw5Lbm9k45drDkgq2VNNA==} engines: {node: '>=6.9.0'} @@ -169,8 +162,8 @@ packages: dev: true optional: true - /@cypress/request@2.88.10: - resolution: {integrity: sha512-Zp7F+R93N0yZyG34GutyTNr+okam7s/Fzc1+i3kcqOP8vk6OuajuE9qZJ6Rs+10/1JFtXFYMdyarnU1rZuJesg==} + /@cypress/request@3.0.1: + resolution: {integrity: sha512-TWivJlJi8ZDx2wGOw1dbLuHJKUYX7bWySw377nlnGOW3hP9/MUKIsEdXT/YngWxVdgNCHRBmFlBipE+5/2ZZlQ==} engines: {node: '>= 6'} dependencies: aws-sign2: 0.7.0 @@ -186,9 +179,9 @@ packages: json-stringify-safe: 5.0.1 mime-types: 2.1.35 performance-now: 2.1.0 - qs: 6.5.3 + qs: 6.10.4 safe-buffer: 5.2.1 - tough-cookie: 2.5.0 + tough-cookie: 4.1.3 tunnel-agent: 0.6.0 uuid: 8.3.2 dev: true @@ -622,15 +615,15 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@testing-library/cypress@8.0.7(cypress@11.2.0): - resolution: {integrity: sha512-3HTV725rOS+YHve/gD9coZp/UcPK5xhr4H0GMnq/ni6USdtzVtSOG9WBFtd8rYnrXk8rrGD+0toRFYouJNIG0Q==} + /@testing-library/cypress@9.0.0(cypress@13.1.0): + resolution: {integrity: sha512-c1XiCGeHGGTWn0LAU12sFUfoX3qfId5gcSE2yHode+vsyHDWraxDPALjVnHd4/Fa3j4KBcc5k++Ccy6A9qnkMA==} engines: {node: '>=12', npm: '>=6'} peerDependencies: - cypress: ^2.1.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0 || ^9.0.0 || ^10.0.0 || ^11.0.0 + cypress: ^12.0.0 dependencies: - '@babel/runtime': 7.20.7 + '@babel/runtime': 7.22.15 '@testing-library/dom': 8.19.1 - cypress: 11.2.0 + cypress: 13.1.0 dev: true /@testing-library/dom@8.19.1: @@ -638,12 +631,12 @@ packages: engines: {node: '>=12'} dependencies: '@babel/code-frame': 7.18.6 - '@babel/runtime': 7.20.7 + '@babel/runtime': 7.22.15 '@types/aria-query': 5.0.1 aria-query: 5.1.3 chalk: 4.1.2 dom-accessibility-api: 0.5.14 - lz-string: 1.4.4 + lz-string: 1.5.0 pretty-format: 27.5.1 dev: true @@ -738,6 +731,10 @@ packages: resolution: {integrity: sha512-FXKWbsJ6a1hIrRxv+FoukuHnGTgEzKYGi7kilfMae96AL9UNkPFNWJEEYWzdRI9ooIkbr4AKldyuSTLql06vLQ==} dev: true + /@types/node@16.18.48: + resolution: {integrity: sha512-mlaecDKQ7rIZrYD7iiKNdzFb6e/qD5I9U1rAhq+Fd+DWvYVs+G2kv74UFHmSOlg5+i/vF3XxuR522V4u8BqO+Q==} + dev: true + /@types/normalize-package-data@2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -772,7 +769,7 @@ packages: resolution: {integrity: sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==} requiresBuild: true dependencies: - '@types/node': 14.18.36 + '@types/node': 16.18.48 dev: true optional: true @@ -932,7 +929,7 @@ packages: std-env: 3.4.3 test-exclude: 6.0.0 v8-to-istanbul: 9.1.0 - vitest: 0.34.3(happy-dom@10.11.2) + vitest: 0.34.3(happy-dom@11.0.2) transitivePeerDependencies: - supports-color dev: true @@ -1600,8 +1597,8 @@ packages: engines: {node: '>=14'} dev: true - /commander@5.1.0: - resolution: {integrity: sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==} + /commander@6.2.1: + resolution: {integrity: sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==} engines: {node: '>= 6'} dev: true @@ -1688,15 +1685,15 @@ packages: /csstype@3.1.2: resolution: {integrity: sha512-I7K1Uu0MBPzaFKg4nI5Q7Vs2t+3gWWW648spaF+Rg7pI9ds18Ugn+lvg4SHczUdKlHI5LWBXyqfS8+DufyBsgQ==} - /cypress@11.2.0: - resolution: {integrity: sha512-u61UGwtu7lpsNWLUma/FKNOsrjcI6wleNmda/TyKHe0dOBcVjbCPlp1N6uwFZ0doXev7f/91YDpU9bqDCFeBLA==} - engines: {node: '>=12.0.0'} + /cypress@13.1.0: + resolution: {integrity: sha512-LUKxCYlB973QBFls1Up4FAE9QIYobT+2I8NvvAwMfQS2YwsWbr6yx7y9hmsk97iqbHkKwZW3MRjoK1RToBFVdQ==} + engines: {node: ^16.0.0 || ^18.0.0 || >=20.0.0} hasBin: true requiresBuild: true dependencies: - '@cypress/request': 2.88.10 + '@cypress/request': 3.0.1 '@cypress/xvfb': 1.2.4(supports-color@8.1.1) - '@types/node': 14.18.36 + '@types/node': 16.18.48 '@types/sinonjs__fake-timers': 8.1.1 '@types/sizzle': 2.3.3 arch: 2.2.0 @@ -1708,7 +1705,7 @@ packages: check-more-types: 2.24.0 cli-cursor: 3.1.0 cli-table3: 0.6.3 - commander: 5.1.0 + commander: 6.2.1 common-tags: 1.8.2 dayjs: 1.11.7 debug: 4.3.4(supports-color@8.1.1) @@ -1726,12 +1723,13 @@ packages: listr2: 3.14.0(enquirer@2.3.6) lodash: 4.17.21 log-symbols: 4.1.0 - minimist: 1.2.7 + minimist: 1.2.8 ospath: 1.2.2 pretty-bytes: 5.6.0 + process: 0.11.10 proxy-from-env: 1.0.0 request-progress: 3.0.0 - semver: 7.3.8 + semver: 7.5.4 supports-color: 8.1.1 tmp: 0.2.1 untildify: 4.0.0 @@ -1892,7 +1890,7 @@ packages: dependencies: domelementtype: 2.3.0 domhandler: 5.0.3 - entities: 4.4.0 + entities: 4.5.0 dev: true /domelementtype@2.3.0: @@ -2128,13 +2126,13 @@ packages: eslint: 8.31.0 dev: true - /eslint-plugin-cypress@2.12.1(eslint@8.31.0): - resolution: {integrity: sha512-c2W/uPADl5kospNDihgiLc7n87t5XhUbFDoTl6CfVkmG+kDAb5Ux10V9PoLPu9N+r7znpc+iQlcmAqT1A/89HA==} + /eslint-plugin-cypress@2.14.0(eslint@8.31.0): + resolution: {integrity: sha512-eW6tv7iIg7xujleAJX4Ujm649Bf5jweqa4ObPEIuueYRyLZt7qXGWhCY/n4bfeFW/j6nQZwbIBHKZt6EKcL/cg==} peerDependencies: eslint: '>= 3.2.1' dependencies: eslint: 8.31.0 - globals: 11.12.0 + globals: 13.21.0 dev: true /eslint-plugin-es@4.1.0(eslint@8.31.0): @@ -2753,11 +2751,6 @@ packages: ini: 2.0.0 dev: true - /globals@11.12.0: - resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} - engines: {node: '>=4'} - dev: true - /globals@13.19.0: resolution: {integrity: sha512-dkQ957uSRWHw7CFXLUtUHQI3g3aWApYhfNR2O6jn/907riyTYKVBmxYVROkBcY614FSSeSJh7Xm7SrUWCxvJMQ==} engines: {node: '>=8'} @@ -2765,6 +2758,13 @@ packages: type-fest: 0.20.2 dev: true + /globals@13.21.0: + resolution: {integrity: sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==} + engines: {node: '>=8'} + dependencies: + type-fest: 0.20.2 + dev: true + /globby@11.1.0: resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} engines: {node: '>=10'} @@ -2796,8 +2796,8 @@ packages: engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} dev: true - /happy-dom@10.11.2: - resolution: {integrity: sha512-rzgmLjLkhyaOdFEyU8CWXzbgyCyM7wJHLqhaoeEVSTyur1fjcUaiNTHx+D4CPaLvx16tGy+SBPd9TVnP/kzL3w==} + /happy-dom@11.0.2: + resolution: {integrity: sha512-0yyYIBCByZVgWNuM+/tXXaAR+YUjsoXmzDisQ/KPI7Dt9kXtsPUOU6JAc/isVxridmeSb9/icthsaAhUBKJa4g==} dependencies: css.escape: 1.5.1 entities: 4.5.0 @@ -3514,11 +3514,6 @@ packages: yallist: 4.0.0 dev: true - /lz-string@1.4.4: - resolution: {integrity: sha512-0ckx7ZHRPqb0oUm8zNr+90mtf9DQB60H1wMCjBtfi62Kl3a7JbHob6gA2bC+xRvZoOL+1hzUK8jeuEIQE8svEQ==} - hasBin: true - dev: true - /lz-string@1.5.0: resolution: {integrity: sha512-h5bgJWpxJNswbU7qCrV0tIKQCaS3blPDrqKWx+QxzuzL1zGUzij9XCWLrSLsJPu5t+eWA/ycetzYAO5IOMcWAQ==} hasBin: true @@ -3625,6 +3620,10 @@ packages: resolution: {integrity: sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==} dev: true + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + /mlly@1.4.2: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: @@ -4155,6 +4154,11 @@ packages: react-is: 18.2.0 dev: true + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: true + /proto-list@1.2.4: resolution: {integrity: sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==} dev: true @@ -4179,9 +4183,15 @@ packages: engines: {node: '>=6'} dev: true - /qs@6.5.3: - resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} + /qs@6.10.4: + resolution: {integrity: sha512-OQiU+C+Ds5qiH91qh/mg0w+8nwQuLjM4F4M/PbmhDOoYehPh+Fb0bDjtR1sOvy7YKxvj28Y/M0PhP5uVX0kB+g==} engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + dev: true + + /querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} dev: true /queue-microtask@1.2.3: @@ -4243,10 +4253,6 @@ packages: resolution: {integrity: sha512-OVede/NQE13xBQ+ob5CKd5KyeJYU2YInb1bmV4nRoOfquZPkAkxuOXicSe1PvqIuZZ4kD13sPKBbR7UFDmli6w==} dev: true - /regenerator-runtime@0.13.11: - resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} - dev: true - /regenerator-runtime@0.14.0: resolution: {integrity: sha512-srw17NI0TUWHuGa5CFGGmhfNIeja30WMBfbslPNhf6JrqQlLN5gcrvig1oqPxiVaXb0oW0XRKtH6Nngs5lKCIA==} dev: true @@ -4281,6 +4287,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -4801,12 +4811,14 @@ packages: is-number: 7.0.0 dev: true - /tough-cookie@2.5.0: - resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} - engines: {node: '>=0.8'} + /tough-cookie@4.1.3: + resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} + engines: {node: '>=6'} dependencies: psl: 1.9.0 punycode: 2.1.1 + universalify: 0.2.0 + url-parse: 1.5.10 dev: true /tr46@0.0.3: @@ -4916,6 +4928,11 @@ packages: which-boxed-primitive: 1.0.2 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.0: resolution: {integrity: sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==} engines: {node: '>= 10.0.0'} @@ -4932,6 +4949,13 @@ packages: punycode: 2.1.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 + /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} dev: true @@ -5045,10 +5069,10 @@ packages: dom-accessibility-api: 0.6.1 lodash-es: 4.17.21 redent: 4.0.0 - vitest: 0.34.3(happy-dom@10.11.2) + vitest: 0.34.3(happy-dom@11.0.2) dev: true - /vitest@0.34.3(happy-dom@10.11.2): + /vitest@0.34.3(happy-dom@11.0.2): resolution: {integrity: sha512-7+VA5Iw4S3USYk+qwPxHl8plCMhA5rtfwMjgoQXMT7rO5ldWcdsdo3U1QD289JgglGK4WeOzgoLTsGFu6VISyQ==} engines: {node: '>=v14.18.0'} hasBin: true @@ -5092,7 +5116,7 @@ packages: cac: 6.7.14 chai: 4.3.8 debug: 4.3.4(supports-color@8.1.1) - happy-dom: 10.11.2 + happy-dom: 11.0.2 local-pkg: 0.4.3 magic-string: 0.30.3 pathe: 1.1.1 diff --git a/tsconfig.json b/tsconfig.json index dfcf94f..364c608 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -22,5 +22,11 @@ "noFallthroughCasesInSwitch": true }, "include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue"], - "references": [{ "path": "./tsconfig.node.json" }] + "references": [{ "path": "./tsconfig.node.json" }], + "ts-node": { + "compilerOptions": { + "module": "ESNext", + "moduleResolution": "node" + } + } } diff --git a/tsconfig.node.json b/tsconfig.node.json index 42872c5..aa7e663 100644 --- a/tsconfig.node.json +++ b/tsconfig.node.json @@ -6,5 +6,9 @@ "moduleResolution": "bundler", "allowSyntheticDefaultImports": true }, - "include": ["vite.config.ts"] + "include": [ + "vite.config.ts", + "cypress.config.ts", + ".eslintrc.js" + ] }