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

Issue when upgrading packages to versions with preset breaking change #1308

Open
gian1200 opened this issue Oct 27, 2024 · 0 comments
Open

Comments

@gian1200
Copy link

For some reason, some ESM code is included in earlier versions, where CommonJS is supposed to be still compatible. Upgrading to said versions breaks CommonJS apps.

Summary

  • git-raw-commits@4.0.0 depends on dargs@8.1.0, which is ESM only
  • git-raw-commits@4.0.0 has ESM code
  • conventional-recommended-bump@8.0.0 depends on git-raw-commits@4.0.0
  • conventional-recommended-bump@9.0.0 depends on git-raw-commits@4.0.0
  • conventional-changelog-preset-loader@4.1.0 has ESM code

Errors

Unable to load the "<project root>\node_modules\conventional-changelog-conventionalcommits\index.js" preset. Please make sure it's installed.                                                                                                                    
                                                                                                                                                                                                                                                                                                      
  at loadPreset (node_modules/conventional-changelog-preset-loader/index.js:115:13)                                                                                                                                                                                                               
  at conventionalRecommendedBump (node_modules/conventional-recommended-bump/index.js:25:14)                                                                                                                                                                                                      

Cause:
TypeError: A dynamic import callback was invoked without --experimental-vm-modules
Unable to load the "angular" preset. Please make sure it's installed.
  at loadPreset (node_modules/conventional-changelog-preset-loader/index.js:115:13)
  at conventionalRecommendedBump (node_modules/conventional-recommended-bump/index.js:25:14)

Cause:
TypeError: A dynamic import callback was invoked without --experimental-vm-modules

Code to be fixed

conventional-changelog-preset-loader@4.1.0

This import should be changed to require:

module.exports.loadPreset = createPresetLoader((preset) => import(preset))

git-raw-commits@4.0.0

Releases to be fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant