Skip to content

Commit

Permalink
build: bump all dependencies to latest versions (#152)
Browse files Browse the repository at this point in the history
* build: Bump dependencies

* build: Bump eslint

* build: write full version of package in package.json, setup eslint

* fix: fix async-validator usages in qForm and qFormItem, replace types

* build: remove webpack from package.json, setup eslint

* build: generate yarn lock file

* build: fix scripts in package.json

* fix: disable no-console rule for cases in stories

* build: upgrade nodejs version up to 14.17.6

Co-authored-by: vizhe <vzheleztsov@gpmdata.ru>
  • Loading branch information
Sergey and ViZhe authored Sep 7, 2021
1 parent 96aa80e commit 5175c7b
Show file tree
Hide file tree
Showing 10 changed files with 259 additions and 169 deletions.
2 changes: 2 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/dist/
/node_modules/
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
},

"extends": [
"airbnb-base",
"airbnb-typescript/base",
"plugin:vue/vue3-recommended",
"@vue/typescript/recommended",
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
14.17.1
14.17.6
76 changes: 39 additions & 37 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,73 +13,75 @@
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"deploy-storybook": "storybook-to-ghpages --source-branch main",
"eslint": "eslint --fix --no-ignore '**/*.{vue,ts}'",
"prettier": "prettier --check --ignore-unknown '**/*'",
"prettier:fix": "prettier --write --ignore-unknown '**/*'",
"lint:js": "eslint '**/*.{vue,ts}'",
"lint:js:fix": "eslint --fix '**/*.{vue,ts}'",
"lint:style": "stylelint '**/*.{css,scss,vue}'",
"lint:style:fix": "stylelint --fix '**/*.{css,scss,vue}'",
"prettier": "prettier --check --ignore-unknown '**/*'",
"prettier:fix": "prettier --write --ignore-unknown '**/*'",
"prepare": "husky install"
},
"dependencies": {
"@popperjs/core": "^2.9.2",
"async-validator": "^3.5.2",
"colord": "^2.1.0",
"date-fns": "^2.22.1",
"@popperjs/core": "^2.10.1",
"async-validator": "^4.0.3",
"colord": "^2.7.0",
"date-fns": "^2.23.0",
"focus-visible": "^5.2.0",
"lodash-es": "^4.17.21"
},
"peerDependencies": {
"vue": "^3.1.4"
"vue": "^3.2.9"
},
"devDependencies": {
"@babel/core": "^7.14.6",
"@babel/core": "^7.15.5",
"@commitlint/cli": "^13.1.0",
"@commitlint/config-conventional": "^13.1.0",
"@qvant/prettier-config": "^0.0.1",
"@qvant/stylelint-config": "^0.0.1",
"@storybook/addon-actions": "^6.3.4",
"@storybook/addon-essentials": "^6.3.4",
"@storybook/addon-links": "^6.3.4",
"@storybook/addon-storysource": "^6.3.4",
"@storybook/builder-webpack5": "^6.3.4",
"@storybook/manager-webpack5": "^6.3.4",
"@storybook/addon-actions": "^6.3.8",
"@storybook/addon-essentials": "^6.3.8",
"@storybook/addon-links": "^6.3.8",
"@storybook/addon-storysource": "^6.3.8",
"@storybook/builder-webpack5": "^6.3.8",
"@storybook/manager-webpack5": "^6.3.8",
"@storybook/preset-scss": "^1.0.3",
"@storybook/storybook-deployer": "^2.8.10",
"@storybook/vue3": "^6.3.4",
"@storybook/vue3": "^6.3.8",
"@types/lodash-es": "^4.17.4",
"@types/node": "^16.3.1",
"@types/node": "^16.7.13",
"@types/sass": "^1.16.1",
"@typescript-eslint/eslint-plugin": "^4.28.2",
"@typescript-eslint/parser": "^4.28.2",
"@vitejs/plugin-vue": "^1.2.5",
"@vue/compiler-sfc": "^3.1.4",
"@typescript-eslint/eslint-plugin": "^4.29.3",
"@typescript-eslint/parser": "^4.31.0",
"@vitejs/plugin-vue": "^1.6.0",
"@vue/compiler-sfc": "^3.2.9",
"@vue/eslint-config-typescript": "^7.0.0",
"@vuedx/typescript-plugin-vue": "^0.7.4",
"babel-loader": "^8.2.2",
"css-loader": "^5.2.6",
"eslint": "^7.30.0",
"eslint-config-airbnb-typescript": "^12.3.1",
"css-loader": "^6.2.0",
"eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^14.0.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-vue": "^7.13.0",
"husky": "^7.0.1",
"lint-staged": "^11.0.0",
"eslint-plugin-import": "^2.24.2",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-vue": "^7.17.0",
"husky": "^7.0.2",
"lint-staged": "^11.1.2",
"prettier": "^2.3.2",
"rollup-plugin-copy": "^3.4.0",
"rollup-plugin-peer-deps-external": "^2.2.4",
"rollup-plugin-sass": "^1.2.2",
"rollup-plugin-sass": "^1.2.7",
"rollup-plugin-typescript2": "^0.30.0",
"rollup-plugin-vue": "^6.0.0",
"sass": "^1.35.2",
"sass": "^1.39.0",
"sass-loader": "^12.1.0",
"style-loader": "^3.0.0",
"style-loader": "^3.2.1",
"stylelint": "^13.13.1",
"typescript": "^4.3.5",
"vite": "^2.4.2",
"vite-plugin-dts": "^0.5.2",
"vue": "^3.1.4",
"vue-loader": "^16.3.0"
"typescript": "^4.4.2",
"vite": "^2.5.3",
"vite-plugin-dts": "^0.7.0",
"vue": "^3.2.9",
"vue-loader": "^15.9.8"
},
"files": ["dist"],
"main": "./dist/qui-max.umd.js",
Expand Down
4 changes: 2 additions & 2 deletions src/qComponents/QForm/src/QForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
watch,
toRef
} from 'vue';
import type { FieldErrorList } from 'async-validator';
import type { ValidateFieldsError } from 'async-validator';
import { concat } from 'lodash-es';
import type { QFormItemContext } from '@/qComponents/QFormItem';
Expand Down Expand Up @@ -143,7 +143,7 @@ export default defineComponent({
const filteredFields = filterFields(passedProps);
let isValid = true;
let invalidFields: FieldErrorList = {};
let invalidFields: ValidateFieldsError = {};
await Promise.all(
filteredFields.map(async field => {
Expand Down
4 changes: 2 additions & 2 deletions src/qComponents/QForm/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Ref } from 'vue';
import type { FieldErrorList } from 'async-validator';
import type { ValidateFieldsError } from 'async-validator';

import type {
QFormItemContext,
Expand All @@ -21,7 +21,7 @@ export interface QFormProps {

export interface ValidateFnResult {
isValid: boolean;
invalidFields: FieldErrorList;
invalidFields: ValidateFieldsError;
}

export interface QFormProvider {
Expand Down
9 changes: 6 additions & 3 deletions src/qComponents/QFormItem/src/QFormItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,10 @@ import {
watch,
PropType
} from 'vue';
import AsyncValidator, { ErrorList, FieldErrorList } from 'async-validator';
import AsyncValidator, {
ValidateError,
ValidateFieldsError
} from 'async-validator';
import { get, set } from 'lodash-es';
import type { QFormProvider } from '@/qComponents/QForm';
Expand Down Expand Up @@ -184,8 +187,8 @@ export default defineComponent({
trigger: Nullable<string> = null
): Nullable<
Promise<{
errors?: ErrorList;
fields?: FieldErrorList;
errors?: Nullable<ValidateError[]>;
fields?: ValidateFieldsError;
}>
> => {
const triggeredRules = getFilteredRules(trigger);
Expand Down
33 changes: 23 additions & 10 deletions src/qComponents/QFormItem/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { Ref, ComputedRef } from 'vue';
import type { RuleItem, ErrorList, FieldErrorList } from 'async-validator';
import type {
RuleItem,
ValidateError,
ValidateFieldsError
} from 'async-validator';

import type { Nullable } from '#/helpers';

Expand All @@ -22,9 +26,12 @@ export interface QFormItemProps {
}

export interface QFormItemContext {
validateField: (
trigger?: Nullable<string>
) => Nullable<Promise<{ errors?: ErrorList; fields?: FieldErrorList }>>;
validateField: (trigger?: Nullable<string>) => Nullable<
Promise<{
errors?: Nullable<ValidateError[]>;
fields?: ValidateFieldsError;
}>
>;
clearValidate: () => void;
errorMessage: Ref<Nullable<string>>;
getFilteredRules: (trigger: Nullable<string>) => Nullable<FilteredRuleItem[]>;
Expand All @@ -46,9 +53,12 @@ export interface QFormItemContext {
}

export interface QFormItemProvider {
validateField: (
trigger?: Nullable<string>
) => Nullable<Promise<{ errors?: ErrorList; fields?: FieldErrorList }>>;
validateField: (trigger?: Nullable<string>) => Nullable<
Promise<{
errors?: Nullable<ValidateError[]>;
fields?: ValidateFieldsError;
}>
>;
resetField: () => void;
}

Expand All @@ -60,8 +70,11 @@ export interface QFormItemInstance {
isHeaderShown: ComputedRef<boolean>;
rootClasses: ComputedRef<Record<string, boolean>>;
getFilteredRules: (trigger: Nullable<string>) => Nullable<FilteredRuleItem[]>;
validateField: (
trigger?: Nullable<string>
) => Nullable<Promise<{ errors?: ErrorList; fields?: FieldErrorList }>>;
validateField: (trigger?: Nullable<string>) => Nullable<
Promise<{
errors?: Nullable<ValidateError[]>;
fields?: ValidateFieldsError;
}>
>;
resetField: () => void;
}
2 changes: 2 additions & 0 deletions stories/components/QPopover.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ const QPopoverStory: Story<QPopoverProps> = args =>
components: { QPopover },
setup() {
const handleShow = (): void => {
// eslint-disable-next-line no-console
console.log('show');
};

const handleHide = (): void => {
// eslint-disable-next-line no-console
console.log('hide');
};

Expand Down
Loading

0 comments on commit 5175c7b

Please sign in to comment.