@adamhl8/configs 0.38.0 → 1.1.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/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  Configs (`tsconfig`, `oxfmt`, `oxlint`, etc.) I use across my projects.
4
4
 
5
5
  ```sh
6
- nub add -D @adamhl8/configs
6
+ bun add -D @adamhl8/configs
7
7
  ```
8
8
 
9
9
  ### just
@@ -14,7 +14,7 @@ Scripts live in a shared [`just`](https://github.com/casey/just) base justfile i
14
14
  import "node_modules/@adamhl8/configs/dist/configs/justfile.base.just"
15
15
  ```
16
16
 
17
- It provides `lint`, `build`, `test`, `bump-deps`, `release`, `release-run`, and `prepare`. Run `just` to list them. `build` only runs `tsdown` if the project has a `tsdown.config.ts`, so projects without a build step can use it as-is.
17
+ It provides `lint`, `build`, `test`, `bump-deps`, `release`, `release-run`, and `prepare`. Run `just` to list them. `build` only runs `tsdown` if the project has a `tsdown.config.ts`, and `test` (`bun test`) passes when there are no tests, so projects without a build step or tests can use them as-is.
18
18
 
19
19
  To customize a recipe, redefine it in your `justfile`. Each public recipe is a thin wrapper over a private `_recipe` that holds the actual body, so an override can still run the original instead of copying it:
20
20
 
@@ -45,6 +45,8 @@ The base justfile puts `node_modules/.bin` on `PATH`, so recipes can call packag
45
45
  }
46
46
  ```
47
47
 
48
+ The base tsconfig sets `types: ["bun"]`, so the project needs `@types/bun` installed.
49
+
48
50
  ### oxfmt
49
51
 
50
52
  ```ts
@@ -88,17 +90,6 @@ export default defineConfig(config)
88
90
 
89
91
  `tsdownBinConfig` is also exported for building `package.json` bin executables: a bundled, single-file, extensionless build with no type declarations.
90
92
 
91
- ### vitest
92
-
93
- ```ts
94
- import { vitestConfig } from "@adamhl8/configs"
95
- import { defineConfig } from "vitest/config"
96
-
97
- const config = vitestConfig({ ... })
98
-
99
- export default defineConfig(config)
100
- ```
101
-
102
93
  ### commitlint
103
94
 
104
95
  ```ts
@@ -115,7 +106,7 @@ import { releaseItConfig } from "@adamhl8/configs"
115
106
  export default releaseItConfig({ ... })
116
107
  ```
117
108
 
118
- The release config wires up its hooks to use `adamhl8-cliff` for the changelog and release notes, so the two are meant to be used together.
109
+ The release config wires up its hooks to use `adamhl8-cliff` for the changelog and release notes, so the two are meant to be used together. It publishes with `bun publish`.
119
110
 
120
111
  ### git-cliff
121
112
 
@@ -139,6 +130,14 @@ extends:
139
130
 
140
131
  `lefthook install` (the base justfile's `prepare` recipe runs it) sets up the hooks.
141
132
 
133
+ ### bunfig
134
+
135
+ bun has no extends mechanism for `bunfig.toml`, so shared settings are synced into the project's `bunfig.toml`. The base justfile's `prepare` recipe runs the `adamhl8-bunfig` bin, which merges the shared base config (`bunfig.base.toml`) with the project's `bunfig.toml` and writes the result back. The project's values win over the base's, and a project without a `bunfig.toml` gets the base config as-is.
136
+
137
+ The base config turns on coverage for `bun test` (showing only failures), runs `**/*.test.ts` files concurrently, ignores `fixtures/` directories, uses the isolated install linker, and makes `bun run` run scripts with bun instead of node.
138
+
139
+ Since the file is regenerated from the merged config, comments in `bunfig.toml` don't survive the sync. The sync can also be run manually by running `adamhl8-bunfig`.
140
+
142
141
  ### gitignore
143
142
 
144
143
  git has no include mechanism for `.gitignore`, so shared entries are synced into the project's `.gitignore`. The base justfile's `prepare` recipe runs the `adamhl8-gitignore` bin, which keeps the shared list at the top of the file above a marker line: the first run prepends it, later runs replace everything above the marker with the current shared list, so changes propagate on package updates:
@@ -156,7 +155,7 @@ Everything below the marker is left untouched. The sync can also be run manually
156
155
 
157
156
  ## GitHub Actions
158
157
 
159
- This repo hosts three reusable workflows you can call from other projects instead of copy/pasting them. The calling project must use `nub`, have a `justfile` that imports the base justfile (see [just](#just)), and have a commitlint config (e.g. via these configs). The workflows install just themselves.
158
+ This repo hosts three reusable workflows you can call from other projects instead of copy/pasting them. The calling project must use `bun`, have a `justfile` that imports the base justfile (see [just](#just)), and have a commitlint config (e.g. via these configs). The workflows set up bun and install just and lefthook themselves.
160
159
 
161
160
  - `ci.yml`: runs `build` (build + lint) on pushes/PRs and lints commit messages with commitlint
162
161
  - `update-deps.yml`: weekly `bump-deps` run that opens a dependency-update PR
@@ -228,6 +227,6 @@ Configure these on each repo that uses the workflows (Settings -> Secrets and va
228
227
 
229
228
  ## Notes
230
229
 
231
- The `prepare` script is `"prepare": "just prepare"`, which runs the base justfile's `prepare` recipe (`lefthook install` and the `.gitignore` sync).
230
+ The `prepare` script is `"prepare": "just prepare"`, which runs the base justfile's `prepare` recipe (`lefthook install`, the `.gitignore` sync, and the `bunfig.toml` sync).
232
231
 
233
- nub installs `package.json` bin executables into the local `node_modules/.bin`. This means that we can run something like `adamhl8-cliff` directly instead of doing `src/adamhl8-cliff/index.ts`. That's why this repo overrides the `prepare` recipe to also run `tsdown`. Those executables need to be available.
232
+ bun links a dependency's `package.json` bin executables into the local `node_modules/.bin`, but not the bins of the package being developed itself. This repo depends on itself (`"@adamhl8/configs": "file:."`) so that its own bins can be run directly, e.g. `adamhl8-cliff` instead of `src/adamhl8-cliff/index.ts`. That's also why this repo overrides the `prepare` recipe to first run `tsdown`: the bins point at `dist/`, so those builds need to be available.
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env bun
2
+ import path from "node:path";
3
+ import bun from "bun";
4
+ import { isPlainObject, merge } from "es-toolkit";
5
+ import { stringify } from "smol-toml";
6
+ import { objectHasOwn } from "ts-extras";
7
+ //#region src/adamhl8-bunfig/index.ts
8
+ const BUNFIG_BASE_PATH = path.resolve(import.meta.dir, "../configs/bunfig.base.toml");
9
+ const BUNFIG_PROJECT_PATH = path.resolve("./bunfig.toml");
10
+ const baseBunfigImport = await import(BUNFIG_BASE_PATH, { with: { type: "toml" } });
11
+ const projectBunfigImport = await bun.file(BUNFIG_PROJECT_PATH).exists() ? await import(BUNFIG_PROJECT_PATH, { with: { type: "toml" } }) : void 0;
12
+ const isTomlImport = (tomlImport) => typeof tomlImport === "object" && objectHasOwn(tomlImport, "default") && isPlainObject(tomlImport.default);
13
+ const mergedConfigToml = stringify(merge(isTomlImport(baseBunfigImport) ? baseBunfigImport.default : {}, isTomlImport(projectBunfigImport) ? projectBunfigImport.default : {}));
14
+ await bun.write(BUNFIG_PROJECT_PATH, mergedConfigToml);
15
+ //#endregion
16
+ export {};
@@ -1,12 +1,17 @@
1
- #!/usr/bin/env nub
2
- import { spawnSync } from "node:child_process";
1
+ #!/usr/bin/env bun
3
2
  import path from "node:path";
4
- import process from "node:process";
3
+ import { spawnSync } from "bun";
5
4
  //#region src/adamhl8-cliff/index.ts
6
- process.exitCode = spawnSync("git-cliff", [
5
+ const result = spawnSync([
6
+ "git-cliff",
7
7
  "--config",
8
- path.resolve(import.meta.dirname, "../configs/cliff.base.toml"),
8
+ path.resolve(import.meta.dir, "../configs/cliff.base.toml"),
9
9
  ...process.argv.slice(2)
10
- ], { stdio: "inherit" }).status;
10
+ ], { stdio: [
11
+ "inherit",
12
+ "inherit",
13
+ "inherit"
14
+ ] });
15
+ process.exitCode = result.exitCode;
11
16
  //#endregion
12
17
  export {};
@@ -1,8 +1,8 @@
1
- #!/usr/bin/env nub
2
- import fs from "node:fs";
1
+ #!/usr/bin/env bun
3
2
  import path from "node:path";
3
+ import bun from "bun";
4
4
  //#region src/adamhl8-gitignore/index.ts
5
- const GITIGNORE_BASE_PATH = path.resolve(import.meta.dirname, "../configs/gitignore.base");
5
+ const GITIGNORE_BASE_PATH = path.resolve(import.meta.dir, "../configs/gitignore.base");
6
6
  const END_MARKER = "# The above patterns are managed by @adamhl8/configs. Anything manually added above this line will be replaced.";
7
7
  /** Rebuilds the managed region above the marker, keeping what's below it (the whole file when there's no marker). */
8
8
  const mergeGitignore = (currentContent, blockBody) => {
@@ -11,9 +11,10 @@ const mergeGitignore = (currentContent, blockBody) => {
11
11
  return existingContent ? `${block}\n\n${existingContent}\n` : `${block}\n`;
12
12
  };
13
13
  const gitignorePath = ".gitignore";
14
- const blockBody = fs.readFileSync(GITIGNORE_BASE_PATH, "utf8").trim();
15
- const currentContent = fs.existsSync(gitignorePath) ? fs.readFileSync(gitignorePath, "utf8") : "";
14
+ const blockBody = (await bun.file(GITIGNORE_BASE_PATH).text()).trim();
15
+ const currentContentFile = bun.file(gitignorePath);
16
+ const currentContent = await currentContentFile.exists() ? await currentContentFile.text() : "";
16
17
  const merged = mergeGitignore(currentContent, blockBody);
17
- if (merged !== currentContent) fs.writeFileSync(gitignorePath, merged);
18
+ if (merged !== currentContent) await bun.write(gitignorePath, merged);
18
19
  //#endregion
19
20
  export {};
@@ -0,0 +1,12 @@
1
+ [test]
2
+ pathIgnorePatterns = ["fixtures/**", "fixture/**"]
3
+ coverage = true
4
+ coverageSkipTestFiles = true
5
+ concurrentTestGlob = "**/*.test.ts"
6
+ onlyFailures = true
7
+
8
+ [install]
9
+ linker = "isolated"
10
+
11
+ [run]
12
+ bun = true
@@ -1 +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 { 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, \"improve\", \"release\"]\n\nconst baseConfig = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"type-enum\": [RuleConfigSeverity.Error, \"always\", commitTypes],\n },\n} as const satisfies UserConfig\n\nexport const commitlintConfig = createMergeConfigFn<UserConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;AAMA,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;CAAG;CAAW;AAAS;AAS3D,MAAa,mBAAmB,oBAAmD;CANjF,SAAS,CAAC,iCAAiC;CAC3C,OAAO,EACL,aAAa;EAAC,mBAAmB;EAAO;EAAU;CAAW,EAC/D;AAGiF,CAAU"}
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 { 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, \"improve\", \"release\"]\n\nconst baseConfig = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"type-enum\": [RuleConfigSeverity.Error, \"always\", commitTypes],\n },\n} as const satisfies UserConfig\n\nexport const commitlintConfig = createMergeConfigFn<UserConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;;AAMA,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;CAAG;CAAW;AAAS;AAS3D,MAAa,mBAAmB,oBAAmD;CANjF,SAAS,CAAC,iCAAiC;CAC3C,OAAO,EACL,aAAa;EAAC,mBAAmB;EAAO;EAAU;CAAW,EAC/D;AAGiF,CAAU"}
@@ -15,12 +15,15 @@ prepare: _prepare
15
15
  _prepare:
16
16
  lefthook install
17
17
  adamhl8-gitignore
18
+ adamhl8-bunfig
19
+ oxfmt bunfig.toml
18
20
 
19
21
  bump-deps: _bump-deps
20
22
  _bump-deps:
21
- nub update -L
22
- rm -f nub.lock
23
- nub i --no-frozen-lockfile
23
+ bunx npm-check-updates --upgrade --format group
24
+ rm -f bun.lock
25
+ rm -rf node_modules/
26
+ bun i --ignore-scripts --no-summary
24
27
 
25
28
  tofu-check: _tofu-check
26
29
  _tofu-check:
@@ -32,8 +35,8 @@ _lint:
32
35
  markdown-toc -i --bullets '-' --maxdepth 3 ./README.md
33
36
  oxlint --fix --fix-suggestions --fix-dangerously
34
37
  oxfmt
35
- knip
36
- @{{ run-when("just test", "[ -f vitest.config.ts ]") }}
38
+ knip-bun
39
+ @just test
37
40
 
38
41
  build: _build
39
42
  _build: lint && tofu-check
@@ -41,7 +44,7 @@ _build: lint && tofu-check
41
44
 
42
45
  test: _test
43
46
  _test:
44
- vitest run
47
+ @bun test --pass-with-no-tests
45
48
 
46
49
  release: _release
47
50
  _release:
@@ -51,4 +54,4 @@ _release:
51
54
  release-run: _release-run
52
55
 
53
56
  _release-run:
54
- release-it --ci -i "$(adamhl8-cliff --bumped-version)"
57
+ release-it -VV --ci -i "$(adamhl8-cliff --bumped-version)"
@@ -3,9 +3,11 @@ import { KnipConfig } from "knip";
3
3
  //#region src/configs/knip.base.d.ts
4
4
  declare const knipConfig: OptionalMergeConfigFn<KnipConfig, {
5
5
  readonly project: ["**/*"];
6
- readonly entry: ["./src/index.ts"];
7
6
  readonly ignoreBinaries: ["just"];
8
7
  readonly ignoreDependencies: ["@adamhl8/eslint-plugin-clean-modules"];
8
+ readonly bun: {
9
+ readonly entry: ["**/*.test.ts"];
10
+ };
9
11
  }>;
10
12
  //#endregion
11
13
  export { knipConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;cAoBa,YAAU,sBAAA"}
1
+ {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;cAuBa,YAAU,sBAAA;;;;;aAJnB"}
@@ -1,14 +1,11 @@
1
1
  import { createMergeConfigFn } from "../utils.js";
2
- //#region src/configs/knip.base.ts
3
- /** Knip sees `just` in the `prepare` script and the release-it hooks, but it isn't a package.json dependency */
4
- const IGNORE_BINARIES = ["just"];
5
2
  const knipConfig = createMergeConfigFn({
6
3
  project: ["**/*"],
7
- entry: ["./src/index.ts"],
8
- ignoreBinaries: IGNORE_BINARIES,
9
- ignoreDependencies: ["@adamhl8/eslint-plugin-clean-modules"]
4
+ ignoreBinaries: ["just"],
5
+ ignoreDependencies: ["@adamhl8/eslint-plugin-clean-modules"],
6
+ bun: { entry: ["**/*.test.ts"] }
10
7
  });
11
8
  //#endregion
12
- export { IGNORE_BINARIES, knipConfig };
9
+ export { knipConfig };
13
10
 
14
11
  //# sourceMappingURL=knip.base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\n/** Knip sees `just` in the `prepare` script and the release-it hooks, but it isn't a package.json dependency */\nexport const IGNORE_BINARIES = [\"just\"] as const satisfies string[]\n\n/**\n * - Knip resolves `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly\n * in the consuming project, so it shows as unlisted\n */\nconst IGNORE_DEPENDENCIES = [\"@adamhl8/eslint-plugin-clean-modules\"] as const satisfies string[]\n\nconst baseConfig = {\n project: [\"**/*\"],\n entry: [\"./src/index.ts\"],\n ignoreBinaries: IGNORE_BINARIES,\n ignoreDependencies: IGNORE_DEPENDENCIES,\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn<KnipConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;;AAKA,MAAa,kBAAkB,CAAC,MAAM;AAetC,MAAa,aAAa,oBAAmD;CAN3E,SAAS,CAAC,MAAM;CAChB,OAAO,CAAC,gBAAgB;CACxB,gBAAgB;CAChB,oBAAoB,CANO,sCAMW;AAGqC,CAAU"}
1
+ {"version":3,"file":"knip.base.js","names":[],"sources":["../../src/configs/knip.base.ts"],"sourcesContent":["import type { KnipConfig } from \"knip\"\n\nimport { createMergeConfigFn } from \"#utils.ts\"\n\n/** Knip sees `just` in the `prepare` script and the release-it hooks, but it isn't a package.json dependency */\nconst IGNORE_BINARIES = [\"just\"] as const satisfies string[]\n\n/**\n * - Knip resolves `@adamhl8/eslint-plugin-clean-modules` via the oxlint config, but we don't need to install it directly\n * in the consuming project, so it shows as unlisted\n */\nconst IGNORE_DEPENDENCIES = [\"@adamhl8/eslint-plugin-clean-modules\"] as const satisfies string[]\n\nconst baseConfig = {\n project: [\"**/*\"],\n // entry: [\"**/*.test.ts\"],\n ignoreBinaries: IGNORE_BINARIES,\n ignoreDependencies: IGNORE_DEPENDENCIES,\n bun: {\n entry: [\"**/*.test.ts\"],\n },\n} as const satisfies KnipConfig\n\nexport const knipConfig = createMergeConfigFn<KnipConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";AAuBA,MAAa,aAAa,oBAAmD;CAT3E,SAAS,CAAC,MAAM;CAEhB,gBAAgB,CAXO,MAWO;CAC9B,oBAAoB,CANO,sCAMW;CACtC,KAAK,EACH,OAAO,CAAC,cAAc,EACxB;AAG2E,CAAU"}
@@ -6,4 +6,4 @@ pre-commit:
6
6
  commit-msg:
7
7
  commands:
8
8
  commitlint:
9
- run: nubx commitlint --edit {1}
9
+ run: bun commitlint --edit {1}
@@ -1 +1 @@
1
- {"version":3,"file":"oxfmt.base.js","names":[],"sources":["../../src/configs/oxfmt.base.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n printWidth: 120,\n semi: false,\n jsdoc: true,\n sortImports: {\n groups: [\n \"builtin\",\n \"external\",\n [\"subpath\", \"internal\"],\n [\"index\", \"sibling\", \"parent\"],\n \"side_effect\",\n [\"style\", \"side_effect_style\"],\n ],\n },\n sortTailwindcss: true,\n} as const satisfies OxfmtConfig\n\nexport const oxfmtConfig = createMergeConfigFn<OxfmtConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";AAqBA,MAAa,cAAc,oBAAoD;CAhB7E,YAAY;CACZ,MAAM;CACN,OAAO;CACP,aAAa,EACX,QAAQ;EACN;EACA;EACA,CAAC,WAAW,UAAU;EACtB;GAAC;GAAS;GAAW;EAAQ;EAC7B;EACA,CAAC,SAAS,mBAAmB;CAC/B,EACF;CACA,iBAAiB;AAG4D,CAAU"}
1
+ {"version":3,"file":"oxfmt.base.js","names":[],"sources":["../../src/configs/oxfmt.base.ts"],"sourcesContent":["import type { OxfmtConfig } from \"oxfmt\"\n\nimport { createMergeConfigFn } from \"#utils.ts\"\n\nconst baseConfig = {\n printWidth: 120,\n semi: false,\n jsdoc: true,\n sortImports: {\n groups: [\n \"builtin\",\n \"external\",\n [\"subpath\", \"internal\"],\n [\"index\", \"sibling\", \"parent\"],\n \"side_effect\",\n [\"style\", \"side_effect_style\"],\n ],\n },\n sortTailwindcss: true,\n} as const satisfies OxfmtConfig\n\nexport const oxfmtConfig = createMergeConfigFn<OxfmtConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";AAqBA,MAAa,cAAc,oBAAoD;CAhB7E,YAAY;CACZ,MAAM;CACN,OAAO;CACP,aAAa,EACX,QAAQ;EACN;EACA;EACA,CAAC,WAAW,UAAU;EACtB;GAAC;GAAS;GAAW;EAAQ;EAC7B;EACA,CAAC,SAAS,mBAAmB;CAC/B,EACF;CACA,iBAAiB;AAG4D,CAAU"}
@@ -19,7 +19,7 @@ declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
19
19
  readonly plugins: ["eslint", "react", "unicorn", "typescript", "oxc", "import", "jsdoc", "vitest", "jsx-a11y", "react-perf", "promise", "node"];
20
20
  readonly jsPlugins: [string];
21
21
  readonly overrides: [{
22
- readonly files: [".release-it.ts", "astro.config.ts", "commitlint.config.ts", "knip.ts", "oxfmt.config.ts", "oxlint.config.ts", "prisma.config.ts", "tsdown.config.ts", "vitest.config.ts"];
22
+ readonly files: [".release-it.ts", "astro.config.ts", "commitlint.config.ts", "knip.ts", "oxfmt.config.ts", "oxlint.config.ts", "prisma.config.ts", "tsdown.config.ts"];
23
23
  readonly rules: {
24
24
  readonly "import/no-default-export": "off";
25
25
  };
@@ -94,6 +94,7 @@ declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
94
94
  readonly "typescript/strict-boolean-expressions": "off";
95
95
  readonly "unicorn/no-array-callback-reference": "off";
96
96
  readonly "unicorn/no-array-method-this-argument": "off";
97
+ readonly "unicorn/no-await-expression-member": "off";
97
98
  readonly "unicorn/no-process-exit": "off";
98
99
  readonly "unicorn/number-literal-case": "off";
99
100
  readonly "unicorn/switch-case-braces": "off";
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;cA2Ia,cAAY,sBAAA;;aAnIrB;aACA;aACA;;;aAIA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;eAmCI;;;;;;;;;;;;;;;;;;;iBAiBS;iBAAiB"}
1
+ {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;cA2Ia,cAAY,sBAAA;;aAnIrB;aACA;aACA;;;aAIA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;eAkCI;;;;;;;;;;;;;;;;;;;iBAiBS;iBAAiB"}
@@ -39,8 +39,7 @@ const oxlintConfig = createMergeConfigFn({
39
39
  "oxfmt.config.ts",
40
40
  "oxlint.config.ts",
41
41
  "prisma.config.ts",
42
- "tsdown.config.ts",
43
- "vitest.config.ts"
42
+ "tsdown.config.ts"
44
43
  ],
45
44
  rules: { "import/no-default-export": "off" }
46
45
  }],
@@ -108,6 +107,7 @@ const oxlintConfig = createMergeConfigFn({
108
107
  "typescript/strict-boolean-expressions": "off",
109
108
  "unicorn/no-array-callback-reference": "off",
110
109
  "unicorn/no-array-method-this-argument": "off",
110
+ "unicorn/no-await-expression-member": "off",
111
111
  "unicorn/no-process-exit": "off",
112
112
  "unicorn/number-literal-case": "off",
113
113
  "unicorn/switch-case-braces": "off",
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\"\n\nimport type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n\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\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\n // Resolve to an absolute path so consumers load it from this package's own deps.\n jsPlugins: [fileURLToPath(import.meta.resolve(\"@adamhl8/eslint-plugin-clean-modules\"))],\n\n overrides: [\n {\n files: [\n \".release-it.ts\",\n \"astro.config.ts\",\n \"commitlint.config.ts\",\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \"prisma.config.ts\",\n \"tsdown.config.ts\",\n \"vitest.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n ],\n\n rules: {\n \"clean-modules/require-direct-exports\": \"error\",\n \"clean-modules/require-import-extensions\": \"error\",\n \"clean-modules/require-subpath-imports\": \"error\",\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", propElementValues: \"always\", props: \"never\" }],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n \"unicorn/filename-case\": [\n \"error\",\n {\n cases: { kebabCase: true, pascalCase: true },\n },\n ],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"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 \"no-void\": \"off\",\n \"node/callback-return\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"react/forbid-component-props\": \"off\",\n \"react/jsx-filename-extension\": \"off\",\n \"react/jsx-max-depth\": \"off\",\n \"react/jsx-no-literals\": \"off\",\n \"react/react-in-jsx-scope\": \"off\",\n \"require-await\": \"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/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n \"vitest/no-hooks\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-describe-function-title\": \"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 = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AA2IA,MAAa,eAAe,oBAAqD;CApI/E,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CAEA,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CAEA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAGA,WAAW,CAAC,cAAc,OAAO,KAAK,QAAQ,sCAAsC,CAAC,CAAC;CAEtF,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CAEA,OAAO;EACL,wCAAwC;EACxC,2CAA2C;EAC3C,yCAAyC;EAEzC,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,kCAAkC,CAAC,SAAS;GAAE,UAAU;GAAS,mBAAmB;GAAU,OAAO;EAAQ,CAAC;EAC9G,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EACxD,yBAAyB,CACvB,SACA,EACE,OAAO;GAAE,WAAW;GAAM,YAAY;EAAK,EAC7C,CACF;EACA,gCAAgC,CAAC,SAAS,EAAE,gBAAgB,MAAM,CAAC;EAEnE,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,+BAA+B;EAC/B,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,WAAW;EACX,wBAAwB;EACxB,gBAAgB;EAChB,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,gCAAgC;EAChC,gCAAgC;EAChC,uBAAuB;EACvB,yBAAyB;EACzB,4BAA4B;EAC5B,iBAAiB;EACjB,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,2BAA2B;EAC3B,+BAA+B;EAC/B,8BAA8B;EAC9B,mBAAmB;EACnB,sCAAsC;EACtC,yCAAyC;EACzC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAG+E,CAAU"}
1
+ {"version":3,"file":"oxlint.base.js","names":[],"sources":["../../src/configs/oxlint.base.ts"],"sourcesContent":["import { fileURLToPath } from \"node:url\"\n\nimport type { OxlintConfig } from \"oxlint\"\n\nimport { createMergeConfigFn } from \"#utils.ts\"\n\nconst baseConfig = {\n options: {\n reportUnusedDisableDirectives: \"error\",\n typeAware: true,\n typeCheck: true,\n },\n\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\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\n // Resolve to an absolute path so consumers load it from this package's own deps.\n jsPlugins: [fileURLToPath(import.meta.resolve(\"@adamhl8/eslint-plugin-clean-modules\"))],\n\n overrides: [\n {\n files: [\n \".release-it.ts\",\n \"astro.config.ts\",\n \"commitlint.config.ts\",\n \"knip.ts\",\n \"oxfmt.config.ts\",\n \"oxlint.config.ts\",\n \"prisma.config.ts\",\n \"tsdown.config.ts\",\n ],\n rules: {\n \"import/no-default-export\": \"off\",\n },\n },\n ],\n\n rules: {\n \"clean-modules/require-direct-exports\": \"error\",\n \"clean-modules/require-import-extensions\": \"error\",\n \"clean-modules/require-subpath-imports\": \"error\",\n\n curly: [\"error\", \"multi-or-nest\"],\n \"func-style\": [\"error\", \"expression\"],\n \"react/jsx-curly-brace-presence\": [\"error\", { children: \"never\", propElementValues: \"always\", props: \"never\" }],\n \"require-unicode-regexp\": [\"error\", { requireFlag: \"v\" }],\n \"unicorn/filename-case\": [\n \"error\",\n {\n cases: { kebabCase: true, pascalCase: true },\n },\n ],\n \"unicorn/no-useless-undefined\": [\"error\", { checkArguments: false }],\n\n \"capitalized-comments\": \"off\",\n \"id-length\": \"off\",\n \"import/exports-last\": \"off\",\n \"import/group-exports\": \"off\",\n \"import/max-dependencies\": \"off\",\n \"import/no-named-export\": \"off\",\n \"import/no-nodejs-modules\": \"off\",\n \"import/no-unassigned-import\": \"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 \"no-void\": \"off\",\n \"node/callback-return\": \"off\",\n \"node/no-sync\": \"off\",\n \"oxc/no-async-await\": \"off\",\n \"oxc/no-optional-chaining\": \"off\",\n \"oxc/no-rest-spread-properties\": \"off\",\n \"react/forbid-component-props\": \"off\",\n \"react/jsx-filename-extension\": \"off\",\n \"react/jsx-max-depth\": \"off\",\n \"react/jsx-no-literals\": \"off\",\n \"react/react-in-jsx-scope\": \"off\",\n \"require-await\": \"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/no-await-expression-member\": \"off\",\n \"unicorn/no-process-exit\": \"off\",\n \"unicorn/number-literal-case\": \"off\",\n \"unicorn/switch-case-braces\": \"off\",\n \"vitest/no-hooks\": \"off\",\n \"vitest/no-importing-vitest-globals\": \"off\",\n \"vitest/prefer-describe-function-title\": \"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 = createMergeConfigFn<OxlintConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";;AA2IA,MAAa,eAAe,oBAAqD;CApI/E,SAAS;EACP,+BAA+B;EAC/B,WAAW;EACX,WAAW;CACb;CAEA,YAAY;EACV,aAAa;EACb,SAAS;EACT,UAAU;EACV,MAAM;EACN,aAAa;EACb,OAAO;EACP,YAAY;CACd;CAEA,SAAS;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;CAGA,WAAW,CAAC,cAAc,OAAO,KAAK,QAAQ,sCAAsC,CAAC,CAAC;CAEtF,WAAW,CACT;EACE,OAAO;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF;EACA,OAAO,EACL,4BAA4B,MAC9B;CACF,CACF;CAEA,OAAO;EACL,wCAAwC;EACxC,2CAA2C;EAC3C,yCAAyC;EAEzC,OAAO,CAAC,SAAS,eAAe;EAChC,cAAc,CAAC,SAAS,YAAY;EACpC,kCAAkC,CAAC,SAAS;GAAE,UAAU;GAAS,mBAAmB;GAAU,OAAO;EAAQ,CAAC;EAC9G,0BAA0B,CAAC,SAAS,EAAE,aAAa,IAAI,CAAC;EACxD,yBAAyB,CACvB,SACA,EACE,OAAO;GAAE,WAAW;GAAM,YAAY;EAAK,EAC7C,CACF;EACA,gCAAgC,CAAC,SAAS,EAAE,gBAAgB,MAAM,CAAC;EAEnE,wBAAwB;EACxB,aAAa;EACb,uBAAuB;EACvB,wBAAwB;EACxB,2BAA2B;EAC3B,0BAA0B;EAC1B,4BAA4B;EAC5B,+BAA+B;EAC/B,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,WAAW;EACX,wBAAwB;EACxB,gBAAgB;EAChB,sBAAsB;EACtB,4BAA4B;EAC5B,iCAAiC;EACjC,gCAAgC;EAChC,gCAAgC;EAChC,uBAAuB;EACvB,yBAAyB;EACzB,4BAA4B;EAC5B,iBAAiB;EACjB,gBAAgB;EAChB,aAAa;EACb,gCAAgC;EAChC,4CAA4C;EAC5C,6CAA6C;EAC7C,8CAA8C;EAC9C,yCAAyC;EACzC,uCAAuC;EACvC,yCAAyC;EACzC,sCAAsC;EACtC,2BAA2B;EAC3B,+BAA+B;EAC/B,8BAA8B;EAC9B,mBAAmB;EACnB,sCAAsC;EACtC,yCAAyC;EACzC,mCAAmC;EACnC,iCAAiC;EACjC,6BAA6B;EAC7B,8BAA8B;EAC9B,uBAAuB;EACvB,+BAA+B;CACjC;AAG+E,CAAU"}
@@ -4,7 +4,7 @@ import { Config } from "release-it";
4
4
  declare const releaseItConfig: OptionalMergeConfigFn<Config, {
5
5
  readonly hooks: {
6
6
  readonly "before:init": "just build";
7
- readonly "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"];
7
+ readonly "after:bump": ["adamhl8-cliff --tag ${version} -o", "bun oxfmt CHANGELOG.md"];
8
8
  };
9
9
  readonly git: {
10
10
  readonly commitMessage: "release: ${version}";
@@ -20,7 +20,7 @@ declare const releaseItConfig: OptionalMergeConfigFn<Config, {
20
20
  readonly npm: {
21
21
  readonly publishPackageManager: "bun";
22
22
  readonly publishPath: "";
23
- readonly publishArgs: ["--no-git-checks"];
23
+ readonly publishArgs: ["--ignore-scripts"];
24
24
  };
25
25
  }>;
26
26
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"release-it.base.d.ts","names":[],"sources":["../../src/configs/release-it.base.ts"],"mappings":";;;cA6Ba,iBAAe,sBAAA;;aAtBxB;aACA;;;aAGA;aACA;aACA;aACA;;;aAGA;aACA;aACA;;;aAIA;aACA;aACA"}
1
+ {"version":3,"file":"release-it.base.d.ts","names":[],"sources":["../../src/configs/release-it.base.ts"],"mappings":";;;cA4Ba,iBAAe,sBAAA;;aArBxB;aACA;;;aAGA;aACA;aACA;aACA;;;aAGA;aACA;aACA;;;aAGA;aACA;aACA"}
@@ -2,7 +2,7 @@ import { createMergeConfigFn } from "../utils.js";
2
2
  const releaseItConfig = createMergeConfigFn({
3
3
  hooks: {
4
4
  "before:init": "just build",
5
- "after:bump": ["adamhl8-cliff --tag ${version} -o", "nubx oxfmt CHANGELOG.md"]
5
+ "after:bump": ["adamhl8-cliff --tag ${version} -o", "bun oxfmt CHANGELOG.md"]
6
6
  },
7
7
  git: {
8
8
  commitMessage: "release: ${version}",
@@ -16,9 +16,9 @@ const releaseItConfig = createMergeConfigFn({
16
16
  releaseNotes: "adamhl8-cliff --unreleased --tag ${version}"
17
17
  },
18
18
  npm: {
19
- publishPackageManager: "nub",
19
+ publishPackageManager: "bun",
20
20
  publishPath: "",
21
- publishArgs: ["--no-git-checks"]
21
+ publishArgs: ["--ignore-scripts"]
22
22
  }
23
23
  });
24
24
  //#endregion
@@ -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\"\n\nconst baseConfig = {\n hooks: {\n \"before:init\": \"just build\",\n \"after:bump\": [\"adamhl8-cliff --tag ${version} -o\", \"nubx oxfmt CHANGELOG.md\"],\n },\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n addUntrackedFiles: true,\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 = createMergeConfigFn<Config, typeof baseConfig>(baseConfig)\n"],"mappings":";AA6BA,MAAa,kBAAkB,oBAA+C;CAvB5E,OAAO;EACL,eAAe;EACf,cAAc,CAAC,qCAAqC,yBAAyB;CAC/E;CACA,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;EACf,mBAAmB;CACrB;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EAEH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,iBAAiB;CACjC;AAG4E,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\"\n\nconst baseConfig = {\n hooks: {\n \"before:init\": \"just build\",\n \"after:bump\": [\"adamhl8-cliff --tag ${version} -o\", \"bun oxfmt CHANGELOG.md\"],\n },\n git: {\n commitMessage: \"release: ${version}\",\n tagName: \"${version}\",\n tagAnnotation: \"release ${version}\",\n addUntrackedFiles: true,\n },\n github: {\n release: true,\n releaseName: \"${version}\",\n releaseNotes: \"adamhl8-cliff --unreleased --tag ${version}\",\n },\n npm: {\n publishPackageManager: \"bun\",\n publishPath: \"\",\n publishArgs: [\"--ignore-scripts\"],\n },\n} as const satisfies Config\n\nexport const releaseItConfig = createMergeConfigFn<Config, typeof baseConfig>(baseConfig)\n"],"mappings":";AA4BA,MAAa,kBAAkB,oBAA+C;CAtB5E,OAAO;EACL,eAAe;EACf,cAAc,CAAC,qCAAqC,wBAAwB;CAC9E;CACA,KAAK;EACH,eAAe;EACf,SAAS;EACT,eAAe;EACf,mBAAmB;CACrB;CACA,QAAQ;EACN,SAAS;EACT,aAAa;EACb,cAAc;CAChB;CACA,KAAK;EACH,uBAAuB;EACvB,aAAa;EACb,aAAa,CAAC,kBAAkB;CAClC;AAG4E,CAAU"}
@@ -3,7 +3,7 @@
3
3
  "include": ["${configDir}/**/*", "${configDir}/**/.*/**/*"],
4
4
  "exclude": ["${configDir}/dist/"],
5
5
  "compilerOptions": {
6
- "types": ["node"],
6
+ "types": ["bun"],
7
7
  "lib": ["ESNext"],
8
8
  "target": "ESNext",
9
9
  "jsx": "react-jsx",
@@ -19,6 +19,9 @@ declare const baseConfig: {
19
19
  };
20
20
  readonly sourcemap: true;
21
21
  };
22
+ readonly deps: {
23
+ readonly neverBundle: ["bun"];
24
+ };
22
25
  readonly attw: {
23
26
  readonly level: "error";
24
27
  readonly profile: "esm-only";
@@ -32,6 +35,9 @@ declare const tsdownBinConfig: OptionalMergeConfigFn<UserConfig, {
32
35
  readonly minify: "dce-only";
33
36
  readonly fixedExtension: false;
34
37
  readonly hash: false;
38
+ readonly deps: {
39
+ readonly neverBundle: ["bun"];
40
+ };
35
41
  readonly publint: true;
36
42
  readonly failOnWarn: true;
37
43
  readonly entry: [];
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;;KAOK,mBAAmB,YAAY;cAE9B;;;;;;;;;;aAUF;aAEA;eAAQ;;aACR;;;aAGA;aACA;;;;;cAkBS,cAAc,cAAc,yBAAyB;cAIrD,iBAAe,sBAAA"}
1
+ {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;;KAOK,mBAAmB,YAAY;cAE9B;;;;;;;;;;aAUF;aAEA;eAAQ;;aACR;;;aAGA;;;aAGA;aACA;;;;;cAkBS,cAAc,cAAc,yBAAyB;cAIrD,iBAAe,sBAAA;;;;;;aA1BxB"}
@@ -14,6 +14,7 @@ const baseConfig = {
14
14
  tsgo: { path: "./node_modules/.bin/tsc" },
15
15
  sourcemap: true
16
16
  },
17
+ deps: { neverBundle: ["bun"] },
17
18
  attw: {
18
19
  level: "error",
19
20
  profile: "esm-only"
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.base.js","names":[],"sources":["../../src/configs/tsdown.base.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\nimport type { SetRequired } from \"type-fest\"\n\nimport type { MergeConfigFn } from \"#/utils.ts\"\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\n// Force projects to specify platform\ntype StrictUserConfig = SetRequired<UserConfig, \"platform\">\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n platform: \"neutral\",\n target: false,\n unbundle: true,\n sourcemap: true,\n minify: \"dce-only\",\n fixedExtension: false,\n hash: false,\n dts: {\n newContext: true,\n // remove/change when rolldown-plugin-dts supports TypeScript v7\n tsgo: { path: \"./node_modules/.bin/tsc\" },\n sourcemap: true,\n },\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n publint: true,\n failOnWarn: true,\n} as const satisfies StrictUserConfig\n\nconst binConfig = {\n ...baseConfig,\n entry: [],\n platform: \"node\",\n unbundle: false,\n sourcemap: false,\n outExtensions: () => ({ js: \"\" }) as const,\n dts: false,\n attw: false,\n} as const satisfies UserConfig\n\n// Annotated as the non-optional MergeConfigFn so projects must pass a config (platform is required)\nexport const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig> = createMergeConfigFn<\n StrictUserConfig,\n typeof baseConfig\n>(baseConfig)\nexport const tsdownBinConfig = createMergeConfigFn<UserConfig, typeof binConfig>(binConfig)\n"],"mappings":";;AASA,MAAM,aAAa;CACjB,OAAO,CAAC,gBAAgB;CACxB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,MAAM;CACN,KAAK;EACH,YAAY;EAEZ,MAAM,EAAE,MAAM,0BAA0B;EACxC,WAAW;CACb;CACA,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,SAAS;CACT,YAAY;AACd;AAEA,MAAM,YAAY;CAChB,GAAG;CACH,OAAO,CAAC;CACR,UAAU;CACV,UAAU;CACV,WAAW;CACX,sBAAsB,EAAE,IAAI,GAAG;CAC/B,KAAK;CACL,MAAM;AACR;AAGA,MAAa,eAAmE,oBAG9E,UAAU;AACZ,MAAa,kBAAkB,oBAAkD,SAAS"}
1
+ {"version":3,"file":"tsdown.base.js","names":[],"sources":["../../src/configs/tsdown.base.ts"],"sourcesContent":["import type { UserConfig } from \"tsdown\"\nimport type { SetRequired } from \"type-fest\"\n\nimport type { MergeConfigFn } from \"#utils.ts\"\nimport { createMergeConfigFn } from \"#utils.ts\"\n\n// Force projects to specify platform\ntype StrictUserConfig = SetRequired<UserConfig, \"platform\">\n\nconst baseConfig = {\n entry: [\"./src/index.ts\"],\n platform: \"neutral\",\n target: false,\n unbundle: true,\n sourcemap: true,\n minify: \"dce-only\",\n fixedExtension: false,\n hash: false,\n dts: {\n newContext: true,\n // remove/change when tsdown released new version\n tsgo: { path: \"./node_modules/.bin/tsc\" },\n sourcemap: true,\n },\n deps: {\n neverBundle: [\"bun\"],\n },\n attw: {\n level: \"error\",\n profile: \"esm-only\",\n },\n publint: true,\n failOnWarn: true,\n} as const satisfies StrictUserConfig\n\nconst binConfig = {\n ...baseConfig,\n entry: [],\n platform: \"node\",\n unbundle: false,\n sourcemap: false,\n outExtensions: () => ({ js: \"\" }) as const,\n dts: false,\n attw: false,\n} as const satisfies UserConfig\n\n// Annotated as the non-optional MergeConfigFn so projects must pass a config (platform is required)\nexport const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig> = createMergeConfigFn<\n StrictUserConfig,\n typeof baseConfig\n>(baseConfig)\nexport const tsdownBinConfig = createMergeConfigFn<UserConfig, typeof binConfig>(binConfig)\n"],"mappings":";;AASA,MAAM,aAAa;CACjB,OAAO,CAAC,gBAAgB;CACxB,UAAU;CACV,QAAQ;CACR,UAAU;CACV,WAAW;CACX,QAAQ;CACR,gBAAgB;CAChB,MAAM;CACN,KAAK;EACH,YAAY;EAEZ,MAAM,EAAE,MAAM,0BAA0B;EACxC,WAAW;CACb;CACA,MAAM,EACJ,aAAa,CAAC,KAAK,EACrB;CACA,MAAM;EACJ,OAAO;EACP,SAAS;CACX;CACA,SAAS;CACT,YAAY;AACd;AAEA,MAAM,YAAY;CAChB,GAAG;CACH,OAAO,CAAC;CACR,UAAU;CACV,UAAU;CACV,WAAW;CACX,sBAAsB,EAAE,IAAI,GAAG;CAC/B,KAAK;CACL,MAAM;AACR;AAGA,MAAa,eAAmE,oBAG9E,UAAU;AACZ,MAAa,kBAAkB,oBAAkD,SAAS"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/env/index.ts"],"sourcesContent":["import process from \"node:process\"\n\nimport arkenv from \"arkenv\"\nimport { attempt, isErr } from \"ts-explicit-errors\"\n\ntype ArkEnv = typeof arkenv\n\nexport const parseEnv = ((...args: Parameters<ArkEnv>) => {\n const env = attempt(() => arkenv(...args))\n if (isErr(env)) {\n console.error(env.message)\n process.exit(1)\n }\n return env\n}) as ArkEnv\n\nexport { requireWhen } from \"#/env/utils.ts\"\n"],"mappings":";;;;;AAOA,MAAa,aAAa,GAAG,SAA6B;CACxD,MAAM,MAAM,cAAc,OAAO,GAAG,IAAI,CAAC;CACzC,IAAI,MAAM,GAAG,GAAG;EACd,QAAQ,MAAM,IAAI,OAAO;EACzB,QAAQ,KAAK,CAAC;CAChB;CACA,OAAO;AACT"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/env/index.ts"],"sourcesContent":["import process from \"node:process\"\n\nimport arkenv from \"arkenv\"\nimport { attempt, isErr } from \"ts-explicit-errors\"\n\ntype ArkEnv = typeof arkenv\n\nexport const parseEnv = ((...args: Parameters<ArkEnv>) => {\n const env = attempt(() => arkenv(...args))\n if (isErr(env)) {\n console.error(env.message)\n process.exit(1)\n }\n return env\n}) as ArkEnv\n\nexport { requireWhen } from \"#env/utils.ts\"\n"],"mappings":";;;;;AAOA,MAAa,aAAa,GAAG,SAA6B;CACxD,MAAM,MAAM,cAAc,OAAO,GAAG,IAAI,CAAC;CACzC,IAAI,MAAM,GAAG,GAAG;EACd,QAAQ,MAAM,IAAI,OAAO;EACzB,QAAQ,KAAK,CAAC;CAChB;CACA,OAAO;AACT"}
package/dist/index.d.ts CHANGED
@@ -4,5 +4,4 @@ import { oxfmtConfig } from "./configs/oxfmt.base.js";
4
4
  import { oxlintConfig } from "./configs/oxlint.base.js";
5
5
  import { releaseItConfig } from "./configs/release-it.base.js";
6
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 };
7
+ export { commitlintConfig, knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig };
package/dist/index.js CHANGED
@@ -4,5 +4,4 @@ import { oxfmtConfig } from "./configs/oxfmt.base.js";
4
4
  import { oxlintConfig } from "./configs/oxlint.base.js";
5
5
  import { releaseItConfig } from "./configs/release-it.base.js";
6
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 };
7
+ export { commitlintConfig, knipConfig, oxfmtConfig, oxlintConfig, releaseItConfig, tsdownBinConfig, tsdownConfig };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.38.0",
3
+ "version": "1.1.0",
4
4
  "description": "My shared configs for TS projects",
5
5
  "homepage": "https://github.com/adamhl8/configs",
6
6
  "bugs": {
@@ -17,6 +17,7 @@
17
17
  "url": "git+https://github.com/adamhl8/configs.git"
18
18
  },
19
19
  "bin": {
20
+ "adamhl8-bunfig": "./dist/adamhl8-bunfig/index",
20
21
  "adamhl8-cliff": "./dist/adamhl8-cliff/index",
21
22
  "adamhl8-gitignore": "./dist/adamhl8-gitignore/index"
22
23
  },
@@ -25,7 +26,7 @@
25
26
  ],
26
27
  "type": "module",
27
28
  "imports": {
28
- "#/*": "./src/*"
29
+ "#*": "./src/*"
29
30
  },
30
31
  "exports": {
31
32
  "./tsconfig": "./dist/configs/tsconfig.base.json",
@@ -51,14 +52,17 @@
51
52
  "arkenv": "^0.12.2",
52
53
  "arktype": "^2.2.3",
53
54
  "es-toolkit": "^1.49.0",
55
+ "smol-toml": "^1.7.0",
54
56
  "ts-explicit-errors": "^4.1.2",
57
+ "ts-extras": "^1.2.0",
55
58
  "type-fest": "^5.8.0"
56
59
  },
57
60
  "devDependencies": {
58
- "@arethetypeswrong/core": "^0.18.4",
61
+ "@adamhl8/configs": "file:.",
62
+ "@arethetypeswrong/core": "^0.18.5",
59
63
  "@commitlint/cli": "^21.2.1",
60
- "@types/node": "^26.1.1",
61
- "knip": "^6.25.0",
64
+ "@types/bun": "^1.3.14",
65
+ "knip": "^6.26.0",
62
66
  "markdown-toc": "^1.2.0",
63
67
  "oxfmt": "^0.58.0",
64
68
  "oxlint": "^1.73.0",
@@ -66,8 +70,7 @@
66
70
  "publint": "^0.3.21",
67
71
  "release-it": "^20.2.1",
68
72
  "tsdown": "^0.22.4",
69
- "typescript": "^7.0.2",
70
- "vitest": "^4.1.10"
73
+ "typescript": "^7.0.2"
71
74
  },
72
75
  "peerDependencies": {
73
76
  "@arethetypeswrong/core": ">=0.18",
@@ -81,8 +84,7 @@
81
84
  "publint": ">=0.3",
82
85
  "release-it": ">=19",
83
86
  "tsdown": ">=0.20",
84
- "typescript": "^6.0.0",
85
- "vitest": ">=4"
87
+ "typescript": "^7.0.0"
86
88
  },
87
89
  "peerDependenciesMeta": {
88
90
  "@arethetypeswrong/core": {
@@ -117,16 +119,6 @@
117
119
  },
118
120
  "tsdown": {
119
121
  "optional": true
120
- },
121
- "vitest": {
122
- "optional": true
123
- }
124
- },
125
- "devEngines": {
126
- "packageManager": {
127
- "name": "nub",
128
- "version": "^0.4.4",
129
- "onFail": "warn"
130
122
  }
131
123
  }
132
124
  }
@@ -1,17 +0,0 @@
1
- import { OptionalMergeConfigFn } from "../utils.js";
2
- import { ViteUserConfig } from "vitest/config";
3
- //#region src/configs/vitest.base.d.ts
4
- declare const vitestConfig: OptionalMergeConfigFn<ViteUserConfig, {
5
- readonly test: {
6
- readonly coverage: {
7
- readonly enabled: true;
8
- readonly reporter: ["text"];
9
- };
10
- readonly expect: {
11
- readonly requireAssertions: true;
12
- };
13
- };
14
- }>;
15
- //#endregion
16
- export { vitestConfig };
17
- //# sourceMappingURL=vitest.base.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitest.base.d.ts","names":[],"sources":["../../src/configs/vitest.base.ts"],"mappings":";;;cAgBa,cAAY,sBAAA;;aAVrB;eACE;eACA;;aAEF;eACE"}
@@ -1,12 +0,0 @@
1
- import { createMergeConfigFn } from "../utils.js";
2
- const vitestConfig = createMergeConfigFn({ test: {
3
- coverage: {
4
- enabled: true,
5
- reporter: ["text"]
6
- },
7
- expect: { requireAssertions: true }
8
- } });
9
- //#endregion
10
- export { vitestConfig };
11
-
12
- //# sourceMappingURL=vitest.base.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"vitest.base.js","names":[],"sources":["../../src/configs/vitest.base.ts"],"sourcesContent":["import type { ViteUserConfig } from \"vitest/config\"\n\nimport { createMergeConfigFn } from \"#/utils.ts\"\n\nconst baseConfig = {\n test: {\n coverage: {\n enabled: true,\n reporter: [\"text\"],\n },\n expect: {\n requireAssertions: true,\n },\n },\n} as const satisfies ViteUserConfig\n\nexport const vitestConfig = createMergeConfigFn<ViteUserConfig, typeof baseConfig>(baseConfig)\n"],"mappings":";AAgBA,MAAa,eAAe,oBAAuD,EAXjF,MAAM;CACJ,UAAU;EACR,SAAS;EACT,UAAU,CAAC,MAAM;CACnB;CACA,QAAQ,EACN,mBAAmB,KACrB;AACF,EAGiF,CAAU"}