@socketsecurity/cli-with-sentry 1.1.14 → 1.1.17

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 (112) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/cli.js +114 -32
  3. package/dist/cli.js.map +1 -1
  4. package/dist/constants.js +35 -37
  5. package/dist/constants.js.map +1 -1
  6. package/dist/shadow-npm-bin.js +6 -6
  7. package/dist/shadow-npm-bin.js.map +1 -1
  8. package/dist/shadow-pnpm-bin.js +3 -5
  9. package/dist/shadow-pnpm-bin.js.map +1 -1
  10. package/dist/shadow-yarn-bin.js +2 -2
  11. package/dist/shadow-yarn-bin.js.map +1 -1
  12. package/dist/tsconfig.dts.tsbuildinfo +1 -1
  13. package/dist/types/commands/fix/cmd-fix.d.mts.map +1 -1
  14. package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
  15. package/dist/types/commands/fix/env-helpers.d.mts +13 -0
  16. package/dist/types/commands/fix/env-helpers.d.mts.map +1 -1
  17. package/dist/types/commands/fix/handle-fix.d.mts.map +1 -1
  18. package/dist/types/commands/manifest/cmd-manifest-cdxgen.d.mts.map +1 -1
  19. package/dist/types/commands/manifest/run-cdxgen.d.mts.map +1 -1
  20. package/dist/types/commands/optimize/apply-optimization.d.mts.map +1 -1
  21. package/dist/types/commands/optimize/update-lockfile.d.mts.map +1 -1
  22. package/dist/types/commands/package/fetch-purls-shallow-score.d.mts.map +1 -1
  23. package/dist/types/commands/patch/cmd-patch.d.mts.map +1 -1
  24. package/dist/types/commands/patch/handle-patch.d.mts.map +1 -1
  25. package/dist/types/commands/threat-feed/cmd-threat-feed.d.mts.map +1 -1
  26. package/dist/types/commands/yarn/cmd-yarn.d.mts +1 -1
  27. package/dist/types/commands/yarn/cmd-yarn.d.mts.map +1 -1
  28. package/dist/types/constants.d.mts +15 -19
  29. package/dist/types/constants.d.mts.map +1 -1
  30. package/dist/types/shadow/pnpm/bin.d.mts.map +1 -1
  31. package/dist/types/utils/agent.d.mts.map +1 -1
  32. package/dist/types/utils/api.d.mts.map +1 -1
  33. package/dist/types/utils/dlx.d.mts.map +1 -1
  34. package/dist/types/utils/package-environment.d.mts.map +1 -1
  35. package/dist/types/utils/path-resolve.d.mts.map +1 -1
  36. package/dist/utils.js +70 -29
  37. package/dist/utils.js.map +1 -1
  38. package/dist/vendor.js +514 -517
  39. package/external/@socketsecurity/registry/external/@inquirer/confirm.js +45 -205
  40. package/external/@socketsecurity/registry/external/@inquirer/input.js +45 -205
  41. package/external/@socketsecurity/registry/external/@inquirer/password.js +181 -205
  42. package/external/@socketsecurity/registry/external/@inquirer/search.js +47 -207
  43. package/external/@socketsecurity/registry/external/@inquirer/select.js +183 -207
  44. package/external/@socketsecurity/registry/external/@npmcli/package-json/index.js +388 -2280
  45. package/external/@socketsecurity/registry/external/browserslist.js +11534 -567
  46. package/external/@socketsecurity/registry/external/cacache.js +2575 -4914
  47. package/external/@socketsecurity/registry/external/libnpmpack.js +64667 -166061
  48. package/external/@socketsecurity/registry/external/make-fetch-happen.js +384 -4044
  49. package/external/@socketsecurity/registry/external/normalize-package-data.js +30 -278
  50. package/external/@socketsecurity/registry/external/npm-package-arg.js +28 -9
  51. package/external/@socketsecurity/registry/external/pacote.js +46680 -66482
  52. package/external/@socketsecurity/registry/external/spdx-correct.js +19 -0
  53. package/external/@socketsecurity/registry/external/spdx-expression-parse.js +19 -0
  54. package/external/@socketsecurity/registry/lib/agent.js +390 -0
  55. package/external/@socketsecurity/registry/lib/arrays.js +31 -0
  56. package/external/@socketsecurity/registry/lib/bin.js +650 -0
  57. package/external/@socketsecurity/registry/lib/constants/bun-lock.js +3 -0
  58. package/external/@socketsecurity/registry/lib/constants/bun-lockb.js +3 -0
  59. package/external/@socketsecurity/registry/lib/constants/bun.js +3 -0
  60. package/external/@socketsecurity/registry/lib/constants/dot-git-dir.js +3 -0
  61. package/external/@socketsecurity/registry/lib/constants/dot-socket-dir.js +3 -0
  62. package/external/@socketsecurity/registry/lib/constants/empty-value.js +3 -0
  63. package/external/@socketsecurity/registry/lib/constants/env.js +17 -3
  64. package/external/@socketsecurity/registry/lib/constants/ext-yaml.js +3 -0
  65. package/external/@socketsecurity/registry/lib/constants/ext-yml.js +3 -0
  66. package/external/@socketsecurity/registry/lib/constants/index.js +20 -11
  67. package/external/@socketsecurity/registry/lib/constants/npm-exec-path.js +2 -2
  68. package/external/@socketsecurity/registry/lib/constants/npm-real-exec-path.js +1 -1
  69. package/external/@socketsecurity/registry/lib/constants/npm-shrinkwrap-json.js +3 -0
  70. package/external/@socketsecurity/registry/lib/constants/pnpm-exec-path.js +5 -0
  71. package/external/@socketsecurity/registry/lib/constants/pnpm-lock-yaml.js +3 -0
  72. package/external/@socketsecurity/registry/lib/constants/unknown-error.js +3 -0
  73. package/external/@socketsecurity/registry/lib/constants/unknown-value.js +3 -0
  74. package/external/@socketsecurity/registry/lib/constants/vlt-lock-json.js +3 -0
  75. package/external/@socketsecurity/registry/lib/constants/vlt.js +3 -0
  76. package/external/@socketsecurity/registry/lib/constants/yarn-berry.js +3 -0
  77. package/external/@socketsecurity/registry/lib/constants/yarn-classic.js +3 -0
  78. package/external/@socketsecurity/registry/lib/constants/yarn-exec-path.js +5 -0
  79. package/external/@socketsecurity/registry/lib/constants/yarn.js +3 -0
  80. package/external/@socketsecurity/registry/lib/debug.js +53 -0
  81. package/external/@socketsecurity/registry/lib/env.js +18 -0
  82. package/external/@socketsecurity/registry/lib/fs.js +218 -2
  83. package/external/@socketsecurity/registry/lib/functions.js +5 -0
  84. package/external/@socketsecurity/registry/lib/globs.js +22 -1
  85. package/external/@socketsecurity/registry/lib/json.js +16 -0
  86. package/external/@socketsecurity/registry/lib/logger.js +157 -0
  87. package/external/@socketsecurity/registry/lib/objects.js +103 -0
  88. package/external/@socketsecurity/registry/lib/packages.js +88 -0
  89. package/external/@socketsecurity/registry/lib/path.js +51 -1
  90. package/external/@socketsecurity/registry/lib/promises.js +55 -0
  91. package/external/@socketsecurity/registry/lib/regexps.js +5 -0
  92. package/external/@socketsecurity/registry/lib/sorts.js +17 -0
  93. package/external/@socketsecurity/registry/lib/spawn.js +105 -7
  94. package/external/@socketsecurity/registry/lib/streams.js +26 -0
  95. package/external/@socketsecurity/registry/lib/strings.js +123 -9
  96. package/external/@socketsecurity/registry/lib/url.js +21 -0
  97. package/external/@socketsecurity/registry/lib/words.js +16 -0
  98. package/external/@socketsecurity/registry/manifest.json +5 -4
  99. package/package.json +5 -4
  100. package/external/@socketsecurity/registry/external/ansi-regex.js +0 -13
  101. package/external/@socketsecurity/registry/lib/constants/node-workspaces.js +0 -3
  102. package/external/@socketsecurity/registry/lib/constants/parse-args-config.js +0 -14
  103. package/external/@socketsecurity/registry/lib/constants/skip-tests-by-ecosystem.js +0 -43
  104. package/external/@socketsecurity/registry/lib/constants/template-cjs-browser.js +0 -3
  105. package/external/@socketsecurity/registry/lib/constants/template-cjs-esm.js +0 -3
  106. package/external/@socketsecurity/registry/lib/constants/template-cjs.js +0 -3
  107. package/external/@socketsecurity/registry/lib/constants/template-es-shim-constructor.js +0 -3
  108. package/external/@socketsecurity/registry/lib/constants/template-es-shim-prototype-method.js +0 -3
  109. package/external/@socketsecurity/registry/lib/constants/template-es-shim-static-method.js +0 -3
  110. package/external/@socketsecurity/registry/lib/constants/win32-ensure-tests-by-ecosystem.js +0 -3
  111. package/external/@socketsecurity/registry/lib/npm.js +0 -404
  112. /package/external/@socketsecurity/registry/lib/constants/{hidden-package-lock-json.js → dot-package-lock-json.js} +0 -0
@@ -1,15 +1,37 @@
1
1
  'use strict'
2
2
 
3
- let _ansiRegex
3
+ const { fromCharCode } = String
4
+
5
+ // Inlined ansi-regex:
6
+ // https://socket.dev/npm/package/ansi-regexp/overview/6.2.2
7
+ // MIT License
8
+ // Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
9
+
10
+ /**
11
+ * Create a regular expression for matching ANSI escape codes.
12
+ * @param {{onlyFirst?: boolean}} [options] - Configuration options.
13
+ * @returns {RegExp} Regular expression for matching ANSI codes.
14
+ */
4
15
  /*@__NO_SIDE_EFFECTS__*/
5
- function getAnsiRegex() {
6
- if (_ansiRegex === undefined) {
7
- // The 'ansi-regex' package is browser safe.
8
- _ansiRegex = /*@__PURE__*/ require('../external/ansi-regex')()
9
- }
10
- return _ansiRegex
16
+ function ansiRegex(options) {
17
+ const { onlyFirst } = { __proto__: null, ...options }
18
+ // Valid string terminator sequences are BEL, ESC\, and 0x9c.
19
+ const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'
20
+ // OSC sequences only: ESC ] ... ST (non-greedy until the first ST).
21
+ const osc = `(?:\\u001B\\][\\s\\S]*?${ST})`
22
+ // CSI and related: ESC/C1, optional intermediates, optional params (supports ; and :) then final byte.
23
+ const csi =
24
+ '[\\u001B\\u009B][[\\]()#;?]*(?:\\d{1,4}(?:[;:]\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]'
25
+ const pattern = `${osc}|${csi}`
26
+ return new RegExp(pattern, onlyFirst ? undefined : 'g')
11
27
  }
12
28
 
29
+ /**
30
+ * Apply a prefix to each line of a string.
31
+ * @param {string} str - The string to prefix.
32
+ * @param {string} [prefix=''] - The prefix to add to each line.
33
+ * @returns {string} The string with prefixes applied.
34
+ */
13
35
  /*@__NO_SIDE_EFFECTS__*/
14
36
  function applyLinePrefix(str, prefix = '') {
15
37
  return prefix.length
@@ -17,21 +39,92 @@ function applyLinePrefix(str, prefix = '') {
17
39
  : str
18
40
  }
19
41
 
42
+ /**
43
+ * Convert a camelCase string to kebab-case.
44
+ * @param {string} str - The camelCase string to convert.
45
+ * @returns {string} The kebab-case string.
46
+ */
47
+ /*@__NO_SIDE_EFFECTS__*/
48
+ function camelToKebab(str) {
49
+ const { length } = str
50
+ if (!length) {
51
+ return ''
52
+ }
53
+ let result = ''
54
+ let i = 0
55
+ while (i < length) {
56
+ const char = str[i]
57
+ const charCode = char.charCodeAt(0)
58
+ // Check if current character is uppercase letter.
59
+ // A = 65, Z = 90
60
+ const isUpperCase = charCode >= 65 /*'A'*/ && charCode <= 90 /*'Z'*/
61
+ if (isUpperCase) {
62
+ // Add dash before uppercase sequence (except at start).
63
+ if (result.length > 0) {
64
+ result += '-'
65
+ }
66
+ // Collect all consecutive uppercase letters.
67
+ while (i < length) {
68
+ const currChar = str[i]
69
+ const currCharCode = currChar.charCodeAt(0)
70
+ const isCurrUpper =
71
+ currCharCode >= 65 /*'A'*/ && currCharCode <= 90 /*'Z'*/
72
+ if (isCurrUpper) {
73
+ // Convert uppercase to lowercase: subtract 32 (A=65 -> a=97, diff=32)
74
+ result += fromCharCode(currCharCode + 32 /*'a'-'A'*/)
75
+ i += 1
76
+ } else {
77
+ // Stop when we hit non-uppercase.
78
+ break
79
+ }
80
+ }
81
+ } else {
82
+ // Handle lowercase letters, digits, and other characters.
83
+ result += char
84
+ i += 1
85
+ }
86
+ }
87
+ return result
88
+ }
89
+
90
+ /**
91
+ * Indent each line of a string with spaces.
92
+ * @param {string} str - The string to indent.
93
+ * @param {number} [count=1] - Number of spaces to indent.
94
+ * @returns {string} The indented string.
95
+ */
20
96
  /*@__NO_SIDE_EFFECTS__*/
21
97
  function indentString(str, count = 1) {
22
98
  return str.replace(/^(?!\s*$)/gm, ' '.repeat(count))
23
99
  }
24
100
 
25
- /*__NO_SIDE_EFFECTS__*/
101
+ /**
102
+ * Check if a value is a blank string (empty or only whitespace).
103
+ * @param {any} value - The value to check.
104
+ * @returns {boolean} True if the value is a blank string.
105
+ */
106
+ /*@__NO_SIDE_EFFECTS__*/
26
107
  function isBlankString(value) {
27
108
  return typeof value === 'string' && (!value.length || /^\s+$/.test(value))
28
109
  }
29
110
 
111
+ /**
112
+ * Check if a value is a non-empty string.
113
+ * @param {any} value - The value to check.
114
+ * @returns {boolean} True if the value is a non-empty string.
115
+ */
30
116
  /*@__NO_SIDE_EFFECTS__*/
31
117
  function isNonEmptyString(value) {
32
118
  return typeof value === 'string' && value.length > 0
33
119
  }
34
120
 
121
+ /**
122
+ * Search for a regular expression in a string starting from an index.
123
+ * @param {string} str - The string to search in.
124
+ * @param {RegExp} regexp - The regular expression to search for.
125
+ * @param {number} [fromIndex=0] - The index to start searching from.
126
+ * @returns {number} The index of the match, or -1 if not found.
127
+ */
35
128
  /*@__NO_SIDE_EFFECTS__*/
36
129
  function search(str, regexp, fromIndex = 0) {
37
130
  const { length } = str
@@ -46,11 +139,21 @@ function search(str, regexp, fromIndex = 0) {
46
139
  return result === -1 ? -1 : result + offset
47
140
  }
48
141
 
142
+ /**
143
+ * Strip ANSI escape codes from a string.
144
+ * @param {string} str - The string to strip ANSI codes from.
145
+ * @returns {string} The string without ANSI codes.
146
+ */
49
147
  /*@__NO_SIDE_EFFECTS__*/
50
148
  function stripAnsi(str) {
51
- return str.replace(getAnsiRegex(), '')
149
+ return str.replace(ansiRegex(), '')
52
150
  }
53
151
 
152
+ /**
153
+ * Strip the Byte Order Mark (BOM) from the beginning of a string.
154
+ * @param {string} str - The string to strip BOM from.
155
+ * @returns {string} The string without BOM.
156
+ */
54
157
  /*@__NO_SIDE_EFFECTS__*/
55
158
  function stripBom(str) {
56
159
  // In JavaScript, string data is stored as UTF-16, so BOM is 0xFEFF.
@@ -58,6 +161,11 @@ function stripBom(str) {
58
161
  return str.length > 0 && str.charCodeAt(0) === 0xfeff ? str.slice(1) : str
59
162
  }
60
163
 
164
+ /**
165
+ * Convert a string to kebab-case (handles camelCase and snake_case).
166
+ * @param {string} str - The string to convert.
167
+ * @returns {string} The kebab-case string.
168
+ */
61
169
  /*@__NO_SIDE_EFFECTS__*/
62
170
  function toKebabCase(str) {
63
171
  if (!str.length) {
@@ -73,6 +181,11 @@ function toKebabCase(str) {
73
181
  )
74
182
  }
75
183
 
184
+ /**
185
+ * Trim newlines from the beginning and end of a string.
186
+ * @param {string} str - The string to trim newlines from.
187
+ * @returns {string} The string with newlines trimmed.
188
+ */
76
189
  /*@__NO_SIDE_EFFECTS__*/
77
190
  function trimNewlines(str) {
78
191
  const { length } = str
@@ -110,6 +223,7 @@ function trimNewlines(str) {
110
223
 
111
224
  module.exports = {
112
225
  applyLinePrefix,
226
+ camelToKebab,
113
227
  indentString,
114
228
  isBlankString,
115
229
  isNonEmptyString,
@@ -3,6 +3,11 @@
3
3
  const BooleanCtor = Boolean
4
4
  const UrlCtor = URL
5
5
 
6
+ /**
7
+ * Check if a value is a valid URL.
8
+ * @param {any} value - Value to check.
9
+ * @returns {boolean} True if value is a valid URL.
10
+ */
6
11
  /*@__NO_SIDE_EFFECTS__*/
7
12
  function isUrl(value) {
8
13
  return (
@@ -12,6 +17,11 @@ function isUrl(value) {
12
17
  )
13
18
  }
14
19
 
20
+ /**
21
+ * Parse a value as a URL.
22
+ * @param {string|URL} value - Value to parse.
23
+ * @returns {URL|null} Parsed URL object or null if invalid.
24
+ */
15
25
  /*@__NO_SIDE_EFFECTS__*/
16
26
  function parseUrl(value) {
17
27
  try {
@@ -20,6 +30,11 @@ function parseUrl(value) {
20
30
  return null
21
31
  }
22
32
 
33
+ /**
34
+ * Convert a URL search parameter to an array.
35
+ * @param {string} value - Search parameter value.
36
+ * @returns {string[]} Array of trimmed values.
37
+ */
23
38
  /*@__NO_SIDE_EFFECTS__*/
24
39
  function urlSearchParamAsArray(value) {
25
40
  return typeof value === 'string'
@@ -27,6 +42,12 @@ function urlSearchParamAsArray(value) {
27
42
  : []
28
43
  }
29
44
 
45
+ /**
46
+ * Convert a URL search parameter to a boolean.
47
+ * @param {any} value - Search parameter value.
48
+ * @param {boolean} [defaultValue=false] - Default value when null/undefined.
49
+ * @returns {boolean} Boolean representation of the value.
50
+ */
30
51
  /*@__NO_SIDE_EFFECTS__*/
31
52
  function urlSearchParamAsBoolean(value, defaultValue = false) {
32
53
  if (typeof value === 'string') {
@@ -1,5 +1,10 @@
1
1
  'use strict'
2
2
 
3
+ /**
4
+ * Capitalize the first letter of a word.
5
+ * @param {string} word - Word to capitalize.
6
+ * @returns {string} Capitalized word.
7
+ */
3
8
  /*@__NO_SIDE_EFFECTS__*/
4
9
  function capitalize(word) {
5
10
  const { length } = word
@@ -12,11 +17,22 @@ function capitalize(word) {
12
17
  return `${word.charAt(0).toUpperCase()}${word.slice(1).toLowerCase()}`
13
18
  }
14
19
 
20
+ /**
21
+ * Determine the appropriate article (a/an) for a word.
22
+ * @param {string} word - Word to determine article for.
23
+ * @returns {'a'|'an'} The appropriate article.
24
+ */
15
25
  /*@__NO_SIDE_EFFECTS__*/
16
26
  function determineArticle(word) {
17
27
  return /^[aeiou]/.test(word) ? 'an' : 'a'
18
28
  }
19
29
 
30
+ /**
31
+ * Pluralize a word based on count.
32
+ * @param {string} word - Word to pluralize.
33
+ * @param {number} [count=1] - Count to determine pluralization.
34
+ * @returns {string} Pluralized word if count is 0 or > 1.
35
+ */
20
36
  /*@__NO_SIDE_EFFECTS__*/
21
37
  function pluralize(word, count = 1) {
22
38
  return count === 0 || count > 1 ? `${word}s` : word
@@ -297,7 +297,7 @@
297
297
  }
298
298
  ],
299
299
  [
300
- "pkg:npm/%40socketregistry/assert@1.0.19",
300
+ "pkg:npm/%40socketregistry/assert@1.0.21",
301
301
  {
302
302
  "categories": ["cleanup"],
303
303
  "engines": {
@@ -307,7 +307,7 @@
307
307
  "license": "MIT",
308
308
  "name": "@socketregistry/assert",
309
309
  "package": "assert",
310
- "version": "1.0.19"
310
+ "version": "1.0.21"
311
311
  }
312
312
  ],
313
313
  [
@@ -354,7 +354,7 @@
354
354
  }
355
355
  ],
356
356
  [
357
- "pkg:npm/%40socketregistry/deep-equal@1.0.18",
357
+ "pkg:npm/%40socketregistry/deep-equal@1.0.20",
358
358
  {
359
359
  "categories": ["cleanup"],
360
360
  "engines": {
@@ -364,7 +364,7 @@
364
364
  "license": "MIT",
365
365
  "name": "@socketregistry/deep-equal",
366
366
  "package": "deep-equal",
367
- "version": "1.0.18"
367
+ "version": "1.0.20"
368
368
  }
369
369
  ],
370
370
  [
@@ -1853,6 +1853,7 @@
1853
1853
  "license": "MIT",
1854
1854
  "name": "@socketregistry/yocto-spinner",
1855
1855
  "package": "yocto-spinner",
1856
+ "skipTests": true,
1856
1857
  "version": "1.0.23"
1857
1858
  }
1858
1859
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@socketsecurity/cli-with-sentry",
3
- "version": "1.1.14",
3
+ "version": "1.1.17",
4
4
  "description": "CLI for Socket.dev, includes Sentry error handling, otherwise identical to the regular `socket` package",
5
5
  "homepage": "https://github.com/SocketDev/socket-cli",
6
6
  "license": "MIT AND OFL-1.1",
@@ -67,7 +67,7 @@
67
67
  "@socketregistry/is-interactive": "1.0.6",
68
68
  "@socketregistry/packageurl-js": "1.0.9",
69
69
  "@socketsecurity/config": "3.0.1",
70
- "@socketsecurity/registry": "1.1.8",
70
+ "@socketsecurity/registry": "1.1.17",
71
71
  "@socketsecurity/sdk": "1.4.93",
72
72
  "@types/blessed": "0.1.25",
73
73
  "@types/cmd-shim": "5.0.2",
@@ -129,7 +129,6 @@
129
129
  "typescript-eslint": "8.43.0",
130
130
  "unplugin-purge-polyfills": "0.1.0",
131
131
  "vitest": "3.2.4",
132
- "which": "5.0.0",
133
132
  "yaml": "2.8.1",
134
133
  "yargs-parser": "22.0.0",
135
134
  "yoctocolors-cjs": "2.1.3",
@@ -214,9 +213,11 @@
214
213
  "test:unit:update": "dotenvx -q run -f .env.test -- vitest --run --update",
215
214
  "test:unit:coverage": "dotenvx -q run -f .env.test -- vitest run --coverage",
216
215
  "test-ci": "run-s test:*",
216
+ "test-pre-commit": "dotenvx -q run -f .env.precommit -- pnpm test",
217
217
  "testu": "dotenvx -q run -f .env.testu -- run-s test:prepare; pnpm test:unit:update --",
218
218
  "testuf": "dotenvx -q run -f .env.testu -- pnpm test:unit:update --",
219
219
  "update": "run-p --aggregate-output update:**",
220
- "update:deps": "taze"
220
+ "update:deps": "taze",
221
+ "update:socket": "pnpm update '@socketsecurity/*' '@socketregistry/*' --latest"
221
222
  }
222
223
  }
@@ -1,13 +0,0 @@
1
- 'use strict'
2
-
3
- function ansiRegex({ onlyFirst = false } = {}) {
4
- // Valid string terminator sequences are BEL, ESC\, and 0x9c
5
- const ST = '(?:\\u0007|\\u001B\\u005C|\\u009C)'
6
- const pattern = [
7
- `[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?${ST})`,
8
- '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))'
9
- ].join('|')
10
- return new RegExp(pattern, onlyFirst ? undefined : 'g')
11
- }
12
-
13
- module.exports = ansiRegex
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'node_workspaces'
@@ -1,14 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = {
4
- options: {
5
- force: {
6
- type: 'boolean',
7
- short: 'f'
8
- },
9
- quiet: {
10
- type: 'boolean'
11
- }
12
- },
13
- strict: false
14
- }
@@ -1,43 +0,0 @@
1
- 'use strict'
2
-
3
- const WIN32 = /*@__PURE__*/ require('./win32')
4
-
5
- module.exports = new Map([
6
- [
7
- 'npm',
8
- new Set([
9
- // @hyrious/bun.lockb has no unit tests.
10
- // https://github.com/hyrious/bun.lockb/tree/v0.0.4
11
- '@hyrious/bun.lockb',
12
- 'hyrious__bun.lockb',
13
- // Our array-flatten override supports v1, v2, and v3 APIs, so we handle
14
- // testing ourselves.
15
- 'array-flatten',
16
- // date tests fail for some Node versions and platforms, but pass in CI
17
- // Win32 environments for the time being.
18
- // https://github.com/es-shims/Date/issues/3
19
- // https://github.com/es-shims/Date/tree/v2.0.5
20
- ...(WIN32 ? [] : ['date']),
21
- // es6-object-assign has no unit tests.
22
- // https://github.com/rubennorte/es6-object-assign/tree/v1.1.0
23
- 'es6-object-assign',
24
- // harmony-reflect has known failures in its package and requires running
25
- // tests in browser.
26
- // https://github.com/tvcutsem/harmony-reflect/tree/v1.6.2/test
27
- 'harmony-reflect',
28
- // is-regex tests don't account for `is-regex` backed by
29
- // `require('node:util/types).isRegExp` which triggers no proxy traps and
30
- // assumes instead that the 'getOwnPropertyDescriptor' trap will be triggered
31
- // by `Object.getOwnPropertyDescriptor(value, 'lastIndex')`.
32
- // https://github.com/inspect-js/is-regex/issues/35
33
- // https://github.com/inspect-js/is-regex/blob/v1.1.4/test/index.js
34
- 'is-regex',
35
- // safer-buffer tests assume Buffer.alloc, Buffer.allocUnsafe, and
36
- // Buffer.allocUnsafeSlow throw for a size of 2 * (1 << 30), i.e. 2147483648,
37
- // which is no longer the case.
38
- // https://github.com/ChALkeR/safer-buffer/issues/16
39
- // https://github.com/ChALkeR/safer-buffer/blob/v2.1.2/tests.js
40
- 'safer-buffer'
41
- ])
42
- ]
43
- ])
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'cjs-browser'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'cjs-esm'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'cjs'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'es-shim-constructor'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'es-shim-prototype-method'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = 'es-shim-static-method'
@@ -1,3 +0,0 @@
1
- 'use strict'
2
-
3
- module.exports = new Map([['npm', new Set(['date'])]])