Skip to content

feat: add named export for memory store #292

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

Merged
merged 1 commit into from
Jan 22, 2022

Conversation

gamemaker1
Copy link
Member

Related Issues

What Does This PR Do?

Added

  • Added a named export for the MemoryStore class.

Checklist

  • The issues that this PR fixes/closes have been mentioned above.
  • What this PR adds/changes/removes has been explained.
  • All tests (npm test) pass.
  • All added/modified code has been commented, and
    methods/classes/constants/types have been annotated with TSDoc comments.
  • If a new feature has been added or a bug has been fixed, tests have been
    added for the same.

Sorry, something went wrong.

Verified

This commit was signed with the committer’s verified signature.
gamemaker1 Vedant Kulkarni
Copy link
Member

@nfriedly nfriedly left a comment

Choose a reason for hiding this comment

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

LGTM!

That esbuild --footer is getting a little hairy, but I don't think there's a better option right now.

@gamemaker1
Copy link
Member Author

That esbuild --footer is getting a little hairy, but I don't think there's a better option right now.

That's bugging me too 😬. Maybe we can use esbuild's __toCommonJSExport function there instead of the module.export.{default, rateLimit,Memory store}?

@nfriedly
Copy link
Member

Yeah... ideally I'd like to see a new flag in ES build that controls the default export behavior for cjs, rather than us having to continue hacking around it.

@gamemaker1
Copy link
Member Author

Maybe we can use ESBuild's __toCommonJSExport function there instead of the module.export.{default, rateLimit,Memory store}

That didn't work - Jest could not resolve named imports in the JS-ESM import tests when I did that. Merging with the big footer for now.

@gamemaker1 gamemaker1 merged commit 506f8ff into master Jan 22, 2022
@gamemaker1 gamemaker1 deleted the feat/add-named-export-for-memory-store branch January 22, 2022 03:44
@gamemaker1
Copy link
Member Author

Should I release v6.2.0 - it will include this as well as the deprecate onLimitReached fixes.

@nfriedly
Copy link
Member

Yeah, go ahead :)

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.

Expose MemoryStore as a named export
2 participants