@adamhl8/configs 1.2.0 → 1.2.1

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
@@ -177,6 +177,18 @@ jobs:
177
177
  uses: adamhl8/configs/.github/workflows/ci.yml@main
178
178
  ```
179
179
 
180
+ The `just build` step runs with `GITHUB_TOKEN` set, for builds that call the GitHub API. It comes from the optional `GH_TOKEN` secret (see [Secrets](#secrets)): the names differ because Actions secrets can't be named `GITHUB_*`, so a build reading `GITHUB_TOKEN` can't be fed by a secret of the same name.
181
+
182
+ When the secret is unset it falls back to the workflow's auto-provisioned token, so fork PRs (which receive no secrets) still build. To supply your own token, pass it. Prefer naming it over `secrets: inherit` here: CI runs on every PR, so it shouldn't be handed the release and deploy secrets it never uses.
183
+
184
+ ```yaml
185
+ jobs:
186
+ ci:
187
+ uses: adamhl8/configs/.github/workflows/ci.yml@main
188
+ secrets:
189
+ GH_TOKEN: ${{ secrets.GH_TOKEN }}
190
+ ```
191
+
180
192
  ### Update dependencies
181
193
 
182
194
  Needs the `CI_TOKEN` secret (see [Secrets](#secrets)).
@@ -220,6 +232,7 @@ Configure these on each repo that uses the workflows (Settings -> Secrets and va
220
232
  | Secret | Used by | What it is |
221
233
  | ---------------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
222
234
  | `CI_TOKEN` | `update-deps.yml` | PAT with `contents` and `pull-requests` write, so the opened PR triggers CI |
235
+ | `GH_TOKEN` | `ci.yml` | Optional. PAT for a build that calls the GitHub API. Reaches the build as `GITHUB_TOKEN`. Unset, the build falls back to the automatic token. |
223
236
  | `NPM_CI_TOKEN` | `release.yml` | npm automation token with publish access |
224
237
  | `CI_SIGNING_KEY` | `release.yml` | Private SSH key that signs the release commit and tag. Add the matching public key to your GitHub account as a Signing Key so the signature verifies as you. Use a dedicated, passphrase-less key, not your personal auth key. |
225
238
 
@@ -14,9 +14,7 @@ declare const baseConfig: {
14
14
  readonly hash: false;
15
15
  readonly dts: {
16
16
  readonly newContext: true;
17
- readonly tsgo: {
18
- readonly path: "./node_modules/.bin/tsc";
19
- };
17
+ readonly tsgo: true;
20
18
  readonly sourcemap: true;
21
19
  };
22
20
  readonly deps: {
@@ -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;;;aAGA;aACA;;;;;cAkBS,cAAc,cAAc,yBAAyB;cAIrD,iBAAe,sBAAA;;;;;;aA1BxB"}
1
+ {"version":3,"file":"tsdown.base.d.ts","names":[],"sources":["../../src/configs/tsdown.base.ts"],"mappings":";;;;KAOK,mBAAmB,YAAY;cAE9B;;;;;;;;;;aAUF;aACA;aACA;;;aAGA;;;aAGA;aACA;;;;;cAkBS,cAAc,cAAc,yBAAyB;cAIrD,iBAAe,sBAAA;;;;;;aA1BxB"}
@@ -11,7 +11,7 @@ const baseConfig = {
11
11
  hash: false,
12
12
  dts: {
13
13
  newContext: true,
14
- tsgo: { path: "./node_modules/.bin/tsc" },
14
+ tsgo: true,
15
15
  sourcemap: true
16
16
  },
17
17
  deps: { neverBundle: ["bun"] },
@@ -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 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
+ {"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 tsgo: true,\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;EACZ,MAAM;EACN,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "My shared configs for TS projects",
5
5
  "homepage": "https://github.com/adamhl8/configs",
6
6
  "bugs": {
@@ -69,7 +69,7 @@
69
69
  "oxlint-tsgolint": "^0.24.0",
70
70
  "publint": "^0.3.21",
71
71
  "release-it": "^20.2.1",
72
- "tsdown": "^0.22.4",
72
+ "tsdown": "^0.22.5",
73
73
  "typescript": "^7.0.2"
74
74
  },
75
75
  "peerDependencies": {