@doki-land/nifty-skills 0.0.4 → 0.0.6
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 +52 -50
- package/package.json +15 -10
- package/skills/nifty/SKILL.md +64 -60
- package/skills/nifty-commit/SKILL.md +70 -63
- package/skills/nifty-git-history/SKILL.md +84 -74
- package/skills/nifty-release/SKILL.md +113 -106
package/README.md
CHANGED
|
@@ -1,50 +1,52 @@
|
|
|
1
|
-
# `@doki-land/nifty-skills`
|
|
2
|
-
|
|
3
|
-
[Agent Skills](https://agentskills.io/specification) for [**Nifty**](https://www.npmjs.com/package/@doki-land/nifty) —
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Install
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
|
27
|
-
|
|
28
|
-
| `nifty
|
|
29
|
-
| `nifty-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
- [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
1
|
+
# `@doki-land/nifty-skills`
|
|
2
|
+
|
|
3
|
+
[Agent Skills](https://agentskills.io/specification) for [**Nifty**](https://www.npmjs.com/package/@doki-land/nifty) —
|
|
4
|
+
gitmoji commit conventions, hybrid Cargo + npm release workflows, and gix-backed git history tools.
|
|
5
|
+
|
|
6
|
+
This package is **docs-only**. It teaches agents how to invoke the published `nifty` CLI. It does not replace
|
|
7
|
+
`@doki-land/nifty` or its native bindings.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
Install one skill into a project (requires Node.js 18+):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx skills add @doki-land/nifty-skills --skill nifty -y
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
List available skills or install globally:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx skills add @doki-land/nifty-skills --list
|
|
21
|
+
npx skills add @doki-land/nifty-skills --skill nifty-release -y -g
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Skills
|
|
25
|
+
|
|
26
|
+
| Skill | Load when |
|
|
27
|
+
|---------------------|----------------------------------------------------------------------------|
|
|
28
|
+
| `nifty` | User mentions Nifty tooling, hybrid monorepos, or you need the command map |
|
|
29
|
+
| `nifty-commit` | Gitmoji commit lint, subject format, `nifty lint` / `nifty check` |
|
|
30
|
+
| `nifty-release` | `nifty bump`, `publish`, `trust`, `upload`, `change-logs`, CI release |
|
|
31
|
+
| `nifty-git-history` | `nifty commit`, `nifty retime`, object-layer history apply |
|
|
32
|
+
|
|
33
|
+
## Prerequisites
|
|
34
|
+
|
|
35
|
+
Consumers need the CLI:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npm install @doki-land/nifty
|
|
39
|
+
nifty --help
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Monorepo authors can use `pnpm exec nifty` after `pnpm install` in [npm-tools](https://github.com/oovm/npm-tools).
|
|
43
|
+
|
|
44
|
+
## Links
|
|
45
|
+
|
|
46
|
+
- [npm package](https://www.npmjs.com/package/@doki-land/nifty-skills)
|
|
47
|
+
- [Nifty CLI](https://www.npmjs.com/package/@doki-land/nifty)
|
|
48
|
+
- [Source](https://github.com/oovm/npm-tools/tree/dev/projects/packages/nifty-skills)
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
[MPL-2.0](https://www.npmjs.com/package/@doki-land/nifty-skills?activeTab=code)
|
package/package.json
CHANGED
|
@@ -1,26 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
},
|
|
2
|
+
"name": "@doki-land/nifty-skills",
|
|
3
|
+
"version": "0.0.6",
|
|
5
4
|
"description": "Agent Skills for Nifty gitmoji commits, npm release, and git history tooling",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MPL-2.0",
|
|
6
7
|
"files": [
|
|
7
8
|
"skills",
|
|
8
9
|
"README.md"
|
|
9
10
|
],
|
|
10
|
-
"homepage": "https://github.com/oovm/npm-tools/tree/dev/projects/packages/nifty-skills#readme",
|
|
11
|
-
"license": "MPL-2.0",
|
|
12
|
-
"name": "@doki-land/nifty-skills",
|
|
13
11
|
"publishConfig": {
|
|
14
12
|
"access": "public"
|
|
15
13
|
},
|
|
16
14
|
"repository": {
|
|
17
|
-
"directory": "projects/packages/nifty-skills",
|
|
18
15
|
"type": "git",
|
|
19
|
-
"url": "git+https://github.com/oovm/npm-tools.git"
|
|
16
|
+
"url": "git+https://github.com/oovm/npm-tools.git",
|
|
17
|
+
"directory": "projects/packages/nifty-skills"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/oovm/npm-tools/tree/dev/projects/packages/nifty-skills#readme",
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/oovm/npm-tools/issues"
|
|
20
22
|
},
|
|
21
23
|
"scripts": {
|
|
22
24
|
"typecheck": "node -e \"console.log('docs-only skill package')\""
|
|
23
25
|
},
|
|
24
|
-
"
|
|
25
|
-
|
|
26
|
+
"optionalDependencies": {
|
|
27
|
+
"@doki-land/nifty-win32-x64": "0.0.6",
|
|
28
|
+
"@doki-land/nifty-linux-x64": "0.0.6",
|
|
29
|
+
"@doki-land/nifty-darwin-arm64": "0.0.6"
|
|
30
|
+
}
|
|
26
31
|
}
|
package/skills/nifty/SKILL.md
CHANGED
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nifty
|
|
3
|
-
description: >-
|
|
4
|
-
Orchestrate Nifty CLI workflows for gitmoji commits, hybrid Cargo + npm release,
|
|
5
|
-
and gix-backed git history tools. Load when the user mentions nifty, @doki-land/nifty,
|
|
6
|
-
gitmoji release tooling, or npm-tools monorepo helpers.
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
# Nifty
|
|
10
|
-
|
|
11
|
-
[Nifty](https://www.npmjs.com/package/@doki-land/nifty) is gitmoji-first release tooling for hybrid **Cargo + npm**
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
| `nifty
|
|
33
|
-
| `nifty
|
|
34
|
-
| `nifty
|
|
35
|
-
| `nifty
|
|
36
|
-
| `nifty
|
|
37
|
-
| `nifty
|
|
38
|
-
| `nifty
|
|
39
|
-
| `nifty
|
|
40
|
-
| `nifty
|
|
41
|
-
| `nifty
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
1
|
+
---
|
|
2
|
+
name: nifty
|
|
3
|
+
description: >-
|
|
4
|
+
Orchestrate Nifty CLI workflows for gitmoji commits, hybrid Cargo + npm release,
|
|
5
|
+
and gix-backed git history tools. Load when the user mentions nifty, @doki-land/nifty,
|
|
6
|
+
gitmoji release tooling, or npm-tools monorepo helpers.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Nifty
|
|
10
|
+
|
|
11
|
+
[Nifty](https://www.npmjs.com/package/@doki-land/nifty) is gitmoji-first release tooling for hybrid **Cargo + npm**
|
|
12
|
+
workspaces. Native git work uses **gix** (Rust). Changelog tag ranges use the `git` CLI.
|
|
13
|
+
|
|
14
|
+
## Before you act
|
|
15
|
+
|
|
16
|
+
1. Confirm `@doki-land/nifty` is installed (`nifty --help`) or use `pnpm exec nifty` in the npm-tools repo.
|
|
17
|
+
2. Look for `nifty.config.ts` at the project root (`defineConfig`, `authorMap`, `publish.packages`, `changelog.*`).
|
|
18
|
+
3. Load a focused sub-skill when the task is narrow (see table below).
|
|
19
|
+
|
|
20
|
+
## Sub-skills
|
|
21
|
+
|
|
22
|
+
| Task | Skill |
|
|
23
|
+
|----------------------------------------------------------------------|---------------------|
|
|
24
|
+
| Commit subject lint, gitmoji rules | `nifty-commit` |
|
|
25
|
+
| Version bump, npm publish/trust, GitHub upload, reference changelogs | `nifty-release` |
|
|
26
|
+
| Object-layer commit apply/retime | `nifty-git-history` |
|
|
27
|
+
|
|
28
|
+
## Command map
|
|
29
|
+
|
|
30
|
+
| Command | Purpose |
|
|
31
|
+
|----------------------------------------------|----------------------------------------------------------------|
|
|
32
|
+
| `nifty lint` / `nifty check` | Workspace gitmoji + cargo hygiene |
|
|
33
|
+
| `nifty commit scan` / `nifty commit audit` | Commit-only gitmoji + message hygiene |
|
|
34
|
+
| `nifty commit export` / `nifty commit apply` | Export/apply commit message maps at the object layer |
|
|
35
|
+
| `nifty bump` | Align crate + package versions |
|
|
36
|
+
| `nifty publish` | Publish workspace npm packages (OIDC or token + TOTP) |
|
|
37
|
+
| `nifty trust` | Configure npm Trusted Publisher |
|
|
38
|
+
| `nifty update` | Bump Cargo and npm dependencies |
|
|
39
|
+
| `nifty format` | Format Rust via `cargo fmt` and JS/TS/JSON via `oxc_formatter` |
|
|
40
|
+
| `nifty upload` | GitHub Release assets or GitHub Pages |
|
|
41
|
+
| `nifty install-native` | Stage CI `.node` artifacts into platform packages |
|
|
42
|
+
| `nifty retime` | Spread timestamps on a new branch |
|
|
43
|
+
| `nifty change-logs` | Draft release reference changelogs from tags |
|
|
44
|
+
|
|
45
|
+
Global flag: `-C, --cwd <dir>`.
|
|
46
|
+
|
|
47
|
+
## Layout (npm-tools monorepo)
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
projects/crates/ # Rust libraries + nifty-napi
|
|
51
|
+
projects/packages/ # @doki-land/nifty + platform @doki-land/nifty-*
|
|
52
|
+
scripts/ci/ # publish-npm.mjs, nifty.mjs
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Do **not** confuse npm-tools `legion` / Valkyrie with Nifty. Nifty is independent Node-API + TypeScript CLI tooling.
|
|
56
|
+
|
|
57
|
+
## Agent discipline
|
|
58
|
+
|
|
59
|
+
- Prefer **`nifty` CLI** over reimplementing git/npm steps in ad-hoc scripts.
|
|
60
|
+
- Run **`nifty commit audit`** or **`nifty check --from … --to …`** before claiming commit history is clean.
|
|
61
|
+
- For publish/trust, follow **`nifty-release`**: `nifty publish` skips registry versions that already exist. Run **
|
|
62
|
+
`nifty trust`** after the first publish of any new package name.
|
|
63
|
+
- Object-layer history (**commit apply** / **retime**) rewrites refs — warn the user and require explicit `--dry-run`
|
|
64
|
+
first when appropriate.
|
|
@@ -1,63 +1,70 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nifty-commit
|
|
3
|
-
description: >-
|
|
4
|
-
Lint and enforce Nifty gitmoji commit conventions with nifty lint and nifty
|
|
5
|
-
Load when fixing commit subjects, gitmoji format, or pre-release commit hygiene.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Nifty commit conventions
|
|
9
|
-
|
|
10
|
-
## Subject shape
|
|
11
|
-
|
|
12
|
-
Every commit **subject** (first line) must:
|
|
13
|
-
|
|
14
|
-
1. Start with a **known gitmoji** immediately followed by a **space**
|
|
15
|
-
2. Use an **English** imperative phrase after the gitmoji (project convention for publish repos)
|
|
16
|
-
3. Match `gitmoji + body` formatting rules enforced by `nifty lint`
|
|
17
|
-
|
|
18
|
-
Known gitmojis (Nifty default set):
|
|
19
|
-
|
|
20
|
-
```text
|
|
21
|
-
✨ 🎨 🚀 🐛 🚑 🔥 💥 ♻️ 🔧 📝 👷 🧹 ⬆️ 🧪 🔨 📦
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
## Commands
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
#
|
|
28
|
-
nifty lint --from v0.0.1 --to HEAD
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
|
42
|
-
|
|
43
|
-
| `gitmoji/
|
|
44
|
-
| `gitmoji/
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
1
|
+
---
|
|
2
|
+
name: nifty-commit
|
|
3
|
+
description: >-
|
|
4
|
+
Lint and enforce Nifty gitmoji commit conventions with nifty lint, nifty check, and nifty commit scan/audit.
|
|
5
|
+
Load when fixing commit subjects, gitmoji format, or pre-release commit hygiene.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Nifty commit conventions
|
|
9
|
+
|
|
10
|
+
## Subject shape
|
|
11
|
+
|
|
12
|
+
Every commit **subject** (first line) must:
|
|
13
|
+
|
|
14
|
+
1. Start with a **known gitmoji** immediately followed by a **space**
|
|
15
|
+
2. Use an **English** imperative phrase after the gitmoji (project convention for publish repos)
|
|
16
|
+
3. Match `gitmoji + body` formatting rules enforced by `nifty lint`
|
|
17
|
+
|
|
18
|
+
Known gitmojis (Nifty default set):
|
|
19
|
+
|
|
20
|
+
```text
|
|
21
|
+
✨ 🎨 🚀 🐛 🚑 🔥 💥 ♻️ 🔧 📝 👷 🧹 ⬆️ 🧪 🔨 📦
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Commands
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Workspace lint (commits + optional cargo hygiene)
|
|
28
|
+
nifty lint --from v0.0.1 --to HEAD
|
|
29
|
+
nifty check --from origin/dev..HEAD
|
|
30
|
+
|
|
31
|
+
# Commit-only scan/audit (gitmoji + semver/semicolon/backtick hygiene)
|
|
32
|
+
nifty commit scan --from d25daeba^ --to HEAD
|
|
33
|
+
nifty commit audit --from d25daeba^ --to HEAD
|
|
34
|
+
|
|
35
|
+
# Lint explicit strings
|
|
36
|
+
nifty lint --subject "✨ Add feature"
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Rules (nifty-linter)
|
|
40
|
+
|
|
41
|
+
| Rule | Default | Meaning |
|
|
42
|
+
|-----------------------|---------|-------------------------------------------|
|
|
43
|
+
| `gitmoji/subject` | error | Subject must start with gitmoji + space |
|
|
44
|
+
| `gitmoji/known` | error | Gitmoji must be in the known list |
|
|
45
|
+
| `gitmoji/body` | warning | Text after gitmoji must not be empty |
|
|
46
|
+
| `gitmoji/format` | warning | Subject should match canonical formatting |
|
|
47
|
+
| `commit/semver` | error | Semver must not appear in subject/body |
|
|
48
|
+
| `commit/semicolon` | error | Message must not contain `;` or `;` |
|
|
49
|
+
| `commit/bare-package` | error | Scoped npm names must use backticks |
|
|
50
|
+
| `commit/bare-symbol` | warning | Common identifiers should use backticks |
|
|
51
|
+
|
|
52
|
+
## Commit message style (when you write commits)
|
|
53
|
+
|
|
54
|
+
Align with Nifty/npm-tools git policy when the user asks you to commit:
|
|
55
|
+
|
|
56
|
+
- Subject starts with one real gitmoji character
|
|
57
|
+
- Subject and body in **English**
|
|
58
|
+
- No Conventional Commit prefix (`feat:`, `fix:`) instead of gitmoji
|
|
59
|
+
- Wrap identifiers in backticks: `` `nifty-skills` ``, `` `publish-npm.mjs` ``
|
|
60
|
+
- No semicolons in commit messages
|
|
61
|
+
- One gitmoji at the start of the subject only
|
|
62
|
+
|
|
63
|
+
## Workflow
|
|
64
|
+
|
|
65
|
+
1. Run `nifty commit scan` on the range about to merge or release.
|
|
66
|
+
2. Fix subjects locally or plan a **`nifty commit export` / `nifty commit apply`** pass (see `nifty-git-history`) for
|
|
67
|
+
history already pushed.
|
|
68
|
+
3. Re-run `nifty commit audit` until exit code is 0.
|
|
69
|
+
|
|
70
|
+
Do not bypass lint with custom regex when `nifty commit scan` is available.
|
|
@@ -1,74 +1,84 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nifty-git-history
|
|
3
|
-
description: >-
|
|
4
|
-
Object-layer git history tools: nifty
|
|
5
|
-
Load when rewriting commit messages or timestamps while preserving author identity.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Nifty git history
|
|
9
|
-
|
|
10
|
-
Implemented in `nifty-history` (gix). **Author and committer name/email are never replaced** with local `user.name` /
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
nifty
|
|
21
|
-
nifty
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
nifty retime
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
---
|
|
2
|
+
name: nifty-git-history
|
|
3
|
+
description: >-
|
|
4
|
+
Object-layer git history tools: nifty commit apply/export and nifty retime without interactive rebase.
|
|
5
|
+
Load when rewriting commit messages or timestamps while preserving author identity.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Nifty git history
|
|
9
|
+
|
|
10
|
+
Implemented in `nifty-history` (gix). **Author and committer name/email are never replaced** with local `user.name` /
|
|
11
|
+
`user.email` — only messages or timestamps change (plus parent relinking when ancestors rewrite).
|
|
12
|
+
|
|
13
|
+
Warn the user before rewriting shared branches. Prefer `--dry-run` first.
|
|
14
|
+
|
|
15
|
+
## Commit message map
|
|
16
|
+
|
|
17
|
+
Export JSON map, preview, apply:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
nifty commit export --base 34e1e665^ --ref dev --path commit.pending.json
|
|
21
|
+
nifty commit apply --base 34e1e665^ --ref dev --path commit.pending.json --dry-run
|
|
22
|
+
nifty commit apply --base 34e1e665^ --ref dev --path commit.pending.json
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Scan or audit the same commit range before editing:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
nifty commit scan --from 34e1e665^ --to dev
|
|
29
|
+
nifty commit audit --from 34e1e665^ --to dev
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Map format
|
|
33
|
+
|
|
34
|
+
Document shape:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"version": 1,
|
|
39
|
+
"entries": [
|
|
40
|
+
{ "hash": "abc123…", "message": "✨ Subject\n\nBody." }
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Flat `{ "abc12345": "message" }` is also accepted.
|
|
46
|
+
|
|
47
|
+
Hash prefixes must be **unique** within the rewrite range.
|
|
48
|
+
|
|
49
|
+
## Retime
|
|
50
|
+
|
|
51
|
+
Spread author and committer timestamps across a window. Writes a **new branch** (default `time-travel`); current branch
|
|
52
|
+
unchanged.
|
|
53
|
+
|
|
54
|
+
Range mode — commits in `(commit..tip]`:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
nifty retime 2a990148
|
|
58
|
+
nifty retime 2a990148 --start-date 2019-01-01 --end-date 2019-06-01 --branch dev-time-travel
|
|
59
|
+
nifty retime 2a990148 -s 2019-03-22T09:00:00 --tip HEAD
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Root mode — all commits from repository root through `tip`:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
nifty retime root
|
|
66
|
+
nifty retime root -s 2019-01-01 --message "🎂 Project initialized!" --branch time-travel
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Datetime: `YYYY-MM-DD` or `YYYY-MM-DDTHH:MM:SS`. End defaults to `start + N days` where `N` is commit count in range.
|
|
70
|
+
|
|
71
|
+
## Change logs (tag ranges)
|
|
72
|
+
|
|
73
|
+
For release reference drafts, use **`nifty-release`** (`nifty change-logs`). That command uses `git log` for tag ranges;
|
|
74
|
+
commit apply/retime use gix object writes.
|
|
75
|
+
|
|
76
|
+
## Safety
|
|
77
|
+
|
|
78
|
+
| Do | Do not |
|
|
79
|
+
|--------------------------------------------|----------------------------------------------------------------|
|
|
80
|
+
| `--dry-run` before `commit apply` | Force-push without user consent |
|
|
81
|
+
| Explicit `--ref` when HEAD is detached | Use `git rebase -i` when user asked for Nifty tools |
|
|
82
|
+
| Explain parent relink-only rows in dry-run | Amend commits with `git commit --amend` for bulk history fixes |
|
|
83
|
+
|
|
84
|
+
After apply, the user must force-update the target ref if it was already published.
|
|
@@ -1,106 +1,113 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: nifty-release
|
|
3
|
-
description: >-
|
|
4
|
-
Nifty release workflow: bump, publish, trust, upload, change-logs, and install-native.
|
|
5
|
-
Load when cutting versions, npm OIDC publish, Trusted Publisher, or GitHub Release assets.
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Nifty release
|
|
9
|
-
|
|
10
|
-
## Configuration
|
|
11
|
-
|
|
12
|
-
Create or extend `nifty.config.ts`:
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
export default {
|
|
16
|
-
githubToken: process.env.GITHUB_TOKEN,
|
|
17
|
-
authorMap: { "you@example.com": { login: "handle", id: 12345 } },
|
|
18
|
-
changelog: {
|
|
19
|
-
authorMap: "documentation/maintenance/author-github.json",
|
|
20
|
-
releasesDir: "documentation/maintenance/releases",
|
|
21
|
-
repo: "owner/name",
|
|
22
|
-
},
|
|
23
|
-
publish: {
|
|
24
|
-
packages: ["@scope/app", "@scope/app-native"],
|
|
25
|
-
},
|
|
26
|
-
};
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`publish.packages` lists every package name for **`nifty trust`**, including registry-only native sidecars.
|
|
30
|
-
|
|
31
|
-
## Version bump
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
nifty bump # patch
|
|
35
|
-
nifty bump minor
|
|
36
|
-
nifty bump --version 0.0.3
|
|
37
|
-
nifty bump --dry-run
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Aligns all `projects/crates/*/Cargo.toml` and `projects/packages/*/package.json` versions.
|
|
41
|
-
|
|
42
|
-
## npm publish and trust
|
|
43
|
-
|
|
44
|
-
**Default: publish the whole workspace.** Nifty walks packages in dependency order and **skips versions already on the
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
nifty
|
|
50
|
-
nifty
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
1
|
+
---
|
|
2
|
+
name: nifty-release
|
|
3
|
+
description: >-
|
|
4
|
+
Nifty release workflow: bump, publish, trust, upload, change-logs, and install-native.
|
|
5
|
+
Load when cutting versions, npm OIDC publish, Trusted Publisher, or GitHub Release assets.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Nifty release
|
|
9
|
+
|
|
10
|
+
## Configuration
|
|
11
|
+
|
|
12
|
+
Create or extend `nifty.config.ts`:
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
export default {
|
|
16
|
+
githubToken: process.env.GITHUB_TOKEN,
|
|
17
|
+
authorMap: { "you@example.com": { login: "handle", id: 12345 } },
|
|
18
|
+
changelog: {
|
|
19
|
+
authorMap: "documentation/maintenance/author-github.json",
|
|
20
|
+
releasesDir: "documentation/maintenance/releases",
|
|
21
|
+
repo: "owner/name",
|
|
22
|
+
},
|
|
23
|
+
publish: {
|
|
24
|
+
packages: ["@scope/app", "@scope/app-native"],
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`publish.packages` lists every package name for **`nifty trust`**, including registry-only native sidecars.
|
|
30
|
+
|
|
31
|
+
## Version bump
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
nifty bump # patch
|
|
35
|
+
nifty bump minor
|
|
36
|
+
nifty bump --version 0.0.3
|
|
37
|
+
nifty bump --dry-run
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Aligns all `projects/crates/*/Cargo.toml` and `projects/packages/*/package.json` versions.
|
|
41
|
+
|
|
42
|
+
## npm publish and trust
|
|
43
|
+
|
|
44
|
+
**Default: publish the whole workspace.** Nifty walks packages in dependency order and **skips versions already on the
|
|
45
|
+
registry** (cache + `npm view`). After a release you can run plain `nifty publish` again — only new or bumped packages
|
|
46
|
+
are uploaded.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
nifty publish --dry-run
|
|
50
|
+
nifty publish --access public
|
|
51
|
+
nifty trust --dry-run
|
|
52
|
+
nifty trust
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Optional subset (new package only, or retry one failure):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
nifty publish --package @doki-land/nifty-skills
|
|
59
|
+
nifty trust --only @doki-land/nifty-skills
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**First publish of a new package name** (e.g. `@doki-land/nifty-skills`): run **`nifty trust`** after `nifty publish` so
|
|
63
|
+
GitHub Actions OIDC can publish on the next tag. `nifty trust` uses `publish.packages` from `nifty.config.ts` when set,
|
|
64
|
+
otherwise all non-private workspace packages.
|
|
65
|
+
|
|
66
|
+
Local auth: `NPM_TOKEN`, `--npm-token`, `--otp`, or `--totp-secret` (see `nifty publish --help`). Trust live
|
|
67
|
+
configuration requires OTP/TOTP.
|
|
68
|
+
|
|
69
|
+
**npm-tools CI**: tag `vX.Y.Z` triggers `.github/workflows/publish-npm.yml` → `scripts/ci/publish-npm.mjs` (OIDC, no
|
|
70
|
+
long-lived token in YAML). Native `.node` files ship as `@doki-land/nifty-*` optional packages, not GitHub Release
|
|
71
|
+
assets.
|
|
72
|
+
|
|
73
|
+
## Reference changelogs
|
|
74
|
+
|
|
75
|
+
Output is a **draft index** for hand-editing release notes — not the published GitHub Release body.
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
nifty change-logs --version 0.0.3
|
|
79
|
+
nifty change-logs --from v0.0.2 --to v0.0.3
|
|
80
|
+
nifty change-logs --version 0.0.3 --write
|
|
81
|
+
nifty change-logs --tags
|
|
82
|
+
nifty change-logs lookup --email you@example.com --fetch
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Default paths: `documentation/maintenance/author-github.json`, `documentation/maintenance/releases/vX.Y.Z.reference.md`.
|
|
86
|
+
|
|
87
|
+
## GitHub upload
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
nifty upload --release --dir dist --tag v0.0.3 --token "$GITHUB_TOKEN"
|
|
91
|
+
nifty upload --pages --dir dist
|
|
92
|
+
nifty upload --both --dir dist --github-action
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
Platform `.node` binaries are **not** uploaded here — they publish via `nifty publish` / CI matrix.
|
|
96
|
+
|
|
97
|
+
## CI native staging (maintainers)
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
nifty install-native --from-artifacts path/to/native-artifacts
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Then `nifty publish` includes staged `@doki-land/nifty-<platform>` packages.
|
|
104
|
+
|
|
105
|
+
## Release checklist
|
|
106
|
+
|
|
107
|
+
1. `nifty check` on commits since last tag
|
|
108
|
+
2. `nifty bump` (or explicit version)
|
|
109
|
+
3. Commit version bump, tag `vX.Y.Z`, push branch + tag
|
|
110
|
+
4. `nifty publish` (skips packages already at that version on npm) — or let CI publish on tag
|
|
111
|
+
5. **`nifty trust`** for any **new** package name not yet on the Trusted Publisher list
|
|
112
|
+
6. `nifty change-logs --version X.Y.Z --write` for reference draft
|
|
113
|
+
7. `nifty upload --release …` when generic assets need GitHub Release upload
|