@ethlete/agent-rules 0.1.0-next.13 → 0.1.0-next.14
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/CHANGELOG.md +7 -0
- package/content/skills/sdk-update/SKILL.md +88 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @ethlete/agent-rules
|
|
2
2
|
|
|
3
|
+
## 0.1.0-next.14
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#3075](https://github.com/ethlete-io/ethdk/pull/3075) [`1d38e7e`](https://github.com/ethlete-io/ethdk/commit/1d38e7e0a025769f065d8ca7d506cb75ad89139a) Thanks [@github-actions](https://github.com/apps/github-actions)! - `et update` moves the `@ethlete/*` packages to a newer version, runs the codemods those versions
|
|
8
|
+
declare in their own `migrations.json`, and reports what needs a decision or an agent.
|
|
9
|
+
|
|
3
10
|
## 0.1.0-next.13
|
|
4
11
|
|
|
5
12
|
### Minor Changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sdk-update
|
|
3
|
+
description: Update the @ethlete/* packages in this repo with `et update`, and work the migration tasks it leaves behind - the codemods it runs itself, the recommendations a human must decide, and the tasks written as a prompt for you. Read whenever this repo moves to a newer @ethlete version, when a task list under .ethlete/update is present, or when the user asks you to apply an SDK migration.
|
|
4
|
+
kind: skill
|
|
5
|
+
scope: consumer
|
|
6
|
+
requires: ['@ethlete/cli']
|
|
7
|
+
vars: [docsBaseUrl, lintCommand]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Updating the @ethlete SDK
|
|
11
|
+
|
|
12
|
+
`et update` moves this repo's `@ethlete/*` dependencies to a newer version and runs the migrations
|
|
13
|
+
those versions ship. Never bump an `@ethlete/*` range by hand: the version that lands is what selects
|
|
14
|
+
the migrations, so a hand-written bump skips every one of them silently.
|
|
15
|
+
|
|
16
|
+
## 1. See what is pending
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
yarn et update --check
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
It prints one line per package, `installed → target`, and exits 1 while an update is pending. It
|
|
23
|
+
writes nothing. The target follows the dist tag the installed version is on: a repo on a `-next`
|
|
24
|
+
prerelease stays on `next`.
|
|
25
|
+
|
|
26
|
+
Name a package to limit the run, short or in full:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
yarn et update core # only @ethlete/core
|
|
30
|
+
yarn et update core --to 5.0.0-next.55
|
|
31
|
+
yarn et update --tag latest # leave the prerelease line
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## 2. Run it
|
|
35
|
+
|
|
36
|
+
The working tree must be clean - the codemods rewrite files, and you need a diff you can read.
|
|
37
|
+
Commit or stash first, then:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
yarn et update
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
In order, it writes the new ranges into `package.json`, runs the install, reads the migrations out of
|
|
44
|
+
the freshly installed packages, runs every codemod, and writes what is left to `.ethlete/update`.
|
|
45
|
+
|
|
46
|
+
If the install or a codemod fails, the run stops and leaves `.ethlete/update/pending.json` behind.
|
|
47
|
+
Fix the cause, then continue - do not start over, or the migrations of the versions already installed
|
|
48
|
+
are skipped:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
yarn et update --continue
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 3. Work the task list
|
|
55
|
+
|
|
56
|
+
Two files describe what is left. Read the JSON one when you work through the list yourself:
|
|
57
|
+
|
|
58
|
+
| File | What it holds |
|
|
59
|
+
| --------------------------------- | --------------------------------------------------------------------- |
|
|
60
|
+
| `.ethlete/update/tasks.md` | The report for a human: what moved, what applied, what is left |
|
|
61
|
+
| `.ethlete/update/tasks.json` | The same tasks as data: `kind`, `instructionsFile`, `docsUrl` |
|
|
62
|
+
| `.ethlete/update/<pkg>-<name>.md` | One task in full: what moved, plus the instructions the package ships |
|
|
63
|
+
|
|
64
|
+
Every task carries a `kind`, and the kind decides who acts:
|
|
65
|
+
|
|
66
|
+
- **`assisted`** - written for you. The task file states one change to apply across this repo. Read the
|
|
67
|
+
whole file before the first edit, then apply it. These are the changes no codemod can make, so expect
|
|
68
|
+
a decision per call site rather than one pattern.
|
|
69
|
+
- **`manual`** - a recommendation for the developer. It needs a product or design decision, or a
|
|
70
|
+
command with answers only they have. Do not guess the answer. Report the task and what it needs.
|
|
71
|
+
- **`unsupported`** - a codemod that could not run here, because this repo has no Nx. The task carries
|
|
72
|
+
the exact command. Ask before running it: it rewrites files.
|
|
73
|
+
|
|
74
|
+
## 4. Finish
|
|
75
|
+
|
|
76
|
+
1. Run the type check and `{%lintCommand%}` for every project you changed.
|
|
77
|
+
2. Run the tests that cover what you touched.
|
|
78
|
+
3. Delete the task files you finished under `.ethlete/update`, and leave the ones you could not decide.
|
|
79
|
+
4. Tell the user, per task: what you changed, and what still needs their decision.
|
|
80
|
+
|
|
81
|
+
## Rules
|
|
82
|
+
|
|
83
|
+
- **Never invent a migration.** Only the tasks in `.ethlete/update` and the guides they link are real.
|
|
84
|
+
A rewrite you reasoned out from a version number is a guess.
|
|
85
|
+
- **Never edit the generated report to make it look done.** Deleting a finished task file is right;
|
|
86
|
+
deleting an entry you did not work is not.
|
|
87
|
+
- **One task at a time.** Each has its own diff, so a failure stays readable.
|
|
88
|
+
- The version notes and every guide a task links live at {%docsBaseUrl%}.
|