@appland/appmap 3.188.7 → 3.189.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.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [@appland/appmap-v3.189.0](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.188.7...@appland/appmap-v3.189.0) (2025-05-10)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Ignore some files in the diff and remove diff size limit ([1faa73a](https://github.com/getappmap/appmap-js/commit/1faa73a23a159fad659b2fcf52731563335c5a73))
|
|
7
|
+
|
|
1
8
|
# [@appland/appmap-v3.188.7](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.188.6...@appland/appmap-v3.188.7) (2025-05-01)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
3
|
/**
|
|
3
4
|
* Examine all the diffs in a git diff output and replace long ones with a simple
|
|
4
5
|
* message indicating that there is a change and its size.
|
|
5
6
|
* @param patchset - The patchset to process.
|
|
6
7
|
* @param maxDiffLength - The maximum length of a diff to include in the patchset.
|
|
8
|
+
* @param ignoreList - A list of paths to ignore when processing the patchset.
|
|
9
|
+
* This is useful for ignoring files that are not relevant to the
|
|
10
|
+
* changes being made, such as dependencies or generated files.
|
|
11
|
+
* The default ignore list includes common directories and files
|
|
12
|
+
* that are typically not relevant to code changes.
|
|
7
13
|
* @returns The processed patchset.
|
|
8
14
|
*/
|
|
9
|
-
|
|
10
|
-
function processPatchset(patchset, maxDiffLength = 5000) {
|
|
15
|
+
function processPatchset(patchset, maxDiffLength = Infinity, ignoreList = DEFAULT_IGNORE_LIST) {
|
|
11
16
|
const parts = patchset.split(/^(?=diff|commit)/m);
|
|
17
|
+
const ignoreRegex = buildIgnoreRegex(ignoreList);
|
|
12
18
|
return parts
|
|
19
|
+
.filter((part) => !part.match(ignoreRegex))
|
|
13
20
|
.map((part) => {
|
|
14
21
|
if (part.startsWith('diff')) {
|
|
15
22
|
const lines = part.split('\n');
|
|
@@ -24,4 +31,27 @@ function processPatchset(patchset, maxDiffLength = 5000) {
|
|
|
24
31
|
.join('');
|
|
25
32
|
}
|
|
26
33
|
exports.default = processPatchset;
|
|
34
|
+
function buildIgnoreRegex(ignoreList) {
|
|
35
|
+
if (ignoreList.length === 0)
|
|
36
|
+
return /(?!)/; // Matches nothing
|
|
37
|
+
const escapedIgnoreList = ignoreList.map((path) => path.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&'));
|
|
38
|
+
return new RegExp(`^diff --git a/(?:${escapedIgnoreList.join('|')})(/| )`, 's');
|
|
39
|
+
}
|
|
40
|
+
const DEFAULT_IGNORE_LIST = [
|
|
41
|
+
'node_modules',
|
|
42
|
+
'vendor',
|
|
43
|
+
'venv',
|
|
44
|
+
'dist',
|
|
45
|
+
'build',
|
|
46
|
+
'target',
|
|
47
|
+
'coverage',
|
|
48
|
+
'tmp',
|
|
49
|
+
'log',
|
|
50
|
+
'.venv',
|
|
51
|
+
'yarn.lock',
|
|
52
|
+
'package-lock.json',
|
|
53
|
+
'Gemfile.lock',
|
|
54
|
+
'go.sum',
|
|
55
|
+
'composer.lock',
|
|
56
|
+
];
|
|
27
57
|
//# sourceMappingURL=processPatchset.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processPatchset.js","sourceRoot":"","sources":["../../src/lib/processPatchset.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"processPatchset.js","sourceRoot":"","sources":["../../src/lib/processPatchset.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;GAWG;AACH,SAAwB,eAAe,CACrC,QAAgB,EAChB,aAAa,GAAG,QAAQ,EACxB,UAAU,GAAG,mBAAmB;IAEhC,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,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