Skip to content

Commit

Permalink
fix: workaround esm/cjs madness :)
Browse files Browse the repository at this point in the history
  • Loading branch information
n1ru4l committed Aug 26, 2022
1 parent a0d25a2 commit bc3cd67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
"prettier": "2.7.1",
"rimraf": "3.0.2",
"ts-jest": "28.0.8",
"tslib": "2.4.0",
"typescript": "4.7.4",
"typescript-json-schema": "0.54.0"
},
Expand Down
4 changes: 3 additions & 1 deletion src/helpers/cosmiconfig.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import { cosmiconfig, cosmiconfigSync, Loader, defaultLoaders } from 'cosmiconfig';
import loadTs from 'cosmiconfig-typescript-loader';
import unsecure_loadTs from 'cosmiconfig-typescript-loader';
import { loadToml } from 'cosmiconfig-toml-loader';
import { env } from 'string-env-interpolation';

/** The underlying module gives us { default: } on ESM but no default on CJS :) */
const loadTs: typeof unsecure_loadTs = (unsecure_loadTs as any)?.default ?? unsecure_loadTs;
export interface ConfigSearchResult {
config: any;
filepath: string;
Expand Down

0 comments on commit bc3cd67

Please sign in to comment.