Skip to content

Clean up CI deprecation warnings - #10

Merged
prathamkashyap merged 1 commit into
mainfrom
chore/ci-deprecation-cleanup
Oct 4, 2026
Merged

prathamkashyap merged 1 commit into
mainfrom
chore/ci-deprecation-cleanup

Conversation

@prathamkashyap

Copy link
Copy Markdown
Owner

Actionable deprecation cleanup. No behaviour change, no dependency churn beyond one line of the lockfile.

1. GitHub Actions on Node 24

Your suggested target was v5 for all three. I checked each action.yml rather than assuming, and
v5 would not have worked for one of them:

Action v4 v5 v6 v7
checkout node20 node24 node24 node24
setup-node node20 node24 node24 node24
upload-artifact node20 node20 node24 node24

upload-artifact@v5 is still Node 20, so it would have left the warning in place. The minimum major
that actually clears it is v6. Applied:

actions/checkout@v4        → @v5   (3 sites)
actions/setup-node@v4      → @v5   (3 sites)
actions/upload-artifact@v4 → @v6   (3 sites)

Latest majors are v7 for all three; I used the minimum that resolves the deprecation rather than
jumping two majors for no benefit.

2. Mongoose new option

14 occurrences, all verified by hand to sit inside a findOneAndUpdate options object — no blind
replacement, no unrelated new properties touched:

Area Sites
services/progressService.js, reviewQueueService.js, backgroundJobService.js 9
controllers/library, flashcard, notification, quiz 5
worker.js (durable attempt claim) 1

new: true → returnDocument: "after", which is the documented replacement and semantically
identical. No findOneAndReplace or findByIdAndUpdate option sites existed, and findByIdAndUpdate
in flashcardService.js passes no options object, so it was left alone.

Nine test assertions updated with them. Four suites assert on the exact options object — e.g.
reviewQueueService.test.js expects { upsert: true, returnDocument: "after" } — so leaving the
tests alone would have failed them. That is also how I caught a miss: my first pass omitted
worker.js, and attemptProcessing.test.js failed on the real call still sending { new: true }. The
exhaustive sweep now finds zero new: true anywhere in the backend.

Verified by execution, not assumption: the warning count in the integration run and in the E2E run
— where it was previously loudest — is now 0 in both.

3. Browserslist

caniuse-lite 1.0.30001727 → 1.0.30001814 via update-browserslist-db@latest. Reported
"No target browser changes", and package.json is untouched (the tool installs then removes its own
temporary dependency entries).

The entire lockfile diff is one line — a single package version. No unrelated churn.

Deliberately not touched

  • MongoDB Too many index builds running simultaneously — test-environment informational
    behaviour; indexes complete afterwards. Changing index definitions would solve the wrong problem.
  • punycode / url.parse() — emitted by GitHub's artifact-upload tooling, not our code.
    Dependency overrides to silence them would be worse than the log noise.
  • Application behaviour, quiz/review/mastery logic, deployment architecture.

Verification

Check Result
Backend unit 937 passed / 36 suites
Backend integration 101 passed, 13 skipped
Frontend 277 passed / 23 files
Playwright E2E 26 passed, 2 skipped — unchanged
npm run typecheck exit 0
npm run build exit 0
npm run lint exit 0, 0 errors
Mongoose new warnings (integration / E2E) 0 / 0

E2E behaviour is identical to before, as required.

@prathamkashyap
prathamkashyap merged commit 3ec8bb1 into main Oct 4, 2026
3 checks passed
@prathamkashyap
prathamkashyap deleted the chore/ci-deprecation-cleanup branch October 4, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant