From 2025a13a3809458faf74e73158b1b469eccae40e Mon Sep 17 00:00:00 2001 From: Sukaato Date: Tue, 13 Aug 2024 23:14:17 +0200 Subject: [PATCH] chore(core): update dependencies --- biome.json | 9 ++++ package-lock.json | 30 ++++++------ packages/core/.prettierrc | 34 -------------- packages/core/package.json | 14 ++++-- packages/core/src/components-config.d.ts | 46 +++++++++---------- packages/core/src/config/components.config.ts | 31 ++++++------- packages/vue/src/proxies.ts | 2 +- 7 files changed, 73 insertions(+), 93 deletions(-) delete mode 100644 packages/core/.prettierrc mode change 100644 => 100755 packages/core/src/config/components.config.ts diff --git a/biome.json b/biome.json index 9c9101b..4721394 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,11 @@ { "$schema": "https://biomejs.dev/schemas/1.8.3/schema.json", + "vcs": { + "enabled": true, + "clientKind": "git", + "useIgnoreFile": true, + "defaultBranch": "main" + }, "formatter": { "enabled": true, "formatWithErrors": false, @@ -19,6 +25,9 @@ "recommended": true, "suspicious": { "noExplicitAny": "off" + }, + "complexity": { + "noForEach": "off" } } }, diff --git a/package-lock.json b/package-lock.json index a468433..7ba6400 100644 --- a/package-lock.json +++ b/package-lock.json @@ -305,9 +305,9 @@ } }, "node_modules/@cheese-grinder/stencil-component-config": { - "version": "0.2.3-beta.1", - "resolved": "https://registry.npmjs.org/@cheese-grinder/stencil-component-config/-/stencil-component-config-0.2.3-beta.1.tgz", - "integrity": "sha512-sq3NHHOiMeoXTbJ0mX3s8eHsLLcZNGVYPAwLwbKy1gui475cyzxVIl2iEXcPQ4Nv1gi5DNilzZaN2XaGfUp6oQ==", + "version": "0.3.0-beta.2", + "resolved": "https://registry.npmjs.org/@cheese-grinder/stencil-component-config/-/stencil-component-config-0.3.0-beta.2.tgz", + "integrity": "sha512-U871GOVgqxiSgEPdQcEejnqH8ArANSebqUKE5KWYbkpo2WsF2geENTtxll1rvYGACmjYVkzYTCR7WNYEj9PfLQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -6778,9 +6778,9 @@ "license": "BSD-3-Clause" }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "license": "MIT", "engines": { @@ -10009,9 +10009,9 @@ } }, "node_modules/postcss-selector-parser": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.1.tgz", - "integrity": "sha512-b4dlw/9V8A71rLIDsSwVmak9z2DuBUB7CA1/wSdelNEzqsjoSPeADTWNO09lpH49Diy3/JIZ2bSPB1dI3LJCHg==", + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.1.2.tgz", + "integrity": "sha512-Q8qQfPiZ+THO/3ZrOrO0cJJKfpYCagtMUkXbnEfmgUjwXg6z/WBeOyS9APBBPCTSiDV+s4SwQGu8yFsiMRIudg==", "dev": true, "license": "MIT", "dependencies": { @@ -12077,22 +12077,22 @@ }, "devDependencies": { "@biomejs/biome": "^1.8.3", - "@cheese-grinder/stencil-component-config": "^0.2.3-beta.1", + "@cheese-grinder/stencil-component-config": "^0.3.0-beta.2", "@cheese-grinder/stencil-custom-readme": "^0.1.5", "@cheese-grinder/stencil-sass-alias": "~0.2.4", "@stencil/sass": "^3.0.12", "@stencil/vue-output-target": "^0.8.9", - "@types/node": "~22.1.0", + "@types/node": "~22.2.0", "clean-css-cli": "^5.6.3", "rimraf": "^6.0.1", "sass": "^1.77.8", - "typescript": "^5.4.5" + "typescript": "^5.5.4" } }, "packages/core/node_modules/@types/node": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.1.0.tgz", - "integrity": "sha512-AOmuRF0R2/5j1knA3c6G3HOk523Ga+l+ZXltX8SF1+5oqcXijjfTd8fY3XRZqSihEu9XhtQnKYLmkFaoxgsJHw==", + "version": "22.2.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.2.0.tgz", + "integrity": "sha512-bm6EG6/pCpkxDf/0gDNDdtDILMOHgaQBVOJGdwsqClnxA3xL6jtMv76rLBc006RVMWbmaf0xbmom4Z/5o2nRkQ==", "dev": true, "license": "MIT", "dependencies": { diff --git a/packages/core/.prettierrc b/packages/core/.prettierrc deleted file mode 100644 index c750ded..0000000 --- a/packages/core/.prettierrc +++ /dev/null @@ -1,34 +0,0 @@ -{ - "arrowParens": "avoid", - "bracketSameLine": false, - "bracketSpacing": true, - "endOfLine": "lf", - "semi": true, - "trailingComma": "all", - "printWidth": 120, - "tabWidth": 2, - "useTabs": false, - "singleAttributePerLine": false, - "singleQuote": true, - "jsxSingleQuote": false, - "quoteProps": "as-needed", - - "overrides": [ - { - "files": "*.{ts,tsx}", - "excludeFiles": "*.d.ts", - "options": { - "plugins": ["prettier-plugin-organize-imports"] - } - }, - { - "files": "*.scss", - "options": { - "plugins": ["prettier-plugin-css-order"], - "singleQuote": false, - "quoteProps": "as-needed", - "cssDeclarationSorterOrder": "smacss" - } - } - ] -} \ No newline at end of file diff --git a/packages/core/package.json b/packages/core/package.json index 16fa684..84b1d2a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -32,7 +32,13 @@ "collection:main": "dist/collection/index.js", "collection": "dist/collection/collection-manifest.json", "types": "dist/types/index.d.ts", - "files": ["components/", "css", "dist/", "hydrate/", "loader/"], + "files": [ + "components/", + "css", + "dist/", + "hydrate/", + "loader/" + ], "publishConfig": { "access": "public" }, @@ -60,15 +66,15 @@ }, "devDependencies": { "@biomejs/biome": "^1.8.3", - "@cheese-grinder/stencil-component-config": "^0.2.3-beta.1", + "@cheese-grinder/stencil-component-config": "^0.3.0-beta.2", "@cheese-grinder/stencil-custom-readme": "^0.1.5", "@cheese-grinder/stencil-sass-alias": "~0.2.4", "@stencil/sass": "^3.0.12", "@stencil/vue-output-target": "^0.8.9", - "@types/node": "~22.1.0", + "@types/node": "~22.2.0", "clean-css-cli": "^5.6.3", "rimraf": "^6.0.1", "sass": "^1.77.8", - "typescript": "^5.4.5" + "typescript": "^5.5.4" } } diff --git a/packages/core/src/components-config.d.ts b/packages/core/src/components-config.d.ts index 956e321..c008c8a 100644 --- a/packages/core/src/components-config.d.ts +++ b/packages/core/src/components-config.d.ts @@ -4,28 +4,28 @@ * This is an autogenerated file created by the Cheese-grinder stencil Plugin. * It contains typing information for all configurable components that exist in this project. */ -import type { BadgeAs, BadgeColor } from './components/badge/badge.type'; -import type { AutoCapitalize, Color, EnterKeyHint, Size } from './interface.d'; -import type { ButtonColor, ButtonExpand, ButtonShape } from './components/button/button.type'; -import type { CheckboxPlacement } from './components/checkbox/checkbox.type'; -import type { DividerColor, DividerOrientation, DividerPlacement } from './components/divider/divider.type'; -import type { TriggerAction } from './utils/trigger'; -import type { DrawerSide } from './components/drawer/drawer.type'; -import type { DropdownAlign, DropdownSide } from './components/dropdown/dropdown.type'; -import type { IndicatorPosition, IndicatorSide } from './components/indicator/indicator.type'; -import type { InputColor } from './components/input/input.type'; -import type { InputFileColor } from './components/input-file/input-file.type'; -import type { JoinOrientation } from './components/join/join.type'; -import type { ListOrientation } from './components/list/list.type'; -import type { LoadingType } from './components/loading/loading.type'; -import type { MaskType } from './components/mask/mask.type'; -import type { RadioGroupCompareFn } from './components/radio-group/radio-group.type'; -import type { RangeColor } from './components/range/range.type'; -import type { SelectColor, SelectCompareFn } from './components/select/select.type'; -import type { SwapType } from './components/swap/swap.type'; -import type { TextareaColor, Wrap } from './components/textarea/textarea.type'; -import type { ToggleColor } from './components/toggle/toggle.type'; -import type { TooltipPosition } from './components/tooltip/tooltip.type'; +import type { BadgeAs, BadgeColor } from "./components/badge/badge.type"; +import type { AutoCapitalize, Color, EnterKeyHint, Size } from "./interface.d"; +import type { ButtonColor, ButtonExpand, ButtonShape } from "./components/button/button.type"; +import type { CheckboxPlacement } from "./components/checkbox/checkbox.type"; +import type { DividerColor, DividerOrientation, DividerPlacement } from "./components/divider/divider.type"; +import type { TriggerAction } from "./utils/trigger"; +import type { DrawerSide } from "./components/drawer/drawer.type"; +import type { DropdownAlign, DropdownSide } from "./components/dropdown/dropdown.type"; +import type { IndicatorPosition, IndicatorSide } from "./components/indicator/indicator.type"; +import type { InputColor } from "./components/input/input.type"; +import type { InputFileColor } from "./components/input-file/input-file.type"; +import type { JoinOrientation } from "./components/join/join.type"; +import type { ListOrientation } from "./components/list/list.type"; +import type { LoadingType } from "./components/loading/loading.type"; +import type { MaskType } from "./components/mask/mask.type"; +import type { RadioGroupCompareFn } from "./components/radio-group/radio-group.type"; +import type { RangeColor } from "./components/range/range.type"; +import type { SelectColor, SelectCompareFn } from "./components/select/select.type"; +import type { SwapType } from "./components/swap/swap.type"; +import type { TextareaColor, Wrap } from "./components/textarea/textarea.type"; +import type { ToggleColor } from "./components/toggle/toggle.type"; +import type { TooltipPosition } from "./components/tooltip/tooltip.type"; export namespace Configuration { interface ComponentsConfig { @@ -756,4 +756,4 @@ export namespace Configuration { open?: boolean; }; } -} +} \ No newline at end of file diff --git a/packages/core/src/config/components.config.ts b/packages/core/src/config/components.config.ts old mode 100644 new mode 100755 index b0e9a36..b8f0bd8 --- a/packages/core/src/config/components.config.ts +++ b/packages/core/src/config/components.config.ts @@ -1,34 +1,33 @@ -import type { Configuration } from 'src/components-config'; +import { Configuration } from 'src/components-config'; -type Config = Configuration.ComponentsConfig; +type Options = Configuration.ComponentsConfig; export class ComponentConfig { - private config = new Map(); + private config = new Map(); - reset(Components: Config): void { + reset(Components: Options): void { this.config = new Map(Object.entries(Components) as any); } - set(component: Tag, config: Config[Tag]): void { + set(component: Tag, config: Options[Tag]): void { this.config.set(component, config); } - get(component: Tag, fallback: Config[Tag] = {} as Config[Tag]): Config[Tag] { + get(component: Tag, fallback: Options[Tag] = {} as Options[Tag]): Options[Tag] { return this.config.get(component) ?? fallback; } - apply(ref: any, tag: string, defaultValue: Record): void; - apply(ref: any, tag: Tag, defaultValue: Config[Tag] & Record): void { + apply(ref: any, tag: Tag, defaultValue: Options[Tag] & Record): void { const component = this.get(tag); - const uniqueKeys = new Set([...Object.keys(component), ...Object.keys(defaultValue)]); + const uniqueKeys = new Set([...Object.keys(component!), ...Object.keys(defaultValue)]); - [...uniqueKeys].forEach(key => (ref[key] ??= component[key] ?? defaultValue[key])); + [...uniqueKeys].forEach(key => (ref[key] ??= component![key] ?? defaultValue[key])); } - setProp( + setProp( component: Tag, prop: Prop, - value: Config[Tag][Prop], + value: Options[Tag][Prop], ): void { const config = this.get(component); this.config.set(component, { @@ -37,13 +36,13 @@ export class ComponentConfig { }); } - getProp( + getProp( component: Tag, prop: Prop, - fallback?: Config[Tag][Prop], - ): Config[Tag][Prop] { + fallback?: Options[Tag][Prop], + ): Options[Tag][Prop] { const config = this.get(component); - return config[prop] ?? (fallback as Config[Tag][Prop]); + return config![prop] ?? (fallback as Options[Tag][Prop]); } } diff --git a/packages/vue/src/proxies.ts b/packages/vue/src/proxies.ts index 79064a9..c66813d 100644 --- a/packages/vue/src/proxies.ts +++ b/packages/vue/src/proxies.ts @@ -1,4 +1,4 @@ - +/* eslint-disable */ /* tslint:disable */ /* auto-generated vue proxies */ import { defineContainer } from './vue-component-lib/utils';