dsh-hot-reload 0.1.1 → 0.1.2
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 +26 -0
- package/README.md +12 -0
- package/README.zh.md +11 -0
- package/package.json +2 -1
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `dsh-hot-reload` are documented here. This project
|
|
4
|
+
follows [semantic versioning](https://semver.org/).
|
|
5
|
+
|
|
6
|
+
## 0.1.2
|
|
7
|
+
|
|
8
|
+
- Docs: add a **Compatibility** section (built/tested against dsh `0.1.0-rc.6`;
|
|
9
|
+
relies on cordis/loader internals, fails safe if they're absent).
|
|
10
|
+
- Docs: note that the plugin works in **any profile**, not just `web`.
|
|
11
|
+
- CI: publish workflow now also triggers on `v*` **tags** (in addition to pushes
|
|
12
|
+
to `main`), so releases can be cut either way.
|
|
13
|
+
|
|
14
|
+
## 0.1.1
|
|
15
|
+
|
|
16
|
+
- Add Chinese README (`README.zh.md`) and ship it in the published package.
|
|
17
|
+
|
|
18
|
+
## 0.1.0
|
|
19
|
+
|
|
20
|
+
- Initial release. Watches the profile's `pnpm-lock.yaml` and live-reloads an
|
|
21
|
+
upgraded plugin's module in place (invalidate + re-import + fiber swap,
|
|
22
|
+
mirroring `cordis-plugin-hmr` into `node_modules`).
|
|
23
|
+
- Optimistic with rollback: a failed reload (load error, or a sync/async `apply`
|
|
24
|
+
throw) keeps the old version live and logs that a manual restart is needed.
|
|
25
|
+
- `dsh.hotReload: false` opt-out; degrades to "restart needed" when loader
|
|
26
|
+
internals are unavailable.
|
package/README.md
CHANGED
|
@@ -41,6 +41,18 @@ apply live:
|
|
|
41
41
|
dsh plugin --profile web add some-plugin@newer # reloaded automatically
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
Works in **any profile** — swap `web` for whichever profile you use; it watches
|
|
45
|
+
the profile it's loaded into.
|
|
46
|
+
|
|
47
|
+
## Compatibility
|
|
48
|
+
|
|
49
|
+
Built and tested against **dsh `0.1.0-rc.6`** (Node 22 / 24). It reaches into
|
|
50
|
+
cordis/loader internals shared with `cordis-plugin-hmr`
|
|
51
|
+
(`loader.internal.loadCache`, `registry.plugin`/`delete`, `fiber.entry`), so a
|
|
52
|
+
future dsh that changes those may require an update. It fails safe: if the
|
|
53
|
+
internals it needs are missing, it degrades to reporting "restart needed" rather
|
|
54
|
+
than breaking dsh.
|
|
55
|
+
|
|
44
56
|
## Opting out
|
|
45
57
|
|
|
46
58
|
A plugin that knows it isn't safe to hot-reload can force the restart-needed
|
package/README.zh.md
CHANGED
|
@@ -36,6 +36,17 @@ dsh plugin --profile web add dsh-hot-reload
|
|
|
36
36
|
dsh plugin --profile web add some-plugin@newer # 自动热重载
|
|
37
37
|
```
|
|
38
38
|
|
|
39
|
+
适用于**任意 profile**——把 `web` 换成你用的 profile 即可;它监听自己被加载进的
|
|
40
|
+
那个 profile。
|
|
41
|
+
|
|
42
|
+
## 兼容性
|
|
43
|
+
|
|
44
|
+
基于并测试于 **dsh `0.1.0-rc.6`**(Node 22 / 24)。它会用到与 `cordis-plugin-hmr`
|
|
45
|
+
共享的 cordis/loader 内部(`loader.internal.loadCache`、`registry.plugin`/
|
|
46
|
+
`delete`、`fiber.entry`),因此未来若某个 dsh 版本改动了这些内部,可能需要更新
|
|
47
|
+
本插件。它是失败安全的:一旦所需内部不可用,会退化为报告“需要重启”,而不会
|
|
48
|
+
弄坏 dsh。
|
|
49
|
+
|
|
39
50
|
## 退出热重载(opt-out)
|
|
40
51
|
|
|
41
52
|
某个插件若知道自己不适合热重载,可在其**自己的** `package.json` 里声明,强制走
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-hot-reload",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Live-reload upgraded DeepSeek Harness (dsh) plugins without restarting dsh — safe plugins are hot-reloaded in place; unsafe ones are flagged for a manual restart.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"cordis.patch.yml",
|
|
37
37
|
"README.md",
|
|
38
38
|
"README.zh.md",
|
|
39
|
+
"CHANGELOG.md",
|
|
39
40
|
"LICENSE"
|
|
40
41
|
],
|
|
41
42
|
"dsh": {
|