From b734723444e54367ebbfc19778904cb91c29aef8 Mon Sep 17 00:00:00 2001 From: Nikola Hristov Date: Tue, 25 Jun 2024 20:55:16 +0300 Subject: [PATCH] Format/v0.0.6 --- CHANGELOG.md | 4 ++++ Source/Function/Integration.ts | 2 +- Source/Function/Merge.ts | 7 +++++++ Source/Variable/Option.ts | 2 +- Target/Function/Configuration.d.ts | 1 - Target/Function/Integration.d.ts | 12 +----------- Target/Function/Integration.js | 2 +- Target/Function/Merge.d.ts | 6 ++++++ Target/Function/Merge.js | 1 + Target/Variable/Option.js | 2 +- package.json | 2 +- 11 files changed, 24 insertions(+), 17 deletions(-) create mode 100644 Source/Function/Merge.ts create mode 100644 Target/Function/Merge.d.ts create mode 100644 Target/Function/Merge.js diff --git a/CHANGELOG.md b/CHANGELOG.md index e5f5824..bc491c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.0.6 + +- Cleanup + ## 0.0.5 - Cleanup diff --git a/Source/Function/Integration.ts b/Source/Function/Integration.ts index 20aa16f..35cffdd 100644 --- a/Source/Function/Integration.ts +++ b/Source/Function/Integration.ts @@ -88,5 +88,5 @@ import type Path from "@playform/pipe/Target/Type/Path.js"; export const { default: Default } = await import("@Variable/Option.js"); export const { default: Merge } = await import( - "@playform/build/Target/Function/Merge.js" + "@Function/Merge.js" ); diff --git a/Source/Function/Merge.ts b/Source/Function/Merge.ts new file mode 100644 index 0000000..adc696d --- /dev/null +++ b/Source/Function/Merge.ts @@ -0,0 +1,7 @@ +/** + * @module Merge + * + */ +export default (await import("deepmerge-ts")).deepmergeCustom({ + mergeArrays: false, +}); diff --git a/Source/Variable/Option.ts b/Source/Variable/Option.ts index 4eca2f0..ebaca75 100644 --- a/Source/Variable/Option.ts +++ b/Source/Variable/Option.ts @@ -3,7 +3,7 @@ * */ export default ( - await import("@playform/build/Target/Function/Merge.js") + await import("@Function/Merge.js") ).default((await import("@playform/pipe/Target/Variable/Option.js")).default, { Biome: (await import("@Variable/Biome.js")).default, Action: { diff --git a/Target/Function/Configuration.d.ts b/Target/Function/Configuration.d.ts index 10fe9cf..ec8c4ea 100644 --- a/Target/Function/Configuration.d.ts +++ b/Target/Function/Configuration.d.ts @@ -1,4 +1,3 @@ -/// /** * @module Configuration * diff --git a/Target/Function/Integration.d.ts b/Target/Function/Integration.d.ts index 4187b18..bd7df46 100644 --- a/Target/Function/Integration.d.ts +++ b/Target/Function/Integration.d.ts @@ -25,14 +25,4 @@ export declare const Default: { Exclude: false; Biome: unknown; }; -export declare const Merge: (...objects: Ts) => import("deepmerge-ts").DeepMergeHKT, Readonly<{ - key: PropertyKey; - parents: readonly Readonly>[]; -}>>; +export declare const Merge: (...objects: Ts) => import("deepmerge-ts").DeepMergeHKT, import("deepmerge-ts").DeepMergeBuiltInMetaData>; diff --git a/Target/Function/Integration.js b/Target/Function/Integration.js index ef596db..385e6bd 100644 --- a/Target/Function/Integration.js +++ b/Target/Function/Integration.js @@ -1 +1 @@ -var l=(...[a={}])=>{Object.entries(a).forEach(([t,i])=>Object.defineProperty(a,t,{value:i===!0?f[t]:a[t]}));const{Path:r,Cache:s,Logger:c,Exclude:p,Action:m,Biome:y}=n(f,a),o=new Set;return typeof r<"u"&&(Array.isArray(r)||r instanceof Set)&&r.forEach(t=>o.add(t)),{name:"@playform/format",hooks:{"astro:build:done":async({dir:t})=>{o.size===0&&o.add(t);const i=await(await import("@biomejs/js-api")).Biome.create({distribution:(await import("@biomejs/js-api")).Distribution.NODE}),u=n(m,{Wrote:async e=>{try{return i.formatContent(e.Buffer.toString(),{filePath:(await import("path")).resolve(e.Input)}).content}catch{return e.Buffer}}});for(const e of o)await(await(await(await new(await import("@playform/pipe")).default(s,c).In(e)).By("**/*.{js,mjs,cjs,ts,json}")).Not(p)).Pipe(u)}}}};const{default:f}=await import("../Variable/Option.js"),{default:n}=await import("@playform/build/Target/Function/Merge.js");export{f as Default,n as Merge,l as default}; +var l=(...[a={}])=>{Object.entries(a).forEach(([t,i])=>Object.defineProperty(a,t,{value:i===!0?f[t]:a[t]}));const{Path:r,Cache:s,Logger:c,Exclude:p,Action:m,Biome:y}=n(f,a),o=new Set;return typeof r<"u"&&(Array.isArray(r)||r instanceof Set)&&r.forEach(t=>o.add(t)),{name:"@playform/format",hooks:{"astro:build:done":async({dir:t})=>{o.size===0&&o.add(t);const i=await(await import("@biomejs/js-api")).Biome.create({distribution:(await import("@biomejs/js-api")).Distribution.NODE}),u=n(m,{Wrote:async e=>{try{return i.formatContent(e.Buffer.toString(),{filePath:(await import("path")).resolve(e.Input)}).content}catch{return e.Buffer}}});for(const e of o)await(await(await(await new(await import("@playform/pipe")).default(s,c).In(e)).By("**/*.{js,mjs,cjs,ts,json}")).Not(p)).Pipe(u)}}}};const{default:f}=await import("../Variable/Option.js"),{default:n}=await import("./Merge.js");export{f as Default,n as Merge,l as default}; diff --git a/Target/Function/Merge.d.ts b/Target/Function/Merge.d.ts new file mode 100644 index 0000000..082044c --- /dev/null +++ b/Target/Function/Merge.d.ts @@ -0,0 +1,6 @@ +/** + * @module Merge + * + */ +declare const _default: (...objects: Ts) => import("deepmerge-ts").DeepMergeHKT, import("deepmerge-ts").DeepMergeBuiltInMetaData>; +export default _default; diff --git a/Target/Function/Merge.js b/Target/Function/Merge.js new file mode 100644 index 0000000..e898449 --- /dev/null +++ b/Target/Function/Merge.js @@ -0,0 +1 @@ +var e=(await import("deepmerge-ts")).deepmergeCustom({mergeArrays:!1});export{e as default}; diff --git a/Target/Variable/Option.js b/Target/Variable/Option.js index 5526529..3dea5a2 100644 --- a/Target/Variable/Option.js +++ b/Target/Variable/Option.js @@ -1 +1 @@ -var a=(await import("@playform/build/Target/Function/Merge.js")).default((await import("@playform/pipe/Target/Variable/Option.js")).default,{Biome:(await import("./Biome.js")).default,Action:{Failed:async t=>`Error: Cannot format file ${t.Input}!`,Accomplished:async t=>`Formatted ${t.Input} in ${t.Output}.`,Fulfilled:async({File:t})=>t>0?`Successfully formatted a total of ${t} JavaScript and TypeScript ${t===1?"file":"files"}.`:!1}});export{a as default}; +var a=(await import("../Function/Merge.js")).default((await import("@playform/pipe/Target/Variable/Option.js")).default,{Biome:(await import("./Biome.js")).default,Action:{Failed:async t=>`Error: Cannot format file ${t.Input}!`,Accomplished:async t=>`Formatted ${t.Input} in ${t.Output}.`,Fulfilled:async({File:t})=>t>0?`Successfully formatted a total of ${t} JavaScript and TypeScript ${t===1?"file":"files"}.`:!1}});export{a as default}; diff --git a/package.json b/package.json index 3f403de..5619246 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@playform/format", - "version": "0.0.5", + "version": "0.0.6", "private": false, "description": "🗻 Format —", "keywords": [