@contrast/rewriter 1.6.0 → 1.7.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/lib/cache.js CHANGED
@@ -19,6 +19,7 @@ const fs = require('node:fs');
19
19
  const fsPromises = require('node:fs/promises');
20
20
  const os = require('node:os');
21
21
  const path = require('node:path');
22
+ const { version } = require('../package.json');
22
23
 
23
24
  /**
24
25
  * Returns the modification time of a file as a number.
@@ -47,7 +48,7 @@ module.exports.Cache = class Cache {
47
48
  this.cacheDir = path.join(
48
49
  core.config.agent.node.rewrite.cache.path,
49
50
  core.appInfo.name.replace('/', '_'),
50
- core.agentVersion,
51
+ version,
51
52
  );
52
53
  }
53
54
 
package/lib/index.js CHANGED
@@ -30,7 +30,6 @@ const INJECTION_FIXES = [
30
30
  /**
31
31
  * @typedef {Object} Core
32
32
  * @prop {import('@contrast/common').AppInfo} appInfo
33
- * @prop {string} agentVersion
34
33
  * @prop {import('@contrast/config').Config} config
35
34
  * @prop {import('@contrast/logger').Logger} logger
36
35
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/rewriter",
3
- "version": "1.6.0",
3
+ "version": "1.7.1",
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)",
@@ -8,7 +8,7 @@
8
8
  "types": "types/index.d.ts",
9
9
  "engines": {
10
10
  "npm": ">=6.13.7 <7 || >= 8.3.1",
11
- "node": ">= 14.15.0"
11
+ "node": ">= 14.18.0"
12
12
  },
13
13
  "scripts": {
14
14
  "test": "../scripts/test.sh"
@@ -16,7 +16,7 @@
16
16
  "dependencies": {
17
17
  "@contrast/agent-swc-plugin": "1.3.0",
18
18
  "@contrast/agent-swc-plugin-unwrite": "1.3.0",
19
- "@contrast/common": "1.20.0",
19
+ "@contrast/common": "1.20.1",
20
20
  "@contrast/synchronous-source-maps": "^1.1.3",
21
21
  "@swc/core": "1.3.39",
22
22
  "multi-stage-sourcemap": "^0.3.1"