@effected/templates 0.8.0 → 0.9.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/ManagedSection.js CHANGED
@@ -36,12 +36,13 @@ const notFound = (error) => error.reason._tag === "NotFound";
36
36
  *
37
37
  * @remarks
38
38
  * `FileSystem.readFileString` decodes through a default `TextDecoder`, which
39
- * strips a leading BOM — verified against `@effect/platform-node@4.0.0-beta.101`.
40
- * Reading through it would make the first sync of a BOM-carrying file silently
41
- * delete the BOM, which violates this package's central promise that every byte
42
- * outside a managed span survives. Reading bytes and decoding with
43
- * `ignoreBOM: true` keeps the mark in the leading text span, where it is
44
- * preserved like any other content.
39
+ * strips a leading BOM. Reading through it would make the first sync of a
40
+ * BOM-carrying file silently delete the BOM, which violates this package's
41
+ * central promise that every byte outside a managed span survives. Reading
42
+ * bytes and decoding with `ignoreBOM: true` keeps the mark in the leading
43
+ * text span, where it is preserved like any other content — pinned by
44
+ * `__test__/integration/ManagedSection.int.test.ts`'s "preserves a
45
+ * byte-order mark through a sync".
45
46
  */
46
47
  const decoder = new TextDecoder("utf-8", { ignoreBOM: true });
47
48
  const make = (options = {}) => Effect.gen(function* () {
package/Section.js CHANGED
@@ -22,7 +22,7 @@ import { Effect, Schema } from "effect";
22
22
  *
23
23
  * @public
24
24
  */
25
- const SectionKey = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]*$/));
25
+ const SectionKey = Schema.String.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9._-]*$/u));
26
26
  /**
27
27
  * What identifies a managed section inside a document: its key and the
28
28
  * comment style its markers are written in.
package/SectionDialect.js CHANGED
@@ -86,7 +86,7 @@ var SectionDialect = class SectionDialect extends Schema.Class("SectionDialect")
86
86
  * phrase can never contain the `---` rule and make a marker ambiguous
87
87
  * against itself.
88
88
  */
89
- phrase: Schema.String.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9 _]*$/)),
89
+ phrase: Schema.String.check(Schema.isPattern(/^[A-Za-z0-9][A-Za-z0-9 _]*$/u)),
90
90
  /** Which comment styles the document scanner recognizes. At least one. */
91
91
  styles: Schema.Array(CommentStyle).check(Schema.isMinLength(1))
92
92
  }) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effected/templates",
3
- "version": "0.8.0",
3
+ "version": "0.9.1",
4
4
  "private": false,
5
5
  "description": "Managed-section blocks in user-editable files: parse, reconcile, sync and check delimited regions.",
6
6
  "keywords": [
@@ -37,7 +37,7 @@
37
37
  "./package.json": "./package.json"
38
38
  },
39
39
  "peerDependencies": {
40
- "effect": "4.0.0-rc.117"
40
+ "effect": "4.0.0-rc.118"
41
41
  },
42
42
  "engines": {
43
43
  "node": ">=24.11.0"