Draft
Conversation
Bump eslint 9→10, typescript 5→6, vite 7→8, prebid.js 10→11, jsdom 28→29, @types/jsdom 27→28, eslint-plugin-unicorn 62→64, @eslint/js 9 →10, typescript-eslint 8.56→8.58. Replace eslint-plugin-import (no eslint 10 support) with eslint-plugin-perfectionist for import ordering. Add esbuild as an explicit dev dep, required by vite 8. Wire RequestAdsOptions.timeout through sendAuction via AbortSignal.timeout, eliminating dead code in requestAds that the new eslint no-useless-assignment rule flagged, and enable the rule. Tighten test type signatures against the stricter vi.fn and prebid 11 typings: use Mock<typeof fn> for sendBeacon/fetch spies, drop unused branded intersections on googletag.cmd, add a TestAdUnit helper for prebid fixtures.
9 tasks
…t comment placement
9 tasks
…Also updated settings.json to reflect new package versions. Added internal/ directory to .gitignore to avoid committing build artifacts and test outputs.
… pinned Node version
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings every devDependency in
crates/js/libup to its latest major. Also wiresRequestAdsOptions.timeoutthroughsendAuctionand enables a new eslint rule that caught the dead code.Package bumps
eslint9 → 10,@eslint/js9 → 10typescript5.9 → 6.0vite7 → 8prebid.js10.26 → 11.5jsdom28 → 29,@types/jsdom27 → 28eslint-plugin-unicorn62 → 64typescript-eslint8.56 → 8.58 (required for TS 6 support)Plugin swap
eslint-plugin-import(latest version still pins eslint ≤9, blocks eslint 10).eslint-plugin-perfectionist— covers the one rule we actually used (import/order→perfectionist/sort-imports).New dep
esbuildas explicit dev dep — vite 8 dropped its bundled esbuild transpiler.Code changes
src/core/request.ts— replaced deadlet optspattern withconstternaries.opts.timeoutis now read.src/core/auction.ts—sendAuctionaccepts an optional{ timeout }and usesAbortSignal.timeout(). Backwards-compatible: third arg defaults to{}.eslint.config.js— enablesno-useless-assignment(new eslint 10 recommended rule).Test type tightening
The stricter TS 6 + prebid 11 typings surfaced ~12 test-only type errors. Fixed idiomatically rather than with escape hatches:
Mock<typeof navigator.sendBeacon>/vi.fn<typeof …>()instead ofReturnType<typeof vi.fn>+ cast — removes 4as unknown ascasts inbeacon_guard.test.tsandscript_guard.test.ts.GptWindow['googletag']['cmd']— removes 4 casts ingpt/index.test.ts.__tsjs_installGptShimfield toGatedWindow— removes 2Record<string, unknown>casts.TestAdUnit/TestBidhelper type inprebid/index.test.ts— removes 6.params as anycasts.declare global { Window.tsjs?: any }incore/index.test.tsthat conflicted with the real declaration insrc/core/global.d.ts.Net remaining casts: 2 (
calledArg as RequestaftertoBeInstanceOfnarrowing, anddelete foo!.bar!.bazfor optional nested deletion) — both TS-idiomatic, not escape hatches.Test plan
npx vitest run— 282 tests passingnpm run lint— clean (withno-useless-assignmentenabled)node build-all.mjs— all 10 modules built successfullynpm run format— clean