@adamhl8/configs 0.36.0 → 0.38.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.
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { RuleConfigSeverity, UserConfig } from "@commitlint/types";
3
-
4
3
  //#region src/configs/commitlint.base.d.ts
5
4
  declare const commitlintConfig: OptionalMergeConfigFn<UserConfig, {
6
5
  readonly extends: ["@commitlint/config-conventional"];
@@ -1 +1 @@
1
- {"version":3,"file":"commitlint.base.d.ts","names":[],"sources":["../../src/configs/commitlint.base.ts"],"mappings":";;;;cAmBa,gBAAA,wBAAgB,UAAA;EAAA"}
1
+ {"version":3,"file":"commitlint.base.d.ts","names":[],"sources":["../../src/configs/commitlint.base.ts"],"mappings":";;;cAmBa,kBAJE,sBAIc;;;aAJzB,uBAAW,mBAAA"}
@@ -19,9 +19,8 @@ _prepare:
19
19
  bump-deps: _bump-deps
20
20
  _bump-deps:
21
21
  nub update -L
22
- rm -f lock.yaml
22
+ rm -f nub.lock
23
23
  nub i --no-frozen-lockfile
24
- oxfmt lock.yaml
25
24
 
26
25
  tofu-check: _tofu-check
27
26
  _tofu-check:
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { KnipConfig } from "knip";
3
-
4
3
  //#region src/configs/knip.base.d.ts
5
4
  declare const knipConfig: OptionalMergeConfigFn<KnipConfig, {
6
5
  readonly project: ["**/*"];
@@ -1 +1 @@
1
- {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;;cAoBa,UAAA,EAAU,qBAAA,CAAA,UAAA;EAAA"}
1
+ {"version":3,"file":"knip.base.d.ts","names":[],"sources":["../../src/configs/knip.base.ts"],"mappings":";;;cAoBa,YAAU,sBAAA"}
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { OxfmtConfig } from "oxfmt";
3
-
4
3
  //#region src/configs/oxfmt.base.d.ts
5
4
  declare const oxfmtConfig: OptionalMergeConfigFn<OxfmtConfig, {
6
5
  readonly printWidth: 120;
@@ -1 +1 @@
1
- {"version":3,"file":"oxfmt.base.d.ts","names":[],"sources":["../../src/configs/oxfmt.base.ts"],"mappings":";;;;cAqBa,WAAA,EAAW,qBAAA,CAAA,WAAA;EAAA"}
1
+ {"version":3,"file":"oxfmt.base.d.ts","names":[],"sources":["../../src/configs/oxfmt.base.ts"],"mappings":";;;cAqBa,aAAW,sBAAA;;;;;aAZpB"}
@@ -1,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { OxlintConfig } from "oxlint";
3
-
4
3
  //#region src/configs/oxlint.base.d.ts
5
4
  declare const oxlintConfig: OptionalMergeConfigFn<OxlintConfig, {
6
5
  readonly options: {
@@ -1 +1 @@
1
- {"version":3,"file":"oxlint.base.d.ts","names":[],"sources":["../../src/configs/oxlint.base.ts"],"mappings":";;;;cA2Ia,YAAA,EAAY,qBAAA,CAAA,YAAA;EAAA"}
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,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { Config } from "release-it";
3
-
4
3
  //#region src/configs/release-it.base.d.ts
5
4
  declare const releaseItConfig: OptionalMergeConfigFn<Config, {
6
5
  readonly hooks: {
@@ -1 +1 @@
1
- {"version":3,"file":"release-it.base.d.ts","names":[],"sources":["../../src/configs/release-it.base.ts"],"mappings":";;;;cA6Ba,eAAA,EAAe,qBAAA,CAAA,MAAA;EAAA"}
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,7 +1,6 @@
1
1
  import { MergeConfigFn, OptionalMergeConfigFn } from "../utils.js";
2
2
  import { SetRequired } from "type-fest";
3
3
  import { UserConfig } from "tsdown";
4
-
5
4
  //#region src/configs/tsdown.base.d.ts
6
5
  type StrictUserConfig = SetRequired<UserConfig, "platform">;
7
6
  declare const baseConfig: {
@@ -15,7 +14,9 @@ declare const baseConfig: {
15
14
  readonly hash: false;
16
15
  readonly dts: {
17
16
  readonly newContext: true;
18
- readonly resolver: "tsc";
17
+ readonly tsgo: {
18
+ readonly path: "./node_modules/.bin/tsc";
19
+ };
19
20
  readonly sourcemap: true;
20
21
  };
21
22
  readonly attw: {
@@ -27,6 +28,12 @@ declare const baseConfig: {
27
28
  };
28
29
  declare const tsdownConfig: MergeConfigFn<StrictUserConfig, typeof baseConfig>;
29
30
  declare const tsdownBinConfig: OptionalMergeConfigFn<UserConfig, {
31
+ readonly target: false;
32
+ readonly minify: "dce-only";
33
+ readonly fixedExtension: false;
34
+ readonly hash: false;
35
+ readonly publint: true;
36
+ readonly failOnWarn: true;
30
37
  readonly entry: [];
31
38
  readonly platform: "node";
32
39
  readonly unbundle: false;
@@ -36,12 +43,6 @@ declare const tsdownBinConfig: OptionalMergeConfigFn<UserConfig, {
36
43
  };
37
44
  readonly dts: false;
38
45
  readonly attw: false;
39
- readonly target: false;
40
- readonly minify: "dce-only";
41
- readonly fixedExtension: false;
42
- readonly hash: false;
43
- readonly publint: true;
44
- readonly failOnWarn: true;
45
46
  }>;
46
47
  //#endregion
47
48
  export { tsdownBinConfig, tsdownConfig };
@@ -1 +1 @@
1
- {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;;;KAOK,gBAAA,GAAmB,WAAW,CAAC,UAAA;AAAA,cAE9B,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;cAkCO,YAAA,EAAc,aAAA,CAAc,gBAAA,SAAyB,UAAA;AAAA,cAIrD,eAAA,EAAe,qBAAA,CAAA,UAAA;EAAA"}
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"}
@@ -11,7 +11,7 @@ const baseConfig = {
11
11
  hash: false,
12
12
  dts: {
13
13
  newContext: true,
14
- resolver: "tsc",
14
+ tsgo: { path: "./node_modules/.bin/tsc" },
15
15
  sourcemap: true
16
16
  },
17
17
  attw: {
@@ -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 resolver: \"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;EACZ,UAAU;EACV,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 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,6 +1,5 @@
1
1
  import { OptionalMergeConfigFn } from "../utils.js";
2
2
  import { ViteUserConfig } from "vitest/config";
3
-
4
3
  //#region src/configs/vitest.base.d.ts
5
4
  declare const vitestConfig: OptionalMergeConfigFn<ViteUserConfig, {
6
5
  readonly test: {
@@ -1 +1 @@
1
- {"version":3,"file":"vitest.base.d.ts","names":[],"sources":["../../src/configs/vitest.base.ts"],"mappings":";;;;cAgBa,YAAA,EAAY,qBAAA,CAAA,cAAA;EAAA"}
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,6 +1,5 @@
1
1
  import { requireWhen } from "./utils.js";
2
2
  import arkenv from "arkenv";
3
-
4
3
  //#region src/env/index.d.ts
5
4
  type ArkEnv = typeof arkenv;
6
5
  declare const parseEnv: ArkEnv;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/env/index.ts"],"mappings":";;;;KAKK,MAAA,UAAgB,MAAM;AAAA,cAEd,QAAA,EAOP,MAAM"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/env/index.ts"],"mappings":";;;KAKK,gBAAgB;cAER,UAOP"}
@@ -1,5 +1,4 @@
1
1
  import { type } from "arktype";
2
-
3
2
  //#region src/env/utils.d.ts
4
3
  /**
5
4
  * Makes an env var required while `when` is true, otherwise optional.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/env/utils.ts"],"mappings":";;;;;AASA;;;;iBAAgB,WAAA,eACd,IAAA,WACA,IAAA,EAAM,IAAA,CAAQ,QAAA,CAAS,MAAA,IACtB,UAAA,CAAW,IAAA,CAAQ,WAAA,CAAY,MAAA;AAAA,iBAClB,WAAA,eACd,IAAA,WACA,IAAA,EAAM,IAAA,CAAQ,QAAA,CAAS,MAAA,GACvB,QAAA,EAAU,IAAA,CAAQ,KAAA,CAAM,MAAA,IACvB,IAAA,CAAQ,WAAA,CAAY,MAAA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../../src/env/utils.ts"],"mappings":";;;;;;;;iBASgB,kBAAkB,QAChC,eACA,MAAM,KAAQ,SAAS,UACtB,WAAW,KAAQ,YAAY;iBAClB,kBAAkB,QAChC,eACA,MAAM,KAAQ,SAAS,SACvB,UAAU,KAAQ,MAAM,UACvB,KAAQ,YAAY"}
@@ -2,15 +2,24 @@ data "local_file" "package_json" {
2
2
  filename = "${path.root}/package.json"
3
3
  }
4
4
 
5
+ data "github_user" "current" {
6
+ username = ""
7
+ }
8
+
5
9
  locals {
6
10
  package_json = jsondecode(data.local_file.package_json.content)
11
+ repo_url = "github.com/${data.github_user.current.login}/${var.repo_name}"
12
+ # a homepage pointing at the repo itself is redundant
13
+ homepage_url = try(strcontains(local.package_json.homepage, local.repo_url) ? null : local.package_json.homepage, null)
7
14
  }
8
15
 
16
+
17
+
9
18
  resource "github_repository" "current" {
10
19
  name = var.repo_name
11
20
  description = local.package_json.description
12
21
  visibility = var.repo_settings.visibility
13
- homepage_url = var.repo_settings.homepage_url
22
+ homepage_url = local.homepage_url
14
23
  topics = try(local.package_json.keywords, [])
15
24
 
16
25
  allow_merge_commit = false
@@ -6,8 +6,7 @@ variable "repo_name" {
6
6
  variable "repo_settings" {
7
7
  description = "The GitHub repository settings"
8
8
  type = object({
9
- visibility = string
10
- homepage_url = optional(string, null)
9
+ visibility = string
11
10
  })
12
11
  }
13
12
 
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  import { MergeDeep, ReadonlyDeep, SimplifyDeep, WritableDeep } from "type-fest";
2
-
3
2
  //#region src/utils.d.ts
4
3
  /**
5
4
  * The merge config function, where the `UserConfig` passed in is merged with `BaseConfig`.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;AA+BA;;;;;;;;;UAAiB,aAAA;EAAA,iCACkB,YAAA,CAAa,UAAA,GAC5C,UAAA,EAAY,iBAAA,EACZ,OAAA;IAAW,MAAA;EAAA,IACV,SAAA,CACD,YAAA,CAAa,YAAA,CAAa,UAAA,IAC1B,YAAA,CAAa,YAAA,CAAa,iBAAA;IACxB,cAAA;EAAA;EAAA,iCAE6B,YAAA,CAAa,UAAA,GAC5C,UAAA,EAAY,iBAAA,EACZ,OAAA;IAAY,MAAA;EAAA,IACX,SAAA,CACD,YAAA,CAAa,YAAA,CAAa,UAAA,IAC1B,YAAA,CAAa,YAAA,CAAa,iBAAA;IACxB,cAAA;EAAA;AAAA;;;;;;;;UAYW,qBAAA,iCAAsD,aAAA,CAAc,UAAA,EAAY,UAAA;EAAA,IAC3F,YAAA,CAAa,YAAA,CAAa,UAAA;AAAA"}
1
+ {"version":3,"file":"utils.d.ts","names":[],"sources":["../src/utils.ts"],"mappings":";;;;;;;;;;;;UA+BiB,cAAc,YAAY;SAClC,0BAA0B,aAAa,aAC5C,YAAY,mBACZ;IAAW;MACV,UACD,aAAa,aAAa,cAC1B,aAAa,aAAa;IACxB;;SAEG,0BAA0B,aAAa,aAC5C,YAAY,mBACZ;IAAY;MACX,UACD,aAAa,aAAa,cAC1B,aAAa,aAAa;IACxB;;;;;;;;;;UAYW,sBAAsB,YAAY,oBAAoB,cAAc,YAAY;MAC3F,aAAa,aAAa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "My shared configs for TS projects",
5
5
  "homepage": "https://github.com/adamhl8/configs",
6
6
  "bugs": {
@@ -45,29 +45,29 @@
45
45
  "prepare": "just prepare"
46
46
  },
47
47
  "dependencies": {
48
- "@adamhl8/eslint-plugin-clean-modules": "^0.1.3",
48
+ "@adamhl8/eslint-plugin-clean-modules": "^0.1.4",
49
49
  "@commitlint/config-conventional": "^21.2.0",
50
50
  "@commitlint/types": "^21.2.0",
51
51
  "arkenv": "^0.12.2",
52
- "arktype": "^2.2.2",
52
+ "arktype": "^2.2.3",
53
53
  "es-toolkit": "^1.49.0",
54
54
  "ts-explicit-errors": "^4.1.2",
55
- "type-fest": "^5.7.0"
55
+ "type-fest": "^5.8.0"
56
56
  },
57
57
  "devDependencies": {
58
58
  "@arethetypeswrong/core": "^0.18.4",
59
- "@commitlint/cli": "^21.2.0",
60
- "@types/node": "^26.1.0",
61
- "knip": "^6.24.0",
59
+ "@commitlint/cli": "^21.2.1",
60
+ "@types/node": "^26.1.1",
61
+ "knip": "^6.25.0",
62
62
  "markdown-toc": "^1.2.0",
63
- "oxfmt": "^0.57.0",
64
- "oxlint": "^1.72.0",
63
+ "oxfmt": "^0.58.0",
64
+ "oxlint": "^1.73.0",
65
65
  "oxlint-tsgolint": "^0.24.0",
66
66
  "publint": "^0.3.21",
67
67
  "release-it": "^20.2.1",
68
- "tsdown": "^0.22.3",
69
- "typescript": "^6.0.3",
70
- "vitest": "^4.1.9"
68
+ "tsdown": "^0.22.4",
69
+ "typescript": "^7.0.2",
70
+ "vitest": "^4.1.10"
71
71
  },
72
72
  "peerDependencies": {
73
73
  "@arethetypeswrong/core": ">=0.18",
@@ -121,5 +121,12 @@
121
121
  "vitest": {
122
122
  "optional": true
123
123
  }
124
+ },
125
+ "devEngines": {
126
+ "packageManager": {
127
+ "name": "nub",
128
+ "version": "^0.4.4",
129
+ "onFail": "warn"
130
+ }
124
131
  }
125
132
  }