From 837f381e193b0783d927ce2a45095ac5413a2df3 Mon Sep 17 00:00:00 2001 From: Corey Farrell Date: Tue, 1 Dec 2020 21:28:37 -0500 Subject: [PATCH] chore: Update dependencies, development * Switch to Github Actions * Drop coveralls in favor of 100% coverage enforcement --- .github/workflows/test.yml | 22 ++++++++++++++++++++ .npmignore | 3 +-- .nycrc | 20 ++++++++++++++++++ .travis.yml | 13 ------------ README.md | 11 ++++------ fixtures/should-respect-cwd.js | 4 ---- package.json | 38 ++++++++++------------------------ 7 files changed, 58 insertions(+), 53 deletions(-) create mode 100644 .github/workflows/test.yml create mode 100644 .nycrc delete mode 100644 .travis.yml delete mode 100644 fixtures/should-respect-cwd.js diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9bfed1d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,22 @@ +name: Tests +on: [push, pull_request] + +env: + CI: true + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + node-version: [10, 12, 14, 15] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v2 + - name: Node.js ${{matrix.node-version}} on ${{matrix.os}} + uses: actions/setup-node@v1 + with: + node-version: ${{matrix.node-version}} + - run: npm install + - name: Test + run: npm run test diff --git a/.npmignore b/.npmignore index 6aa63bb..fc02298 100644 --- a/.npmignore +++ b/.npmignore @@ -1,7 +1,6 @@ -.travis.yml +.nycrc .github *.tgz -.nyc_output/ coverage/ src/ fixtures/ diff --git a/.nycrc b/.nycrc new file mode 100644 index 0000000..d57bb5f --- /dev/null +++ b/.nycrc @@ -0,0 +1,20 @@ +{ + "temp-dir": "coverage/tmp", + "include": [ + "src/*.js", + "fixtures/should-cover.js" + ], + "require": [ + "@babel/register" + ], + "reporter": [ + "lcov", + "text" + ], + "lines": 100, + "functions": 100, + "statements": 100, + "branches": 100, + "sourceMap": false, + "instrument": false +} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ce325d4..0000000 --- a/.travis.yml +++ /dev/null @@ -1,13 +0,0 @@ -language: node_js - -os: - - windows - - osx - - linux - -node_js: - - "14" - - "12" - - "10" - -after_success: npm run coverage diff --git a/README.md b/README.md index a3942b4..ed80423 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,4 @@ -# babel-plugin-istanbul - -[![Greenkeeper badge](https://badges.greenkeeper.io/istanbuljs/babel-plugin-istanbul.svg)](https://greenkeeper.io/) -[![Build Status](https://travis-ci.org/istanbuljs/babel-plugin-istanbul.svg?branch=master)](https://travis-ci.org/istanbuljs/babel-plugin-istanbul) -[![Coverage Status](https://coveralls.io/repos/github/istanbuljs/babel-plugin-istanbul/badge.svg?branch=master)](https://coveralls.io/github/istanbuljs/babel-plugin-istanbul?branch=master) -[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org) -[![community slack](http://devtoolscommunity.herokuapp.com/badge.svg)](http://devtoolscommunity.herokuapp.com) +# babel-plugin-istanbul [![NPM Version][npm-image]][npm-url] _Having problems? want to contribute? join our [community slack](http://devtoolscommunity.herokuapp.com)_. @@ -135,3 +129,6 @@ The approach used in `babel-plugin-istanbul` was inspired by [Thai Pangsakulyano Available as part of the Tidelift Subscription. The maintainers of `babel-plugin-istanbul` and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/npm-babel-plugin-istanbul?utm_source=npm-babel-plugin-istanbul&utm_medium=referral&utm_campaign=enterprise&utm_term=repo) + +[npm-image]: https://img.shields.io/npm/v/babel-plugin-istanbul.svg +[npm-url]: https://npmjs.org/package/babel-plugin-istanbul diff --git a/fixtures/should-respect-cwd.js b/fixtures/should-respect-cwd.js deleted file mode 100644 index a79558b..0000000 --- a/fixtures/should-respect-cwd.js +++ /dev/null @@ -1,4 +0,0 @@ -const foo = function () { - console.log('foo') -} -foo() diff --git a/package.json b/package.json index 5fddd57..75b1992 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "description": "A babel plugin that adds istanbul instrumentation to ES6 code", "main": "lib/index.js", "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", + "@babel/helper-plugin-utils": "^7.10.4", "@istanbuljs/schema": "^0.1.2", "istanbul-lib-coverage": "^3.0.0", "test-exclude": "^6.0.0" @@ -15,23 +15,22 @@ "@babel/core": "^7" }, "devDependencies": { - "@babel/cli": "^7.7.5", - "@babel/core": "^7.7.5", - "@babel/plugin-transform-modules-commonjs": "^7.7.5", - "@babel/register": "^7.7.4", - "coveralls": "^3.0.9", + "@babel/cli": "^7.12.8", + "@babel/core": "^7.12.9", + "@babel/plugin-transform-modules-commonjs": "^7.12.1", + "@babel/register": "^7.12.1", "cross-env": "^6.0.3", "libtap": "^0.3.0", - "nyc": "^15.0.0", - "standard": "^14.3.1", - "standard-version": "^7.1.0", + "nyc": "^15.1.0", + "standard": "^16.0.3", + "standard-version": "^9.0.0", "tap-yaml-summary": "^0.1.0" }, "scripts": { - "coverage": "nyc report --reporter=text-lcov | coveralls", "release": "babel src --out-dir lib", "pretest": "standard && npm run release", - "test": "cross-env NODE_ENV=test nyc --silent node test/babel-plugin-istanbul.js|tap-yaml-summary", + "tests-only": "cross-env NODE_ENV=test nyc --silent node test/babel-plugin-istanbul.js|tap-yaml-summary", + "test": "npm run -s tests-only", "posttest": "nyc report --check-coverage", "prepublish": "npm run release", "version": "standard-version" @@ -51,26 +50,11 @@ "plugin", "instrumentation" ], - "nyc": { - "include": [ - "src/*.js", - "fixtures/should-cover.js" - ], - "require": [ - "@babel/register" - ], - "reporter": [ - "lcov", - "text" - ], - "sourceMap": false, - "instrument": false - }, "bugs": { "url": "https://github.com/istanbuljs/babel-plugin-istanbul/issues" }, "homepage": "https://github.com/istanbuljs/babel-plugin-istanbul#readme", "engines": { - "node": ">=10" + "node": ">=10.13" } }