Skip to content

Commit

Permalink
fix: httptoolkit-esm types, and import.ts coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nktnet1 committed Dec 15, 2023
1 parent f60e076 commit 000e4cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/httptoolkit-esm-types.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module '@httptoolkit/esm' {
import * as Esm from 'esm';
import Esm from 'esm';
export = Esm;
}
1 change: 1 addition & 0 deletions src/import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ const importSync = (id: string, options: Options = {}) => {
// In case CJS shows up as empty, e.g. when importing CommonJS/CommonTS into Jest
try {
const basicModule = require(modulePath);
/* istanbul ignore next */
if (Object.keys(basicModule).length > 0) {
return basicModule;
}
Expand Down

0 comments on commit 000e4cf

Please sign in to comment.