revert: downgrade @headlessui/react and react-select - #445
Conversation
Pin @headlessui/react to ^1.4.0 and react-select to ^5.7.0, reverting the bump in xola#441. Newer versions are causing widespread Selenium flakiness in downstream apps.
Summary
Validation
WalkthroughChangesDependency constraint updates
Merge Risk: 🟡 Moderate · up to The dependency ranges still allow the newer versions associated with downstream Selenium flakiness, so this revert may not reliably restore stable behavior. Pinning the versions or adding upper bounds is needed before merge. Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 98056162-ff2a-4513-b52b-97e7fcd2c43c
⛔ Files ignored due to path filters (1)
package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (1)
package.json
🔗 Linked repositories identified
CodeRabbit considers these linked repositories for cross-repo context during reviews:
xola/x2-seller(manual)
Included review availability: 3 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour.
| }, | ||
| "dependencies": { | ||
| "@headlessui/react": "^1.7.19", | ||
| "@headlessui/react": "^1.4.0", |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
node <<'NODE'
const { dependencies } = require("./package.json");
for (const [name, version] of Object.entries({
"`@headlessui/react`": "1.4.0",
"react-select": "5.7.0",
})) {
if (dependencies[name] !== version) {
throw new Error(`${name} is not pinned to ${version}`);
}
}
NODERepository: xola/ui-kit
Length of output: 780
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- package manifest ---'
cat -n package.json | sed -n '1,75p'
printf '%s\n' '--- package metadata and dependency lock entries ---'
node <<'NODE'
const fs = require('fs');
const pkg = JSON.parse(fs.readFileSync('package.json', 'utf8'));
console.log(JSON.stringify({
name: pkg.name,
version: pkg.version,
private: pkg.private,
publishConfig: pkg.publishConfig,
dependencies: {
'`@headlessui/react`': pkg.dependencies?.['`@headlessui/react`'],
'react-select': pkg.dependencies?.['react-select'],
},
}, null, 2));
NODE
python3 - <<'PY'
import json
from pathlib import Path
lock = json.loads(Path("package-lock.json").read_text())
for name in ("node_modules/@headlessui/react", "node_modules/react-select"):
entry = lock.get("packages", {}).get(name)
print(name, json.dumps(entry, sort_keys=True))
PY
printf '%s\n' '--- changed files and dependency history ---'
git diff --stat
git diff -- package.json package-lock.json
git log -8 --oneline -- package.json package-lock.jsonRepository: xola/ui-kit
Length of output: 5269
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
printf '%s\n' '--- dependency change commit ---'
git show --stat --format=fuller 19ed415
git show --format= -- package.json package-lock.json 19ed415 | sed -n '1,220p'
printf '%s\n' '--- repository references ---'
rg -n --hidden -g '!node_modules' -g '!build' \
'1\.7\.19|5\.10\.2|`@headlessui/react`|react-select|Selenium|selenium|flak' . \
| sed -n '1,240p'Repository: xola/ui-kit
Length of output: 13340
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
rg -n --hidden -g '!node_modules' -g '!build' \
'1\.7\.19|5\.10\.2|`@headlessui/react`|react-select|Selenium|selenium|flak' . \
| sed -n '1,260p'Repository: xola/x2-seller
Length of output: 3282
🏁 Script executed (no clone):
#!/usr/bin/env bash
set -euo pipefail
node <<'NODE'
try {
const semver = require('semver');
for (const [range, versions] of Object.entries({
'^1.4.0': ['1.4.0', '1.7.19', '2.0.0'],
'^5.7.0': ['5.7.0', '5.10.2', '6.0.0'],
})) {
console.log(range, Object.fromEntries(versions.map(v => [v, semver.satisfies(v, range)])));
}
} catch (error) {
console.error(`semver probe unavailable: ${error.message}`);
process.exitCode = 2;
}
NODE
Length of output: 205
🏁 Script executed (no clone):
#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
from dataclasses import dataclass
`@dataclass`(frozen=True)
class Version:
major: int
minor: int
patch: int
def parse(value):
return Version(*(int(part) for part in value.split(".")))
def caret_satisfies(base, candidate):
# npm caret ranges for non-zero major versions:
# ^M.m.p means >=M.m.p and <(M+1).0.0.
return candidate >= base and candidate.major == base.major
checks = [
("^1.4.0", "1.7.19"),
("^5.7.0", "5.10.2"),
]
for range_text, version_text in checks:
base = parse(range_text[1:])
candidate = parse(version_text)
result = caret_satisfies(base, candidate)
print(f"{range_text} includes {version_text}: {result}")
assert result
PY
Length of output: 320
🏁 Script executed (no clone):
#!/usr/bin/env bash
set -euo pipefail
python3 - <<'PY'
def parse(value):
return tuple(int(part) for part in value.split("."))
def caret_satisfies(base, candidate):
return candidate >= base and candidate[0] == base[0]
for range_text, version_text in [
("^1.4.0", "1.7.19"),
("^5.7.0", "5.10.2"),
]:
base = parse(range_text[1:])
candidate = parse(version_text)
result = caret_satisfies(base, candidate)
print(f"{range_text} includes {version_text}: {result}")
assert result
PY
Length of output: 183
Pin the published dependency versions
^1.4.0 and ^5.7.0 allow the problematic @headlessui/react 1.7.19 and react-select 5.10.2 versions. Pin both dependencies, or add upper bounds that exclude them.
Summary
Test plan
npm run lintclean (pre-existing complexity warnings only)npm testpasses (9/9)npm run buildsucceeds