@contrast/cli 1.40.0 → 1.41.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/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
 
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
- * Copyright: 2024 Contrast Security, Inc
3
+ * Copyright: 2025 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
package/lib/rewrite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
- * Copyright: 2024 Contrast Security, Inc
3
+ * Copyright: 2025 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
@@ -19,12 +19,13 @@
19
19
  const { readFile } = require('node:fs/promises');
20
20
  const { createRequire } = require('node:module');
21
21
  const path = require('node:path');
22
+ const { program } = require('commander');
22
23
  const swc = require('@swc/core');
23
24
  const { Visitor } = require('@swc/core/Visitor');
25
+ const { primordials: { RegExpPrototypeTest, JSONParse } } = require('@contrast/common');
24
26
  const { findPackageJson } = require('@contrast/find-package-json');
25
- const { program } = require('commander');
27
+ const { rewriteIsDeadzoned } = require('@contrast/rewriter/lib/rewrite-is-deadzoned');
26
28
  const { version } = require('../package.json');
27
- const { primordials: { RegExpPrototypeTest, JSONParse } } = require('@contrast/common');
28
29
 
29
30
  const JS_FILE_REGEX = /\.[cm]?js$/;
30
31
 
@@ -135,7 +136,11 @@ class RewriteVisitor extends Visitor {
135
136
 
136
137
  /** @param {string} filename */
137
138
  async function rewriteFile(filename) {
138
- if (!RegExpPrototypeTest.call(JS_FILE_REGEX, filename) || visited.has(filename)) return;
139
+ if (
140
+ !RegExpPrototypeTest.call(JS_FILE_REGEX, filename) ||
141
+ visited.has(filename) ||
142
+ rewriteIsDeadzoned(filename)
143
+ ) return;
139
144
 
140
145
  try {
141
146
  const content = (await readFile(filename)).toString();
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  /*
3
- * Copyright: 2024 Contrast Security, Inc
3
+ * Copyright: 2025 Contrast Security, Inc
4
4
  * Contact: support@contrastsecurity.com
5
5
  * License: Commercial
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contrast/cli",
3
- "version": "1.40.0",
3
+ "version": "1.41.1",
4
4
  "description": "A collection of agent related CLI utilities",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": "Contrast Security <nodejs@contrastsecurity.com> (https://www.contrastsecurity.com)",
@@ -21,14 +21,14 @@
21
21
  },
22
22
  "dependencies": {
23
23
  "@contrast/find-package-json": "^1.1.0",
24
- "@contrast/rewriter": "1.20.0",
25
- "@contrast/common": "1.29.0",
26
- "@contrast/config": "1.39.0",
27
- "@contrast/core": "1.44.0",
28
- "@contrast/logger": "1.17.0",
29
- "@contrast/perf": "1.3.0",
30
- "@contrast/reporter": "1.40.0",
31
- "@contrast/scopes": "1.14.0",
24
+ "@contrast/rewriter": "1.21.1",
25
+ "@contrast/common": "1.29.1",
26
+ "@contrast/config": "1.40.1",
27
+ "@contrast/core": "1.45.1",
28
+ "@contrast/logger": "1.18.1",
29
+ "@contrast/perf": "1.3.1",
30
+ "@contrast/reporter": "1.41.1",
31
+ "@contrast/scopes": "1.15.1",
32
32
  "@swc/core": "1.5.29",
33
33
  "commander": "^9.4.1"
34
34
  }