@teamscale/javascript-instrumenter 0.0.1-beta.1 → 0.0.1-beta.7

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/README.md CHANGED
@@ -52,7 +52,7 @@ or
52
52
  There are several options to run the Instrumenter. For example, via `yarn` by running
53
53
 
54
54
  ```
55
- yarn instrument
55
+ yarn instrumenter
56
56
  ```
57
57
 
58
58
  or via `npx` by running
@@ -74,24 +74,17 @@ the file must contain source-map information, or the source-map file
74
74
  must be placed along with the source file in the same directory.
75
75
 
76
76
  ```
77
- yarn run --inplace ./the/path/to/the/file.js
77
+ yarn instrumenter --inplace ./the/path/to/the/file.js
78
78
  ```
79
79
 
80
80
  ```
81
- yarn run --inplace ./the/path/to/the/file.js --source-map ./the/path/to/the/source.map
81
+ yarn instrumenter --inplace ./the/path/to/the/file.js --source-map ./the/path/to/the/source.map
82
82
  ```
83
83
 
84
84
  ```
85
- yarn run ./the/path/to/the/file.js --to ./the/file/path/to/write/to.js
85
+ yarn instrumenter ./the/path/to/the/file.js --to ./the/file/path/to/write/to.js
86
86
  ```
87
87
 
88
- ### Instrumenting all JavaScript Files in a Folder
89
-
90
- We think that dealing with sets of files, in particular including or excluding
91
- files that match particular file masks should be done by other tools.
92
- In a UNIX environment, you should consider using `find` with corresponding
93
- filters and an `-exec` argument to run the instrumenter.
94
-
95
88
  ### Integration with Testing Frameworks
96
89
 
97
90
  This is planned work: Provide a Babel plugin that provides a code transformation
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamscale/javascript-instrumenter",
3
- "version": "0.0.1-beta.1",
3
+ "version": "0.0.1-beta.7",
4
4
  "description": "Istanbul-based coverage instrumenter with coverage forwarding via WebSockets",
5
5
  "main": "dist/src/main.js",
6
6
  "bin": "dist/src/main.js",
@@ -14,7 +14,7 @@
14
14
  "scripts": {
15
15
  "clean": "rimraf dist tsconfig.tsbuildinfo",
16
16
  "build": "tsc --project tsconfig.json && node esbuild.mjs",
17
- "instrument": "node dist/src/main.js",
17
+ "instrumenter": "node dist/src/main.js",
18
18
  "test": "yarn build && NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --coverage --silent=true --detectOpenHandles"
19
19
  },
20
20
  "files": [
@@ -58,7 +58,8 @@
58
58
  "source-map": "0.6.1",
59
59
  "typescript-optional": "^2.0.1",
60
60
  "unload": "^2.2.0",
61
- "web-worker": "^1.0.0"
61
+ "web-worker": "^1.0.0",
62
+ "winston": "^3.3.3"
62
63
  },
63
64
  "publishConfig": {
64
65
  "access": "public"
@@ -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;AAGlF,OAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAG1C;;GAEG;AACH,qBAAa,GAAG;IACf;;;OAGG;WACiB,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAa9C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IA6B1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAa1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAS/B;;;;;OAKG;WACW,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAO1G,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;AAGlF,OAAgB,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAG1C;;GAEG;AACH,qBAAa,GAAG;IACf;;;OAGG;WACiB,GAAG,IAAI,OAAO,CAAC,UAAU,CAAC;IAa9C;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAgC1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,WAAW;IAa1B;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAS/B;;;;;OAKG;WACW,qBAAqB,CAAC,MAAM,EAAE,uBAAuB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAO1G,OAAO,CAAC,MAAM,CAAC,yBAAyB;IAIxC,OAAO,CAAC,MAAM,CAAC,kBAAkB;CAajC"}
package/dist/src/App.js CHANGED
@@ -57,10 +57,13 @@ class App {
57
57
  description: 'Instrumenter of the Teamscale JavaScript Profiler'
58
58
  });
59
59
  parser.add_argument('-v', '--version', { action: 'version', version: package_json_1.version });
60
- parser.add_argument('-i', '--in-place', { action: 'store_true' });
60
+ parser.add_argument('-i', '--in-place', {
61
+ action: 'store_true',
62
+ help: 'If set, the original files to instrument are replaced (!!) by their instrumented counterparts.'
63
+ });
61
64
  parser.add_argument('-d', '--debug', { action: 'store_true' });
62
65
  parser.add_argument('-o', '--to', {
63
- help: 'Name of the file to write the instrumented version to.'
66
+ help: 'Path (directory or file name) to write the instrumented version to.'
64
67
  });
65
68
  parser.add_argument('-s', '--source-map', {
66
69
  help: 'External location of source-map files to consider.'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamscale/javascript-instrumenter",
3
- "version": "0.0.1-beta.1",
3
+ "version": "0.0.1-beta.7",
4
4
  "description": "Istanbul-based coverage instrumenter with coverage forwarding via WebSockets",
5
5
  "main": "dist/src/main.js",
6
6
  "bin": "dist/src/main.js",
@@ -14,7 +14,7 @@
14
14
  "scripts": {
15
15
  "clean": "rimraf dist tsconfig.tsbuildinfo",
16
16
  "build": "tsc --project tsconfig.json && node esbuild.mjs",
17
- "instrument": "node dist/src/main.js",
17
+ "instrumenter": "node dist/src/main.js",
18
18
  "test": "yarn build && NODE_OPTIONS='--experimental-vm-modules' jest --forceExit --coverage --silent=true --detectOpenHandles"
19
19
  },
20
20
  "files": [
@@ -58,7 +58,8 @@
58
58
  "source-map": "0.6.1",
59
59
  "typescript-optional": "^2.0.1",
60
60
  "unload": "^2.2.0",
61
- "web-worker": "^1.0.0"
61
+ "web-worker": "^1.0.0",
62
+ "winston": "^3.3.3"
62
63
  },
63
64
  "publishConfig": {
64
65
  "access": "public"