Skip to content

Commit

Permalink
Merge pull request #36 from cb1kenobi/v5
Browse files Browse the repository at this point in the history
v5.0.0
  • Loading branch information
cb1kenobi authored Mar 2, 2022
2 parents 17ab284 + 7ca3b4d commit b83c1f8
Show file tree
Hide file tree
Showing 10 changed files with 380 additions and 542 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.js text eol=lf
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Build
on:
- pull_request
- push

jobs:
Lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Install dependencies
run: yarn
- name: Lint
run: yarn run lint

Test:
needs: Lint
name: ${{ matrix.os }} ${{ matrix.nodeVersion }} Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
nodeVersion: [ '14.17.1', '16.14.0', '17.6.0' ]
os: [ macos-latest, ubuntu-latest, windows-latest ]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.nodeVersion }}
- name: Install dependencies
run: yarn
- name: Run tests
run: yarn run test
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# v5.0.0 (Mar 2, 2022)

* BREAKING CHANGE: Require Node.js 14.15.0 LTS or newer.
* fix: Always force colors even when not available. Use `StripColors` transform to remove color
sequences when piping to files or non-TTY terminals.
* chore: Updated dependencies.
* chore: Replaced Travis with GitHub action.

# v4.0.0 (Feb 24, 2021)

* BREAKING CHANGE: Changed package to a ES module.
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2017-2021 Chris Barber
Copyright (c) 2017-2022 Chris Barber

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
12 changes: 0 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

[![NPM Version][npm-image]][npm-url]
[![NPM Downloads][downloads-image]][downloads-url]
[![Travis CI Build][travis-image]][travis-url]
[![Appveyor CI Build][appveyor-image]][appveyor-url]
[![Deps][david-image]][david-url]
[![Dev Deps][david-dev-image]][david-dev-url]

Laid back debug logging.

Expand Down Expand Up @@ -242,11 +238,3 @@ MIT
[npm-url]: https://npmjs.org/package/snooplogg
[downloads-image]: https://img.shields.io/npm/dm/snooplogg.svg
[downloads-url]: https://npmjs.org/package/snooplogg
[travis-image]: https://travis-ci.org/cb1kenobi/snooplogg.svg?branch=master
[travis-url]: https://travis-ci.org/cb1kenobi/snooplogg
[appveyor-image]: https://ci.appveyor.com/api/projects/status/ecpifaqt54itg7h4?svg=true
[appveyor-url]: https://ci.appveyor.com/project/cb1kenobi/snooplogg
[david-image]: https://img.shields.io/david/cb1kenobi/snooplogg.svg
[david-url]: https://david-dm.org/cb1kenobi/snooplogg
[david-dev-image]: https://img.shields.io/david/dev/cb1kenobi/snooplogg.svg
[david-dev-url]: https://david-dm.org/cb1kenobi/snooplogg#info=devDependencies
20 changes: 0 additions & 20 deletions appveyor.yml

This file was deleted.

31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "snooplogg",
"version": "4.0.0",
"version": "5.0.0",
"description": "Your mind on your logs and your logs on your mind",
"type": "module",
"exports": "./src/index.js",
Expand All @@ -20,29 +20,30 @@
"scripts": {
"coverage": "c8 npm run test",
"lint": "eslint src test",
"prepack": "npm run lint",
"test": "npm run lint && mocha test/**/test-*.js --reporter spec"
"prepublishOnly": "npm run lint",
"test": "npm run lint && mocha test/**/test-*.js --reporter spec",
"test-no-tty": "node -e \"try { console.log(require('child_process').execSync('yarn test').toString()); } catch (e) { console.log(e, e.stdout.toString()); console.log(e.stderr.toString()); }\""
},
"dependencies": {
"bryt-lite": "^1.0.1",
"chalk": "^4.1.0",
"nanobuffer": "^2.0.0",
"supports-color": "^8.1.1"
"bryt-lite": "^2.0.0",
"chalk": "^5.0.0",
"nanobuffer": "^3.0.0",
"supports-color": "^9.2.1"
},
"devDependencies": {
"c8": "^7.6.0",
"chai": "^4.3.0",
"eslint": "^7.20.0",
"eslint-plugin-chai-expect": "^2.2.0",
"eslint-plugin-mocha": "^8.0.0",
"eslint-plugin-promise": "^4.3.1",
"c8": "^7.11.0",
"chai": "^4.3.6",
"eslint": "^8.10.0",
"eslint-plugin-chai-expect": "^3.0.0",
"eslint-plugin-mocha": "^10.0.3",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-security": "^1.4.0",
"mocha": "^8.3.0"
"mocha": "^9.2.1"
},
"homepage": "https://github.com/cb1kenobi/snooplogg",
"bugs": "https://github.com/cb1kenobi/snooplogg/issues",
"repository": "https://github.com/cb1kenobi/snooplogg",
"engines": {
"node": ">=12"
"node": ">=14.15.0"
}
}
10 changes: 9 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import * as bryt from 'bryt-lite';
import chalk from 'chalk';
import NanoBuffer from 'nanobuffer';
import supportsColor from 'supports-color';
import util from 'util';

import { Chalk } from 'chalk';
import { Console } from 'console';
import { Transform, Writable } from 'stream';

/**
* The chalk instance with all colors enabled.
* @type {Chalk}
*/
const chalk = new Chalk({
level: 3
});

/**
* The secret sauce.
*/
Expand Down
Loading

0 comments on commit b83c1f8

Please sign in to comment.