Skip to content

chore(passport-x): declare passport-oauth1 exports for TS7 - #41311

Merged
dionisio-bot[bot] merged 1 commit into
developfrom
chore/ts7-passport-x
Jul 23, 2026
Merged

chore(passport-x): declare passport-oauth1 exports for TS7#41311
dionisio-bot[bot] merged 1 commit into
developfrom
chore/ts7-passport-x

Conversation

@ggazzo

@ggazzo ggazzo commented Jul 10, 2026

Copy link
Copy Markdown
Member

Summary

Fixes the ambient passport-oauth1 declaration in passport-x so InternalOAuthError resolves under TypeScript 7.

Why

The declaration mixed export = OAuthStrategy with a separate export { InternalOAuthError, ... }. TS7 rejects that combination, so import OAuthStrategy, { InternalOAuthError } from 'passport-oauth1' failed with TS2305 (no exported member). The runtime module does export it (exports.InternalOAuthError = ...).

Move the named members into a namespace OAuthStrategy merged with the default class — the canonical way to type a CommonJS module that has both module.exports = X and exports.Y. Green on both TS5.x and TS7.

Draft — part of the TS7-readiness set.

Review in cubic

Task: ARCH-2244

Summary by CodeRabbit

  • Bug Fixes
    • Corrected OAuth strategy type definitions for improved compatibility with TypeScript projects.
    • Organized OAuth-related types under the strategy namespace and aligned internal property typing.

@changeset-bot

changeset-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 4032d4d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

The OAuth1 TypeScript declarations now namespace related types under OAuthStrategy, update _oauth accordingly, and retain only the export = OAuthStrategy module export.

Changes

OAuth1 declaration namespace

Layer / File(s) Summary
Namespace and internal type references
packages/passport-x/src/passport-oauth1.d.ts
OAuthGetCallback, OAuthError, OAuthClient, and InternalOAuthError are declared within OAuthStrategy; _oauth references OAuthStrategy.OAuthClient, and the previous named exports are removed.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: updating passport-oauth1 type exports for TypeScript 7 compatibility.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • ARCH-2244: Request failed with status code 401

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dionisio-bot

dionisio-bot Bot commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@ggazzo ggazzo added this to the 8.7.0 milestone Jul 10, 2026
@ggazzo

ggazzo commented Jul 10, 2026

Copy link
Copy Markdown
Member Author

/jira ARCH-2200

@ggazzo
ggazzo marked this pull request as ready for review July 10, 2026 17:31
@codecov

codecov Bot commented Jul 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.65%. Comparing base (eb99fc4) to head (4032d4d).
⚠️ Report is 20 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #41311      +/-   ##
===========================================
- Coverage    68.68%   68.65%   -0.04%     
===========================================
  Files         4135     4135              
  Lines       160461   160461              
  Branches     29186    29231      +45     
===========================================
- Hits        110215   110162      -53     
- Misses       45137    45182      +45     
- Partials      5109     5117       +8     
Flag Coverage Δ
e2e 58.81% <ø> (-0.06%) ⬇️
e2e-api 45.32% <ø> (-0.30%) ⬇️
unit 70.65% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

No issues found across 1 file

Re-trigger cubic

… for TS7

The ambient declaration mixed `export =` with `export { ... }`, which TS7
rejects (InternalOAuthError resolved as no exported member). Move the named
members into a namespace merged with the default export.
@ggazzo
ggazzo force-pushed the chore/ts7-passport-x branch from ea054f5 to 4032d4d Compare July 22, 2026 20:15
@ggazzo ggazzo changed the title fix(passport-x): declare passport-oauth1 exports for TS7 chore(passport-x): declare passport-oauth1 exports for TS7 Jul 23, 2026
@ggazzo ggazzo added the stat: QA assured Means it has been tested and approved by a company insider label Jul 23, 2026
@dionisio-bot dionisio-bot Bot added the stat: ready to merge PR tested and approved waiting for merge label Jul 23, 2026
@dionisio-bot
dionisio-bot Bot added this pull request to the merge queue Jul 23, 2026
Merged via the queue into develop with commit a27dd2f Jul 23, 2026
56 checks passed
@dionisio-bot
dionisio-bot Bot deleted the chore/ts7-passport-x branch July 23, 2026 20:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge type: chore

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants