Skip to content
Merged
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ jobs:
MONGODB_VERSION: 8.0.0
MONGODB_TOPOLOGY: standalone
NODE_VERSION: 22.4.1
- name: Node 22
MONGODB_VERSION: 8.0.0
MONGODB_TOPOLOGY: standalone
NODE_VERSION: 22.13.0
- name: Node 20
MONGODB_VERSION: 8.0.0
MONGODB_TOPOLOGY: standalone
Expand Down
8 changes: 5 additions & 3 deletions src/Adapters/AdapterLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,15 @@ export async function loadModule(modulePath) {
} catch (err) {
if (err.code === 'ERR_REQUIRE_ESM') {
module = await import(modulePath);
if (module.default) {
module = module.default;
}
} else {
throw err;
}
}

if (module.default) {
module = module.default;
}

return module;
}

Expand Down
1 change: 1 addition & 0 deletions src/Controllers/AdaptableController.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export class AdaptableController {
}, {});

if (Object.keys(mismatches).length > 0) {
console.error("Adapter prototype don't match expected prototype", mismatches);
throw new Error("Adapter prototype don't match expected prototype", adapter, mismatches);
}
}
Expand Down