Skip to content

Commit

Permalink
chore!: Normalize repository, dropping node <10.13 support
Browse files Browse the repository at this point in the history
  • Loading branch information
sttk committed Nov 7, 2021
1 parent 2640711 commit 405da19
Show file tree
Hide file tree
Showing 12 changed files with 172 additions and 89 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: 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: Run with coverage
run: npm run cover

- 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
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: 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
51 changes: 43 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,32 +1,67 @@
# 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 intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Compiled binary addons (http://nodejs.org/api/addons.html)
# 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 directory
# Commenting this out is preferred by some people, see
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules
# Dependency directories
node_modules/
jspm_packages/

# Users Environment Variables
.lock-wscript
# 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
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
coverage/
.nyc_output/
CHANGELOG.md
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2014-2018 Tyler Kellen <tyler@sleekcode.net>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io>
Copyright (c) 2014-2018, 2021 Tyler Kellen <tyler@sleekcode.net>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io> and other contributors

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
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# flagged-respawn

[![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]
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]

A tool for respawning node binaries when special flags are present.

Expand Down Expand Up @@ -94,18 +94,15 @@ If `--no-respawning` flag is given in *argv*, this function does not respawned e

MIT

[downloads-image]: http://img.shields.io/npm/dm/flagged-respawn.svg
[npm-url]: https://www.npmjs.com/package/flagged-respawn
[npm-image]: http://img.shields.io/npm/v/flagged-respawn.svg

[travis-url]: https://travis-ci.org/gulpjs/flagged-respawn
[travis-image]: http://img.shields.io/travis/gulpjs/flagged-respawn.svg?label=travis-ci
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/flagged-respawn.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/flagged-respawn
[npm-image]: https://img.shields.io/npm/v/flagged-respawn.svg?style=flat-square

[appveyor-url]: https://ci.appveyor.com/project/gulpjs/flagged-respawn
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/flagged-respawn.svg?label=appveyor
[ci-url]: https://github.com/gulpjs/flagged-respawn/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/flagged-respawn/dev?style=flat-square

[coveralls-url]: https://coveralls.io/r/gulpjs/flagged-respawn
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/flagged-respawn/master.svg

[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/flagged-respawn/master.svg?style=flat-square
<!-- prettier-ignore-end -->
26 changes: 0 additions & 26 deletions appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion lib/is-v8flags.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function replaceSeparatorsFromDashesToUnderscores(flag) {
if (!arr) {
return flag;
}
return arr[1] + arr[2].replace(/\-/g, '_');
return arr[1] + arr[2].replace(/-/g, '_');
}

module.exports = isV8flags;
30 changes: 18 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"repository": "gulpjs/flagged-respawn",
"license": "MIT",
"engines": {
"node": ">= 0.10"
"node": ">= 10.13.0"
},
"main": "index.js",
"files": [
Expand All @@ -24,21 +24,27 @@
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "nyc --reporter=lcov --reporter=text-summary npm test",
"coveralls": "npm run cover && istanbul-coveralls",
"cover": "nyc mocha --async-only",
"respawn": "node test/bin/respawner --harmony test",
"nospawn": "node test/bin/respawner test"
},
"dependencies": {},
"devDependencies": {
"eslint": "^2.13.0",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"mocha": "^3.5.3",
"nyc": "^11.3.0",
"v8flags": "^3.0.1"
"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",
"v8flags": "^3.2.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [
"respawn",
Expand Down
6 changes: 0 additions & 6 deletions test/.eslintrc

This file was deleted.

4 changes: 2 additions & 2 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ describe('flaggedRespawn', function() {

it('should respawn; if child is killed, parent should exit with same signal', function(done) {
// Because travis and nyc hates this
if (process.env.TRAVIS || process.env.NYC_PARENT_PID) {
if (process.env.TRAVIS || process.env.NYC_PARENT_PID || process.env.NYC_PROCESS_ID) {
this.skip();
return;
}
Expand Down Expand Up @@ -174,7 +174,7 @@ describe('flaggedRespawn', function() {
expect(results.length).toEqual(2);

var params = JSON.parse(results[0]);
expect(params.child_pid).toNotEqual(params.process_pid);
expect(params.child_pid).not.toEqual(params.process_pid);

params = JSON.parse(results[1]);
expect(params.child_pid).toEqual(params.process_pid);
Expand Down

0 comments on commit 405da19

Please sign in to comment.