Skip to content

Commit a7b9c22

Browse files
authored
chore!: Normalize repository, dropping node <10.13 support (#9)
1 parent 2998485 commit a7b9c22

14 files changed

+177
-82
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: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +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

19-
# Compiled binary addons (http://nodejs.org/api/addons.html)
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
2033
build/Release
2134

22-
# Dependency directory
23-
# Commenting this out is preferred by some people, see
24-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
25-
node_modules
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
2638

27-
# Users Environment Variables
28-
.lock-wscript
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
50+
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
2962

3063
# Garbage files
3164
.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) 2015 Blaine Bublitz, Eric Schoffstall and other contributors
3+
Copyright (c) 2015-2016, 2021 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: 14 additions & 15 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
# default-resolution
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
Get the default resolution time based on the current node version, optionally overridable.
1212

@@ -49,22 +49,21 @@ More information at https://github.com/gulpjs/undertaker/pull/17#issuecomment-82
4949

5050
MIT
5151

52-
[dinoboff]: https://github.com/dinoboff
53-
[original]: https://github.com/gulpjs/undertaker/pull/17
54-
[default-table]: #default-resolutions
5552

56-
[downloads-image]: http://img.shields.io/npm/dm/default-resolution.svg
53+
<!-- prettier-ignore-start -->
54+
[downloads-image]: https://img.shields.io/npm/dm/default-resolution.svg?style=flat-square
5755
[npm-url]: https://www.npmjs.com/package/default-resolution
58-
[npm-image]: http://img.shields.io/npm/v/default-resolution.svg
59-
60-
[travis-url]: https://travis-ci.org/gulpjs/default-resolution
61-
[travis-image]: http://img.shields.io/travis/gulpjs/default-resolution.svg?label=travis-ci
56+
[npm-image]: https://img.shields.io/npm/v/default-resolution.svg?style=flat-square
6257

63-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/default-resolution
64-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/default-resolution.svg?label=appveyor
58+
[ci-url]: https://github.com/gulpjs/default-resolution/actions?query=workflow:dev
59+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/default-resolution/dev?style=flat-square
6560

6661
[coveralls-url]: https://coveralls.io/r/gulpjs/default-resolution
67-
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/default-resolution/master.svg
62+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/default-resolution/master.svg?style=flat-square
63+
<!-- prettier-ignore-end -->
6864

69-
[gitter-url]: https://gitter.im/gulpjs/gulp
70-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
65+
<!-- prettier-ignore-start -->
66+
[dinoboff]: https://github.com/dinoboff
67+
[original]: https://github.com/gulpjs/undertaker/pull/17
68+
[default-table]: #default-resolutions
69+
<!-- prettier-ignore-end -->

appveyor.yml

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

package.json

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repository": "gulpjs/default-resolution",
1111
"license": "MIT",
1212
"engines": {
13-
"node": ">= 0.10"
13+
"node": ">= 10.13.0"
1414
},
1515
"main": "index.js",
1616
"files": [
@@ -19,22 +19,26 @@
1919
"node-version.js"
2020
],
2121
"scripts": {
22-
"lint": "eslint . && jscs index.js node-version.js test/",
22+
"lint": "eslint .",
2323
"pretest": "npm run lint",
24-
"test": "mocha --async-only",
25-
"cover": "istanbul cover _mocha --report lcovonly",
26-
"coveralls": "npm run cover && istanbul-coveralls"
24+
"test": "nyc mocha --async-only"
2725
},
28-
"dependencies": {},
2926
"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.4.0",
36-
"jscs-preset-gulp": "^1.0.0",
37-
"mocha": "^2.4.5"
27+
"eslint": "^7.32.0",
28+
"eslint-config-gulp": "^5.0.1",
29+
"eslint-plugin-node": "^11.1.0",
30+
"expect": "^27.4.2",
31+
"mocha": "^8.4.0",
32+
"nyc": "^15.1.0"
33+
},
34+
"nyc": {
35+
"reporter": [
36+
"lcov",
37+
"text-summary"
38+
]
39+
},
40+
"prettier": {
41+
"singleQuote": true
3842
},
3943
"keywords": [
4044
"resolution",

test/.eslintrc

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

test/default-resolution.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ var nodeVersion = require('../node-version');
88
describe('nodeVersion', function() {
99

1010
it('has all integers and not strings', function(done) {
11-
expect(nodeVersion.major).toBeA('number');
12-
expect(nodeVersion.minor).toBeA('number');
13-
expect(nodeVersion.patch).toBeA('number');
11+
expect(typeof nodeVersion.major).toEqual('number');
12+
expect(typeof nodeVersion.minor).toEqual('number');
13+
expect(typeof nodeVersion.patch).toEqual('number');
1414
done();
1515
});
1616
});

0 commit comments

Comments
 (0)