TypeScript 7 - #214
Conversation
|
Warning Review limit reached
Next review available in: 13 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (28)
📝 WalkthroughWalkthroughThe PR updates TypeScript and Yarn tooling, modernizes compiler settings, converts type-only dependencies across the source tree to ChangesTypeScript toolchain modernization
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
tsconfig.json (1)
3-20: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winPlan re-enabling
strictNullCheckssoon.
strict: truewithstrictNullChecks: falseleaves a gap where null/undefined assignments won't be caught at compile time. The inline comment acknowledges this is temporary — consider tracking it as a follow-up issue to avoid it becoming permanent.🤖 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 `@tsconfig.json` around lines 3 - 20, Create a follow-up issue to re-enable strictNullChecks in the TypeScript compiler options and track the required null/undefined fixes, ensuring the temporary inline exception does not become permanent.
🤖 Prompt for all review comments with 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.
Inline comments:
In @.yarnrc.yml:
- Around line 7-8: Change the npmMinimalAgeGate setting from 0 to a non-zero
duration, preferably restoring Yarn’s default 1d minimum-age window, unless
intentionally documenting and approving the security trade-off.
In `@package.json`:
- Line 51: Revert the TypeScript 7 upgrade in the package manifest and lockfile,
keeping TypeScript within tsdown@0.22.4’s supported ^5.0.0 || ^6.0.0 range;
leave the `@types/node` update unchanged.
In `@src/fetchers/fetch.polyfill.ts`:
- Line 1: Replace the broad ambient declaration `declare const window: any` with
a minimal type describing only the required `fetch` property, preserving the
existing fetch usage in this module.
---
Nitpick comments:
In `@tsconfig.json`:
- Around line 3-20: Create a follow-up issue to re-enable strictNullChecks in
the TypeScript compiler options and track the required null/undefined fixes,
ensuring the temporary inline exception does not become permanent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 2530f6d1-4834-4768-a6e1-5d7f1091bd3e
⛔ Files ignored due to path filters (1)
yarn.lockis excluded by!**/yarn.lock,!**/*.lock
📒 Files selected for processing (28)
.vscode/settings.json.yarnrc.ymlpackage.jsonsrc/bin/export-ratings.tssrc/bin/export-reviews.tssrc/bin/server.tssrc/dto/cinema.tssrc/dto/creator.tssrc/dto/movie.tssrc/dto/search.tssrc/dto/user-ratings.tssrc/dto/user-reviews.tssrc/fetchers/fetch.polyfill.tssrc/helpers/cinema.helper.tssrc/helpers/creator.helper.tssrc/helpers/global.helper.tssrc/helpers/search.helper.tssrc/helpers/user-ratings.helper.tssrc/helpers/user-reviews.helper.tssrc/index.tssrc/services/cinema.service.tssrc/services/creator.service.tssrc/services/movie.service.tssrc/services/search.service.tssrc/services/user-ratings.service.tssrc/services/user-reviews.service.tssrc/vars.tstsconfig.json
| "@eslint/js": "^10.0.1", | ||
| "@types/express": "^5.0.6", | ||
| "@types/node": "^26.1.0", | ||
| "@types/node": "^26.1.1", |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Check if the specified package versions exist on npm
curl -s https://registry.npmjs.org/typescript/7.0.2 | jq -r '.version // "NOT FOUND"'
curl -s https://registry.npmjs.org/tsdown/0.22.4 | jq -r '.version // "NOT FOUND"'
curl -s https://registry.npmjs.org/@types/node/26.1.1 | jq -r '.version // "NOT FOUND"'Repository: bartholomej/node-csfd-api
Length of output: 183
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, urllib.request
pkgs = [
("typescript", "7.0.2"),
("tsdown", "0.22.4"),
("`@types/node`", "26.1.1"),
]
for name, ver in pkgs:
url = f"https://registry.npmjs.org/{name.replace('/', '%2F')}/{ver}"
with urllib.request.urlopen(url) as r:
data = json.load(r)
print(f"\n== {name}@{ver} ==")
print("version:", data.get("version"))
print("deprecated:", data.get("deprecated"))
for k in ("engines", "peerDependencies", "dependencies", "devDependencies", "peerDependenciesMeta"):
if k in data:
print(f"{k}:", json.dumps(data[k], sort_keys=True))
PYRepository: bartholomej/node-csfd-api
Length of output: 2758
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, urllib.request
# Pull the latest metadata for the packages as a quick compatibility check.
names = ["typescript", "tsdown", "`@types/node`"]
for name in names:
url = f"https://registry.npmjs.org/{name.replace('/', '%2F')}"
with urllib.request.urlopen(url) as r:
data = json.load(r)
latest = data.get("dist-tags", {}).get("latest")
print(f"\n== {name} ==")
print("latest:", latest)
if latest and latest in data.get("versions", {}):
v = data["versions"][latest]
print("latest_version:", v.get("version"))
for k in ("engines", "peerDependencies", "dependencies", "deprecated"):
if k in v:
print(f"{k}:", json.dumps(v[k], sort_keys=True))
PYRepository: bartholomej/node-csfd-api
Length of output: 2757
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python3 - <<'PY'
import json, urllib.request
pkgs = [
("typescript", "7.0.2"),
("tsdown", "0.22.4"),
("`@types/node`", "26.1.1"),
]
for name, ver in pkgs:
url = f"https://registry.npmjs.org/{name.replace('/', '%2F')}/{ver}"
with urllib.request.urlopen(url) as r:
data = json.load(r)
print(f"\n== {name}@{ver} ==")
for key in ("version", "deprecated", "engines", "peerDependencies", "dependencies", "peerDependenciesMeta"):
if key in data:
print(f"{key}: {json.dumps(data[key], sort_keys=True)}")
PYRepository: bartholomej/node-csfd-api
Length of output: 2758
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for spec in \
"typescript/7.0.2" \
"tsdown/0.22.4" \
"`@types`%2Fnode/26.1.1"
do
echo "== $spec =="
curl -ks "https://registry.npmjs.org/$spec" | jq -r '
{
version,
deprecated,
engines,
peerDependencies,
dependencies,
peerDependenciesMeta
}'
doneRepository: bartholomej/node-csfd-api
Length of output: 2920
Hold the TypeScript 7 bump until tsdown supports it. typescript@7.0.2 exists, but tsdown@0.22.4 still declares typescript: ^5.0.0 || ^6.0.0, so this moves the project outside its supported range. @types/node@26.1.1 has no peer constraint here.
🤖 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 51, Revert the TypeScript 7 upgrade in the package
manifest and lockfile, keeping TypeScript within tsdown@0.22.4’s supported
^5.0.0 || ^6.0.0 range; leave the `@types/node` update unchanged.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #214 +/- ##
=======================================
Coverage 98.46% 98.46%
=======================================
Files 39 39
Lines 1045 1045
Branches 244 244
=======================================
Hits 1029 1029
Misses 16 16 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
87ee440 to
55e2ade
Compare
Description
Typescript 7 migration
Type of change
Checklist
Summary by CodeRabbit
Refactor
Chores