Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 14 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"webpack-dev-server": "5.2.5"
},
"overrides": {
"brace-expansion": "1.1.16",
"brace-expansion": "5.0.7",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
rg -n '"engines"|node-version|NODE_VERSION|\.nvmrc|\.node-version|\.tool-versions|FROM node' \
  package.json package-lock.json .github Dockerfile* 2>/dev/null

rg -n "brace-expansion|minimatch|expand\\(|makeRe\\(|replace" \
  --glob '!package-lock.json' --glob '!node_modules/**' .

Repository: openshift/lightspeed-console

Length of output: 28904


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- package.json (top + deps area) ---'
sed -n '1,120p' package.json | cat -n

echo
echo '--- package-lock.json brace-expansion/minimatch entries ---'
python3 - <<'PY'
import json, re
from pathlib import Path

data = json.loads(Path('package-lock.json').read_text())
pkgs = data.get('packages', {})
for name in ['', 'node_modules/brace-expansion', 'node_modules/minimatch']:
    obj = pkgs.get(name)
    print(f'[{name or "root"}]')
    if obj is None:
        print('MISSING')
    else:
        for k in ('version', 'engines', 'dependencies', 'peerDependencies'):
            if k in obj:
                print(f'{k}: {obj[k]}')
    print()

# Also print top-level package resolutions if present
for key in ('dependencies', 'packages'):
    pass
PY

Repository: openshift/lightspeed-console

Length of output: 5763


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo '--- package-lock direct dependency graph around minimatch/brace-expansion ---'
python3 - <<'PY'
import json
from pathlib import Path

data = json.loads(Path('package-lock.json').read_text())
pkgs = data['packages']
for path in ['node_modules/minimatch', 'node_modules/brace-expansion']:
    p = pkgs.get(path)
    print(path)
    if not p:
        print('  MISSING')
        continue
    for k,v in p.items():
        if k in ('version','engines','dependencies','optional','dev'):
            print(f'  {k}: {v}')
    print()
PY

Repository: openshift/lightspeed-console

Length of output: 488


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

data = json.loads(Path('package-lock.json').read_text())
root = data.get('packages', {}).get('', {})
print("root.engines =", root.get('engines'))
print("root.packageManager =", root.get('packageManager'))
print("root.dependencies brace-expansion =", data.get('dependencies', {}).get('brace-expansion'))
print("root.dependencies minimatch =", data.get('dependencies', {}).get('minimatch'))
PY

Repository: openshift/lightspeed-console

Length of output: 306


🌐 Web query:

brace-expansion 5.0.7 minimatch 3.1.5 compatibility API behavior semver

💡 Result:

Minimatch 3.1.5 is fundamentally incompatible with brace-expansion 5.x [1][2][3]. Compatibility Details: - Minimatch 3.1.5 is designed to work with brace-expansion 1.x (specifically ^1.1.7) [4][5]. - Brace-expansion 5.x introduced a breaking change in its module structure by shifting to an ESM-only shape, which lacks the callable default export (module.exports = expand) expected by Minimatch 3 [1][2]. - When brace-expansion 5.x is used with Minimatch 3.1.5—often caused by overly aggressive package manager overrides or forced resolutions—the application will throw a TypeError: expand is not a function at runtime whenever a pattern requiring brace expansion is processed [1][2][3]. API Behavior and SemVer: - Minimatch 3.1.5 maintains its legacy API surface [6], but it relies on the CommonJS-compatible behavior of brace-expansion 1.x [2]. - Brace-expansion 5.x follows a different major version line [2] and is not a drop-in replacement for 1.x. - To resolve dependency conflicts where package managers force 5.x on 3.x consumers, you must use dependency overrides or resolutions to pin brace-expansion to a 1.x version (e.g., ^1.1.13) [7][2] or 2.x (if applicable and compatible) [3]. In summary, brace-expansion 5.0.7 is not compatible with Minimatch 3.1.5 [1][2][3]. Any configuration that forces this combination will result in a runtime crash [1][3].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

python3 - <<'PY'
import json
from pathlib import Path

data = json.loads(Path('package-lock.json').read_text())
pkgs = data.get('packages', {})
hits = []
for path, meta in pkgs.items():
    deps = meta.get('dependencies', {}) or {}
    if 'minimatch' in deps:
        hits.append((path or '[root]', deps['minimatch'], meta.get('version'), meta.get('dev'), meta.get('optional')))
for item in hits:
    print(item)
PY

Repository: openshift/lightspeed-console

Length of output: 698


Keep brace-expansion on a 1.x line for minimatch 3
package.json:76 — This repo already requires Node >=22.22.2, so the engine range is fine. The override still forces brace-expansion@5.0.7 into minimatch@3.1.5 consumers (eslint, glob, etc.), which expect the 1.x CommonJS API and can fail when expanding braces. Use a 1.x pin or drop the override.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 76, Update the brace-expansion dependency entry in
package.json to use a 1.x-compatible pin for minimatch 3 consumers, or remove
the override so their expected CommonJS API is preserved; do not retain the
current 5.0.7 override.

"dompurify": "3.4.9",
"fast-uri": "3.1.3",
"js-cookie": "3.0.8",
Expand Down