pax_global_header00006660000000000000000000000064143151223730014513gustar00rootroot0000000000000052 comment=b08f61b220a021b7a8cf1443b908e8832f237c73 gulplog-2.0.1/000077500000000000000000000000001431512237300131645ustar00rootroot00000000000000gulplog-2.0.1/.editorconfig000066400000000000000000000003261431512237300156420ustar00rootroot00000000000000# http://editorconfig.org root = true [*] indent_style = space indent_size = 2 end_of_line = lf charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true [*.md] trim_trailing_whitespace = false gulplog-2.0.1/.eslintignore000066400000000000000000000000121431512237300156600ustar00rootroot00000000000000coverage/ gulplog-2.0.1/.eslintrc000066400000000000000000000000301431512237300150010ustar00rootroot00000000000000{ "extends": "gulp" } gulplog-2.0.1/.gitattributes000066400000000000000000000000161431512237300160540ustar00rootroot00000000000000* text eol=lf gulplog-2.0.1/.github/000077500000000000000000000000001431512237300145245ustar00rootroot00000000000000gulplog-2.0.1/.github/workflows/000077500000000000000000000000001431512237300165615ustar00rootroot00000000000000gulplog-2.0.1/.github/workflows/dev.yml000066400000000000000000000031051431512237300200610ustar00rootroot00000000000000name: dev on: pull_request: push: branches: - master - main env: CI: true jobs: prettier: name: Format code runs-on: ubuntu-latest if: ${{ github.event_name == 'push' }} steps: - name: Checkout uses: actions/checkout@v2 - name: Prettier uses: gulpjs/prettier_action@v3.0 with: commit_message: 'chore: Run prettier' prettier_options: '--write .' test: name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: node: [10, 12, 14, 16] os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Clone repository uses: actions/checkout@v2 - name: Set Node.js version uses: actions/setup-node@v2 with: node-version: ${{ matrix.node }} - run: node --version - run: npm --version - name: Install npm dependencies run: npm install - name: Run lint run: npm run lint - name: Run tests run: npm test - name: Coveralls uses: coverallsapp/github-action@v1.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} flag-name: ${{matrix.os}}-node-${{ matrix.node }} parallel: true coveralls: needs: test name: Finish up runs-on: ubuntu-latest steps: - name: Coveralls Finished uses: coverallsapp/github-action@v1.1.2 with: github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true gulplog-2.0.1/.github/workflows/release.yml000066400000000000000000000005511431512237300207250ustar00rootroot00000000000000name: release on: push: branches: - master - main jobs: release-please: runs-on: ubuntu-latest steps: - uses: GoogleCloudPlatform/release-please-action@v2 with: token: ${{ secrets.GITHUB_TOKEN }} release-type: node package-name: release-please-action bump-minor-pre-major: true gulplog-2.0.1/.gitignore000066400000000000000000000017111431512237300151540ustar00rootroot00000000000000# Logs logs *.log npm-debug.log* yarn-debug.log* yarn-error.log* # Runtime data pids *.pid *.seed *.pid.lock # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # nyc test coverage .nyc_output # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files) .grunt # Bower dependency directory (https://bower.io/) bower_components # node-waf configuration .lock-wscript # Compiled binary addons (https://nodejs.org/api/addons.html) build/Release # Dependency directories node_modules/ jspm_packages/ # TypeScript v1 declaration files typings/ # Optional npm cache directory .npm # Optional eslint cache .eslintcache # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env # next.js build output .next # Garbage files .DS_Store # Test results test.xunit gulplog-2.0.1/.npmrc000066400000000000000000000000231431512237300142770ustar00rootroot00000000000000package-lock=false gulplog-2.0.1/.prettierignore000066400000000000000000000000441431512237300162250ustar00rootroot00000000000000coverage/ .nyc_output/ CHANGELOG.md gulplog-2.0.1/CHANGELOG.md000066400000000000000000000017511431512237300150010ustar00rootroot00000000000000# gulplog changelog ### [2.0.1](https://www.github.com/gulpjs/gulplog/compare/v2.0.0...v2.0.1) (2022-09-28) ### Bug Fixes * Include TypeScript definition file in package ([f4aee89](https://www.github.com/gulpjs/gulplog/commit/f4aee89952538290511ff4c7585e9ed35170ccdf)) ## [2.0.0](https://www.github.com/gulpjs/gulplog/compare/v1.0.0...v2.0.0) (2022-06-24) ### ⚠ BREAKING CHANGES * Normalize repository, dropping node <10.13 support (#13) ### Features * Add TypeScript type definition file ([#12](https://www.github.com/gulpjs/gulplog/issues/12)) ([b5ce699](https://www.github.com/gulpjs/gulplog/commit/b5ce699f8646d9c5f231e3a4a130d61891545e2a)) ### Miscellaneous Chores * Normalize repository, dropping node <10.13 support ([#13](https://www.github.com/gulpjs/gulplog/issues/13)) ([da9b3ad](https://www.github.com/gulpjs/gulplog/commit/da9b3ad292e47c1d7f379f142394f29bb3f15be4)) ## 1.0.0 - Initial release - No implementation changed since initial commit ## 0.0.0 - Experimentation gulplog-2.0.1/LICENSE000066400000000000000000000022051431512237300141700ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2015, 2017, 2022 Blaine Bublitz and Eric Schoffstall Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. gulplog-2.0.1/README.md000066400000000000000000000046331431512237300144510ustar00rootroot00000000000000

# gulplog [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] Logger for gulp and gulp plugins ## Usage ```js var logger = require('gulplog'); // logs strings logger.debug('The MOST verbose!'); logger.info('Some important info'); logger.warn('All the warnings to you'); logger.error('OH NO! SOMETHING HAPPENED!'); // supports util.format! logger.info('%s style!', 'printf'); // log anything logger.debug({ my: 'obj' }); logger.info([1, 2, 3]); ``` ## API Logging (and level of logging) is controlled by [`gulp-cli`][gulp-cli-url] #### logger.debug(msg) Highest log level. Typically used for debugging purposes. If the first argument is a string, all arguments are passed to node's [`util.format()`][util-format-url] before being emitted. #### logger.info(msg) Standard log level. Typically used for user information. If the first argument is a string, all arguments are passed to node's [`util.format()`][util-format-url] before being emitted. #### logger.warn(msg) Warning log level. Typically used for warnings. If the first argument is a string, all arguments are passed to node's [`util.format()`][util-format-url] before being emitted. #### logger.error(msg) Error log level. Typically used when things went horribly wrong. If the first argument is a string, all arguments are passed to node's [`util.format()`][util-format-url] before being emitted. ## License MIT [downloads-image]: https://img.shields.io/npm/dm/gulplog.svg?style=flat-square [npm-url]: https://npmjs.org/package/gulplog [npm-image]: https://img.shields.io/npm/v/gulplog.svg?style=flat-square [ci-url]: https://github.com/gulpjs/gulplog/actions?query=workflow:dev [ci-image]: https://img.shields.io/github/workflow/status/gulpjs/gulplog/dev?style=flat-square [coveralls-url]: https://coveralls.io/r/gulpjs/gulplog [coveralls-image]: https://img.shields.io/coveralls/gulpjs/gulplog/master.svg?style=flat-square [gulp-cli-url]: https://github.com/gulpjs/gulp-cli [util-format-url]: https://nodejs.org/docs/latest/api/util.html#util_util_format_format gulplog-2.0.1/index.d.ts000066400000000000000000000027141431512237300150710ustar00rootroot00000000000000/** * Highest log level. Typically used for debugging purposes. * * If the first argument is a string, all arguments are passed to node's util.format() before being emitted. * @param msg Message to log * @param args Arguments to format message with via util.format() */ export function debug(msg: string, ...args: any[]): void; export function debug(msg: any): void; /** * Standard log level. Typically used for user information. * * If the first argument is a string, all arguments are passed to node's util.format() before being emitted. * @param msg Message to log * @param args Arguments to format message with via util.format() */ export function info(msg: string, ...args: any[]): void; export function info(msg: any): void; /** * Warning log level. Typically used for warnings. * * If the first argument is a string, all arguments are passed to node's util.format() before being emitted. * @param msg Message to log * @param args Arguments to format message with via util.format() */ export function warn(msg: string, ...args: any[]): void; export function warn(msg: any): void; /** * Error log level. Typically used when things went horribly wrong. * * If the first argument is a string, all arguments are passed to node's util.format() before being emitted. * @param msg Message to log * @param args Arguments to format message with via util.format() */ export function error(msg: string, ...args: any[]): void; export function error(msg: any): void; gulplog-2.0.1/index.js000066400000000000000000000001571431512237300146340ustar00rootroot00000000000000'use strict'; var getLogger = require('glogg'); var logger = getLogger('gulplog'); module.exports = logger; gulplog-2.0.1/package.json000066400000000000000000000017241431512237300154560ustar00rootroot00000000000000{ "name": "gulplog", "version": "2.0.1", "description": "Logger for gulp and gulp plugins", "author": "Gulp Team (http://gulpjs.com/)", "contributors": [ "Blaine Bublitz " ], "repository": "gulpjs/gulplog", "license": "MIT", "engines": { "node": ">= 10.13.0" }, "main": "index.js", "types": "index.d.ts", "files": [ "LICENSE", "index.js", "index.d.ts" ], "scripts": { "lint": "eslint .", "pretest": "npm run lint", "test": "nyc mocha --async-only" }, "dependencies": { "glogg": "^2.0.0" }, "devDependencies": { "eslint": "^7.32.0", "eslint-config-gulp": "^5.0.1", "eslint-plugin-node": "^11.1.0", "expect": "^27.3.1", "mocha": "^8.4.0", "nyc": "^15.1.0" }, "nyc": { "reporter": [ "lcov", "text-summary" ] }, "prettier": { "singleQuote": true }, "keywords": [ "gulp", "log", "logging" ] } gulplog-2.0.1/test/000077500000000000000000000000001431512237300141435ustar00rootroot00000000000000gulplog-2.0.1/test/index.js000066400000000000000000000040131431512237300156060ustar00rootroot00000000000000'use strict'; var expect = require('expect'); var logger = require('../'); describe('gulplog', function () { after(function (done) { logger.remove(); done(); }); afterEach(function (done) { logger.removeAllListeners(); done(); }); it('should emit the appropriate event when debug/info/warn/error methods are called', function (done) { var called = { debug: 0, info: 0, warn: 0, error: 0 }; function allDone() { if (called.debug && called.info && called.warn && called.error) { expect(called.debug).toEqual(1); expect(called.info).toEqual(1); expect(called.warn).toEqual(1); expect(called.error).toEqual(1); done(); } } logger.on('debug', function (msg) { expect(msg).toEqual('The MOST verbose!'); called.debug++; allDone(); }); logger.on('info', function (msg) { expect(msg).toEqual('Some important info'); called.info++; allDone(); }); logger.on('warn', function (msg) { expect(msg).toEqual('All the warnings to you'); called.warn++; allDone(); }); logger.on('error', function (msg) { expect(msg).toEqual('OH NO! SOMETHING HAPPENED!'); called.error++; allDone(); }); logger.debug('The MOST verbose!'); logger.info('Some important info'); logger.warn('All the warnings to you'); logger.error('OH NO! SOMETHING HAPPENED!'); }); it('should support util.format syntax', function (done) { logger.on('debug', function (msg) { expect(msg).toEqual('printf style!'); done(); }); logger.debug('%s style!', 'printf'); }); it('should log an object as it is', function (done) { logger.on('debug', function (msg) { expect(msg).toEqual({ my: 'obj' }); done(); }); logger.debug({ my: 'obj' }); }); it('should log an array as it is', function (done) { logger.on('info', function (msg) { expect(msg).toEqual([1, 2, 3]); done(); }); logger.info([1, 2, 3]); }); });