async function supportsDynamicImport() {
  try {
    // imports are cached.
    // no need to worry about perf here.
    // Don't remove .js: extension must be included for ESM imports!
    await import('./dummy-file.js');
    return true;
  } catch (e) {
    return false;
  }
}

/**
 * Imports a JSON, CommonJS or ESM module
 * based on feature detection.
 *
 * @param modulePath path to the module to import
 * @returns {Promise<unknown>} the imported module.
 */
async function importModule(modulePath) {
  // JSON modules are still behind a flag. Fallback to require for now.
  // https://nodejs.org/api/esm.html#json-modules
  if (!modulePath.endsWith('.json') && (await supportsDynamicImport())) {
    return import(modulePath);
  }

  // mimics what `import()` would return for
  // cjs modules.
  return { default: require(modulePath) };
}

module.exports = {
  supportsDynamicImport,
  importModule,
};

@@ -1,20 +1,49 @@
+const url = require('url');%0A%0A
 async function suppo
@@ -659,16 +659,46 @@
 s%0A  if (
+%0A    url.pathToFileURL &&%0A    
 !moduleP
@@ -721,16 +721,20 @@
 son') &&
+%0A   
  (await 
@@ -757,24 +757,27 @@
 mport())
+%0A  
 ) %7B%0A    
 return i
@@ -772,21 +772,116 @@
     
-return import
+// 'import' expects a URL. (https://github.com/sequelize/cli/issues/994)%0A    return import(url.pathToFileURL
 (mod
@@ -888,16 +888,17 @@
 ulePath)
+)
 ;%0A  %7D%0A%0A 

fix config import breaking on windows (#995)