Skip to content

[BUG] Exports for config object does not work in version 14.0.6 but works in 14.0.5 #474

Description

@darekg11

Bug Description

Export of config seems to be broken in version 14.0.6 which introduced support for Full ESM support with native import/export

Environment

  • migrate-mongo version: 14.0.6
  • Node.js version: 25.2.1
  • MongoDB version: 8
  • Operating System: Ubuntu

Steps to Reproduce

  1. Init new Node project
  2. Install migrate-mongo dependency in version 14.0.6
  3. Try to run following code:
const { config: MongoMigrateConfig, up: MongoMigrateUp, database: MongoMigrateDatabase } = require("migrate-mongo");
MongoMigrateConfig.set({});

Expected Behavior

Should work without throwing any errors

Actual Behavior

This returns error that set is not a function because MongoMigrateConfig is null

Additional Context

Reverting back to version 14.0.5 makes everything work again without changing anything in the code.

Could you please tell me if this is a bug or if config should be now required differently? According to docs this should still work as expected:
https://github.com/seppevs/migrate-mongo/tree/master?tab=readme-ov-file#configsetyourconfigobject

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions