@contrast/rewriter 1.30.2 → 1.32.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.
Files changed (2) hide show
  1. package/lib/index.js +2 -2
  2. package/package.json +8 -8
package/lib/index.js CHANGED
@@ -200,9 +200,9 @@ module.exports = function init(core) {
200
200
  parseSync('');
201
201
  } catch (cause) {
202
202
  // @ts-expect-error TS hates errors.
203
- throw cause.message === 'Bindings not found.'
203
+ throw cause.message === 'Failed to load native binding'
204
204
  ? new Error(
205
- `Contrast cannot detect the correct precompiled dependencies for the current environment: ${platform()}-${arch()}. This typically occurs when deploying an installation from one environment to a different execution environment.`,
205
+ `Contrast cannot detect the correct precompiled dependencies for the current environment: ${platform()}-${arch()}. This typically occurs when deploying an installation from one environment to a different execution environment or when the \`--omit=optional\` or \`--no-optional\` flags are provided to \`npm install\`.`,
206
206
  // @ts-expect-error `cause` requires ts to target es2022 or above, which corresponds to Node 17+, despite being added to Node in 16.9.
207
207
  { cause },
208
208
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/rewriter",
3
- "version": "1.30.2",
3
+ "version": "1.32.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,17 +14,17 @@
14
14
  "types": "types/index.d.ts",
15
15
  "engines": {
16
16
  "npm": ">=6.13.7 <7 || >= 8.3.1",
17
- "node": ">= 16.9.1"
17
+ "node": ">= 18.7.0"
18
18
  },
19
19
  "scripts": {
20
20
  "test": "bash ../scripts/test.sh"
21
21
  },
22
22
  "dependencies": {
23
- "@contrast/agent-swc-plugin": "3.0.0",
24
- "@contrast/common": "1.34.2",
25
- "@contrast/config": "1.49.2",
26
- "@contrast/core": "1.54.2",
27
- "@contrast/logger": "1.27.2",
28
- "@swc/core": "1.11.24"
23
+ "@contrast/agent-swc-plugin": "3.2.0",
24
+ "@contrast/common": "1.36.0",
25
+ "@contrast/config": "1.51.0",
26
+ "@contrast/core": "1.56.0",
27
+ "@contrast/logger": "1.29.0",
28
+ "@swc/core": "1.13.3"
29
29
  }
30
30
  }