Skip to content

Commit bf4ba5a

Browse files
authored
chore!: Normalize repository, dropping node <10.13 support (#16)
1 parent 6a398ef commit bf4ba5a

14 files changed

+185
-83
lines changed

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
coverage/

.github/workflows/dev.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: dev
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
env:
9+
CI: true
10+
11+
jobs:
12+
prettier:
13+
name: Format code
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event_name == 'push' }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Prettier
22+
uses: gulpjs/prettier_action@v3.0
23+
with:
24+
commit_message: 'chore: Run prettier'
25+
prettier_options: '--write .'
26+
27+
test:
28+
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
29+
runs-on: ${{ matrix.os }}
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
node: [10, 12, 14, 16]
35+
os: [ubuntu-latest, windows-latest, macos-latest]
36+
37+
steps:
38+
- name: Clone repository
39+
uses: actions/checkout@v2
40+
41+
- name: Set Node.js version
42+
uses: actions/setup-node@v2
43+
with:
44+
node-version: ${{ matrix.node }}
45+
46+
- run: node --version
47+
- run: npm --version
48+
49+
- name: Install npm dependencies
50+
run: npm install
51+
52+
- name: Run lint
53+
run: npm run lint
54+
55+
- name: Run tests
56+
run: npm test
57+
58+
- name: Coveralls
59+
uses: coverallsapp/github-action@v1.1.2
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
63+
parallel: true
64+
65+
coveralls:
66+
needs: test
67+
name: Finish up
68+
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Coveralls Finished
72+
uses: coverallsapp/github-action@v1.1.2
73+
with:
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
75+
parallel-finished: true

.github/workflows/release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GoogleCloudPlatform/release-please-action@v2
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
release-type: node
16+
package-name: release-please-action
17+
bump-minor-pre-major: true

.gitignore

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,67 @@
11
# Logs
22
logs
33
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
47

58
# Runtime data
69
pids
710
*.pid
811
*.seed
12+
*.pid.lock
913

1014
# Directory for instrumented libs generated by jscoverage/JSCover
1115
lib-cov
1216

1317
# Coverage directory used by tools like istanbul
1418
coverage
1519

16-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
1724
.grunt
1825

26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
1929
# node-waf configuration
2030
.lock-wscript
2131

22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
2333
build/Release
2434

25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27-
node_modules
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
2850

51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
# Garbage files
2964
.DS_Store
65+
66+
# Test results
67+
test.xunit

.jscsrc

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

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/
2+
.nyc_output/
3+
CHANGELOG.md

.travis.yml

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

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014 Blaine Bublitz, Eric Schoffstall and other contributors
3+
Copyright (c) 2014, 2016-2017, 2022 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<p align="center">
2-
<a href="http://gulpjs.com">
2+
<a href="https://gulpjs.com">
33
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
44
</a>
55
</p>
66

77
# async-settle
88

9-
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
9+
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]
1010

1111
Settle an async function. It will always complete successfully with an object of the resulting state.
1212

@@ -76,21 +76,20 @@ Settled values have two properties, `state` and `value`.
7676

7777
MIT
7878

79-
[async-done]: https://github.com/gulpjs/async-done
80-
[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution
8179

82-
[downloads-image]: http://img.shields.io/npm/dm/async-settle.svg
80+
<!-- prettier-ignore-start -->
81+
[downloads-image]: https://img.shields.io/npm/dm/async-settle.svg?style=flat-square
8382
[npm-url]: https://www.npmjs.com/package/async-settle
84-
[npm-image]: http://img.shields.io/npm/v/async-settle.svg
85-
86-
[travis-url]: https://travis-ci.org/gulpjs/async-settle
87-
[travis-image]: http://img.shields.io/travis/gulpjs/async-settle.svg?label=travis-ci
83+
[npm-image]: https://img.shields.io/npm/v/async-settle.svg?style=flat-square
8884

89-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/async-settle
90-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/async-settle.svg?label=appveyor
85+
[ci-url]: https://github.com/gulpjs/async-settle/actions?query=workflow:dev
86+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/async-settle/dev?style=flat-square
9187

9288
[coveralls-url]: https://coveralls.io/r/gulpjs/async-settle
93-
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/async-settle/master.svg
89+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/async-settle/master.svg?style=flat-square
90+
<!-- prettier-ignore-end -->
9491

95-
[gitter-url]: https://gitter.im/gulpjs/gulp
96-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
92+
<!-- prettier-ignore-start -->
93+
[async-done]: https://github.com/gulpjs/async-done
94+
[completions]: https://github.com/gulpjs/async-done#completion-and-error-resolution
95+
<!-- prettier-ignore-end -->

appveyor.yml

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

package.json

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,37 @@
99
"repository": "gulpjs/async-settle",
1010
"license": "MIT",
1111
"engines": {
12-
"node": ">= 0.10"
12+
"node": ">= 10.13.0"
1313
},
1414
"main": "index.js",
1515
"files": [
1616
"index.js",
1717
"LICENSE"
1818
],
1919
"scripts": {
20-
"lint": "eslint . && jscs index.js test/",
20+
"lint": "eslint . ",
2121
"pretest": "npm run lint",
22-
"test": "mocha --async-only",
23-
"cover": "istanbul cover _mocha --report lcovonly",
24-
"coveralls": "npm run cover && istanbul-coveralls"
22+
"test": "nyc mocha --async-only"
2523
},
2624
"dependencies": {
27-
"async-done": "^1.2.2"
25+
"async-done": "^2.0.0"
2826
},
2927
"devDependencies": {
30-
"eslint": "^1.7.3",
31-
"eslint-config-gulp": "^2.0.0",
32-
"expect": "^1.19.0",
33-
"istanbul": "^0.4.3",
34-
"istanbul-coveralls": "^1.0.3",
35-
"jscs": "^2.3.5",
36-
"jscs-preset-gulp": "^1.0.0",
37-
"mocha": "^2.4.5"
28+
"eslint": "^7.32.0",
29+
"eslint-config-gulp": "^5.0.1",
30+
"eslint-plugin-node": "^11.1.0",
31+
"expect": "^27.4.2",
32+
"mocha": "^8.4.0",
33+
"nyc": "^15.1.0"
34+
},
35+
"nyc": {
36+
"reporter": [
37+
"lcov",
38+
"text-summary"
39+
]
40+
},
41+
"prettier": {
42+
"singleQuote": true
3843
},
3944
"keywords": [
4045
"settle",

test/.eslintrc

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

test/index.js

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ describe('asyncSettle', function() {
1111
settle(function(done) {
1212
done(null, val);
1313
}, function(err, result) {
14-
expect(result).toInclude({
15-
state: 'success',
16-
value: val,
17-
});
14+
expect(result).toEqual(
15+
expect.objectContaining({
16+
state: 'success',
17+
value: val,
18+
})
19+
);
1820
done(err);
1921
});
2022
});
@@ -24,10 +26,12 @@ describe('asyncSettle', function() {
2426
settle(function(done) {
2527
done(error);
2628
}, function(err, result) {
27-
expect(result).toInclude({
28-
state: 'error',
29-
value: error,
30-
});
29+
expect(result).toEqual(
30+
expect.objectContaining({
31+
state: 'error',
32+
value: error,
33+
})
34+
);
3135
done(err);
3236
});
3337
});

0 commit comments

Comments
 (0)