@valbuild/language-server 0.119.0 → 0.120.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,60 @@
1
1
  # @valbuild/language-server
2
2
 
3
+ ## 0.120.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`6f318d4`](https://github.com/valbuild/val/commit/6f318d406295b772e721bf463283f47e2822e996)]:
8
+ - @valbuild/server@0.120.1
9
+
10
+ ## 0.120.0
11
+
12
+ ### Minor Changes
13
+
14
+ - [#589](https://github.com/valbuild/val/pull/589) [`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a) Thanks [@freekh](https://github.com/freekh)! - **Breaking:** `s.richtext()` options are flat.
15
+
16
+ The `style`, `block` and `inline` groups are gone — every option is a key of its
17
+ own. The names are unchanged, so updating a schema is only a matter of removing
18
+ the wrappers:
19
+
20
+ ```ts
21
+ // before
22
+ s.richtext({
23
+ style: { bold: true, italic: true },
24
+ block: { h1: true, ul: true },
25
+ inline: { a: true, img: s.image() },
26
+ });
27
+
28
+ // after
29
+ s.richtext({
30
+ bold: true,
31
+ italic: true,
32
+ h1: true,
33
+ ul: true,
34
+ a: true,
35
+ img: s.image(),
36
+ });
37
+ ```
38
+
39
+ The groups never carried any meaning the option names did not already have, and
40
+ they cost something real: an option name and its `ValRichText` theme key were
41
+ spelled differently (`block.h1` vs `theme.h1`), so the type that keeps a theme
42
+ exhaustive had to restate all thirteen options by hand. It is now a mapped type
43
+ over the options themselves — which also fixes an inconsistency in it: enabling
44
+ links with a schema (`a: s.route()`) rather than `a: true` now requires an `a`
45
+ key in the theme, the way `img` always has.
46
+
47
+ `ValRichText` themes were already flat and are unchanged. The serialized schema
48
+ that the server sends the Studio is flat too, so a project must not mix
49
+ `@valbuild/*` versions across this release.
50
+
51
+ ### Patch Changes
52
+
53
+ - Updated dependencies [[`c2d3c0e`](https://github.com/valbuild/val/commit/c2d3c0e6c2010c0a94c725d9dbaa618998773e8a)]:
54
+ - @valbuild/core@0.120.0
55
+ - @valbuild/shared@0.120.0
56
+ - @valbuild/server@0.120.0
57
+
3
58
  ## 0.119.0
4
59
 
5
60
  ### Patch Changes
@@ -3232,9 +3232,9 @@ function permitsInlineLinks(richtext) {
3232
3232
  return false;
3233
3233
  }
3234
3234
  const options = richtext.options;
3235
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3236
- // links are allowed.
3237
- return Boolean(options?.inline?.a);
3235
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3236
+ // are allowed.
3237
+ return Boolean(options?.a);
3238
3238
  }
3239
3239
 
3240
3240
  /** Schema at a module path, or undefined when it cannot be resolved. */
@@ -3232,9 +3232,9 @@ function permitsInlineLinks(richtext) {
3232
3232
  return false;
3233
3233
  }
3234
3234
  const options = richtext.options;
3235
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3236
- // links are allowed.
3237
- return Boolean(options?.inline?.a);
3235
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3236
+ // are allowed.
3237
+ return Boolean(options?.a);
3238
3238
  }
3239
3239
 
3240
3240
  /** Schema at a module path, or undefined when it cannot be resolved. */
@@ -3221,9 +3221,9 @@ function permitsInlineLinks(richtext) {
3221
3221
  return false;
3222
3222
  }
3223
3223
  const options = richtext.options;
3224
- // `inline.a` is either `true` or the schema the href must satisfy; both mean
3225
- // links are allowed.
3226
- return Boolean(options?.inline?.a);
3224
+ // `a` is either `true` or the schema the href must satisfy; both mean links
3225
+ // are allowed.
3226
+ return Boolean(options?.a);
3227
3227
  }
3228
3228
 
3229
3229
  /** Schema at a module path, or undefined when it cannot be resolved. */
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "lsp",
12
12
  "language-server"
13
13
  ],
14
- "version": "0.119.0",
14
+ "version": "0.120.1",
15
15
  "bin": {
16
16
  "val-language-server": "./bin.js"
17
17
  },
@@ -29,9 +29,9 @@
29
29
  "typescript": "^6.0.3",
30
30
  "vscode-languageserver": "^10.1.0",
31
31
  "vscode-languageserver-textdocument": "^1.0.14",
32
- "@valbuild/core": "0.117.0",
33
- "@valbuild/server": "0.119.0",
34
- "@valbuild/shared": "0.118.0"
32
+ "@valbuild/core": "0.120.0",
33
+ "@valbuild/server": "0.120.1",
34
+ "@valbuild/shared": "0.120.0"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/jest": "^30.0.0",