Skip to content

Commit b4ea840

Browse files
authored
chore!: Normalize repository, dropping node <10.13 support (#6)
1 parent 69cad9e commit b4ea840

File tree

12 files changed

+172
-80
lines changed

12 files changed

+172
-80
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

.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 & 11 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) 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
3+
Copyright (c) 2018, 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: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
# parse-node-version
88

9-
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Travis 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
Turn node's process.version into something useful.
1212

@@ -34,18 +34,15 @@ Takes a node version string (usually `process.version`) and returns an object wi
3434

3535
MIT
3636

37-
[downloads-image]: http://img.shields.io/npm/dm/parse-node-version.svg
38-
[npm-url]: https://www.npmjs.com/package/parse-node-version
39-
[npm-image]: http://img.shields.io/npm/v/parse-node-version.svg
4037

41-
[travis-url]: https://travis-ci.org/gulpjs/parse-node-version
42-
[travis-image]: http://img.shields.io/travis/gulpjs/parse-node-version.svg?label=travis-ci
38+
<!-- prettier-ignore-start -->
39+
[downloads-image]: http://img.shields.io/npm/dm/parse-node-version.svg?style=flat-square
40+
[npm-url]: https://www.npmjs.com/package/parse-node-version
41+
[npm-image]: http://img.shields.io/npm/v/parse-node-version.svg?style=flat-square
4342

44-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/parse-node-version
45-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/parse-node-version.svg?label=appveyor
43+
[ci-url]: https://github.com/gulpjs/parse-node-version/actions?query=workflow:dev
44+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/parse-node-version/dev?style=flat-square
4645

4746
[coveralls-url]: https://coveralls.io/r/gulpjs/parse-node-version
48-
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/parse-node-version/master.svg
49-
50-
[gitter-url]: https://gitter.im/gulpjs/gulp
51-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
47+
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/parse-node-version/master.svg?style=flat-square
48+
<!-- prettier-ignore-end -->

appveyor.yml

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

package.json

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"repository": "gulpjs/parse-node-version",
1010
"license": "MIT",
1111
"engines": {
12-
"node": ">= 0.10"
12+
"node": ">= 10.13.0"
1313
},
1414
"main": "index.js",
1515
"files": [
@@ -19,18 +19,24 @@
1919
"scripts": {
2020
"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
},
26-
"dependencies": {},
2724
"devDependencies": {
28-
"eslint": "^2.13.0",
29-
"eslint-config-gulp": "^3.0.1",
30-
"expect": "^1.20.2",
31-
"istanbul": "^0.4.3",
32-
"istanbul-coveralls": "^1.0.3",
33-
"mocha": "^3.5.3"
25+
"eslint": "^7.32.0",
26+
"eslint-config-gulp": "^5.0.1",
27+
"eslint-plugin-node": "^11.1.0",
28+
"expect": "^27.3.1",
29+
"mocha": "^8.4.0",
30+
"nyc": "^15.1.0"
31+
},
32+
"nyc": {
33+
"reporter": [
34+
"lcov",
35+
"text-summary"
36+
]
37+
},
38+
"prettier": {
39+
"singleQuote": true
3440
},
3541
"keywords": [
3642
"process.version",

test/.eslintrc

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

test/index.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ describe('parseNodeVersion', function() {
88

99
it('takes process.version and returns all numbers', function(done) {
1010
var nodeVersion = parseNodeVersion(process.version);
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

@@ -51,9 +51,9 @@ describe('parseNodeVersion', function() {
5151

5252
it('always returns strings if no pre-release or build metadata', function(done) {
5353
var nodeVersion = parseNodeVersion(process.version);
54-
expect(nodeVersion.pre).toBeA('string');
54+
expect(typeof nodeVersion.pre).toEqual('string');
5555
expect(nodeVersion.pre).toEqual('');
56-
expect(nodeVersion.build).toBeA('string');
56+
expect(typeof nodeVersion.build).toEqual('string');
5757
expect(nodeVersion.build).toEqual('');
5858
done();
5959
});

0 commit comments

Comments
 (0)