@abide/abide 0.34.0 → 0.34.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # abide
2
2
 
3
+ ## 0.34.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`fcaf01b`](https://github.com/briancray/abide/commit/fcaf01bf160e300258568a0614f6b3cbef11e585) - project linked as a writable let in the typecheck shadow ([`cc9f3aa`](https://github.com/briancray/abide/commit/cc9f3aa0573be03318cbd8c8e389035fc6683408))
8
+
3
9
  ## 0.34.0
4
10
 
5
11
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abide/abide",
3
- "version": "0.34.0",
3
+ "version": "0.34.1",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Isomorphic multimodal HTTP framework built for humans and machines in a single Bun runtime",
@@ -280,14 +280,21 @@ function scopeLineFor(
280
280
  const typeNode = call.typeArguments?.[0]
281
281
  const annotation = typeNode === undefined ? '' : `: ${verbatim(typeNode)}`
282
282
  const fn = call.arguments[0]
283
+ /* `linked` is a writable `State<T>` at runtime (it reseeds AND accepts `.value =`
284
+ writes), so project it as `let`; `computed` is genuinely read-only, so `const`. */
285
+ const keyword = callee === 'linked' ? 'let' : 'const'
286
+ /* binding-name map offset = past the keyword + space (`let ` = 4, `const ` = 6) */
287
+ const keywordOffset = keyword.length + 1
283
288
  if (fn === undefined) {
284
- /* map the binding name (offset 6, past `const `) for hover/go-to */
285
- return { text: `const ${name} = undefined;`, segments: [span(declaration.name, 6)] }
289
+ return {
290
+ text: `${keyword} ${name} = undefined;`,
291
+ segments: [span(declaration.name, keywordOffset)],
292
+ }
286
293
  }
287
- const prefix = `const ${name}${annotation} = (`
294
+ const prefix = `${keyword} ${name}${annotation} = (`
288
295
  return {
289
296
  text: `${prefix}${verbatim(fn)})();`,
290
- segments: [span(declaration.name, 6), span(fn, prefix.length)],
297
+ segments: [span(declaration.name, keywordOffset), span(fn, prefix.length)],
291
298
  }
292
299
  }
293
300
  /* prop<T>('key'): Props field `key[?]: T`, scope binding read from props. */