@appland/appmap 3.188.7 → 3.189.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,3 +1,17 @@
1
+ # [@appland/appmap-v3.189.1](https://github.com/getappmap/appmap-js/compare/@appland/appmap-v3.189.0...@appland/appmap-v3.189.1) (2025-05-16)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * Update parseLocation to handle negative line numbers correctly ([871139a](https://github.com/getappmap/appmap-js/commit/871139a659115725ffb06276f8f2941456b9ed25)), closes [#2304](https://github.com/getappmap/appmap-js/issues/2304)
7
+
8
+ # [@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)
9
+
10
+
11
+ ### Features
12
+
13
+ * Ignore some files in the diff and remove diff size limit ([1faa73a](https://github.com/getappmap/appmap-js/commit/1faa73a23a159fad659b2fcf52731563335c5a73))
14
+
1
15
  # [@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
16
 
3
17
 
package/LICENSE.txt CHANGED
@@ -12,7 +12,7 @@ Software: @appland/appmap
12
12
 
13
13
  License: MIT License
14
14
 
15
- Copyright 2024, AppLand Inc
15
+ Copyright 2025, AppLand Inc
16
16
 
17
17
  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"),
18
18
  to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
@@ -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
- Object.defineProperty(exports, "__esModule", { value: true });
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":";AAAA;;;;;;GAMG;;AAEH,SAAwB,eAAe,CAAC,QAAgB,EAAE,aAAa,GAAG,IAAI;IAC5E,MAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,mBAA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AC;YACxB,MAAM,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACvC,IAAI,IAAI,CAAC,MAAM,GAAG,aAAa,EAAE;gBAC/B,OAAO,GAAG,MAAM,qBAAqB,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,KAAK,CAAC;aACjE;SACF;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;SACD,IAAI,CAAC,EAAE,CAAC,CAAC;AACd,CAAC;AArBD,kCAqBC;AAED,SAAS,gBAAgB,CAAC,UAA6B;IACrD,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,MAAM,CAAC,CAAC,kBAAkB;IAC9D,MAAM,iBAAiB,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,uBAAuB,EAAE,MAAM,CAAC,CAAC,CAAC;IAClG,OAAO,IAAI,MAAM,CAAC,oBAAoB,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAClF,CAAC;AAED,MAAM,mBAAmB,GAAsB;IAC7C,cAAc;IACd,QAAQ;IACR,MAAM;IACN,MAAM;IACN,OAAO;IACP,QAAQ;IACR,UAAU;IACV,KAAK;IACL,KAAK;IACL,OAAO;IACP,WAAW;IACX,mBAAmB;IACnB,cAAc;IACd,QAAQ;IACR,eAAe;CAChB,CAAC"}
@@ -8,13 +8,13 @@ const console_1 = require("console");
8
8
  function parseLocation(location) {
9
9
  if (!location.includes(':'))
10
10
  return [location, undefined];
11
- const locationTest = /([^:]+):(\d+)$/.exec(location);
11
+ const locationTest = /([^:]+):(-?\d+)$/.exec(location);
12
12
  if (!locationTest) {
13
13
  (0, console_1.warn)(chalk_1.default.gray(`Invalid location format: ${location}. Skipping file lookup.`));
14
14
  return;
15
15
  }
16
16
  const [requestedFileName, lineNoStr] = locationTest.slice(1);
17
- const lineNoReturned = lineNoStr ? parseInt(lineNoStr, 10) : undefined;
17
+ const lineNoReturned = lineNoStr && !lineNoStr.startsWith('-') ? parseInt(lineNoStr, 10) : undefined;
18
18
  return [requestedFileName, lineNoReturned];
19
19
  }
20
20
  exports.default = parseLocation;
@@ -1 +1 @@
1
- {"version":3,"file":"parseLocation.js","sourceRoot":"","sources":["../../../src/rpc/explain/parseLocation.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,qCAA+B;AAE/B,SAAwB,aAAa,CAAC,QAAgB;IACpD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,gBAAgB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACrD,IAAI,CAAC,YAAY,EAAE;QACjB,IAAA,cAAI,EAAC,eAAK,CAAC,IAAI,CAAC,4BAA4B,QAAQ,yBAAyB,CAAC,CAAC,CAAC;QAChF,OAAO;KACR;IAED,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAG,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACvE,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;AAC7C,CAAC;AAZD,gCAYC"}
1
+ {"version":3,"file":"parseLocation.js","sourceRoot":"","sources":["../../../src/rpc/explain/parseLocation.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,qCAA+B;AAE/B,SAAwB,aAAa,CAAC,QAAgB;IACpD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC;QAAE,OAAO,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAE1D,MAAM,YAAY,GAAG,kBAAkB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACvD,IAAI,CAAC,YAAY,EAAE;QACjB,IAAA,cAAI,EAAC,eAAK,CAAC,IAAI,CAAC,4BAA4B,QAAQ,yBAAyB,CAAC,CAAC,CAAC;QAChF,OAAO;KACR;IAED,MAAM,CAAC,iBAAiB,EAAE,SAAS,CAAC,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC7D,MAAM,cAAc,GAClB,SAAS,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,OAAO,CAAC,iBAAiB,EAAE,cAAc,CAAC,CAAC;AAC7C,CAAC;AAbD,gCAaC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appland/appmap",
3
- "version": "3.188.7",
3
+ "version": "3.189.1",
4
4
  "description": "",
5
5
  "bin": "built/cli.js",
6
6
  "engines": {