@diffci.com/diffci 0.3.64 → 0.3.66

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 (110) hide show
  1. package/dist-client/src/client/isolated-worktree.d.ts +16 -0
  2. package/dist-client/src/client/isolated-worktree.js +67 -1
  3. package/dist-client/src/client/mcp.js +14 -0
  4. package/dist-client/src/client/telemetry.d.ts +1 -1
  5. package/dist-client/src/client/telemetry.js +2 -1
  6. package/dist-client/src/client/usage-signal.d.ts +10 -2
  7. package/dist-client/src/client/usage-signal.js +11 -0
  8. package/node_modules/@babel/helper-string-parser/lib/index.js +15 -6
  9. package/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -1
  10. package/node_modules/@babel/helper-string-parser/package.json +1 -1
  11. package/node_modules/@babel/parser/lib/index.js +326 -93
  12. package/node_modules/@babel/parser/lib/index.js.map +1 -1
  13. package/node_modules/@babel/parser/package.json +3 -3
  14. package/node_modules/@babel/parser/typings/babel-parser.d.ts +23 -25
  15. package/node_modules/@babel/types/lib/ast-types/generated/index.js.map +1 -1
  16. package/node_modules/@babel/types/lib/clone/cloneNode.js.map +1 -1
  17. package/node_modules/@babel/types/lib/definitions/core.js +4 -0
  18. package/node_modules/@babel/types/lib/definitions/core.js.map +1 -1
  19. package/node_modules/@babel/types/lib/index-legacy.d.ts +1 -0
  20. package/node_modules/@babel/types/lib/index.d.ts +5 -5
  21. package/node_modules/@babel/types/lib/index.js.flow +1 -0
  22. package/node_modules/@babel/types/lib/validators/is.js.map +1 -1
  23. package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js +5 -1
  24. package/node_modules/@babel/types/lib/validators/isSpecifierDefault.js.map +1 -1
  25. package/node_modules/@babel/types/package.json +4 -4
  26. package/node_modules/@diffci.com/core/README.md +1 -1
  27. package/node_modules/@diffci.com/core/dist/git/git-diff.js +7 -4
  28. package/node_modules/@diffci.com/core/dist/git/git-diff.js.map +1 -1
  29. package/node_modules/@diffci.com/core/dist/git/types.d.ts +4 -0
  30. package/node_modules/@diffci.com/core/dist/repo/adapters/maven.js +16 -10
  31. package/node_modules/@diffci.com/core/dist/repo/adapters/maven.js.map +1 -1
  32. package/node_modules/@diffci.com/core/dist/repo/graph.js +8 -3
  33. package/node_modules/@diffci.com/core/dist/repo/graph.js.map +1 -1
  34. package/node_modules/@diffci.com/core/dist/repo/impact.js +4 -1
  35. package/node_modules/@diffci.com/core/dist/repo/impact.js.map +1 -1
  36. package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.d.ts +11 -0
  37. package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.js +45 -0
  38. package/node_modules/@diffci.com/core/dist/repo/npm-lockfile.js.map +1 -1
  39. package/node_modules/@diffci.com/core/package.json +1 -1
  40. package/node_modules/@diffci.com/core/src/git/git-diff.ts +6 -4
  41. package/node_modules/@diffci.com/core/src/git/types.ts +4 -0
  42. package/node_modules/@diffci.com/core/src/repo/adapters/maven.ts +16 -9
  43. package/node_modules/@diffci.com/core/src/repo/graph.ts +8 -3
  44. package/node_modules/@diffci.com/core/src/repo/impact.ts +4 -1
  45. package/node_modules/@diffci.com/core/src/repo/npm-lockfile.ts +39 -0
  46. package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs +115 -71
  47. package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.mjs.map +2 -2
  48. package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js +115 -71
  49. package/node_modules/@jridgewell/sourcemap-codec/dist/sourcemap-codec.umd.js.map +2 -2
  50. package/node_modules/@jridgewell/sourcemap-codec/package.json +2 -1
  51. package/node_modules/@jridgewell/sourcemap-codec/src/range-mappings.ts +47 -0
  52. package/node_modules/@jridgewell/sourcemap-codec/src/scopes.ts +66 -46
  53. package/node_modules/@jridgewell/sourcemap-codec/src/sourcemap-codec.ts +27 -11
  54. package/node_modules/@jridgewell/sourcemap-codec/src/vlq.ts +13 -17
  55. package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts +5 -0
  56. package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.cts.map +1 -0
  57. package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts +5 -0
  58. package/node_modules/@jridgewell/sourcemap-codec/types/range-mappings.d.mts.map +1 -0
  59. package/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.cts.map +1 -1
  60. package/node_modules/@jridgewell/sourcemap-codec/types/scopes.d.mts.map +1 -1
  61. package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts +2 -0
  62. package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.cts.map +1 -1
  63. package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts +2 -0
  64. package/node_modules/@jridgewell/sourcemap-codec/types/sourcemap-codec.d.mts.map +1 -1
  65. package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts +4 -2
  66. package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.cts.map +1 -1
  67. package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts +4 -2
  68. package/node_modules/@jridgewell/sourcemap-codec/types/vlq.d.mts.map +1 -1
  69. package/node_modules/@vue/compiler-core/dist/compiler-core.cjs.js +6 -2
  70. package/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6 -2
  71. package/node_modules/@vue/compiler-core/dist/compiler-core.esm-bundler.js +6 -2
  72. package/node_modules/@vue/compiler-core/package.json +4 -4
  73. package/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.js +8 -8
  74. package/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +8 -8
  75. package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +14 -14
  76. package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +2 -2
  77. package/node_modules/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +1 -1
  78. package/node_modules/@vue/compiler-dom/dist/compiler-dom.global.js +14 -14
  79. package/node_modules/@vue/compiler-dom/dist/compiler-dom.global.prod.js +2 -2
  80. package/node_modules/@vue/compiler-dom/package.json +3 -3
  81. package/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +1847 -1370
  82. package/node_modules/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +6462 -6187
  83. package/node_modules/@vue/compiler-sfc/package.json +11 -11
  84. package/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +32 -9
  85. package/node_modules/@vue/compiler-ssr/package.json +3 -3
  86. package/node_modules/@vue/shared/dist/shared.cjs.js +11 -15
  87. package/node_modules/@vue/shared/dist/shared.cjs.prod.js +11 -15
  88. package/node_modules/@vue/shared/dist/shared.esm-bundler.js +11 -15
  89. package/node_modules/@vue/shared/package.json +1 -1
  90. package/node_modules/postcss/lib/css-syntax-error.js +6 -4
  91. package/node_modules/postcss/lib/declaration.d.ts +2 -2
  92. package/node_modules/postcss/lib/map-generator.js +12 -2
  93. package/node_modules/postcss/lib/processor.js +1 -1
  94. package/node_modules/postcss/lib/tokenize.js +6 -13
  95. package/node_modules/postcss/package.json +1 -1
  96. package/node_modules/source-map-js/README.md +192 -176
  97. package/node_modules/source-map-js/lib/array-set.js +5 -3
  98. package/node_modules/source-map-js/lib/base64-vlq.js +5 -9
  99. package/node_modules/source-map-js/lib/base64.js +13 -12
  100. package/node_modules/source-map-js/lib/binary-search.js +10 -6
  101. package/node_modules/source-map-js/lib/mapping-list.js +12 -7
  102. package/node_modules/source-map-js/lib/quick-sort.js +93 -23
  103. package/node_modules/source-map-js/lib/source-map-consumer.js +272 -194
  104. package/node_modules/source-map-js/lib/source-map-generator.js +146 -106
  105. package/node_modules/source-map-js/lib/source-node.js +144 -118
  106. package/node_modules/source-map-js/lib/util.js +56 -37
  107. package/node_modules/source-map-js/package.json +14 -7
  108. package/node_modules/source-map-js/source-map.d.ts +177 -63
  109. package/node_modules/source-map-js/source-map.js +4 -2
  110. package/package.json +3 -3
@@ -1,104 +1,218 @@
1
1
  export interface StartOfSourceMap {
2
- file?: string;
3
- sourceRoot?: string;
2
+ file?: string;
3
+ sourceRoot?: string;
4
4
  }
5
5
 
6
+ /**
7
+ * A source map as `SourceMapGenerator#toJSON` returns it. For a source map
8
+ * passed to `SourceMapConsumer`, use `RawSourceMapInput`.
9
+ */
6
10
  export interface RawSourceMap extends StartOfSourceMap {
7
- version: string;
8
- sources: string[];
9
- names: string[];
10
- sourcesContent?: string[];
11
- mappings: string;
11
+ /** The number `3` at runtime. Typed as a string for backward compatibility. */
12
+ version: string;
13
+ sources: string[];
14
+ names: string[];
15
+ /**
16
+ * `null` for each source without content at runtime. Typed as `string[]`
17
+ * for backward compatibility.
18
+ */
19
+ sourcesContent?: string[];
20
+ mappings: string;
21
+ }
22
+
23
+ /**
24
+ * A source map as `SourceMapConsumer` accepts it. Unlike `RawSourceMap`, the
25
+ * `version` can be a number, `sourcesContent` can have `null` entries, and
26
+ * `names` can be left out.
27
+ */
28
+ export interface RawSourceMapInput extends StartOfSourceMap {
29
+ version: number | string;
30
+ sources: string[];
31
+ names?: string[];
32
+ sourcesContent?: (string | null)[];
33
+ mappings: string;
34
+ }
35
+
36
+ export interface RawSection {
37
+ /** Where the section starts in the generated code. Both are 0-based. */
38
+ offset: Position;
39
+ map: RawSourceMapInput | RawIndexMap;
40
+ }
41
+
42
+ /** A source map made of sections, each with its own source map. */
43
+ export interface RawIndexMap {
44
+ version: number | string;
45
+ file?: string;
46
+ sections: RawSection[];
12
47
  }
13
48
 
14
49
  export interface Position {
15
- line: number;
16
- column: number;
50
+ line: number;
51
+ column: number;
17
52
  }
18
53
 
19
54
  export interface LineRange extends Position {
20
- lastColumn: number;
55
+ lastColumn: number;
21
56
  }
22
57
 
23
58
  export interface FindPosition extends Position {
24
- // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND
25
- bias?: number;
59
+ // SourceMapConsumer.GREATEST_LOWER_BOUND or SourceMapConsumer.LEAST_UPPER_BOUND
60
+ bias?: number;
26
61
  }
27
62
 
28
63
  export interface SourceFindPosition extends FindPosition {
29
- source: string;
64
+ source: string;
30
65
  }
31
66
 
32
67
  export interface MappedPosition extends Position {
33
- source: string;
34
- name?: string;
68
+ source: string;
69
+ name?: string;
35
70
  }
36
71
 
37
72
  export interface MappingItem {
38
- source: string | null;
39
- generatedLine: number;
40
- generatedColumn: number;
41
- originalLine: number | null;
42
- originalColumn: number | null;
43
- name: string | null;
73
+ source: string | null;
74
+ generatedLine: number;
75
+ generatedColumn: number;
76
+ originalLine: number | null;
77
+ originalColumn: number | null;
78
+ name: string | null;
44
79
  }
45
80
 
46
81
  export class SourceMapConsumer {
47
- static GENERATED_ORDER: number;
48
- static ORIGINAL_ORDER: number;
82
+ static GENERATED_ORDER: number;
83
+ static ORIGINAL_ORDER: number;
49
84
 
50
- static GREATEST_LOWER_BOUND: number;
51
- static LEAST_UPPER_BOUND: number;
85
+ static GREATEST_LOWER_BOUND: number;
86
+ static LEAST_UPPER_BOUND: number;
52
87
 
53
- constructor(rawSourceMap: RawSourceMap);
54
- readonly file: string | undefined | null;
55
- readonly sourceRoot: string | undefined | null;
56
- readonly sourcesContent: readonly string[] | null | undefined;
57
- readonly sources: readonly string[]
88
+ /**
89
+ * @param rawSourceMap A source map or an index map, as an object or as a
90
+ * JSON string.
91
+ * @param sourceMapUrl The URL of the source map. Relative `sources` are
92
+ * resolved against it.
93
+ */
94
+ constructor(
95
+ rawSourceMap: RawSourceMapInput | RawIndexMap | string,
96
+ sourceMapUrl?: string
97
+ );
98
+ static fromSourceMap(
99
+ sourceMap: SourceMapGenerator,
100
+ sourceMapUrl?: string
101
+ ): SourceMapConsumer;
102
+ readonly file: string | undefined | null;
103
+ readonly sourceRoot: string | undefined | null;
104
+ /** Can have `null` entries at runtime: one for each source without content. */
105
+ readonly sourcesContent: readonly string[] | null | undefined;
106
+ readonly sources: readonly string[];
58
107
 
59
- computeColumnSpans(): void;
60
- originalPositionFor(generatedPosition: FindPosition): MappedPosition;
61
- generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
62
- allGeneratedPositionsFor(originalPosition: MappedPosition): Position[];
63
- hasContentsOfAllSources(): boolean;
64
- sourceContentFor(source: string, returnNullOnMissing?: boolean): string | null;
65
- eachMapping(callback: (mapping: MappingItem) => void, context?: any, order?: number): void;
108
+ computeColumnSpans(): void;
109
+ /**
110
+ * At runtime, `source`, `line`, `column` and `name` are all `null` when no
111
+ * mapping is found, and `name` is `null` when the mapping has no name.
112
+ */
113
+ originalPositionFor(generatedPosition: FindPosition): MappedPosition;
114
+ /**
115
+ * At runtime, `line`, `column` and `lastColumn` are all `null` when no
116
+ * mapping is found, and `lastColumn` is `null` until `computeColumnSpans()`
117
+ * is called.
118
+ */
119
+ generatedPositionFor(originalPosition: SourceFindPosition): LineRange;
120
+ /**
121
+ * Without a `column`, returns the mappings of the line, or of the next line
122
+ * that has mappings. `lastColumn` is `null` until `computeColumnSpans()` is
123
+ * called.
124
+ */
125
+ allGeneratedPositionsFor(
126
+ originalPosition:
127
+ MappedPosition | { source: string; line: number; column?: number }
128
+ ): Array<Position & { lastColumn?: number | null }>;
129
+ hasContentsOfAllSources(): boolean;
130
+ sourceContentFor(
131
+ source: string,
132
+ returnNullOnMissing?: boolean
133
+ ): string | null;
134
+ eachMapping(
135
+ callback: (mapping: MappingItem) => void,
136
+ context?: any,
137
+ order?: number
138
+ ): void;
66
139
  }
67
140
 
68
141
  export interface Mapping {
69
- generated: Position;
70
- original?: Position | null;
71
- source?: string | null;
72
- name?: string | null;
142
+ generated: Position;
143
+ original?: Position | null;
144
+ source?: string | null;
145
+ name?: string | null;
146
+ }
147
+
148
+ export interface SourceMapGeneratorOptions extends StartOfSourceMap {
149
+ /** Don't validate mappings in `addMapping`. */
150
+ skipValidation?: boolean;
151
+ /** Warn about invalid mappings and skip them, instead of throwing. */
152
+ ignoreInvalidMapping?: boolean;
73
153
  }
74
154
 
75
155
  export class SourceMapGenerator {
76
- constructor(startOfSourceMap?: StartOfSourceMap);
77
- static fromSourceMap(sourceMapConsumer: SourceMapConsumer, startOfSourceMap?: StartOfSourceMap): SourceMapGenerator;
78
- addMapping(mapping: Mapping): void;
79
- setSourceContent(sourceFile: string, sourceContent: string | null | undefined): void;
80
- applySourceMap(sourceMapConsumer: SourceMapConsumer, sourceFile?: string, sourceMapPath?: string): void;
81
- toString(): string;
82
- toJSON(): RawSourceMap;
156
+ constructor(startOfSourceMap?: SourceMapGeneratorOptions);
157
+ static fromSourceMap(
158
+ sourceMapConsumer: SourceMapConsumer,
159
+ startOfSourceMap?: SourceMapGeneratorOptions
160
+ ): SourceMapGenerator;
161
+ addMapping(mapping: Mapping): void;
162
+ setSourceContent(
163
+ sourceFile: string,
164
+ sourceContent: string | null | undefined
165
+ ): void;
166
+ applySourceMap(
167
+ sourceMapConsumer: SourceMapConsumer,
168
+ sourceFile?: string,
169
+ sourceMapPath?: string
170
+ ): void;
171
+ toString(): string;
172
+ toJSON(): RawSourceMap;
83
173
  }
84
174
 
85
175
  export interface CodeWithSourceMap {
86
- code: string;
87
- map: SourceMapGenerator;
176
+ code: string;
177
+ map: SourceMapGenerator;
88
178
  }
89
179
 
180
+ /** A string of generated code, a `SourceNode`, or an array of chunks. */
181
+ export type SourceNodeChunk = string | SourceNode | SourceNodeChunkArray;
182
+ export interface SourceNodeChunkArray extends Array<SourceNodeChunk> {}
183
+
90
184
  export class SourceNode {
91
- constructor();
92
- constructor(line: number, column: number, source: string);
93
- constructor(line: number, column: number, source: string, chunk?: string, name?: string);
94
- static fromStringWithSourceMap(code: string, sourceMapConsumer: SourceMapConsumer, relativePath?: string): SourceNode;
95
- add(chunk: string): void;
96
- prepend(chunk: string): void;
97
- setSourceContent(sourceFile: string, sourceContent: string): void;
98
- walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
99
- walkSourceContents(fn: (file: string, content: string) => void): void;
100
- join(sep: string): SourceNode;
101
- replaceRight(pattern: string, replacement: string): SourceNode;
102
- toString(): string;
103
- toStringWithSourceMap(startOfSourceMap?: StartOfSourceMap): CodeWithSourceMap;
185
+ constructor();
186
+ constructor(
187
+ line: number | null,
188
+ column: number | null,
189
+ source: string | null,
190
+ chunks?: SourceNodeChunk,
191
+ name?: string | null
192
+ );
193
+ static fromStringWithSourceMap(
194
+ code: string,
195
+ sourceMapConsumer: SourceMapConsumer,
196
+ relativePath?: string
197
+ ): SourceNode;
198
+ /** Returns this node at runtime. */
199
+ add(chunk: SourceNodeChunk): void;
200
+ /** Returns this node at runtime. */
201
+ prepend(chunk: SourceNodeChunk): void;
202
+ setSourceContent(sourceFile: string, sourceContent: string): void;
203
+ /**
204
+ * At runtime, `source`, `line`, `column` and `name` are `null` for chunks
205
+ * without an original position, and `name` is `null` when there's no name.
206
+ */
207
+ walk(fn: (chunk: string, mapping: MappedPosition) => void): void;
208
+ walkSourceContents(fn: (file: string, content: string) => void): void;
209
+ join(sep: string): SourceNode;
210
+ replaceRight(
211
+ pattern: string | RegExp,
212
+ replacement: string | ((substring: string, ...args: any[]) => string)
213
+ ): SourceNode;
214
+ toString(): string;
215
+ toStringWithSourceMap(
216
+ startOfSourceMap?: SourceMapGeneratorOptions
217
+ ): CodeWithSourceMap;
104
218
  }
@@ -3,6 +3,8 @@
3
3
  * Licensed under the New BSD license. See LICENSE.txt or:
4
4
  * http://opensource.org/licenses/BSD-3-Clause
5
5
  */
6
- exports.SourceMapGenerator = require('./lib/source-map-generator').SourceMapGenerator;
7
- exports.SourceMapConsumer = require('./lib/source-map-consumer').SourceMapConsumer;
6
+ exports.SourceMapGenerator =
7
+ require('./lib/source-map-generator').SourceMapGenerator;
8
+ exports.SourceMapConsumer =
9
+ require('./lib/source-map-consumer').SourceMapConsumer;
8
10
  exports.SourceNode = require('./lib/source-node').SourceNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diffci.com/diffci",
3
- "version": "0.3.64",
3
+ "version": "0.3.66",
4
4
  "description": "Verification for AI coding agents: runs the tests and checks a change affects, with full fallback and a receipt",
5
5
  "keywords": [
6
6
  "ci",
@@ -76,7 +76,7 @@
76
76
  "test": "node scripts/run-tests.mjs"
77
77
  },
78
78
  "dependencies": {
79
- "@diffci.com/core": "git+https://github.com/DiffCI/core.git#e22323333adf89a959fe4e47297b8b3f365bbe95",
79
+ "@diffci.com/core": "git+https://github.com/DiffCI/core.git#31259384dcb80af1b703e938c99953999a26145d",
80
80
  "saxes": "6.0.0",
81
81
  "yaml": "^2.9.0"
82
82
  },
@@ -88,5 +88,5 @@
88
88
  "bundleDependencies": [
89
89
  "@diffci.com/core"
90
90
  ],
91
- "gitHead": "822f9514d8051c84d284c2b769b3c1a6fa0ab4aa"
91
+ "gitHead": "34a71469c0fcfa25aeb40e2d7c93645574fe6484"
92
92
  }