Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import * as http -> import http from 'http' #1854

Merged
merged 4 commits into from
Jul 24, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Jul 24, 2023

Fixes #1844. TL;DR we will use the equivalent of import {default as http} from 'http' in an ES module context, to allow monkey patching, and in our tsconfig.json we have put "esModuleInterop" so in the CJS context we will still use require('http')

@richardm-stripe richardm-stripe marked this pull request as ready for review July 24, 2023 18:50
@richardm-stripe richardm-stripe merged commit f6d9d5d into master Jul 24, 2023
@richardm-stripe richardm-stripe deleted the richardm-monkey-patchable-node-http branch July 24, 2023 18:57
Copy link

@123MoeThu 123MoeThu left a comment

Choose a reason for hiding this comment

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

  • FTFYimagehjjjhhc@ffhcvv
    N

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.

Importing Stripe via ES Modules does not respect monkey-patching 'http'
3 participants