pi-mono-all 1.0.0

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.
Files changed (161) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENCE.md +7 -0
  3. package/node_modules/pi-common/package.json +22 -0
  4. package/node_modules/pi-common/src/auth-config.ts +290 -0
  5. package/node_modules/pi-common/src/auth.ts +63 -0
  6. package/node_modules/pi-common/src/cache.ts +60 -0
  7. package/node_modules/pi-common/src/errors.ts +47 -0
  8. package/node_modules/pi-common/src/http-client.ts +118 -0
  9. package/node_modules/pi-common/src/index.ts +7 -0
  10. package/node_modules/pi-common/src/rate-limiter.ts +32 -0
  11. package/node_modules/pi-common/src/tool-result.ts +27 -0
  12. package/node_modules/pi-mono-ask-user-question/CHANGELOG.md +185 -0
  13. package/node_modules/pi-mono-ask-user-question/README.md +226 -0
  14. package/node_modules/pi-mono-ask-user-question/index.ts +923 -0
  15. package/node_modules/pi-mono-ask-user-question/package.json +29 -0
  16. package/node_modules/pi-mono-auto-fix/CHANGELOG.md +59 -0
  17. package/node_modules/pi-mono-auto-fix/README.md +77 -0
  18. package/node_modules/pi-mono-auto-fix/index.ts +488 -0
  19. package/node_modules/pi-mono-auto-fix/package.json +23 -0
  20. package/node_modules/pi-mono-btw/CHANGELOG.md +180 -0
  21. package/node_modules/pi-mono-btw/README.md +24 -0
  22. package/node_modules/pi-mono-btw/index.ts +499 -0
  23. package/node_modules/pi-mono-btw/package.json +29 -0
  24. package/node_modules/pi-mono-clear/CHANGELOG.md +180 -0
  25. package/node_modules/pi-mono-clear/README.md +40 -0
  26. package/node_modules/pi-mono-clear/index.ts +45 -0
  27. package/node_modules/pi-mono-clear/package.json +29 -0
  28. package/node_modules/pi-mono-context/CHANGELOG.md +12 -0
  29. package/node_modules/pi-mono-context/README.md +74 -0
  30. package/node_modules/pi-mono-context/index.ts +641 -0
  31. package/node_modules/pi-mono-context/package.json +29 -0
  32. package/node_modules/pi-mono-context-guard/CHANGELOG.md +195 -0
  33. package/node_modules/pi-mono-context-guard/README.md +81 -0
  34. package/node_modules/pi-mono-context-guard/index.ts +212 -0
  35. package/node_modules/pi-mono-context-guard/package.json +23 -0
  36. package/node_modules/pi-mono-figma/CHANGELOG.md +59 -0
  37. package/node_modules/pi-mono-figma/README.md +236 -0
  38. package/node_modules/pi-mono-figma/__tests__/code-connect.test.ts +32 -0
  39. package/node_modules/pi-mono-figma/__tests__/figma-assets.test.ts +38 -0
  40. package/node_modules/pi-mono-figma/__tests__/figma-component-hints.test.ts +23 -0
  41. package/node_modules/pi-mono-figma/__tests__/figma-implementation-layout.test.ts +47 -0
  42. package/node_modules/pi-mono-figma/__tests__/figma-search.test.ts +51 -0
  43. package/node_modules/pi-mono-figma/__tests__/figma-summarizer.test.ts +65 -0
  44. package/node_modules/pi-mono-figma/__tests__/fixtures/complex-auto-layout.json +115 -0
  45. package/node_modules/pi-mono-figma/__tests__/fixtures/component-instance.json +50 -0
  46. package/node_modules/pi-mono-figma/__tests__/fixtures/hidden-and-vectors.json +28 -0
  47. package/node_modules/pi-mono-figma/__tests__/fixtures/variables-and-styles.json +40 -0
  48. package/node_modules/pi-mono-figma/docs/live-selection-bridge.md +16 -0
  49. package/node_modules/pi-mono-figma/index.ts +6 -0
  50. package/node_modules/pi-mono-figma/package.json +33 -0
  51. package/node_modules/pi-mono-figma/skills/figma/SKILL.md +143 -0
  52. package/node_modules/pi-mono-figma/src/code-connect.ts +110 -0
  53. package/node_modules/pi-mono-figma/src/figma-assets.ts +146 -0
  54. package/node_modules/pi-mono-figma/src/figma-cache.ts +6 -0
  55. package/node_modules/pi-mono-figma/src/figma-client.ts +471 -0
  56. package/node_modules/pi-mono-figma/src/figma-component-hints.ts +87 -0
  57. package/node_modules/pi-mono-figma/src/figma-implementation.ts +264 -0
  58. package/node_modules/pi-mono-figma/src/figma-schemas.ts +139 -0
  59. package/node_modules/pi-mono-figma/src/figma-search.ts +195 -0
  60. package/node_modules/pi-mono-figma/src/figma-summarizer.ts +673 -0
  61. package/node_modules/pi-mono-figma/src/figma-tokens.ts +57 -0
  62. package/node_modules/pi-mono-figma/src/figma-tools.ts +352 -0
  63. package/node_modules/pi-mono-linear/CHANGELOG.md +44 -0
  64. package/node_modules/pi-mono-linear/README.md +159 -0
  65. package/node_modules/pi-mono-linear/index.ts +6 -0
  66. package/node_modules/pi-mono-linear/package.json +30 -0
  67. package/node_modules/pi-mono-linear/skills/linear/SKILL.md +107 -0
  68. package/node_modules/pi-mono-linear/src/linear-client.ts +339 -0
  69. package/node_modules/pi-mono-linear/src/linear-queries.ts +101 -0
  70. package/node_modules/pi-mono-linear/src/linear-schemas.ts +90 -0
  71. package/node_modules/pi-mono-linear/src/linear-tools.ts +362 -0
  72. package/node_modules/pi-mono-loop/CHANGELOG.md +163 -0
  73. package/node_modules/pi-mono-loop/README.md +54 -0
  74. package/node_modules/pi-mono-loop/index.ts +291 -0
  75. package/node_modules/pi-mono-loop/package.json +26 -0
  76. package/node_modules/pi-mono-multi-edit/CHANGELOG.md +232 -0
  77. package/node_modules/pi-mono-multi-edit/README.md +244 -0
  78. package/node_modules/pi-mono-multi-edit/__tests__/classic.test.ts +277 -0
  79. package/node_modules/pi-mono-multi-edit/__tests__/diff.test.ts +77 -0
  80. package/node_modules/pi-mono-multi-edit/__tests__/patch.test.ts +287 -0
  81. package/node_modules/pi-mono-multi-edit/benchmark-edits.ts +966 -0
  82. package/node_modules/pi-mono-multi-edit/classic.ts +435 -0
  83. package/node_modules/pi-mono-multi-edit/diff.ts +143 -0
  84. package/node_modules/pi-mono-multi-edit/index.ts +266 -0
  85. package/node_modules/pi-mono-multi-edit/package.json +37 -0
  86. package/node_modules/pi-mono-multi-edit/patch.ts +463 -0
  87. package/node_modules/pi-mono-multi-edit/types.ts +53 -0
  88. package/node_modules/pi-mono-multi-edit/workspace.ts +85 -0
  89. package/node_modules/pi-mono-review/CHANGELOG.md +190 -0
  90. package/node_modules/pi-mono-review/README.md +30 -0
  91. package/node_modules/pi-mono-review/common.ts +930 -0
  92. package/node_modules/pi-mono-review/index.ts +8 -0
  93. package/node_modules/pi-mono-review/package.json +29 -0
  94. package/node_modules/pi-mono-review/review-tui.ts +194 -0
  95. package/node_modules/pi-mono-review/review.ts +119 -0
  96. package/node_modules/pi-mono-review/reviewer.ts +339 -0
  97. package/node_modules/pi-mono-sentinel/CHANGELOG.md +158 -0
  98. package/node_modules/pi-mono-sentinel/README.md +87 -0
  99. package/node_modules/pi-mono-sentinel/__tests__/output-scanner.test.ts +109 -0
  100. package/node_modules/pi-mono-sentinel/__tests__/permissions.test.ts +202 -0
  101. package/node_modules/pi-mono-sentinel/__tests__/whitelist.test.ts +59 -0
  102. package/node_modules/pi-mono-sentinel/guards/execution-tracker.ts +281 -0
  103. package/node_modules/pi-mono-sentinel/guards/output-scanner.ts +232 -0
  104. package/node_modules/pi-mono-sentinel/guards/permission-gate.ts +170 -0
  105. package/node_modules/pi-mono-sentinel/index.ts +43 -0
  106. package/node_modules/pi-mono-sentinel/package.json +26 -0
  107. package/node_modules/pi-mono-sentinel/patterns/permissions.ts +175 -0
  108. package/node_modules/pi-mono-sentinel/patterns/read-targets.ts +104 -0
  109. package/node_modules/pi-mono-sentinel/patterns/secrets.ts +143 -0
  110. package/node_modules/pi-mono-sentinel/session.ts +95 -0
  111. package/node_modules/pi-mono-sentinel/specs/2026/04/sentinel/001-permission-gate.md +145 -0
  112. package/node_modules/pi-mono-sentinel/types.ts +39 -0
  113. package/node_modules/pi-mono-sentinel/whitelist.ts +86 -0
  114. package/node_modules/pi-mono-simplify/CHANGELOG.md +163 -0
  115. package/node_modules/pi-mono-simplify/README.md +56 -0
  116. package/node_modules/pi-mono-simplify/index.ts +78 -0
  117. package/node_modules/pi-mono-simplify/package.json +29 -0
  118. package/node_modules/pi-mono-status-line/CHANGELOG.md +180 -0
  119. package/node_modules/pi-mono-status-line/README.md +96 -0
  120. package/node_modules/pi-mono-status-line/basic.ts +89 -0
  121. package/node_modules/pi-mono-status-line/expert.ts +689 -0
  122. package/node_modules/pi-mono-status-line/index.ts +54 -0
  123. package/node_modules/pi-mono-status-line/package.json +29 -0
  124. package/node_modules/pi-mono-team-mode/CHANGELOG.md +278 -0
  125. package/node_modules/pi-mono-team-mode/README.md +246 -0
  126. package/node_modules/pi-mono-team-mode/__tests__/agent-manager-transient.test.ts +75 -0
  127. package/node_modules/pi-mono-team-mode/__tests__/delegation-manager.test.ts +118 -0
  128. package/node_modules/pi-mono-team-mode/__tests__/formatters.test.ts +104 -0
  129. package/node_modules/pi-mono-team-mode/__tests__/model-config.test.ts +272 -0
  130. package/node_modules/pi-mono-team-mode/__tests__/notification-box.test.ts +34 -0
  131. package/node_modules/pi-mono-team-mode/__tests__/parallel-utils.test.ts +32 -0
  132. package/node_modules/pi-mono-team-mode/__tests__/pi-stream-parser.test.ts +64 -0
  133. package/node_modules/pi-mono-team-mode/__tests__/prompts.test.ts +106 -0
  134. package/node_modules/pi-mono-team-mode/__tests__/store.test.ts +164 -0
  135. package/node_modules/pi-mono-team-mode/__tests__/tasks.test.ts +267 -0
  136. package/node_modules/pi-mono-team-mode/__tests__/teammate-specs.test.ts +114 -0
  137. package/node_modules/pi-mono-team-mode/__tests__/widget.test.ts +41 -0
  138. package/node_modules/pi-mono-team-mode/__tests__/worktree.test.ts +78 -0
  139. package/node_modules/pi-mono-team-mode/core/chain-utils.ts +90 -0
  140. package/node_modules/pi-mono-team-mode/core/fs-utils.ts +44 -0
  141. package/node_modules/pi-mono-team-mode/core/model-config.ts +432 -0
  142. package/node_modules/pi-mono-team-mode/core/parallel-utils.ts +48 -0
  143. package/node_modules/pi-mono-team-mode/core/prompts.ts +158 -0
  144. package/node_modules/pi-mono-team-mode/core/store.ts +156 -0
  145. package/node_modules/pi-mono-team-mode/core/tasks.ts +99 -0
  146. package/node_modules/pi-mono-team-mode/core/teammate-specs.ts +124 -0
  147. package/node_modules/pi-mono-team-mode/core/types.ts +160 -0
  148. package/node_modules/pi-mono-team-mode/index.ts +825 -0
  149. package/node_modules/pi-mono-team-mode/managers/agent-manager.ts +654 -0
  150. package/node_modules/pi-mono-team-mode/managers/delegation-manager.ts +211 -0
  151. package/node_modules/pi-mono-team-mode/managers/task-manager.ts +238 -0
  152. package/node_modules/pi-mono-team-mode/managers/team-manager.ts +59 -0
  153. package/node_modules/pi-mono-team-mode/package.json +33 -0
  154. package/node_modules/pi-mono-team-mode/runtime/pi-stream-parser.ts +194 -0
  155. package/node_modules/pi-mono-team-mode/runtime/subprocess.ts +183 -0
  156. package/node_modules/pi-mono-team-mode/runtime/transient-session.ts +196 -0
  157. package/node_modules/pi-mono-team-mode/runtime/worktree.ts +90 -0
  158. package/node_modules/pi-mono-team-mode/ui/formatters.ts +149 -0
  159. package/node_modules/pi-mono-team-mode/ui/notification-box.ts +55 -0
  160. package/node_modules/pi-mono-team-mode/ui/widget.ts +94 -0
  161. package/package.json +76 -0
@@ -0,0 +1,287 @@
1
+ /**
2
+ * parsePatch + applyPatchOperations — contract tests.
3
+ *
4
+ * Pins the Codex apply_patch behavior before Phase C1 rewrites the parser.
5
+ * Anything tested here is part of the "parity required" surface; edge cases
6
+ * left untested (EOF sentinel, 4-pass fuzzy match) may change in C1.
7
+ */
8
+
9
+ import { describe, test } from "node:test";
10
+ import assert from "node:assert/strict";
11
+ import { mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises";
12
+ import { join } from "node:path";
13
+ import { tmpdir } from "node:os";
14
+
15
+ import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
16
+
17
+ import { applyPatchOperations, parsePatch } from "../patch.ts";
18
+ import { createRealWorkspace } from "../workspace.ts";
19
+
20
+ const stubPi: ExtensionAPI = {
21
+ events: { emit: () => {} },
22
+ } as unknown as ExtensionAPI;
23
+
24
+ async function withTmp<T>(fn: (dir: string) => Promise<T>): Promise<T> {
25
+ const dir = await mkdtemp(join(tmpdir(), "multi-edit-patch-"));
26
+ try {
27
+ return await fn(dir);
28
+ } finally {
29
+ await rm(dir, { recursive: true, force: true });
30
+ }
31
+ }
32
+
33
+ async function exists(path: string): Promise<boolean> {
34
+ try {
35
+ await stat(path);
36
+ return true;
37
+ } catch {
38
+ return false;
39
+ }
40
+ }
41
+
42
+ describe("parsePatch — structural errors", () => {
43
+ test("rejects patch missing '*** Begin Patch'", () => {
44
+ assert.throws(() => parsePatch("not a patch\n*** End Patch"), /first line of the patch must be/);
45
+ });
46
+
47
+ test("rejects patch missing '*** End Patch'", () => {
48
+ assert.throws(() => parsePatch("*** Begin Patch\nno end"), /last line of the patch must be/);
49
+ });
50
+
51
+ test("rejects empty patch", () => {
52
+ assert.throws(() => parsePatch(""), /empty or invalid/);
53
+ });
54
+
55
+ test("rejects invalid hunk header", () => {
56
+ const patch = "*** Begin Patch\n*** Frobnicate: a.txt\n*** End Patch";
57
+ assert.throws(() => parsePatch(patch), /not a valid hunk header/);
58
+ });
59
+ });
60
+
61
+ describe("parsePatch — Add File", () => {
62
+ test("parses a single add-file op", () => {
63
+ const patch = [
64
+ "*** Begin Patch",
65
+ "*** Add File: new.txt",
66
+ "+line one",
67
+ "+line two",
68
+ "*** End Patch",
69
+ ].join("\n");
70
+ const ops = parsePatch(patch);
71
+ assert.equal(ops.length, 1);
72
+ assert.equal(ops[0].kind, "add");
73
+ if (ops[0].kind === "add") {
74
+ assert.equal(ops[0].path, "new.txt");
75
+ assert.equal(ops[0].contents, "line one\nline two\n");
76
+ }
77
+ });
78
+ });
79
+
80
+ describe("parsePatch — Delete File", () => {
81
+ test("parses a single delete-file op", () => {
82
+ const patch = "*** Begin Patch\n*** Delete File: old.txt\n*** End Patch";
83
+ const ops = parsePatch(patch);
84
+ assert.equal(ops.length, 1);
85
+ assert.equal(ops[0].kind, "delete");
86
+ if (ops[0].kind === "delete") {
87
+ assert.equal(ops[0].path, "old.txt");
88
+ }
89
+ });
90
+ });
91
+
92
+ describe("parsePatch — Update File", () => {
93
+ test("parses an update with a single context-anchored hunk", () => {
94
+ const patch = [
95
+ "*** Begin Patch",
96
+ "*** Update File: src.txt",
97
+ "@@",
98
+ " unchanged",
99
+ "-old line",
100
+ "+new line",
101
+ "*** End Patch",
102
+ ].join("\n");
103
+ const ops = parsePatch(patch);
104
+ assert.equal(ops.length, 1);
105
+ assert.equal(ops[0].kind, "update");
106
+ if (ops[0].kind === "update") {
107
+ assert.equal(ops[0].hunks.length, 1);
108
+ assert.equal(ops[0].hunks[0].oldBlock, "unchanged\nold line");
109
+ assert.equal(ops[0].hunks[0].newBlock, "unchanged\nnew line");
110
+ }
111
+ });
112
+
113
+ test("rejects move operations", () => {
114
+ const patch = [
115
+ "*** Begin Patch",
116
+ "*** Update File: src.txt",
117
+ "*** Move to: dst.txt",
118
+ "*** End Patch",
119
+ ].join("\n");
120
+ assert.throws(() => parsePatch(patch), /Move to.*not supported/);
121
+ });
122
+ });
123
+
124
+ describe("applyPatchOperations — Add File round-trip", () => {
125
+ test("creates the file with the given contents", async () => {
126
+ await withTmp(async (dir) => {
127
+ const patch = [
128
+ "*** Begin Patch",
129
+ "*** Add File: greet.txt",
130
+ "+hello",
131
+ "+world",
132
+ "*** End Patch",
133
+ ].join("\n");
134
+ const ops = parsePatch(patch);
135
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
136
+ assert.equal(await readFile(join(dir, "greet.txt"), "utf-8"), "hello\nworld\n");
137
+ });
138
+ });
139
+ });
140
+
141
+ describe("applyPatchOperations — Delete File round-trip", () => {
142
+ test("removes the target file", async () => {
143
+ await withTmp(async (dir) => {
144
+ const victim = join(dir, "gone.txt");
145
+ await writeFile(victim, "bye\n");
146
+
147
+ const patch = "*** Begin Patch\n*** Delete File: gone.txt\n*** End Patch";
148
+ const ops = parsePatch(patch);
149
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
150
+ assert.equal(await exists(victim), false);
151
+ });
152
+ });
153
+
154
+ test("rejects deletion of a non-existent file", async () => {
155
+ await withTmp(async (dir) => {
156
+ const patch = "*** Begin Patch\n*** Delete File: ghost.txt\n*** End Patch";
157
+ const ops = parsePatch(patch);
158
+ await assert.rejects(
159
+ () => applyPatchOperations(ops, createRealWorkspace(stubPi), dir),
160
+ /does not exist/,
161
+ );
162
+ });
163
+ });
164
+ });
165
+
166
+ describe("applyPatchOperations — Update File round-trip", () => {
167
+ test("applies a single-hunk replacement", async () => {
168
+ await withTmp(async (dir) => {
169
+ const file = join(dir, "src.txt");
170
+ await writeFile(file, "keep\nold\ntail\n");
171
+
172
+ const patch = [
173
+ "*** Begin Patch",
174
+ "*** Update File: src.txt",
175
+ "@@",
176
+ " keep",
177
+ "-old",
178
+ "+new",
179
+ "*** End Patch",
180
+ ].join("\n");
181
+ const ops = parsePatch(patch);
182
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
183
+ assert.equal(await readFile(file, "utf-8"), "keep\nnew\ntail\n");
184
+ });
185
+ });
186
+
187
+ test("applies two non-overlapping hunks", async () => {
188
+ await withTmp(async (dir) => {
189
+ const file = join(dir, "src.txt");
190
+ await writeFile(file, "a\nb\nc\nd\ne\nf\ng\n");
191
+
192
+ const patch = [
193
+ "*** Begin Patch",
194
+ "*** Update File: src.txt",
195
+ "@@",
196
+ " a",
197
+ "-b",
198
+ "+B",
199
+ "@@",
200
+ " e",
201
+ "-f",
202
+ "+F",
203
+ "*** End Patch",
204
+ ].join("\n");
205
+ const ops = parsePatch(patch);
206
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
207
+ assert.equal(await readFile(file, "utf-8"), "a\nB\nc\nd\ne\nF\ng\n");
208
+ });
209
+ });
210
+ });
211
+
212
+ describe("applyPatchOperations — multi-op", () => {
213
+ test("applies add + update + delete in one batch", async () => {
214
+ await withTmp(async (dir) => {
215
+ const keep = join(dir, "keep.txt");
216
+ const gone = join(dir, "gone.txt");
217
+ await writeFile(keep, "foo\nbar\n");
218
+ await writeFile(gone, "delete me\n");
219
+
220
+ const patch = [
221
+ "*** Begin Patch",
222
+ "*** Add File: new.txt",
223
+ "+created",
224
+ "*** Update File: keep.txt",
225
+ "@@",
226
+ " foo",
227
+ "-bar",
228
+ "+BAR",
229
+ "*** Delete File: gone.txt",
230
+ "*** End Patch",
231
+ ].join("\n");
232
+ const ops = parsePatch(patch);
233
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
234
+
235
+ assert.equal(await readFile(join(dir, "new.txt"), "utf-8"), "created\n");
236
+ assert.equal(await readFile(keep, "utf-8"), "foo\nBAR\n");
237
+ assert.equal(await exists(gone), false);
238
+ });
239
+ });
240
+ });
241
+
242
+ describe("applyPatchOperations — trimEnd hunk matching", () => {
243
+ test("matches hunk when file has trailing spaces on context/old lines", async () => {
244
+ await withTmp(async (dir) => {
245
+ const file = join(dir, "ws.ts");
246
+ // File has trailing spaces on some lines.
247
+ await writeFile(file, "keep \nold \ntail\n");
248
+
249
+ // Patch references the lines without trailing spaces (model generated clean).
250
+ const patch = [
251
+ "*** Begin Patch",
252
+ "*** Update File: ws.ts",
253
+ "@@",
254
+ " keep",
255
+ "-old",
256
+ "+new",
257
+ "*** End Patch",
258
+ ].join("\n");
259
+ const ops = parsePatch(patch);
260
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
261
+ // The matched block (including context line "keep ") is replaced by
262
+ // newBlock ("keep\nnew") — trailing spaces on the context line are
263
+ // cleaned as a side effect of the replacement.
264
+ assert.equal(await readFile(file, "utf-8"), "keep\nnew\ntail\n");
265
+ });
266
+ });
267
+
268
+ test("matches context prefix with trailing whitespace difference", async () => {
269
+ await withTmp(async (dir) => {
270
+ const file = join(dir, "ctx.ts");
271
+ await writeFile(file, "function foo() { \n return 1;\n}\n");
272
+
273
+ // Context line doesn't have the trailing spaces the file has.
274
+ const patch = [
275
+ "*** Begin Patch",
276
+ "*** Update File: ctx.ts",
277
+ "@@ function foo() {",
278
+ "- return 1;",
279
+ "+ return 2;",
280
+ "*** End Patch",
281
+ ].join("\n");
282
+ const ops = parsePatch(patch);
283
+ await applyPatchOperations(ops, createRealWorkspace(stubPi), dir);
284
+ assert.equal(await readFile(file, "utf-8"), "function foo() { \n return 2;\n}\n");
285
+ });
286
+ });
287
+ });