@adamhl8/configs 0.13.1 → 0.14.0

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/knip.d.ts CHANGED
@@ -1,9 +1,12 @@
1
+ import { KnipConfig } from "knip";
2
+
1
3
  //#region src/knip.d.ts
2
- declare const knipConfig: {
4
+ declare const knipConfig: <T extends KnipConfig>(config: T) => {
3
5
  readonly entry: ["./src/index.ts", "**/*.test.ts"];
4
6
  readonly project: ["**"];
5
7
  readonly tsdown: false;
6
- };
8
+ readonly treatConfigHintsAsErrors: true;
9
+ } & T;
7
10
  //#endregion
8
11
  export { knipConfig };
9
12
  //# sourceMappingURL=knip.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"knip.d.ts","names":[],"sources":["../src/knip.ts"],"sourcesContent":[],"mappings":";cAMa;EAAA,SAAA,KAIkB,EAAA,CAAA,gBAAA,EAAA,cAAA,CAAA"}
1
+ {"version":3,"file":"knip.d.ts","names":[],"sources":["../src/knip.ts"],"sourcesContent":[],"mappings":";;;cAca,uBAAwB,oBAAoB;;EAA5C,SAAA,OAA8E,EAAA,CAAA,IAAA,CAAA;EAAA,SAAA,MAAA,EAAA,KAAA;WAAtD,wBAAA,EAAA,IAAA"}
package/dist/knip.js CHANGED
@@ -1,8 +1,11 @@
1
- const knipConfig = {
1
+ import { toMerged } from "./node_modules/es-toolkit/dist/object/toMerged.js";
2
+ const baseConfig = {
2
3
  entry: ["./src/index.ts", "**/*.test.ts"],
3
4
  project: ["**"],
4
- tsdown: false
5
+ tsdown: false,
6
+ treatConfigHintsAsErrors: true
5
7
  };
8
+ const knipConfig = (config) => toMerged(baseConfig, config);
6
9
  export { knipConfig };
7
10
 
8
11
  //# sourceMappingURL=knip.js.map
package/dist/knip.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"knip.js","names":[],"sources":["../src/knip.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\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\nexport const knipConfig = {\n entry: [\"./src/index.ts\", \"**/*.test.ts\"], // knip automatically grabs the `./src/index.ts` entrypoint with its tsdown plugin\n project: [\"**\"],\n tsdown: false,\n} as const satisfies KnipConfig\n"],"mappings":"AAMA,MAAa,aAAa;CACxB,OAAO,CAAC,kBAAkB,eAAe;CACzC,SAAS,CAAC,KAAK;CACf,QAAQ;CACT"}
1
+ {"version":3,"file":"knip.js","names":[],"sources":["../src/knip.ts"],"sourcesContent":["import { toMerged } from \"es-toolkit\"\nimport type { KnipConfig } from \"knip\"\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 treatConfigHintsAsErrors: true,\n} as const satisfies KnipConfig\n\nexport const knipConfig = <T extends KnipConfig>(config: T) => toMerged(baseConfig, config)\n"],"mappings":";AAOA,MAAM,aAAa;CACjB,OAAO,CAAC,kBAAkB,eAAe;CACzC,SAAS,CAAC,KAAK;CACf,QAAQ;CACR,0BAA0B;CAC3B;AAED,MAAa,cAAoC,WAAc,SAAS,YAAY,OAAO"}
@@ -1,5 +1,7 @@
1
+ import { Config } from "prettier";
2
+
1
3
  //#region src/prettier.d.ts
2
- declare const prettierConfig: {
4
+ declare const prettierConfig: <T extends Config>(config: T) => {
3
5
  readonly printWidth: 120;
4
6
  readonly semi: false;
5
7
  readonly plugins: ["@prettier/plugin-xml", "prettier-plugin-sh", "prettier-plugin-toml", "prettier-plugin-astro", "prettier-plugin-tailwindcss"];
@@ -15,7 +17,7 @@ declare const prettierConfig: {
15
17
  readonly parser: "astro";
16
18
  };
17
19
  }];
18
- };
20
+ } & T;
19
21
  //#endregion
20
22
  export { prettierConfig };
21
23
  //# sourceMappingURL=prettier.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prettier.d.ts","names":[],"sources":["../src/prettier.ts"],"sourcesContent":[],"mappings":";cAEa;EAAA,SAAA,UA0Bc,EAAA,GAAA"}
1
+ {"version":3,"file":"prettier.d.ts","names":[],"sources":["../src/prettier.ts"],"sourcesContent":[],"mappings":";;;cA+Ba,2BAA4B,gBAAgB;;EAA5C,SAAA,IAAA,EAAA,KAA8E;EAAA,SAAA,OAAA,EAAA,CAAA,sBAAA,EAAA,oBAAA,EAAA,sBAAA,EAAA,uBAAA,EAAA,6BAAA,CAAA;WAAlD,kBAAA,EAAA,kBAAA;WAAgB,SAAA,EAAA,CAAA;;IAAkC,SAAA,OAAA,EAAA"}
package/dist/prettier.js CHANGED
@@ -1,4 +1,5 @@
1
- const prettierConfig = {
1
+ import { toMerged } from "./node_modules/es-toolkit/dist/object/toMerged.js";
2
+ const baseConfig = {
2
3
  printWidth: 120,
3
4
  semi: false,
4
5
  plugins: [
@@ -17,6 +18,7 @@ const prettierConfig = {
17
18
  options: { parser: "astro" }
18
19
  }]
19
20
  };
21
+ const prettierConfig = (config) => toMerged(baseConfig, config);
20
22
  export { prettierConfig };
21
23
 
22
24
  //# sourceMappingURL=prettier.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"prettier.js","names":[],"sources":["../src/prettier.ts"],"sourcesContent":["import type { Config } from \"prettier\"\n\nexport const prettierConfig = {\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"],"mappings":"AAEA,MAAa,iBAAiB;CAC5B,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"}
1
+ {"version":3,"file":"prettier.js","names":[],"sources":["../src/prettier.ts"],"sourcesContent":["import { toMerged } from \"es-toolkit\"\nimport type { Config } from \"prettier\"\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 = <T extends Config>(config: T) => toMerged(baseConfig, config)\n"],"mappings":";AAGA,MAAM,aAAa;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;AAED,MAAa,kBAAoC,WAAc,SAAS,YAAY,OAAO"}
package/dist/tsdown.d.ts CHANGED
@@ -1,5 +1,7 @@
1
+ import { UserConfig } from "tsdown";
2
+
1
3
  //#region src/tsdown.d.ts
2
- declare const tsdownConfig: {
4
+ declare const tsdownConfig: <T extends UserConfig>(config: T) => {
3
5
  readonly entry: ["./src/index.ts"];
4
6
  readonly unbundle: true;
5
7
  readonly target: false;
@@ -17,7 +19,7 @@ declare const tsdownConfig: {
17
19
  readonly publint: true;
18
20
  readonly logLevel: "warn";
19
21
  readonly failOnWarn: true;
20
- };
22
+ } & T;
21
23
  //#endregion
22
24
  export { tsdownConfig };
23
25
  //# sourceMappingURL=tsdown.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.d.ts","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":[],"mappings":";cAEa;EAAA,SAAA,KAAA,EAkBkB,CAAA,gBAAA,CAAA"}
1
+ {"version":3,"file":"tsdown.d.ts","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":[],"mappings":";;;cAuBa,yBAA0B,oBAAoB;;EAA9C,SAAA,QAAgF,EAAA,IAAA;EAAA,SAAA,MAAA,EAAA,KAAA;WAAtD,QAAA,EAAA,SAAA;WAAoB,MAAA,EAAA,UAAA;;EAAkC,SAAA,GAAA,EAAA"}
package/dist/tsdown.js CHANGED
@@ -1,4 +1,5 @@
1
- const tsdownConfig = {
1
+ import { toMerged } from "./node_modules/es-toolkit/dist/object/toMerged.js";
2
+ const baseConfig = {
2
3
  entry: ["./src/index.ts"],
3
4
  unbundle: true,
4
5
  target: false,
@@ -17,6 +18,7 @@ const tsdownConfig = {
17
18
  logLevel: "warn",
18
19
  failOnWarn: true
19
20
  };
21
+ const tsdownConfig = (config) => toMerged(baseConfig, config);
20
22
  export { tsdownConfig };
21
23
 
22
24
  //# sourceMappingURL=tsdown.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.js","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\n\nexport const tsdownConfig = {\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"],"mappings":"AAEA,MAAa,eAAe;CAC1B,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"}
1
+ {"version":3,"file":"tsdown.js","names":[],"sources":["../src/tsdown.ts"],"sourcesContent":["import { toMerged } from \"es-toolkit\"\nimport type { UserConfig } from \"tsdown\"\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 = <T extends UserConfig>(config: T) => toMerged(baseConfig, config)\n"],"mappings":";AAGA,MAAM,aAAa;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;AAED,MAAa,gBAAsC,WAAc,SAAS,YAAY,OAAO"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.13.1",
3
+ "version": "0.14.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,6 +43,7 @@
43
43
  "@arethetypeswrong/core": "^0.18.2",
44
44
  "@biomejs/biome": "^2.2.4",
45
45
  "@types/bun": "^1.2.21",
46
+ "es-toolkit": "^1.39.10",
46
47
  "knip": "^5.63.1",
47
48
  "prettier": "^3.6.2",
48
49
  "publint": "^0.3.12",