@adamhl8/configs 0.14.4 → 0.14.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  //#region src/knip.d.ts
2
2
  declare const knipConfig: {
3
3
  (): {
4
- readonly entry: ["./src/index.ts", "**/*.test.ts"];
4
+ readonly entry: ["./src/index.ts", "**/*.test.ts", "./tsdown.config.ts"];
5
5
  readonly project: ["**"];
6
6
  readonly tsdown: false;
7
7
  };
@@ -10,7 +10,7 @@ declare const knipConfig: {
10
10
  [x: number]: unknown;
11
11
  [x: symbol]: unknown;
12
12
  }>(userConfig: S): {
13
- readonly entry: ["./src/index.ts", "**/*.test.ts"];
13
+ readonly entry: ["./src/index.ts", "**/*.test.ts", "./tsdown.config.ts"];
14
14
  readonly project: ["**"];
15
15
  readonly tsdown: false;
16
16
  } & S;
@@ -76,7 +76,6 @@ declare const tsdownConfig: {
76
76
  readonly profile: "esmOnly";
77
77
  };
78
78
  readonly publint: true;
79
- readonly logLevel: "warn";
80
79
  readonly failOnWarn: true;
81
80
  };
82
81
  <S extends {
@@ -99,7 +98,6 @@ declare const tsdownConfig: {
99
98
  readonly profile: "esmOnly";
100
99
  };
101
100
  readonly publint: true;
102
- readonly logLevel: "warn";
103
101
  readonly failOnWarn: true;
104
102
  } & S;
105
103
  };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":[],"mappings":";cAea;EAAA,EAAA,EAAA;IAA4C,SAAA,KAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,CAAA;;;;;;;ICkB5C,CAAA,CAAA,EAAA,MAAA,CAAA,EAAgD,OAAA;EAAA,CAAA,CAAA,CAAA,UAAA,GAAA,CAAA,EAAA;;;;;;;;cAAhD;EDlBA,EAAA,EAAA;IAA4C,SAAA,UAAA,EAAA,GAAA;;;;;;;QCkB5C,SAAgD,aAAA,EAAA,MAAA;MAAA,CAAA;;;;;;;ECRhD,CAAA;EAA8C,CAAA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;cAA9C;EFVA,EAAA,EAAA;IAA4C,SAAA,KAAA,EAAA,CAAA,gBAAA,CAAA;;;;;;;MCkB5C,SAAgD,UAAA,EAAA,IAAA;MAAA,SAAA,SAAA,EAAA,IAAA;;;;;;;ICRhD,SAAA,QAA8C,EAAA,MAAA;IAAA,SAAA,UAAA,EAAA,IAAA"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":[],"mappings":";cAea;EAAA,EAAA,EAAA;IAA4C,SAAA,KAAA,EAAA,CAAA,gBAAA,EAAA,cAAA,EAAA,oBAAA,CAAA;;;;;;;ICkB5C,CAAA,CAAA,EAAA,MAAA,CAAA,EAAgD,OAAA;EAAA,CAAA,CAAA,CAAA,UAAA,GAAA,CAAA,EAAA;;;;;;;;cAAhD;EDlBA,EAAA,EAAA;IAA4C,SAAA,UAAA,EAAA,GAAA;;;;;;;QCkB5C,SAAgD,aAAA,EAAA,MAAA;MAAA,CAAA;;;;;;;ECThD,CAAA;EAA8C,CAAA,UAAA;;;;;;;;;;;;;;;;;;;;;;;;cAA9C;EFTA,EAAA,EAAA;IAA4C,SAAA,KAAA,EAAA,CAAA,gBAAA,CAAA;;;;;;;MCkB5C,SAAgD,UAAA,EAAA,IAAA;MAAA,SAAA,SAAA,EAAA,IAAA;;;;;;;ICThD,SAAA,UAA8C,EAAA,IAAA;EAAA,CAAA"}
package/dist/index.js CHANGED
@@ -29,7 +29,11 @@ function createMergeConfigFn(baseConfig$3) {
29
29
  return mergeConfig;
30
30
  }
31
31
  const knipConfig = createMergeConfigFn({
32
- entry: ["./src/index.ts", "**/*.test.ts"],
32
+ entry: [
33
+ "./src/index.ts",
34
+ "**/*.test.ts",
35
+ "./tsdown.config.ts"
36
+ ],
33
37
  project: ["**"],
34
38
  tsdown: false
35
39
  });
@@ -68,7 +72,6 @@ const tsdownConfig = createMergeConfigFn({
68
72
  profile: "esmOnly"
69
73
  },
70
74
  publint: true,
71
- logLevel: "warn",
72
75
  failOnWarn: true
73
76
  });
74
77
  export { knipConfig, prettierConfig, tsdownConfig };
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["merge","baseConfig","baseConfig","baseConfig"],"sources":["../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/es-toolkit/dist/object/mergeWith.mjs","../src/utils.ts","../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":["function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isObjectLike } from '../compat/predicate/isObjectLike.mjs';\n\nfunction mergeWith(target, source, merge) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n const merged = merge(targetValue, sourceValue, key, target, source);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWith(targetValue ?? [], sourceValue, merge);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from \"es-toolkit\"\n\ntype AnyObj = Record<PropertyKey, unknown>\n\n/**\n * A wrapper around es-toolkit's `mergeWith` with a custom merge function that concatenates arrays.\n */\nexport function merge<T extends AnyObj, S extends AnyObj>(target: T, source: S) {\n return mergeWith(target, source, (objValue: unknown, srcValue: unknown) =>\n Array.isArray(objValue) ? objValue.concat(srcValue) : undefined,\n )\n}\n\n/**\n * Creates a config merge function with proper type overloads for merging with a base config.\n */\nexport function createMergeConfigFn<T extends AnyObj>(baseConfig: T) {\n function mergeConfig(): T\n function mergeConfig<S extends AnyObj>(userConfig: S): T & S\n function mergeConfig<S extends AnyObj>(userConfig?: S) {\n return userConfig ? merge(baseConfig, userConfig) : baseConfig\n }\n return mergeConfig\n}\n","import type { KnipConfig } from \"knip\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\n// Normally, specifying the `./src/index.ts` entry would cause knip to complain about a redundant entry because it gets automatically included via the tsdown plugin.\n// However, in projects that _don't_ use tsdown, the `./src/index.ts` entry would be missing entirely.\n// To handle this, we specify it and disable the tsdown plugin. This makes knip work in both cases.\n\nconst baseConfig = {\n entry: [\"./src/index.ts\", \"**/*.test.ts\"],\n project: [\"**\"],\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn(baseConfig)\n","import type { Config } from \"prettier\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\nconst baseConfig = {\n printWidth: 120,\n semi: false,\n plugins: [\n \"@prettier/plugin-xml\",\n \"prettier-plugin-sh\",\n \"prettier-plugin-toml\",\n \"prettier-plugin-astro\",\n \"prettier-plugin-tailwindcss\",\n ],\n tailwindStylesheet: \"./src/global.css\",\n overrides: [\n {\n // https://github.com/prettier/prettier/issues/15956\n files: \"*.jsonc\",\n options: {\n trailingComma: \"none\",\n },\n },\n {\n files: \"*.astro\",\n options: {\n parser: \"astro\",\n },\n },\n ],\n} as const satisfies Config\n\nexport const prettierConfig = createMergeConfigFn(baseConfig)\n","import type { UserConfig } from \"tsdown\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n unbundle: true,\n target: false,\n platform: \"neutral\",\n minify: \"dce-only\",\n sourcemap: true,\n dts: {\n newContext: true,\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esmOnly\",\n },\n publint: true,\n logLevel: \"warn\",\n failOnWarn: true,\n} as const satisfies UserConfig\n\nexport const tsdownConfig = createMergeConfigFn(baseConfig)\n"],"x_google_ignoreList":[0,1,2],"mappings":"AAAA,SAAS,iBAAiB,KAAK;AAC3B,QAAO,QAAQ;;ACDnB,SAAS,aAAa,OAAO;AACzB,QAAO,OAAO,UAAU,YAAY,UAAU;;ACElD,SAAS,UAAU,QAAQ,QAAQ,SAAO;CACtC,MAAM,aAAa,OAAO,KAAK,OAAO;AACtC,MAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;EACxC,MAAM,MAAM,WAAW;AACvB,MAAI,iBAAiB,IAAI,CACrB;EAEJ,MAAM,cAAc,OAAO;EAC3B,MAAM,cAAc,OAAO;EAC3B,MAAM,SAASA,QAAM,aAAa,aAAa,KAAK,QAAQ,OAAO;AACnE,MAAI,WAAW,KAAA,EACX,QAAO,OAAO;WAET,MAAM,QAAQ,YAAY,CAC/B,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAaA,QAAM;WAEzD,aAAa,YAAY,IAAI,aAAa,YAAY,CAC3D,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAaA,QAAM;WAEzD,gBAAgB,KAAA,KAAa,gBAAgB,KAAA,EAClD,QAAO,OAAO;;AAGtB,QAAO;;ACnBX,SAAgB,MAA0C,QAAW,QAAW;AAC9E,QAAO,UAAU,QAAQ,SAAS,UAAmB,aACnD,MAAM,QAAQ,SAAS,GAAG,SAAS,OAAO,SAAS,GAAG,KAAA,EACvD;;AAMH,SAAgB,oBAAsC,cAAe;CAGnE,SAAS,YAA8B,YAAgB;AACrD,SAAO,aAAa,MAAMG,cAAY,WAAW,GAAGA;;AAEtD,QAAO;;ACPT,MAAa,aAAa,oBANP;CACjB,OAAO,CAAC,kBAAkB,eAAe;CACzC,SAAS,CAAC,KAAK;CACf,QAAQ;CACT,CAEwD;ACkBzD,MAAa,iBAAiB,oBA5BX;CACjB,YAAY;CACZ,MAAM;CACN,SAAS;EACP;EACA;EACA;EACA;EACA;EACD;CACD,oBAAoB;CACpB,WAAW,CACT;EAEE,OAAO;EACP,SAAS,EACP,eAAe,QAChB;EACF,EACD;EACE,OAAO;EACP,SAAS,EACP,QAAQ,SACT;EACF,CACF;CACF,CAE4D;ACR7D,MAAa,eAAe,oBApBT;CACjB,OAAO,CAAC,iBAAiB;CACzB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,KAAK;EACH,YAAY;EACZ,WAAW;EACZ;CACD,MAAM;EACJ,OAAO;EACP,SAAS;EACV;CACD,SAAS;CACT,UAAU;CACV,YAAY;CACb,CAE0D"}
1
+ {"version":3,"file":"index.js","names":["merge","baseConfig","baseConfig","baseConfig"],"sources":["../node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs","../node_modules/es-toolkit/dist/compat/predicate/isObjectLike.mjs","../node_modules/es-toolkit/dist/object/mergeWith.mjs","../src/utils.ts","../src/knip.ts","../src/prettier.ts","../src/tsdown.ts"],"sourcesContent":["function isUnsafeProperty(key) {\n return key === '__proto__';\n}\n\nexport { isUnsafeProperty };\n","function isObjectLike(value) {\n return typeof value === 'object' && value !== null;\n}\n\nexport { isObjectLike };\n","import { isUnsafeProperty } from '../_internal/isUnsafeProperty.mjs';\nimport { isObjectLike } from '../compat/predicate/isObjectLike.mjs';\n\nfunction mergeWith(target, source, merge) {\n const sourceKeys = Object.keys(source);\n for (let i = 0; i < sourceKeys.length; i++) {\n const key = sourceKeys[i];\n if (isUnsafeProperty(key)) {\n continue;\n }\n const sourceValue = source[key];\n const targetValue = target[key];\n const merged = merge(targetValue, sourceValue, key, target, source);\n if (merged !== undefined) {\n target[key] = merged;\n }\n else if (Array.isArray(sourceValue)) {\n target[key] = mergeWith(targetValue ?? [], sourceValue, merge);\n }\n else if (isObjectLike(targetValue) && isObjectLike(sourceValue)) {\n target[key] = mergeWith(targetValue ?? {}, sourceValue, merge);\n }\n else if (targetValue === undefined || sourceValue !== undefined) {\n target[key] = sourceValue;\n }\n }\n return target;\n}\n\nexport { mergeWith };\n","import { mergeWith } from \"es-toolkit\"\n\ntype AnyObj = Record<PropertyKey, unknown>\n\n/**\n * A wrapper around es-toolkit's `mergeWith` with a custom merge function that concatenates arrays.\n */\nexport function merge<T extends AnyObj, S extends AnyObj>(target: T, source: S) {\n return mergeWith(target, source, (objValue: unknown, srcValue: unknown) =>\n Array.isArray(objValue) ? objValue.concat(srcValue) : undefined,\n )\n}\n\n/**\n * Creates a config merge function with proper type overloads for merging with a base config.\n */\nexport function createMergeConfigFn<T extends AnyObj>(baseConfig: T) {\n function mergeConfig(): T\n function mergeConfig<S extends AnyObj>(userConfig: S): T & S\n function mergeConfig<S extends AnyObj>(userConfig?: S) {\n return userConfig ? merge(baseConfig, userConfig) : baseConfig\n }\n return mergeConfig\n}\n","import type { KnipConfig } from \"knip\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\n// Normally, specifying the `./src/index.ts` entry would cause knip to complain about a redundant entry because it gets automatically included via the tsdown plugin.\n// However, in projects that _don't_ use tsdown, the `./src/index.ts` entry would be missing entirely.\n// To handle this, we specify it and disable the tsdown plugin. This makes knip work in both cases.\n\nconst baseConfig = {\n entry: [\"./src/index.ts\", \"**/*.test.ts\", \"./tsdown.config.ts\"],\n project: [\"**\"],\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn(baseConfig)\n","import type { Config } from \"prettier\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\nconst baseConfig = {\n printWidth: 120,\n semi: false,\n plugins: [\n \"@prettier/plugin-xml\",\n \"prettier-plugin-sh\",\n \"prettier-plugin-toml\",\n \"prettier-plugin-astro\",\n \"prettier-plugin-tailwindcss\",\n ],\n tailwindStylesheet: \"./src/global.css\",\n overrides: [\n {\n // https://github.com/prettier/prettier/issues/15956\n files: \"*.jsonc\",\n options: {\n trailingComma: \"none\",\n },\n },\n {\n files: \"*.astro\",\n options: {\n parser: \"astro\",\n },\n },\n ],\n} as const satisfies Config\n\nexport const prettierConfig = createMergeConfigFn(baseConfig)\n","import type { UserConfig } from \"tsdown\"\n\n// biome-ignore lint/plugin: ignore\nimport { createMergeConfigFn } from \"./utils.ts\"\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n unbundle: true,\n target: false,\n platform: \"neutral\",\n minify: \"dce-only\",\n sourcemap: true,\n dts: {\n newContext: true,\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esmOnly\",\n },\n publint: true,\n failOnWarn: true,\n} as const satisfies UserConfig\n\nexport const tsdownConfig = createMergeConfigFn(baseConfig)\n"],"x_google_ignoreList":[0,1,2],"mappings":"AAAA,SAAS,iBAAiB,KAAK;AAC3B,QAAO,QAAQ;;ACDnB,SAAS,aAAa,OAAO;AACzB,QAAO,OAAO,UAAU,YAAY,UAAU;;ACElD,SAAS,UAAU,QAAQ,QAAQ,SAAO;CACtC,MAAM,aAAa,OAAO,KAAK,OAAO;AACtC,MAAK,IAAI,IAAI,GAAG,IAAI,WAAW,QAAQ,KAAK;EACxC,MAAM,MAAM,WAAW;AACvB,MAAI,iBAAiB,IAAI,CACrB;EAEJ,MAAM,cAAc,OAAO;EAC3B,MAAM,cAAc,OAAO;EAC3B,MAAM,SAASA,QAAM,aAAa,aAAa,KAAK,QAAQ,OAAO;AACnE,MAAI,WAAW,KAAA,EACX,QAAO,OAAO;WAET,MAAM,QAAQ,YAAY,CAC/B,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAaA,QAAM;WAEzD,aAAa,YAAY,IAAI,aAAa,YAAY,CAC3D,QAAO,OAAO,UAAU,eAAe,EAAE,EAAE,aAAaA,QAAM;WAEzD,gBAAgB,KAAA,KAAa,gBAAgB,KAAA,EAClD,QAAO,OAAO;;AAGtB,QAAO;;ACnBX,SAAgB,MAA0C,QAAW,QAAW;AAC9E,QAAO,UAAU,QAAQ,SAAS,UAAmB,aACnD,MAAM,QAAQ,SAAS,GAAG,SAAS,OAAO,SAAS,GAAG,KAAA,EACvD;;AAMH,SAAgB,oBAAsC,cAAe;CAGnE,SAAS,YAA8B,YAAgB;AACrD,SAAO,aAAa,MAAMG,cAAY,WAAW,GAAGA;;AAEtD,QAAO;;ACPT,MAAa,aAAa,oBANP;CACjB,OAAO;EAAC;EAAkB;EAAgB;EAAqB;CAC/D,SAAS,CAAC,KAAK;CACf,QAAQ;CACT,CAEwD;ACkBzD,MAAa,iBAAiB,oBA5BX;CACjB,YAAY;CACZ,MAAM;CACN,SAAS;EACP;EACA;EACA;EACA;EACA;EACD;CACD,oBAAoB;CACpB,WAAW,CACT;EAEE,OAAO;EACP,SAAS,EACP,eAAe,QAChB;EACF,EACD;EACE,OAAO;EACP,SAAS,EACP,QAAQ,SACT;EACF,CACF;CACF,CAE4D;ACT7D,MAAa,eAAe,oBAnBT;CACjB,OAAO,CAAC,iBAAiB;CACzB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,QAAQ;CACR,WAAW;CACX,KAAK;EACH,YAAY;EACZ,WAAW;EACZ;CACD,MAAM;EACJ,OAAO;EACP,SAAS;EACV;CACD,SAAS;CACT,YAAY;CACb,CAE0D"}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.14.4",
3
+ "version": "0.14.6",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
7
- "url": "https://github.com/adamhl8/configs"
7
+ "url": "git+https://github.com/adamhl8/configs.git"
8
8
  },
9
9
  "homepage": "https://github.com/adamhl8/configs",
10
10
  "bugs": {