@rose42/t3-feedback 0.1.0 → 0.1.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
@@ -480,37 +480,18 @@ pnpm dev
480
480
 
481
481
  ## Release
482
482
 
483
- Releases are driven by **version tags** (`vX.Y.Z`). Pushing a tag runs CI: verify → GitLab Release (dist tarball in the package registry) → publish to public npm.
483
+ Releases are driven by **version tags** (`vX.Y.Z`). Pushing a tag runs CI: verify → GitLab Release (dist tarball in the package registry) → publish to public npm via **OIDC trusted publishing** (no `NPM_TOKEN`).
484
484
 
485
485
  CI installs `@rose42/feedback-capture@0.1.0` from npm. Local/devcontainer work
486
486
  symlinks a sibling [`feedback-capture`](https://gitlab.com/rose42/feedback-capture) clone
487
487
  into `node_modules` without changing the declared dependency.
488
488
 
489
- ### One-time npm + GitLab setup
490
-
491
- 1. Create or join the **`rose42`** org on [npmjs.com](https://www.npmjs.com) with permission to publish `@rose42/*`.
492
- 2. Create an npm **Automation** (or granular) access token with publish rights for `@rose42/t3-feedback` (or the whole `@rose42` org).
493
- 3. In GitLab: **Settings → CI/CD → Variables** → add:
494
- - Key: `NPM_TOKEN`
495
- - Value: the token
496
- - Flags: **Masked**; use **Protected** only if `v*` tags are protected (otherwise leave Protected off so tag pipelines can read it).
497
- 4. Optional local check: `pnpm login` then `pnpm publish --dry-run --access public`.
498
-
499
- ### Cut a release
500
-
501
- Requires a clean git worktree. Bumps `package.json`, commits, tags `vX.Y.Z`, and pushes (with `--follow-tags`) so the tag pipeline runs. Ensure `NPM_TOKEN` is set in GitLab before the first publish.
489
+ See [docs/release.md](docs/release.md) for trusted-publisher setup, post-publish hardening, and cutting a release:
502
490
 
503
491
  ```bash
504
- pnpm release -- 0.1.0 # first release
505
- # later:
506
- pnpm release -- patch # or: minor | major
492
+ pnpm release -- patch # or 0.1.1 / minor / major
507
493
  ```
508
494
 
509
- After the pipeline succeeds:
510
-
511
- - npm: [`@rose42/t3-feedback`](https://www.npmjs.com/package/@rose42/t3-feedback)
512
- - GitLab: **Deploy → Releases** (asset links to the generic package tarball)
513
-
514
495
  ## License
515
496
 
516
497
  MIT © Rose42
package/dist/cli/bin.js CHANGED
File without changes
@@ -0,0 +1,47 @@
1
+ # Release
2
+
3
+ Releases are driven by **version tags** (`vX.Y.Z`). Pushing a tag runs CI:
4
+
5
+ **verify** → **GitLab Release** (dist tarball in the package registry) → **npm publish** via OIDC trusted publishing.
6
+
7
+ CI uses the `node:24` image (npm ≥ 11.5.1). Publish must run on **GitLab.com shared runners** — self-hosted runners are not supported for npm OIDC.
8
+
9
+ ## One-time npm trusted publisher setup
10
+
11
+ 1. Create or join the **`rose42`** org on [npmjs.com](https://www.npmjs.com) with permission to publish `@rose42/*`.
12
+ 2. On the package page for [`@rose42/t3-feedback`](https://www.npmjs.com/package/@rose42/t3-feedback): **Settings → Trusted Publishing → GitLab CI/CD**. Configure (values are case-sensitive):
13
+ - **Namespace**: `rose42`
14
+ - **Project name**: `t3-feedback`
15
+ - **Top-level CI file path**: `.gitlab-ci.yml`
16
+ - **Environment name**: leave empty (this pipeline does not use GitLab environments)
17
+ - **Allowed actions**: at least `npm publish`
18
+ 3. Do **not** add an `NPM_TOKEN` CI variable or write `_authToken` into `.npmrc` for publish. The `publish` job requests `NPM_ID_TOKEN` (audience `npm:registry.npmjs.org`); the npm CLI exchanges that OIDC token for a short-lived publish credential. A fallback token overrides OIDC and breaks the flow.
19
+ 4. Optional local check: `pnpm login` then `pnpm publish --dry-run --access public`.
20
+
21
+ ### After the first successful tag publish
22
+
23
+ 1. In GitLab: **Settings → CI/CD → Variables** — remove `NPM_TOKEN` if it still exists (or stop using it).
24
+ 2. Optionally on npm → package **Settings → Publishing access**: require 2FA and disallow tokens.
25
+
26
+ ## Cut a release
27
+
28
+ Requires a clean git worktree. Bumps `package.json`, commits, tags `vX.Y.Z`, and pushes (with `--follow-tags`) so the tag pipeline runs.
29
+
30
+ ```bash
31
+ pnpm release -- 0.1.0 # first release (exact version)
32
+ # later:
33
+ pnpm release -- patch # or: minor | major
34
+ ```
35
+
36
+ After the pipeline succeeds:
37
+
38
+ - npm: [`@rose42/t3-feedback`](https://www.npmjs.com/package/@rose42/t3-feedback)
39
+ - GitLab: **Deploy → Releases** (asset links to the generic package tarball)
40
+
41
+ ## CI publish job (OIDC)
42
+
43
+ The `publish` job in [`.gitlab-ci.yml`](../.gitlab-ci.yml):
44
+
45
+ - Requests `NPM_ID_TOKEN` with `aud: "npm:registry.npmjs.org"`
46
+ - Optionally requests `SIGSTORE_ID_TOKEN` with `aud: sigstore` for provenance
47
+ - Runs `pnpm publish --access public --no-git-checks` with **no** `~/.npmrc` `_authToken`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rose42/t3-feedback",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "type": "module",
5
5
  "description": "DEV-only: capture app feedback and send it to a T3 Code thread (unofficial community tool)",
6
6
  "license": "MIT",
@@ -58,27 +58,9 @@
58
58
  "docs",
59
59
  "!dist/**/*.map"
60
60
  ],
61
- "scripts": {
62
- "dev": "tsc -p tsconfig.build.json --watch",
63
- "build": "rm -rf dist && tsc -p tsconfig.build.json",
64
- "typecheck": "tsc -p tsconfig.json --noEmit",
65
- "lint": "eslint .",
66
- "format": "prettier --write .",
67
- "format:check": "prettier --check .",
68
- "test": "vitest run",
69
- "test:watch": "vitest",
70
- "release": "bash scripts/release.sh",
71
- "prepublishOnly": "pnpm typecheck && pnpm lint && pnpm test && pnpm build"
72
- },
73
61
  "engines": {
74
62
  "node": ">=24"
75
63
  },
76
- "packageManager": "pnpm@10.21.0",
77
- "pnpm": {
78
- "onlyBuiltDependencies": [
79
- "esbuild"
80
- ]
81
- },
82
64
  "dependencies": {
83
65
  "@rose42/feedback-capture": "0.1.0",
84
66
  "ws": "^8.18.3"
@@ -103,5 +85,16 @@
103
85
  "typescript-eslint": "^8.46.4",
104
86
  "vite": "^7.0.0",
105
87
  "vitest": "^3.2.7"
88
+ },
89
+ "scripts": {
90
+ "dev": "tsc -p tsconfig.build.json --watch",
91
+ "build": "rm -rf dist && tsc -p tsconfig.build.json",
92
+ "typecheck": "tsc -p tsconfig.json --noEmit",
93
+ "lint": "eslint .",
94
+ "format": "prettier --write .",
95
+ "format:check": "prettier --check .",
96
+ "test": "vitest run",
97
+ "test:watch": "vitest",
98
+ "release": "bash scripts/release.sh"
106
99
  }
107
- }
100
+ }