Skip to content

docs: add exported symbols comment above module.exports in background.js#213

Merged
ormidales merged 2 commits into1.0.12from
copilot/patch-docs-cleanup-stale-tracked-requests
Apr 17, 2026
Merged

docs: add exported symbols comment above module.exports in background.js#213
ormidales merged 2 commits into1.0.12from
copilot/patch-docs-cleanup-stale-tracked-requests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 3, 2026

background.js exports 9 symbols via module.exports but had no comment documenting them, leaving consumers without a quick reference without reading the full file.

Changes

  • background.js: Added a comment between /* istanbul ignore next */ and the module.exports guard listing all exported symbols and their context (Node.js/Jest-only)
/* istanbul ignore next */
// Exported for Node.js / Jest environments (not available in the browser extension context).
// Symbols: isNonRoutableHost, buildAcceptLanguage, DEFAULT_ACCEPT_LANGUAGE,
//          trackInitialHost, cleanupStaleTrackedRequests, initialHostByRequest,
//          redirectedRequestIds, REQUEST_TRACK_TTL_MS, MAX_TRACKED_REQUESTS
if (typeof module === "object" && module !== null) {

Style mirrors the inline comment convention used in utils.js. No behaviour change.

Copilot AI changed the title [WIP] Fix JSDoc comment for exported symbols in background.js docs: add exported symbols comment above module.exports in background.js Apr 3, 2026
Copilot AI requested a review from ormidales April 3, 2026 12:18
@ormidales ormidales added this to the v1.0.12 milestone Apr 17, 2026
@ormidales ormidales marked this pull request as ready for review April 17, 2026 12:10
Copilot AI review requested due to automatic review settings April 17, 2026 12:10
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to improve developer/test ergonomics by documenting the CommonJS exports from background.js for Node.js/Jest consumers, but it also includes unrelated package-lock.json modifications.

Changes:

  • Added an inline comment above the module.exports guard in background.js listing all exported symbols and clarifying the Node.js/Jest-only context.
  • Updated package-lock.json by removing "peer": true metadata in two package entries (unmentioned in the PR description).

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.

File Description
package-lock.json Removes "peer": true fields in two dependency entries (lockfile churn not described in PR metadata).
background.js Adds a concise comment documenting the Jest/Node-only exported symbols above module.exports.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ormidales ormidales merged commit bc8c274 into 1.0.12 Apr 17, 2026
4 checks passed
@ormidales ormidales deleted the copilot/patch-docs-cleanup-stale-tracked-requests branch April 17, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[PATCH] cleanupStaleTrackedRequests is exported but absent from module.exports JSDoc comment

3 participants