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

Showcase: patching sinon to work with swc #1

Open
wants to merge 1 commit into
base: go-back-to-15-2-0
Choose a base branch
from

Conversation

piotracalski
Copy link
Owner

@piotracalski piotracalski commented Dec 13, 2024

Purpose

The purpose of this PR is to showcase changes which make sinon@15.2.0 work with swc
related conversation: sinonjs#2528 (comment)

* @returns {boolean}
*/

module.exports = function isESModuleGetter(object, property) {
Copy link

Choose a reason for hiding this comment

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

This is not really a true name: it's more like isTranspiledEsModuleGetter 😄

return (
object &&
// eslint-disable-next-line no-underscore-dangle
object.__esModule &&
Copy link

Choose a reason for hiding this comment

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

Would you happen to know if __esModule is more or less a standard shared between the various transpilers (Webpack, SWC, etc)?

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.

2 participants