dsh-graft-plugin 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/package.json +1 -1
- package/scripts/test-harness.mjs +14 -0
- package/src/client.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-graft-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Shows which graft index a dsh session is serving and whether it still matches the code, and gives the model graft_ask, graft_grep, graft_callers, graft_skeleton and graft_map as native tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
package/scripts/test-harness.mjs
CHANGED
|
@@ -215,6 +215,20 @@ check('the tab is opened exactly once', opens.length === 1, opens.join(' | '))
|
|
|
215
215
|
check('and never with noopener', opens.every((call) => !call.includes('noopener')), opens.join(' | '))
|
|
216
216
|
check('and opened blank, to be navigated later', (opens[0] ?? '').includes('"", "_blank"'), opens[0])
|
|
217
217
|
|
|
218
|
+
console.log('\n--- the client module key ---')
|
|
219
|
+
// The client loader keys bundles by the package name — entry.options.name in
|
|
220
|
+
// cordis.patch.yml — and arrive() asserts factories.has(that name). The row id
|
|
221
|
+
// `graft-status` is a DIFFERENT namespace (storage keys, prompt section,
|
|
222
|
+
// effect labels) and must stay put there. When the two were conflated, the
|
|
223
|
+
// factory landed under the row id and the assert fired on every boot with the
|
|
224
|
+
// chip and tab missing. That shipped as 0.1.0; this guard is the reason it
|
|
225
|
+
// will not ship again.
|
|
226
|
+
check(
|
|
227
|
+
'registers under the package name, not the row id',
|
|
228
|
+
/__ModuleLoader__\.load\(\{\s*\r?\n\s*id:\s*"dsh-graft-plugin"/.test(clientSource),
|
|
229
|
+
)
|
|
230
|
+
check('and never under the row id', !/__ModuleLoader__\.load\(\{\s*\r?\n\s*id:\s*"graft-status"/.test(clientSource))
|
|
231
|
+
|
|
218
232
|
console.log('\n--- the sidebar tab is a consumer, not a patch ---')
|
|
219
233
|
// dsh-better-sidebar is never edited by this plugin: the tab is contributed
|
|
220
234
|
// through its documented `ctx.betterSidebar` service, which its README states
|
package/src/client.js
CHANGED