pax_global_header00006660000000000000000000000064141470217560014521gustar00rootroot0000000000000052 comment=e1e121c5ce3de78706d4c7fd5e6f31d8c0f81bfd mute-stdout-2.0.0/000077500000000000000000000000001414702175600140125ustar00rootroot00000000000000mute-stdout-2.0.0/.editorconfig000066400000000000000000000003261414702175600164700ustar00rootroot00000000000000# http://editorconfig.org root = true [*] indent_style = space indent_size = 2 charset = utf-8 trim_trailing_whitespace = true insert_final_newline = true end_of_line = lf [*.md] trim_trailing_whitespace = false mute-stdout-2.0.0/.eslintrc000066400000000000000000000000301414702175600156270ustar00rootroot00000000000000{ "extends": "gulp" } mute-stdout-2.0.0/.gitattributes000066400000000000000000000000161414702175600167020ustar00rootroot00000000000000* text eol=lf mute-stdout-2.0.0/.github/000077500000000000000000000000001414702175600153525ustar00rootroot00000000000000mute-stdout-2.0.0/.github/workflows/000077500000000000000000000000001414702175600174075ustar00rootroot00000000000000mute-stdout-2.0.0/.github/workflows/dev.yml000066400000000000000000000031051414702175600207070ustar00rootroot00000000000000name: 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 mute-stdout-2.0.0/.github/workflows/release.yml000066400000000000000000000005511414702175600215530ustar00rootroot00000000000000name: 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 mute-stdout-2.0.0/.gitignore000066400000000000000000000017101414702175600160010ustar00rootroot00000000000000# 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 (http://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 mute-stdout-2.0.0/.npmrc000066400000000000000000000000231414702175600151250ustar00rootroot00000000000000package-lock=false mute-stdout-2.0.0/.prettierignore000066400000000000000000000000441414702175600170530ustar00rootroot00000000000000coverage/ .nyc_output/ CHANGELOG.md mute-stdout-2.0.0/CHANGELOG.md000066400000000000000000000006601414702175600156250ustar00rootroot00000000000000# Changelog ## [2.0.0](https://www.github.com/gulpjs/mute-stdout/compare/v1.0.1...v2.0.0) (2021-11-22) ### ⚠ BREAKING CHANGES * Normalize repository, dropping node <10.13 support (#8) ### Miscellaneous Chores * Normalize repository, dropping node <10.13 support ([#8](https://www.github.com/gulpjs/mute-stdout/issues/8)) ([4b17b49](https://www.github.com/gulpjs/mute-stdout/commit/4b17b49c1134d6a775289b3aa903078a019f9b46)) mute-stdout-2.0.0/LICENSE000066400000000000000000000022051414702175600150160ustar00rootroot00000000000000The MIT License (MIT) Copyright (c) 2015, 2018, 2021 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. mute-stdout-2.0.0/README.md000066400000000000000000000024731414702175600152770ustar00rootroot00000000000000

# mute-stdout [![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url] Mute and unmute stdout. ## Usage ```js var stdout = require('mute-stdout'); stdout.mute(); console.log('will not print'); stdout.unmute(); console.log('will print'); ``` ## API ### mute() Mutes the `process.stdout` stream by replacing the `write` method with a no-op function. ### unmute() Unmutes the `process.stdout` stream by restoring the original `write` method. ## License MIT [downloads-image]: http://img.shields.io/npm/dm/mute-stdout.svg?style=flat-square [npm-url]: https://www.npmjs.com/package/mute-stdout [npm-image]: http://img.shields.io/npm/v/mute-stdout.svg?style=flat-square [ci-url]: https://github.com/gulpjs/mute-stdout/actions?query=workflow:dev [ci-image]: https://img.shields.io/github/workflow/status/gulpjs/mute-stdout/dev?style=flat-square [coveralls-url]: https://coveralls.io/r/gulpjs/mute-stdout [coveralls-image]: http://img.shields.io/coveralls/gulpjs/mute-stdout/master.svg mute-stdout-2.0.0/index.js000066400000000000000000000004741414702175600154640ustar00rootroot00000000000000'use strict'; var ogWrite = process.stdout.write; var muteStdout = { mute: mute, unmute: noop }; function noop() {} function mute() { muteStdout.unmute = unmute; process.stdout.write = noop; } function unmute() { process.stdout.write = ogWrite; muteStdout.unmute = noop; } module.exports = muteStdout; mute-stdout-2.0.0/package.json000066400000000000000000000016361414702175600163060ustar00rootroot00000000000000{ "name": "mute-stdout", "version": "2.0.0", "description": "Mute and unmute stdout.", "author": "Gulp Team (http://gulpjs.com/)", "contributors": [ "Blaine Bublitz " ], "repository": "gulpjs/mute-stdout", "license": "MIT", "engines": { "node": ">= 10.13.0" }, "main": "index.js", "files": [ "LICENSE", "index.js" ], "scripts": { "lint": "eslint .", "pretest": "npm run lint", "test": "nyc mocha --async-only" }, "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", "sinon": "^12.0.1" }, "nyc": { "reporter": [ "lcov", "text-summary" ] }, "prettier": { "singleQuote": true }, "keywords": [ "mute", "silence is golden", "stdout" ] } mute-stdout-2.0.0/test/000077500000000000000000000000001414702175600147715ustar00rootroot00000000000000mute-stdout-2.0.0/test/index.js000066400000000000000000000024021414702175600164340ustar00rootroot00000000000000'use strict'; var expect = require('expect'); var sinon = require('sinon'); // The spy needs to be set up before our module tracks the original method var spy = sinon.spy(process.stdout, 'write'); var stdout = require('../'); describe('mute', function () { beforeEach(function (done) { spy.resetHistory(); done(); }); afterEach(function (done) { spy.resetHistory(); done(); }); it('mutes the stream', function (done) { stdout.mute(); console.log('should not print'); stdout.unmute(); expect(spy.called).toBeFalsy(); done(); }); }); describe('unmute', function () { beforeEach(function (done) { spy.resetHistory(); done(); }); afterEach(function (done) { spy.resetHistory(); done(); }); it('unmutes a muted stream', function (done) { stdout.mute(); console.log('should not print'); stdout.unmute(); console.log('should print'); expect(spy.called).toBeTruthy(); expect(spy.callCount).toEqual(1); done(); }); it('skips unmute if never muted', function (done) { console.log('should count up!'); stdout.unmute(); console.log('should count up!'); expect(spy.called).toBeTruthy(); expect(spy.callCount).toEqual(2); done(); }); });