@contrast/rewriter 1.21.0 → 1.21.2

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright: 2024 Contrast Security, Inc
1
+ Copyright: 2025 Contrast Security, Inc
2
2
  Contact: support@contrastsecurity.com
3
3
  License: Commercial
4
4
 
package/lib/cache.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2024 Contrast Security, Inc
2
+ * Copyright: 2025 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2024 Contrast Security, Inc
2
+ * Copyright: 2025 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
@@ -16,6 +16,7 @@
16
16
  'use strict';
17
17
 
18
18
  const Module = require('node:module');
19
+ const path = require('node:path');
19
20
  const { transform, transformSync } = require('@swc/core');
20
21
  const { Cache } = require('./cache');
21
22
  const { primordials: { StringPrototypeReplace, StringPrototypeSubstring } } = require('@contrast/common');
@@ -111,6 +112,7 @@ class Rewriter {
111
112
  assess: this.modes.has('assess'),
112
113
  inject: opts.inject,
113
114
  }]],
115
+ cacheRoot: path.join(this.core.config.agent.node.rewrite.cache.path, '.swc'),
114
116
  },
115
117
  },
116
118
  sourceMaps: this.core.config.agent.node.source_maps.enable,
@@ -1,5 +1,5 @@
1
1
  /*
2
- * Copyright: 2024 Contrast Security, Inc
2
+ * Copyright: 2025 Contrast Security, Inc
3
3
  * Contact: support@contrastsecurity.com
4
4
  * License: Commercial
5
5
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/rewriter",
3
- "version": "1.21.0",
3
+ "version": "1.21.2",
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)",
@@ -15,10 +15,10 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@contrast/agent-swc-plugin": "^2.0.0",
18
- "@contrast/common": "1.29.0",
19
- "@contrast/config": "1.40.0",
20
- "@contrast/core": "1.45.0",
21
- "@contrast/logger": "1.18.0",
18
+ "@contrast/common": "1.29.1",
19
+ "@contrast/config": "1.40.1",
20
+ "@contrast/core": "1.45.1",
21
+ "@contrast/logger": "1.18.1",
22
22
  "@swc/core": "1.5.29"
23
23
  }
24
24
  }