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

fix commonjs require #1020

Merged
merged 2 commits into from
Feb 4, 2023
Merged

fix commonjs require #1020

merged 2 commits into from
Feb 4, 2023

Conversation

fratzinger
Copy link
Contributor

What's Changing and Why

This little change is for js users who use commonjs-modules.
before the fix: const Jimp = require('jimp').default;
after the fix: const Jimp = require('jimp');

The esm module isn't affected. Other popular libraries use this fix as well.

What else might be affected

nothing

Tasks

  • Add tests
  • Update Documentation
  • Update jimp.d.ts
  • Add SemVer Label

- before: const Jimp = require('jimp').default;
- after: const Jimp = require('jimp');
no changes for esm module
@Steve-Mcl
Copy link

Will const Jimp = require('jimp').default continue to work in existing node js projects?

If not, will this be a major semver change?

@fratzinger
Copy link
Contributor Author

Good point. .default will continue working.

@hipstersmoothie hipstersmoothie merged commit 3635b81 into jimp-dev:master Feb 4, 2023
@hipstersmoothie
Copy link
Collaborator

🚀 PR was released in v0.17.4 🚀

@hipstersmoothie hipstersmoothie added the released This issue/pull request has been released. label Feb 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants