Skip to content

Commit

Permalink
chore: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
IlCallo committed Feb 28, 2023
1 parent 09c1e74 commit 009e439
Show file tree
Hide file tree
Showing 16 changed files with 4,043 additions and 2,971 deletions.
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
"private": true,
"homepage": "http://quasar-framework.org",
"devDependencies": {
"@types/node": "^12.20.47",
"@typescript-eslint/eslint-plugin": "^5.41.0",
"@typescript-eslint/parser": "^5.41.0",
"eslint": "^8.26.0",
"eslint-config-prettier": "^8.5.0",
"@types/node": "^16.11.7",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"lerna": "^4.0.0",
"prettier": "^2.7.1",
"typescript": "^4.6.3"
"prettier": "^2.8.4",
"typescript": "^4.9.5"
},
"engines": {
"node": ">= 12.22.1",
Expand Down
8 changes: 4 additions & 4 deletions packages/e2e-cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@
"cross-env": "^7.0.3",
"lodash": "^4.17.21",
"nyc": "^15.1.0",
"start-server-and-test": "^1.15.2",
"vite-plugin-istanbul": "^3.0.4"
"start-server-and-test": "^2.0.0",
"vite-plugin-istanbul": "^4.0.1"
},
"devDependencies": {
"@types/lodash": "^4.14.191",
"cypress": "^12.2.0",
"cypress": "^12.7.0",
"eslint-plugin-cypress": "^2.12.1",
"rimraf": "^3.0.2"
"rimraf": "^4.1.2"
},
"peerDependencies": {
"cypress": "^12.2.0",
Expand Down
22 changes: 11 additions & 11 deletions packages/e2e-cypress/src/helpers/code-coverage-shim.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/**
* Types are not supported for `@cypress/code-coverage`
*
* @see https://github.com/cypress-io/code-coverage/issues/257
*/
declare module '@cypress/code-coverage/task' {
export default function registerCodeCoverageTasks(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): void;
}
/**
* Types are not supported for `@cypress/code-coverage`
*
* @see https://github.com/cypress-io/code-coverage/issues/257
*/
declare module '@cypress/code-coverage/task' {
export default function registerCodeCoverageTasks(
on: Cypress.PluginEvents,
config: Cypress.PluginConfigOptions,
): void;
}
38 changes: 19 additions & 19 deletions packages/e2e-cypress/src/helpers/commands/mount.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { mount } from 'cypress/vue';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
/**
* Helper mount function for Vue Components
* @param component Vue Component or JSX Element to mount
* @param options Options passed to Vue Test Utils
*/
mount: typeof mount;
}
}
}

export function registerMount() {
Cypress.Commands.add('mount', mount);
}
import { mount } from 'cypress/vue';

declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
/**
* Helper mount function for Vue Components
* @param component Vue Component or JSX Element to mount
* @param options Options passed to Vue Test Utils
*/
mount: typeof mount;
}
}
}

export function registerMount() {
Cypress.Commands.add('mount', mount);
}
124 changes: 62 additions & 62 deletions packages/e2e-cypress/src/helpers/commands/select-date.ts
Original file line number Diff line number Diff line change
@@ -1,62 +1,62 @@
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
/**
* Selects a given date into a QDate.
* @example cy.get('.q-date').selectDate('11/02/2021')
* @example cy.dataCy('start-date').selectDate(new Date())
*/
selectDate<E extends HTMLElement = HTMLElement>(
value: string | Date,
): Chainable<JQueryWithSelector<E>>;
}
}
}

export function registerSelectDate() {
Cypress.Commands.add(
'selectDate',
{ prevSubject: 'element' },
(subject, value) => {
if (!subject.hasClass('q-date')) {
throw new Error('Subject is not a QDate');
}

const targetDate = typeof value === 'string' ? new Date(value) : value;

cy.wrap(subject).within(() => {
cy.get('.q-date__navigation div:not(.q-date__arrow)')
.last()
.as('yearSelector');
cy.get('.q-date__navigation div:not(.q-date__arrow)')
.first()
.as('monthSelector');

const targetYear = targetDate.getFullYear();
const targetMonth = targetDate.getMonth();
const targetDay = targetDate.getDate();

// Since it's easy to detect it with the year selector,
// we avoid selecting the year if it's already the target one
cy.get('@yearSelector')
.invoke('text')
.then((currentYear) => {
if (currentYear !== targetYear.toString()) {
cy.get('@yearSelector').click();
cy.contains(targetYear).click();
}
});

cy.get('@monthSelector').click();
cy.get('.q-date__months-item').eq(targetMonth).click();

// The target day number is searched only into days buttons,
// skipping filler and out of range days
cy.get('.q-date__calendar-item--in').contains(targetDay).click();
});

return cy.wrap(subject);
},
);
}
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {
interface Chainable {
/**
* Selects a given date into a QDate.
* @example cy.get('.q-date').selectDate('11/02/2021')
* @example cy.dataCy('start-date').selectDate(new Date())
*/
selectDate<E extends HTMLElement = HTMLElement>(
value: string | Date,
): Chainable<JQueryWithSelector<E>>;
}
}
}

export function registerSelectDate() {
Cypress.Commands.add(
'selectDate',
{ prevSubject: 'element' },
(subject, value) => {
if (!subject.hasClass('q-date')) {
throw new Error('Subject is not a QDate');
}

const targetDate = typeof value === 'string' ? new Date(value) : value;

cy.wrap(subject).within(() => {
cy.get('.q-date__navigation div:not(.q-date__arrow)')
.last()
.as('yearSelector');
cy.get('.q-date__navigation div:not(.q-date__arrow)')
.first()
.as('monthSelector');

const targetYear = targetDate.getFullYear();
const targetMonth = targetDate.getMonth();
const targetDay = targetDate.getDate();

// Since it's easy to detect it with the year selector,
// we avoid selecting the year if it's already the target one
cy.get('@yearSelector')
.invoke('text')
.then((currentYear) => {
if (currentYear !== targetYear.toString()) {
cy.get('@yearSelector').click();
cy.contains(targetYear).click();
}
});

cy.get('@monthSelector').click();
cy.get('.q-date__months-item').eq(targetMonth).click();

// The target day number is searched only into days buttons,
// skipping filler and out of range days
cy.get('.q-date__calendar-item--in').contains(targetDay).click();
});

return cy.wrap(subject);
},
);
}
50 changes: 25 additions & 25 deletions packages/e2e-cypress/src/helpers/v-model-adapter.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
import { Ref, watch } from 'vue';

// VTU won't accept reactive v-model binding, this adapter manually
// set the model prop each time a new value is emitted
// See https://github.com/vuejs/test-utils/discussions/279

// See https://github.com/vuejs/test-utils/issues/871
export function vModelAdapter<T>(
modelRef: Ref<T>,
modelName = 'modelValue',
// Without this, TS will start complaining as it cannot understand the dynamic type of
// the returned object and match it with the component props this helper is applied to.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): any {
watch(modelRef, (value) =>
Cypress.vueWrapper.setProps({ [modelName]: value }),
);

return {
[modelName]: modelRef.value,
[`onUpdate:${modelName}`]: (emittedValue: T) => {
modelRef.value = emittedValue;
},
};
}
import { Ref, watch } from 'vue';

// VTU won't accept reactive v-model binding, this adapter manually
// set the model prop each time a new value is emitted
// See https://github.com/vuejs/test-utils/discussions/279

// See https://github.com/vuejs/test-utils/issues/871
export function vModelAdapter<T>(
modelRef: Ref<T>,
modelName = 'modelValue',
// Without this, TS will start complaining as it cannot understand the dynamic type of
// the returned object and match it with the component props this helper is applied to.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
): any {
watch(modelRef, (value) =>
Cypress.vueWrapper.setProps({ [modelName]: value }),
);

return {
[modelName]: modelRef.value,
[`onUpdate:${modelName}`]: (emittedValue: T) => {
modelRef.value = emittedValue;
},
};
}
8 changes: 4 additions & 4 deletions packages/unit-jest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,13 @@
},
"devDependencies": {
"@types/lodash-es": "^4.17.6",
"@vue/test-utils": "^2.2.0",
"@vue/test-utils": "^2.3.0",
"copyfiles": "^2.4.1",
"eslint-plugin-jest": "^27.1.3",
"jest": "^29.2.2",
"quasar": "^2.10.0",
"rimraf": "^3.0.2",
"vue": "^3.2.41"
"quasar": "^2.11.6",
"rimraf": "^4.1.2",
"vue": "^3.2.47"
},
"peerDependencies": {
"@vue/test-utils": "^2.2.0",
Expand Down
20 changes: 10 additions & 10 deletions packages/unit-jest/src/helpers/jest-preset-shim.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
// This module provide typings to the deep import, since the original file isn't written in TS
// This should be a .ts file (instead of a .d.ts) to not being elided at compile time by TS,
// which would make it useless
declare module '@quasar/quasar-app-extension-testing-unit-jest/jest-preset.mjs' {
import { Config } from 'jest';

export const quasarEsModulesPackageNames: string;
export const config: Config;
export default Config;
}
// This module provide typings to the deep import, since the original file isn't written in TS
// This should be a .ts file (instead of a .d.ts) to not being elided at compile time by TS,
// which would make it useless
declare module '@quasar/quasar-app-extension-testing-unit-jest/jest-preset.mjs' {
import { Config } from 'jest';

export const quasarEsModulesPackageNames: string;
export const config: Config;
export default Config;
}
12 changes: 6 additions & 6 deletions packages/unit-vitest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,18 @@
"yarn": ">= 1.17.3"
},
"dependencies": {
"happy-dom": "^7.7.0",
"happy-dom": "^8.9.0",
"lodash-es": "^4.17.21",
"vite-jsconfig-paths": "^2.0.1",
"vite-tsconfig-paths": "^3.5.0"
},
"devDependencies": {
"@types/lodash-es": "^4.17.4",
"@vue/test-utils": "^2.0.0",
"quasar": "^2.10.2",
"rimraf": "^3.0.2",
"vitest": "^0.25.2",
"vue": "^3.2.0"
"@vue/test-utils": "^2.3.0",
"quasar": "^2.11.6",
"rimraf": "^4.1.2",
"vitest": "^0.29.1",
"vue": "^3.2.47"
},
"peerDependencies": {
"@vitest/ui": "^0.25.2",
Expand Down
34 changes: 17 additions & 17 deletions test-project-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,33 +39,33 @@
"test:unit:watchAll": "jest --watchAll"
},
"dependencies": {
"@quasar/extras": "^1.0.0",
"@quasar/extras": "^1.15.11",
"axios": "^0.27.2",
"core-js": "^3.6.5",
"quasar": "^2.0.0",
"vue-i18n": "^9.0.0",
"vue-router": "^4.0.0",
"vuex": "^4.0.1"
"core-js": "^3.29.0",
"quasar": "^2.11.6",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6",
"vuex": "^4.1.0"
},
"devDependencies": {
"@babel/eslint-parser": "^7.13.14",
"@quasar/app": "^3.0.0",
"@babel/eslint-parser": "^7.19.1",
"@quasar/app": "^3.3.3",
"@quasar/quasar-app-extension-testing": "../packages/testing",
"@quasar/quasar-app-extension-testing-e2e-cypress": "../packages/e2e-cypress",
"@quasar/quasar-app-extension-testing-unit-jest": "../packages/unit-jest",
"@types/node": "^12.20.21",
"@typescript-eslint/eslint-plugin": "^5.27.0",
"@typescript-eslint/parser": "^5.27.0",
"@vue/test-utils": "^2.2.0",
"cypress": "^12.2.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^8.1.0",
"@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@vue/test-utils": "^2.3.0",
"cypress": "^12.7.0",
"eslint": "^8.35.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-cypress": "^2.12.1",
"eslint-plugin-jest": "^27.1.3",
"eslint-plugin-vue": "^9.1.0",
"eslint-plugin-vue": "^9.9.0",
"jest": "^29.2.2",
"majestic": "^1.7.0",
"prettier": "^2.6.2"
"majestic": "^1.8.1",
"prettier": "^2.8.4"
},
"browserslist": [
"last 10 Chrome versions",
Expand Down
Loading

0 comments on commit 009e439

Please sign in to comment.