Skip to content

Commit

Permalink
Remove default export, named exports only
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacs committed Apr 9, 2023
1 parent adabb30 commit 05861a5
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
}
},
Expand Down
3 changes: 0 additions & 3 deletions src/index-cjs.ts

This file was deleted.

2 changes: 0 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,3 @@ export const mkdirp = Object.assign(
useNativeSync,
}
)

export default mkdirp
2 changes: 1 addition & 1 deletion test/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
2 changes: 1 addition & 1 deletion test/index.ts
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tsconfig-esm.json
Original file line number Diff line number Diff line change
@@ -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"
Expand Down

0 comments on commit 05861a5

Please sign in to comment.