@adamhl8/configs 0.22.2 → 0.23.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.
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env nub
2
+ import { spawnSync } from "node:child_process";
3
+ import path from "node:path";
4
+ import process from "node:process";
5
+ //#region src/adamhl8-cliff/index.ts
6
+ process.exitCode = spawnSync("git-cliff", [
7
+ "--config",
8
+ path.resolve(import.meta.dirname, "../configs/cliff.base.toml"),
9
+ ...process.argv.slice(2)
10
+ ], { stdio: "inherit" }).status;
11
+ //#endregion
12
+ export {};
@@ -8,24 +8,8 @@ const DEFAULT_ENTRIES = [
8
8
  ];
9
9
  //#endregion
10
10
  //#region src/adamhl8-knip/knip-preprocessor.ts
11
- const countIssues = (issueRecords) => Object.values(issueRecords).map((issueRecord) => Object.keys(issueRecord).length).reduce((acc, curr) => acc + curr, 0);
12
- /**
13
- * Modifies issues based on the provided map function.
14
- *
15
- * This is needed because we also need to update `options.counters` after modifying issues.
16
- */
17
- const modifyIssues = (options, issueType, mapFn) => {
18
- const originalIssues = options.issues[issueType];
19
- const modifiedIssueEntries = Object.entries(originalIssues).map(([key, issueRecord]) => [key, Object.entries(issueRecord)]).map(([key, issueRecordEntries]) => [key, Object.fromEntries(mapFn([key, issueRecordEntries]))]);
20
- const modifiedIssues = Object.fromEntries(modifiedIssueEntries);
21
- const originalIssueCount = countIssues(originalIssues);
22
- const issuesRemovedCount = originalIssueCount - countIssues(modifiedIssues);
23
- options.counters[issueType] = originalIssueCount - issuesRemovedCount;
24
- options.issues[issueType] = modifiedIssues;
25
- };
26
11
  const preprocess = (options) => {
27
12
  options.configurationHints = options.configurationHints.filter((hint) => !(DEFAULT_ENTRIES.some((entry) => typeof hint.identifier === "string" && hint.identifier.includes(entry)) && (hint.type === "entry-empty" || hint.type === "entry-redundant")));
28
- modifyIssues(options, "unlisted", ([, issueRecordEntries]) => issueRecordEntries.filter(([key]) => !key.includes("prettier")));
29
13
  return options;
30
14
  };
31
15
  //#endregion
@@ -0,0 +1,14 @@
1
+ import { OptionalMergeConfigFn } from "../utils.js";
2
+ import { RuleConfigSeverity, UserConfig } from "@commitlint/types";
3
+
4
+ //#region src/configs/commitlint.base.d.ts
5
+ declare const baseConfig: {
6
+ extends: string[];
7
+ rules: {
8
+ "type-enum": [RuleConfigSeverity.Error, "always", string[]];
9
+ };
10
+ };
11
+ declare const commitlintConfig: OptionalMergeConfigFn<UserConfig, typeof baseConfig>;
12
+ //#endregion
13
+ export { commitlintConfig };
14
+ //# sourceMappingURL=commitlint.base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitlint.base.d.ts","names":[],"sources":["../../src/configs/commitlint.base.ts"],"mappings":";;;;cAaM,UAAA;;;kBAKgB,kBAAA,CAAA,KAAA;EAAA;AAAA;AAAA,cAET,gBAAA,EAAkB,qBAAA,CAAsB,UAAA,SAAmB,UAAA"}
@@ -0,0 +1,23 @@
1
+ import { createMergeConfigFn } from "../utils.js";
2
+ import conventional from "@commitlint/config-conventional";
3
+ import { RuleConfigSeverity } from "@commitlint/types";
4
+ //#region src/configs/commitlint.base.ts
5
+ const [_severity, _condition, conventionalTypes] = conventional.rules["type-enum"];
6
+ const EXCLUDED_TYPES = /* @__PURE__ */ new Set([
7
+ "test",
8
+ "style",
9
+ "build"
10
+ ]);
11
+ const commitTypes = [...conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type)), "release"];
12
+ const commitlintConfig = createMergeConfigFn({
13
+ extends: ["@commitlint/config-conventional"],
14
+ rules: { "type-enum": [
15
+ RuleConfigSeverity.Error,
16
+ "always",
17
+ commitTypes
18
+ ] }
19
+ });
20
+ //#endregion
21
+ export { commitlintConfig };
22
+
23
+ //# sourceMappingURL=commitlint.base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"commitlint.base.js","names":[],"sources":["../../src/configs/commitlint.base.ts"],"sourcesContent":["import conventional from \"@commitlint/config-conventional\"\nimport { RuleConfigSeverity } from \"@commitlint/types\"\nimport type { UserConfig } from \"@commitlint/types\"\n\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst [_severity, _condition, conventionalTypes] = conventional.rules[\"type-enum\"]\n\nconst EXCLUDED_TYPES = new Set([\"test\", \"style\", \"build\"])\nconst filteredTypes = conventionalTypes.filter((type) => !EXCLUDED_TYPES.has(type))\nconst commitTypes = [...filteredTypes, \"release\"]\n\nconst baseConfig = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"type-enum\": [RuleConfigSeverity.Error, \"always\", commitTypes],\n },\n} satisfies UserConfig\n\nexport const commitlintConfig: OptionalMergeConfigFn<UserConfig, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";;;;AAOA,MAAM,CAAC,WAAW,YAAY,qBAAqB,aAAa,MAAM;AAEtE,MAAM,iCAAiB,IAAI,IAAI;CAAC;CAAQ;CAAS;AAAO,CAAC;AAEzD,MAAM,cAAc,CAAC,GADC,kBAAkB,QAAQ,SAAS,CAAC,eAAe,IAAI,IAAI,CAC7C,GAAG,SAAS;AAShD,MAAa,mBAAyE,oBAAoB;CANxG,SAAS,CAAC,iCAAiC;CAC3C,OAAO,EACL,aAAa;EAAC,mBAAmB;EAAO;EAAU;CAAW,EAC/D;AAGwG,CAAU"}
@@ -5,7 +5,7 @@ import { KnipConfig } from "knip";
5
5
  declare const baseConfig: {
6
6
  readonly project: ["**"];
7
7
  readonly entry: ["./src/index.ts", "**/*.test.ts", "./tsdown.config.ts"];
8
- readonly ignoreBinaries: ["lefthook", "git-cliff"];
8
+ readonly ignoreBinaries: ["lefthook"];
9
9
  readonly ignoreDependencies: ["@commitlint/cli"];
10
10
  readonly tsdown: false;
11
11
  };
@@ -8,7 +8,7 @@ const DEFAULT_ENTRIES = [
8
8
  const knipConfig = createMergeConfigFn({
9
9
  project: ["**"],
10
10
  entry: DEFAULT_ENTRIES,
11
- ignoreBinaries: ["lefthook", "git-cliff"],
11
+ ignoreBinaries: ["lefthook"],
12
12
  ignoreDependencies: ["@commitlint/cli"],
13
13
  tsdown: false
14
14
  });
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\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\nexport const DEFAULT_ENTRIES = [\"./src/index.ts\", \"**/*.test.ts\", \"./tsdown.config.ts\"] as const satisfies string[]\n\nconst baseConfig = {\n project: [\"**\"],\n entry: DEFAULT_ENTRIES,\n ignoreBinaries: [\"lefthook\", \"git-cliff\"],\n ignoreDependencies: [\"@commitlint/cli\"],\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig: OptionalMergeConfigFn<KnipConfig, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";;AASA,MAAa,kBAAkB;CAAC;CAAkB;CAAgB;AAAoB;AAUtF,MAAa,aAAmE,oBAAoB;CAPlG,SAAS,CAAC,IAAI;CACd,OAAO;CACP,gBAAgB,CAAC,YAAY,WAAW;CACxC,oBAAoB,CAAC,iBAAiB;CACtC,QAAQ;AAG0F,CAAU"}
1
+ {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\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\nexport const DEFAULT_ENTRIES = [\"./src/index.ts\", \"**/*.test.ts\", \"./tsdown.config.ts\"] as const satisfies string[]\n\nconst baseConfig = {\n project: [\"**\"],\n entry: DEFAULT_ENTRIES,\n ignoreBinaries: [\"lefthook\"],\n ignoreDependencies: [\"@commitlint/cli\"],\n tsdown: false,\n} as const satisfies KnipConfig\n\nexport const knipConfig: OptionalMergeConfigFn<KnipConfig, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";;AASA,MAAa,kBAAkB;CAAC;CAAkB;CAAgB;AAAoB;AAUtF,MAAa,aAAmE,oBAAoB;CAPlG,SAAS,CAAC,IAAI;CACd,OAAO;CACP,gBAAgB,CAAC,UAAU;CAC3B,oBAAoB,CAAC,iBAAiB;CACtC,QAAQ;AAG0F,CAAU"}
@@ -0,0 +1,9 @@
1
+ pre-commit:
2
+ commands:
3
+ lint:
4
+ run: nub run lint
5
+
6
+ commit-msg:
7
+ commands:
8
+ commitlint:
9
+ run: nubx commitlint --edit {1}
@@ -18,7 +18,7 @@ declare const baseConfig: {
18
18
  readonly typeCheck: true;
19
19
  };
20
20
  readonly overrides: [{
21
- readonly files: ["knip.ts", "oxfmt.config.ts", "oxlint.config.ts", ".release-it.ts", "tsdown.config.ts", "vitest.config.ts"];
21
+ readonly files: [".release-it.ts", "commitlint.config.ts", "knip.ts", "oxfmt.config.ts", "oxlint.config.ts", "tsdown.config.ts", "vitest.config.ts"];
22
22
  readonly rules: {
23
23
  readonly "import/no-default-export": "off";
24
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;;cAKM,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAiGO,YAAA,EAAc,qBAAA,CAAsB,YAAA,SAAqB,UAAA"}
1
+ {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;;cAKM,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAkGO,YAAA,EAAc,qBAAA,CAAsB,YAAA,SAAqB,UAAA"}
@@ -16,10 +16,11 @@ const oxlintConfig = createMergeConfigFn({
16
16
  },
17
17
  overrides: [{
18
18
  files: [
19
+ ".release-it.ts",
20
+ "commitlint.config.ts",
19
21
  "knip.ts",
20
22
  "oxfmt.config.ts",
21
23
  "oxlint.config.ts",
22
- ".release-it.ts",
23
24
  "tsdown.config.ts",
24
25
  "vitest.config.ts"
25
26
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n categories: {\n correctness: \"error\",\n nursery: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n overrides: [\n {\n files: [\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \".release-it.ts\",\n \"tsdown.config.ts\",\n \"vitest.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n ],\n plugins: [\n \"eslint\",\n \"react\",\n \"unicorn\",\n \"typescript\",\n \"oxc\",\n \"import\",\n \"jsdoc\",\n \"vitest\",\n \"jsx-a11y\",\n \"react-perf\",\n \"promise\",\n \"node\",\n ],\n rules: {\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"node/no-sync\": [\"error\", { ignores: [\"existsSync\", \"spawnSync\"] }],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"init-declarations\": \"off\",\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-console\": \"off\",\n \"no-continue\": \"off\",\n \"no-duplicate-imports\": \"off\",\n \"no-inline-comments\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-plusplus\": \"off\",\n \"no-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"node/callback-return\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n \"typescript/consistent-return\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/require-hook\": \"off\", // reenable when false positives are fixed?\n \"vitest/require-test-timeout\": \"off\",\n },\n} as const satisfies OxlintConfig\n\nexport const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";AAsGA,MAAa,eAAuE,oBAAoB;CAhGtG,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CACA,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CACA,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,cAAc,WAAW,EAAE,CAAC;EAClE,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EAExD,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,qBAAqB;EACrB,uBAAuB;EACvB,yBAAyB;EACzB,wBAAwB;EACxB,aAAa;EACb,0BAA0B;EAC1B,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,wBAAwB;EACxB,sBAAsB;EACtB,oBAAoB;EACpB,eAAe;EACf,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,qBAAqB;EACrB,wBAAwB;EACxB,4BAA4B;EAC5B,iCAAiC;EACjC,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,8BAA8B;EAC9B,sCAAsC;EACtC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAGsG,CAAU"}
1
+ {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n categories: {\n correctness: \"error\",\n nursery: \"error\",\n pedantic: \"error\",\n perf: \"error\",\n restriction: \"error\",\n style: \"error\",\n suspicious: \"error\",\n },\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n overrides: [\n {\n files: [\n \".release-it.ts\",\n \"commitlint.config.ts\",\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \"tsdown.config.ts\",\n \"vitest.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n ],\n plugins: [\n \"eslint\",\n \"react\",\n \"unicorn\",\n \"typescript\",\n \"oxc\",\n \"import\",\n \"jsdoc\",\n \"vitest\",\n \"jsx-a11y\",\n \"react-perf\",\n \"promise\",\n \"node\",\n ],\n rules: {\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"node/no-sync\": [\"error\", { ignores: [\"existsSync\", \"spawnSync\"] }],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/prefer-default-export\": \"off\",\n \"init-declarations\": \"off\",\n \"jsdoc/require-param\": \"off\",\n \"jsdoc/require-returns\": \"off\",\n \"max-classes-per-file\": \"off\",\n \"max-lines\": \"off\",\n \"max-lines-per-function\": \"off\",\n \"max-statements\": \"off\",\n \"no-console\": \"off\",\n \"no-continue\": \"off\",\n \"no-duplicate-imports\": \"off\",\n \"no-inline-comments\": \"off\",\n \"no-magic-numbers\": \"off\",\n \"no-plusplus\": \"off\",\n \"no-ternary\": \"off\",\n \"no-undef\": \"off\",\n \"no-undefined\": \"off\",\n \"no-useless-return\": \"off\",\n \"node/callback-return\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"sort-imports\": \"off\",\n \"sort-keys\": \"off\",\n \"typescript/consistent-return\": \"off\",\n \"typescript/explicit-function-return-type\": \"off\",\n \"typescript/explicit-module-boundary-types\": \"off\",\n \"typescript/prefer-readonly-parameter-types\": \"off\",\n \"typescript/strict-boolean-expressions\": \"off\",\n \"unicorn/no-array-callback-reference\": \"off\",\n \"unicorn/no-array-method-this-argument\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-expect-assertions\": \"off\",\n \"vitest/prefer-lowercase-title\": \"off\",\n \"vitest/prefer-to-be-falsy\": \"off\",\n \"vitest/prefer-to-be-truthy\": \"off\",\n \"vitest/require-hook\": \"off\", // reenable when false positives are fixed?\n \"vitest/require-test-timeout\": \"off\",\n },\n} as const satisfies OxlintConfig\n\nexport const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";AAuGA,MAAa,eAAuE,oBAAoB;CAjGtG,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CACA,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CACA,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CACA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CACA,OAAO;EACL,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,gBAAgB,CAAC,SAAS,EAAE,SAAS,CAAC,cAAc,WAAW,EAAE,CAAC;EAClE,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EAExD,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,0BAA0B;EAC1B,4BAA4B;EAC5B,gCAAgC;EAChC,qBAAqB;EACrB,uBAAuB;EACvB,yBAAyB;EACzB,wBAAwB;EACxB,aAAa;EACb,0BAA0B;EAC1B,kBAAkB;EAClB,cAAc;EACd,eAAe;EACf,wBAAwB;EACxB,sBAAsB;EACtB,oBAAoB;EACpB,eAAe;EACf,cAAc;EACd,YAAY;EACZ,gBAAgB;EAChB,qBAAqB;EACrB,wBAAwB;EACxB,4BAA4B;EAC5B,iCAAiC;EACjC,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,8BAA8B;EAC9B,sCAAsC;EACtC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAGsG,CAAU"}
@@ -10,12 +10,12 @@ declare const baseConfig: {
10
10
  };
11
11
  readonly hooks: {
12
12
  readonly "before:init": "nub run bundle";
13
- readonly "after:bump": ["git-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"];
13
+ readonly "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"];
14
14
  };
15
15
  readonly github: {
16
16
  readonly release: true;
17
17
  readonly releaseName: "${version}";
18
- readonly releaseNotes: "git-cliff --unreleased --tag ${version}";
18
+ readonly releaseNotes: "adamhl8-cliff --unreleased --tag ${version}";
19
19
  };
20
20
  readonly npm: {
21
21
  readonly publishPackageManager: "bun";
@@ -7,12 +7,12 @@ const releaseItConfig = createMergeConfigFn({
7
7
  },
8
8
  hooks: {
9
9
  "before:init": "nub run bundle",
10
- "after:bump": ["git-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"]
10
+ "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"]
11
11
  },
12
12
  github: {
13
13
  release: true,
14
14
  releaseName: "${version}",
15
- releaseNotes: "git-cliff --unreleased --tag ${version}"
15
+ releaseNotes: "adamhl8-cliff --unreleased --tag ${version}"
16
16
  },
17
17
  npm: {
18
18
  publishPackageManager: "nub",
@@ -1 +1 @@
1
- {"version":3,"file":"release-it.base.js","names":[],"sources":["../../src/configs/release-it.base.ts"],"sourcesContent":["// oxlint-disable no-template-curly-in-string\nimport type { Config } from \"release-it\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n },\n hooks: {\n \"before:init\": \"nub run bundle\",\n \"after:bump\": [\"git-cliff --tag ${version} -o\", \"nubx oxfmt CHANGELOG.md\"],\n },\n github: {\n release: true,\n releaseName: \"${version}\",\n releaseNotes: \"git-cliff --unreleased --tag ${version}\",\n },\n npm: {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - release-it doesn't support nub directly yet\n publishPackageManager: \"nub\" as \"bun\",\n publishPath: \"\",\n publishArgs: [\"--no-git-checks\"],\n },\n} as const satisfies Config\n\nexport const releaseItConfig: OptionalMergeConfigFn<Config, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";AA6BA,MAAa,kBAAoE,oBAAoB;CAtBnG,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;CACjB;CACA,OAAO;EACL,eAAe;EACf,cAAc,CAAC,iCAAiC,yBAAyB;CAC3E;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EAEH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,iBAAiB;CACjC;AAGmG,CAAU"}
1
+ {"version":3,"file":"release-it.base.js","names":[],"sources":["../../src/configs/release-it.base.ts"],"sourcesContent":["// oxlint-disable no-template-curly-in-string\nimport type { Config } from \"release-it\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\nimport type { OptionalMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n },\n hooks: {\n \"before:init\": \"nub run bundle\",\n \"after:bump\": [\"adamhl8-cliff --tag ${version} -o\", \"nubx oxfmt CHANGELOG.md\"],\n },\n github: {\n release: true,\n releaseName: \"${version}\",\n releaseNotes: \"adamhl8-cliff --unreleased --tag ${version}\",\n },\n npm: {\n // oxlint-disable-next-line typescript/no-unsafe-type-assertion - release-it doesn't support nub directly yet\n publishPackageManager: \"nub\" as \"bun\",\n publishPath: \"\",\n publishArgs: [\"--no-git-checks\"],\n },\n} as const satisfies Config\n\nexport const releaseItConfig: OptionalMergeConfigFn<Config, typeof baseConfig> = createMergeConfigFn(baseConfig)\n"],"mappings":";AA6BA,MAAa,kBAAoE,oBAAoB;CAtBnG,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;CACjB;CACA,OAAO;EACL,eAAe;EACf,cAAc,CAAC,qCAAqC,yBAAyB;CAC/E;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EAEH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,iBAAiB;CACjC;AAGmG,CAAU"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
+ import { commitlintConfig } from "./configs/commitlint.base.js";
1
2
  import { knipConfig } from "./configs/knip.base.js";
2
- import { tsdownBinConfig, tsdownConfig } from "./configs/tsdown.base.js";
3
- import { oxlintConfig } from "./configs/oxlint.base.js";
4
3
  import { oxfmtConfig } from "./configs/oxfmt.base.js";
5
- import { vitestConfig } from "./configs/vitest.base.js";
4
+ import { oxlintConfig } from "./configs/oxlint.base.js";
6
5
  import { releaseItConfig } from "./configs/release-it.base.js";
7
- export { knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig, vitestConfig };
6
+ import { tsdownBinConfig, tsdownConfig } from "./configs/tsdown.base.js";
7
+ import { vitestConfig } from "./configs/vitest.base.js";
8
+ export { commitlintConfig, knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig, vitestConfig };
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
+ import { commitlintConfig } from "./configs/commitlint.base.js";
1
2
  import { knipConfig } from "./configs/knip.base.js";
2
- import { tsdownBinConfig, tsdownConfig } from "./configs/tsdown.base.js";
3
- import { oxlintConfig } from "./configs/oxlint.base.js";
4
3
  import { oxfmtConfig } from "./configs/oxfmt.base.js";
5
- import { vitestConfig } from "./configs/vitest.base.js";
4
+ import { oxlintConfig } from "./configs/oxlint.base.js";
6
5
  import { releaseItConfig } from "./configs/release-it.base.js";
7
- export { knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig, vitestConfig };
6
+ import { tsdownBinConfig, tsdownConfig } from "./configs/tsdown.base.js";
7
+ import { vitestConfig } from "./configs/vitest.base.js";
8
+ export { commitlintConfig, knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig, vitestConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.22.2",
3
+ "version": "0.23.0",
4
4
  "homepage": "https://github.com/adamhl8/configs",
5
5
  "bugs": {
6
6
  "url": "https://github.com/adamhl8/configs/issues"
@@ -16,6 +16,7 @@
16
16
  "url": "git+https://github.com/adamhl8/configs.git"
17
17
  },
18
18
  "bin": {
19
+ "adamhl8-cliff": "./dist/adamhl8-cliff/index",
19
20
  "adamhl8-knip": "./dist/adamhl8-knip/index"
20
21
  },
21
22
  "files": [
@@ -36,11 +37,11 @@
36
37
  "access": "public"
37
38
  },
38
39
  "scripts": {
39
- "lint": "markdown-toc -i --bullets '-' --maxdepth 3 ./README.md && oxfmt && oxlint --fix --fix-suggestions --fix-dangerously && ./src/adamhl8-knip/index.ts",
40
+ "lint": "markdown-toc -i --bullets '-' --maxdepth 3 ./README.md && oxfmt && oxlint --fix --fix-suggestions --fix-dangerously && adamhl8-knip",
40
41
  "bump-deps": "rm -f lock.yaml && nub update -L && nub ./patch-knip.ts",
41
42
  "bundle": "nub run lint && tsdown",
42
- "release": "release-it --ci -i \"$(git-cliff --bumped-version)\"",
43
- "prepare": "lefthook install && nub ./patch-knip.ts"
43
+ "release": "release-it --ci -i \"$(adamhl8-cliff --bumped-version)\"",
44
+ "prepare": "lefthook install && nub ./patch-knip.ts && tsdown"
44
45
  },
45
46
  "dependencies": {
46
47
  "es-toolkit": "^1.49.0",