Skip to content

Commit f0bd534

Browse files
committed
7.0.3: #146, #147: adds more test cases and temporarily adds ignore.default back
1 parent cd9f640 commit f0bd534

File tree

8 files changed

+16
-41
lines changed

8 files changed

+16
-41
lines changed

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/build
22
/coverage
33
/no-track
4-
/test/ts/*.js
4+
/test/import/*.js
55
/legacy.js
66
/index.mjs

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# test
22
/.tap
3+
/test/import/*.js
34

45
# coverage
56
coverage

CHANGELOG.md

-34
This file was deleted.

index.js

+6
Original file line numberDiff line numberDiff line change
@@ -770,4 +770,10 @@ if (
770770
// COMMONJS_EXPORTS ////////////////////////////////////////////////////////////
771771

772772
module.exports = factory
773+
774+
// Although it is an anti-pattern,
775+
// it is still widely misused by a lot of libraries in github
776+
// Ref: https://github.com/search?q=ignore.default%28%29&type=code
777+
factory.default = factory
778+
773779
module.exports.isPathValid = isPathValid

package.json

+8-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ignore",
3-
"version": "7.0.1",
3+
"version": "7.0.3",
44
"description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.",
55
"types": "index.d.ts",
66
"files": [
@@ -16,17 +16,19 @@
1616
"==================== linting ======================": "",
1717
"lint": "eslint .",
1818

19-
"=================== typescript ====================": "",
19+
"===================== import ======================": "",
2020
"ts": "npm run test:ts && npm run test:16",
21-
"test:ts": "ts-node ./test/ts/simple.ts",
21+
"test:ts": "ts-node ./test/import/simple.ts",
2222
"test:16": "npm run test:ts:16 && npm run test:cjs:16 && npm run test:mjs:16",
23-
"test:ts:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/ts/simple.ts",
24-
"test:cjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/ts/simple.cjs",
25-
"test:mjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/ts/simple.mjs",
23+
"test:ts:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.ts && tsc ./test/import/simple.ts --lib ES6 --moduleResolution Node16 --module Node16 && node ./test/import/simple.js",
24+
"test:cjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.cjs",
25+
"test:mjs:16": "ts-node --compilerOptions '{\"moduleResolution\": \"Node16\", \"module\": \"Node16\"}' ./test/import/simple.mjs && babel -o ./test/import/simple-mjs.js ./test/import/simple.mjs && node ./test/import/simple-mjs.js",
2626

2727
"===================== cases =======================": "",
2828
"test:cases": "npm run tap test/*.test.js -- --coverage",
2929
"tap": "tap --reporter classic",
30+
31+
"===================== debug =======================": "",
3032
"test:git": "npm run tap test/git-check-ignore.test.js",
3133
"test:ignore": "npm run tap test/ignore.test.js",
3234
"test:ignore:only": "IGNORE_ONLY_IGNORES=1 npm run tap test/ignore.test.js",
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)