diff --git a/CHANGELOG.md b/CHANGELOG.md index c3ef3d9..40cccea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changers Lorgs! +## 3.0 + +No default exports, just a named export. + ## 2.1 Export CommonJS module without a `.default` dangly wart. (A diff --git a/package.json b/package.json index b58dd99..28ad8cf 100644 --- a/package.json +++ b/package.json @@ -12,7 +12,7 @@ "native" ], "bin": "./dist/cjs/src/bin.js", - "main": "./dist/cjs/src/index-cjs.js", + "main": "./dist/cjs/src/index.js", "module": "./dist/mjs/index.js", "types": "./dist/mjs/index.d.ts", "exports": { @@ -23,7 +23,7 @@ }, "require": { "types": "./dist/cjs/src/index.d.ts", - "default": "./dist/cjs/src/index-cjs.js" + "default": "./dist/cjs/src/index.js" } } }, diff --git a/src/index-cjs.ts b/src/index-cjs.ts deleted file mode 100644 index 31866f1..0000000 --- a/src/index-cjs.ts +++ /dev/null @@ -1,3 +0,0 @@ -import mkdirp from './index.js' - -export = Object.assign(mkdirp, { default: mkdirp, mkdirp }) diff --git a/src/index.ts b/src/index.ts index ef3b12d..0b48e0f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -41,5 +41,3 @@ export const mkdirp = Object.assign( useNativeSync, } ) - -export default mkdirp diff --git a/test/cmd.ts b/test/cmd.ts index 3b2c0cd..95f2cab 100644 --- a/test/cmd.ts +++ b/test/cmd.ts @@ -21,7 +21,7 @@ fakeMkdirp.mkdirp = fakeMkdirp if (process.argv[2] === 'RUN') { process.argv = [process.execPath, cmd, ...process.argv.slice(3)] t.mock(cmd, { - '../dist/cjs/src/index.js': fakeMkdirp, + '../dist/cjs/src/index.js': { mkdirp: fakeMkdirp }, '../dist/cjs/package.json': { version: '4.2.0-69.lol', }, diff --git a/test/index.ts b/test/index.ts index b76ef59..115a05f 100644 --- a/test/index.ts +++ b/test/index.ts @@ -1,6 +1,6 @@ import { mkdir, mkdirSync, statSync } from 'fs' import t from 'tap' -import mkdirp from '../dist/cjs/src/index.js' +import { mkdirp } from '../dist/cjs/src/index.js' import { MkdirpOptions, MkdirpOptionsResolved, diff --git a/tsconfig-esm.json b/tsconfig-esm.json index 1384ff2..bebee46 100644 --- a/tsconfig-esm.json +++ b/tsconfig-esm.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig-base.json", - "exclude": ["./test", "./tap-snapshots", "src/index-cjs.ts", "src/bin.ts"], + "exclude": ["./test", "./tap-snapshots", "src/bin.ts"], "compilerOptions": { "module": "esnext", "outDir": "dist/mjs"