@contrast/rewriter 1.11.1 → 1.13.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/lib/index.js +4 -4
- package/package.json +6 -6
package/lib/index.js
CHANGED
|
@@ -41,8 +41,8 @@ const prefix = Module.wrapper[0];
|
|
|
41
41
|
// @ts-expect-error `wrapper` is missing from @types/node
|
|
42
42
|
const suffix = Module.wrapper[1].replace(/;$/, '.apply(this, arguments);');
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
const
|
|
44
|
+
// @ts-expect-error `@contrast/agent-swc-plugin` .d.ts file doesn't exist.
|
|
45
|
+
const { defaultRewriter, defaultUnwriter } = require('@contrast/agent-swc-plugin');
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* Wraps the source content as necessary to support rewriting.
|
|
@@ -105,7 +105,7 @@ class Rewriter {
|
|
|
105
105
|
},
|
|
106
106
|
jsc: {
|
|
107
107
|
experimental: {
|
|
108
|
-
plugins: [[
|
|
108
|
+
plugins: [[defaultRewriter, {
|
|
109
109
|
assess: this.modes.has('assess'),
|
|
110
110
|
inject: opts.inject,
|
|
111
111
|
}]],
|
|
@@ -166,7 +166,7 @@ class Rewriter {
|
|
|
166
166
|
},
|
|
167
167
|
jsc: {
|
|
168
168
|
experimental: {
|
|
169
|
-
plugins: [[
|
|
169
|
+
plugins: [[defaultUnwriter, {}]],
|
|
170
170
|
},
|
|
171
171
|
},
|
|
172
172
|
sourceMaps: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contrast/rewriter",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "A transpilation tool mainly used for instrumentation",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
"test": "../scripts/test.sh"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@contrast/agent-swc-plugin": "
|
|
18
|
-
"@contrast/
|
|
19
|
-
"@contrast/
|
|
20
|
-
"@contrast/
|
|
21
|
-
"@contrast/
|
|
17
|
+
"@contrast/agent-swc-plugin": "^2.0.0",
|
|
18
|
+
"@contrast/common": "1.25.0",
|
|
19
|
+
"@contrast/config": "1.33.0",
|
|
20
|
+
"@contrast/core": "1.37.0",
|
|
21
|
+
"@contrast/logger": "1.10.0",
|
|
22
22
|
"@swc/core": "1.5.29"
|
|
23
23
|
}
|
|
24
24
|
}
|