Skip to content

Commit

Permalink
Migrate to typescript + Bump minimatch + Add ESM support
Browse files Browse the repository at this point in the history
  • Loading branch information
Yqnn committed Apr 7, 2024
1 parent a3504ab commit 11abd07
Show file tree
Hide file tree
Showing 9 changed files with 239 additions and 43 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run build
- run: npm test
coverage:
runs-on: ubuntu-latest
Expand All @@ -26,6 +27,7 @@ jobs:
with:
node-version: 20.x
- run: npm ci
- run: npm run build
- run: npm test
- uses: coverallsapp/github-action@master
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.*.swp
/dist/
/node_modules/*
/v8.log
/profile.txt
Expand Down
45 changes: 39 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 14 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,33 @@
"author": "Yann Armelin",
"name": "readdir-glob",
"description": "Recursive fs.readdir with streaming API and glob filtering.",
"version": "1.1.3",
"version": "2.0.0",
"homepage": "https://github.com/Yqnn/node-readdir-glob",
"repository": {
"type": "git",
"url": "git://github.com/Yqnn/node-readdir-glob.git"
},
"main": "index.js",
"main": "./dist/cjs/index.cjs.js",
"files": [
"index.js"
"dist/**",
"src"
],
"exports": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.cjs.js",
"default": "./dist/cjs/index.cjs.js"
},
"dependencies": {
"minimatch": "^5.1.0"
"minimatch": "^9.0.4"
},
"devDependencies": {
"@types/node": "^20.12.5",
"jasmine": "^4.6.0",
"mkdirp": "^2.1.6",
"nyc": "^15.1.0",
"rimraf": "^3.0.2",
"tick": "0.0.6"
"tick": "0.0.6",
"typescript": "^5.4.4"
},
"keywords": [
"recursive",
Expand All @@ -36,6 +44,7 @@
"scripts": {
"test": "npx nyc --reporter=lcov --reporter=text-summary --reporter=html jasmine --config=jasmine.json",
"test-regen": "TEST_REGEN=1 jasmine --config=jasmine.json",
"build": "tsc -p tsconfig.esm.json && tsc -p tsconfig.cjs.json",
"bench": "bash scripts/benchmark.sh",
"profile": "bash scripts/profile.sh && cat profile.txt"
},
Expand Down
3 changes: 3 additions & 0 deletions src/index.cjs.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import {readdirGlob} from './index';

export = readdirGlob;
Loading

0 comments on commit 11abd07

Please sign in to comment.