Skip to content

Commit e4f8633

Browse files
committed
Named export only, no default export
1 parent 3093d33 commit e4f8633

17 files changed

+21
-27
lines changed

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,6 @@ import { minimatch } from 'minimatch'
1515
// or:
1616
const { minimatch } = require('minimatch')
1717

18-
// default export also works
19-
import minimatch from 'minimatch'
20-
// or:
21-
const minimatch = require('minimatch')
22-
2318
minimatch('bar.foo', '*.foo') // true!
2419
minimatch('bar.foo', '*.bar') // false!
2520
minimatch('bar.foo', '*.+(bar|foo)', { debug: true }) // true, and noisy!

changelog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# change log
22

3+
## 9.0
4+
5+
- No default export, only named exports.
6+
37
## 8.0
48

59
- Recursive descent parser for extglob, allowing correct support

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"type": "git",
88
"url": "git://github.com/isaacs/minimatch.git"
99
},
10-
"main": "./dist/cjs/index-cjs.js",
10+
"main": "./dist/cjs/index.js",
1111
"module": "./dist/mjs/index.js",
1212
"types": "./dist/cjs/index.d.ts",
1313
"exports": {
@@ -18,7 +18,7 @@
1818
},
1919
"require": {
2020
"types": "./dist/cjs/index.d.ts",
21-
"default": "./dist/cjs/index-cjs.js"
21+
"default": "./dist/cjs/index.js"
2222
}
2323
}
2424
},

src/index-cjs.ts

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ export const minimatch = (
5555
return new Minimatch(pattern, options).match(p)
5656
}
5757

58-
export default minimatch
59-
6058
// Optimized checking for the most common glob patterns.
6159
const starDotExtRE = /^\*+([^+@!?\*\[\(]*)$/
6260
const starDotExtTest = (ext: string) => (f: string) =>

test/brace-expand.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
var tap = require('tap'),
2-
minimatch = require('../').default
1+
var tap = require('tap')
2+
const { minimatch } = require('../')
33

44
tap.test('brace expansion', function (t) {
55
// [ pattern, [expanded] ]

test/class-edge-cases.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const t = require('tap')
2-
const minimatch = require('../').default
2+
const { minimatch } = require('../')
33

44
const files = ['a[]b', '[b-a]x', 'a]b', 'a[]]b', 'a[[]b']
55

test/defaults.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
const t = require('tap')
77
const globalBefore = Object.keys(global)
8-
const mm = require('../').default
8+
const { minimatch: mm } = require('../')
99

1010
const patterns = require('./patterns.js')
1111

test/escaping.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var tap = require('tap')
2-
var minimatch = require('../').default
2+
const { minimatch } = require('../')
33

44
// test all characters with codes in range [mincc,maxcc]
55
var mincc = 0x20

test/extglob-ending-with-state-char.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
var test = require('tap').test
2-
var minimatch = require('../').default
2+
const { minimatch } = require('../')
33

44
test('extglob ending with statechar', function (t) {
55
t.notOk(minimatch('ax', 'a?(b*)'))

0 commit comments

Comments
 (0)