10000 chore!: Normalize repository, dropping node <10.13 support (#21) · gulpjs/fancy-log@4083943 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4083943

Browse files
authored
chore!: Normalize repository, dropping node <10.13 support (#21)
1 parent d17973c commit 4083943

File tree

12 files changed

+247
-126
lines changed

12 files changed

+247
-126
lines changed

.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) 2014, 2015, 2018 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>
3+
Copyright (c) 2014, 2015, 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 & 13 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
# fancy-log
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
Log things, prefixed with a timestamp.
1212

@@ -54,18 +54,14 @@ current time in HH:MM:ss format.
5454

5555
MIT
5656

57-
[downloads-image]: http://img.shields.io/npm/dm/fancy-log.svg
57+
<!-- prettier-ignore-start -->
58+
[downloads-image]: https://img.shields.io/npm/dm/fancy-log.svg?style=flat-square
5859
[npm-url]: https://www.npmjs.com/package/fancy-log
59-
[npm-image]: http://img.shields.io/npm/v/fancy-log.svg
60+
[npm-image]: https://img.shields.io/npm/v/fancy-log.svg?style=flat-square
6061

61-
[travis-url]: https://travis-ci.org/gulpjs/fancy-log
62-
[travis-image]: http://img.shields.io/travis/gulpjs/fancy-log.svg?label=travis-ci
63-
64-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/fancy-log
65-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/fancy-log.svg?label=appveyor
62+
[ci-url]: https://github.com/gulpjs/fancy-log/actions?query=workflow:dev
63+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/fancy-log/dev?style=flat-square
6664

6765
[coveralls-url]: https://coveralls.io/r/gulpjs/fancy-log
68-
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/fancy-log/master.svg
69-
70-
[gitter-url]: https://gitter.im/gulpjs/gulp
71-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
66+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/fancy-log/master.svg?style=flat-square
67+
<!-- prettier-ignore-end -->

appveyor.yml

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

index.js

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,12 @@ var Console = require('console').Console;
44
var gray = require('ansi-gray');
55
var timestamp = require('time-stamp');
66
var supportsColor = require('color-support');
7-
var nodeVersion = require('parse-node-version')(process.version);
87

9-
var colorDetectionOptions = {
10-
// If on Windows, ignore the isTTY check
11-
// This is due to AppVeyor (and thus probably common Windows platforms?) failing the check
12-
// TODO: If this is too broad, we can reduce it to an APPVEYOR env check
13-
ignoreTTY: (process.platform === 'win32'),
14-
};
15-
16-
// Needed to add this because node 10 decided to start coloring log output randomly
17-
var console;
18-
if (nodeVersion.major >= 10) {
19-
// Node 10 also changed the way this is constructed
20-
console = new Console({
21-
stdout: process.stdout,
22-
stderr: process.stderr,
23-
colorMode: false,
24-
});
25-
} else {
26-
console = new Console(process.stdout, process.stderr);
27-
}
8+
var console = new Console({
9+
stdout: process.stdout,
10+
stderr: process.stderr,
11+
colorMode: false,
12+
});
2813

2914
function hasFlag(flag) {
3015
return (process.argv.indexOf('--' + flag) !== -1);
@@ -39,7 +24,7 @@ function addColor(str) {
3924
return gray(str);
4025
}
4126

42-
if (supportsColor(colorDetectionOptions)) {
27+
if (supportsColor()) {
4328
return gray(str);
4429
}
4530

package.json

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"repository": "gulpjs/fancy-log",
1111
"license": "MIT",
1212
"engines": {
13-
"node": ">= 0.10"
13+
"node": ">=10.13.0"
1414
},
1515
"main": "index.js",
1616
"files": [
@@ -20,23 +20,31 @@
2020
"scripts": {
2121
"lint": "eslint .",
2222
"pretest": "npm run lint",
23-
"test": "mocha --async-only",
24-
"cover": "istanbul cover _mocha --report lcovonly",
25-
"coveralls": "npm run cover && istanbul-coveralls"
23+
"test": "nyc mocha --async-only"
2624
},
2725
"dependencies": {
2826
"ansi-gray": "^0.1.1",
2927
"color-support": "^1.1.3",
30-
"parse-node-version": "^1.0.0",
31-
"time-stamp": "^1.0.0"
28+
"time-stamp": "^2.2.0"
3229
},
3330
"devDependencies": {
34-
"eslint": "^2.13.0",
35-
"eslint-config-gulp": "^3.0.1",
36-
"expect": "^1.20.2",
37-
"istanbul": "^0.4.3",
38-
"istanbul-coveralls": "^1.0.3",
39-
"mocha": "^3.5.3"
31+
"eslint": "^7.32.0",
32+
"eslint-config-gulp": "^5.0.1",
33+
"eslint-plugin-node": "^11.1.0",
34+
"expect": "^27.4.2",
35+
"mocha": "^8.4.0",
36+
"nyc": "^15.1.0",
37+
"parse-node-version": "^2.0.0",
38+
"sinon": "^12.0.1"
39+
},
40+
"nyc": {
41+
"reporter": [
42+
"lcov",
43+
"text-summary"
44+
]
45+
},
46+
"prettier": {
47+
46EE "singleQuote": true
4048
},
4149
"keywords": [
4250
"console.log",

0 commit comments

Comments
 (0)
0