@teamscale/javascript-instrumenter 0.0.1-beta.49 → 0.0.1-beta.50

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/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamscale/javascript-instrumenter",
3
- "version": "0.0.1-beta.49",
3
+ "version": "0.0.1-beta.50",
4
4
  "description": "JavaScript coverage instrumenter with coverage forwarding to a collector process",
5
5
  "main": "dist/src/main.js",
6
6
  "bin": "dist/src/main.js",
@@ -1 +1 @@
1
- {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,EAAE,uBAAuB,EAAe,MAAM,4BAA4B,CAAC;AAKlF,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,qBAAa,GAAG;IACf;;;OAGG;WACiB,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAa9C;;;OAGG;WACW,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAoCtE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAyC1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA8B1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B;;;;;OAKG;WACW,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAS1G,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAIxC,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAajC"}
1
+ {"version":3,"file":"App.d.ts","sourceRoot":"","sources":["../../src/App.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtE,OAAO,EAAE,uBAAuB,EAAe,MAAM,4BAA4B,CAAC;AAKlF,OAAO,MAAM,MAAM,QAAQ,CAAC;AAE5B;;GAEG;AACH,qBAAa,GAAG;IACf;;;OAGG;WACiB,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAe9C;;;OAGG;WACW,iBAAiB,CAAC,MAAM,EAAE,uBAAuB,GAAG,IAAI;IAyCtE;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAyC1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA8B1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B;;;;;OAKG;WACW,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAS1G,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAIxC,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAajC"}
package/dist/src/App.js CHANGED
@@ -51,6 +51,8 @@ class App {
51
51
  const config = parser.parse_args();
52
52
  // Build the logger
53
53
  const logger = this.buildLogger(config);
54
+ logger.debug("Retrieved arguments", process.argv);
55
+ logger.debug("Translated arguments to config", config);
54
56
  // Run the instrumenter with the given configuration.
55
57
  return this.runForConfigArguments(config, logger);
56
58
  }
@@ -63,7 +65,13 @@ class App {
63
65
  if (originalString === undefined) {
64
66
  return originalString;
65
67
  }
66
- return originalString.replace(/^["'](.+(?=["']$))["']$/, '$1');
68
+ const result = originalString.replace(/^["'](.+(?=["']$))["']$/, '$1');
69
+ if (result === originalString) {
70
+ return result;
71
+ }
72
+ else {
73
+ return unquoteString(result);
74
+ }
67
75
  }
68
76
  function unquoteStringElements(originalArray) {
69
77
  if (originalArray === undefined) {
@@ -83,6 +83,10 @@ class IstanbulInstrumenter {
83
83
  }
84
84
  return new Task_1.TaskResult(0, 0, 0, 1, 0, 0, 0);
85
85
  }
86
+ // Not all file types are supported by the instrumenter
87
+ if (!this.isFileTypeSupported(taskElement.fromFile)) {
88
+ return new Task_1.TaskResult(0, 0, 0, 0, 1, 0, 0);
89
+ }
86
90
  // We might want to skip the instrumentation of the file
87
91
  if (excludeBundles.isExcluded(taskElement.fromFile)) {
88
92
  if (!taskElement.isInPlace()) {
@@ -90,10 +94,6 @@ class IstanbulInstrumenter {
90
94
  }
91
95
  return new Task_1.TaskResult(0, 1, 0, 0, 0, 0, 0);
92
96
  }
93
- // Not all file types are supported by the instrumenter
94
- if (!this.isFileTypeSupported(taskElement.fromFile)) {
95
- return new Task_1.TaskResult(0, 0, 0, 0, 1, 0, 0);
96
- }
97
97
  // Report progress
98
98
  this.logger.info(`Instrumenting "${path.basename(taskElement.fromFile)}"`);
99
99
  let finalSourceMap;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamscale/javascript-instrumenter",
3
- "version": "0.0.1-beta.49",
3
+ "version": "0.0.1-beta.50",
4
4
  "description": "JavaScript coverage instrumenter with coverage forwarding to a collector process",
5
5
  "main": "dist/src/main.js",
6
6
  "bin": "dist/src/main.js",