Skip to content

Commit

Permalink
configfile: convert to es6 class (#57)
Browse files Browse the repository at this point in the history
* configfile: convert to es6 class
* read_dir: promisify
* configfile: use simpler es6 for..in and for..of
* move declared function to callback (for this scoping)
* update Changes, meta
  • Loading branch information
msimerson committed Mar 23, 2020
1 parent 8e32ce5 commit 3996f25
Show file tree
Hide file tree
Showing 8 changed files with 346 additions and 348 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
engines:
eslint:
enabled: true
channel: "eslint-4"
channel: "eslint-6"
config:
config: ".eslintrc.yaml"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
with:
fetch-depth: 1

- name: Use Node.js 10
- name: Use Node.js 12
uses: actions/setup-node@master
with:
version: 10.x
version: 12.x

- name: install, run
run: |
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,5 @@ jobs:
run: npm run lint

env:
CI: true
CI: true

6 changes: 6 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@

## 1.N.NN - 20YY-MM-DD

## 1.0.19 - 2019-MM-DD

- configfile: convert to es6 class
- configfile.read_dir: promisify
- configfile: use simpler es6 `for..in` and `for..of`


## 1.0.18 - 2019-10-11

Expand Down
4 changes: 3 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ class Config {
}

getDir (name, opts, done) {
cfreader.read_dir(path.resolve(this.root_path, name), opts, done);
cfreader.read_dir(path.resolve(this.root_path, name), opts).then((files) => {
done(null, files) // keep the API consistent
}).catch(done)
}

arrange_args (args) {
Expand Down
Loading

0 comments on commit 3996f25

Please sign in to comment.