8000 fix commonjs require by fratzinger · Pull Request #1020 · jimp-dev/jimp · GitHub
[go: up one dir, main page]

Skip to content

fix commonjs require - #1020

Merged
hipstersmoothie merged 2 commits into
jimp-dev:masterfrom
fratzinger:patch-1
Feb 4, 2023
Merged

hipstersmoothie merged 2 commits into
jimp-dev:masterfrom
fratzinger:patch-1

Conversation

@fratzinger
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor Author

Good point. .default will continue working.

@hipstersmoothie
hipstersmoothie merged commit 3635b81 into jimp-dev:master Feb 4, 2023
@hipstersmoothie
Copy link
Copy Markdown
8000
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

0