Skip to content

Commit

Permalink
chore!: Normalize repository, dropping node <10.13 support (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 28, 2022
1 parent 95324ff commit efad451
Show file tree
Hide file tree
Showing 13 changed files with 168 additions and 81 deletions.
75 changes: 75 additions & 0 deletions .github/workflows/dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
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: 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
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
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
47 changes: 40 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,31 +1,64 @@
# 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

# 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
Expand Down
3 changes: 0 additions & 3 deletions .jscsrc

This file was deleted.

1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package-lock=false
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
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

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

Copyright (c) 2015, 2017 Blaine Bublitz <blaine.bublitz@gmail.com>, Eric Schoffstall <yo@contra.io> and other contributors
Copyright (c) 2015, 2017, 2022 Blaine Bublitz <blaine.bublitz@gmail.com> and Eric Schoffstall <yo@contra.io>

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 All @@ -19,4 +19,3 @@ 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.

24 changes: 10 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# undertaker-forward-reference

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![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]

Undertaker custom registry supporting forward referenced tasks.

Expand All @@ -20,7 +20,7 @@ an edge case that is better handled with other patterns (coming soon: links to b
patterns). If you must use forward referenced tasks, you can set this as a custom
registry before registering any tasks.

## Example
## Usage

```js
var gulp = require('gulp');
Expand All @@ -46,18 +46,14 @@ Constructor for the registry. Pass an instance of this registry to `gulp.registr

MIT

[downloads-image]: http://img.shields.io/npm/dm/undertaker-forward-reference.svg
[npm-url]: https://npmjs.com/package/undertaker-forward-reference
[npm-image]: http://img.shields.io/npm/v/undertaker-forward-reference.svg
<!-- prettier-ignore-start -->
[downloads-image]: https://img.shields.io/npm/dm/undertaker-forward-reference.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/undertaker-forward-reference
[npm-image]: https://img.shields.io/npm/v/undertaker-forward-reference.svg?style=flat-square

[travis-url]: https://travis-ci.org/gulpjs/undertaker-forward-reference
[travis-image]: http://img.shields.io/travis/gulpjs/undertaker-forward-reference.svg?label=travis-ci

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

[coveralls-url]: https://coveralls.io/r/gulpjs/undertaker-forward-reference
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/undertaker-forward-reference/master.svg

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

This file was deleted.

35 changes: 20 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,44 @@
"name": "undertaker-forward-reference",
"version": "1.0.2",
"description": "Undertaker custom registry supporting forward referenced tasks.",
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
"contributors": [
"Blaine Bublitz <blaine.bublitz@gmail.com>"
],
"repository": "gulpjs/undertaker-forward-reference",
"license": "MIT",
"engines": {
"node": ">= 0.10"
"node": ">=10.13.0"
},
"main": "index.js",
"files": [
"LICENSE",
"index.js"
],
"scripts": {
"lint": "eslint index.js test/ && jscs index.js test/",
"lint": "eslint .",
"pretest": "npm run lint",
"test": "mocha --async-only",
"cover": "istanbul cover _mocha --report lcovonly",
"coveralls": "npm run cover && istanbul-coveralls"
"test": "nyc mocha --async-only"
},
"dependencies": {
"undertaker-registry": "^1.0.0"
"undertaker-registry": "^2.0.0"
},
"devDependencies": {
"eslint": "^1.10.3",
"eslint-config-gulp": "^2.0.0",
"expect": "^1.20.2",
"istanbul": "^0.4.3",
"istanbul-coveralls": "^1.0.3",
"jscs": "^2.4.0",
"jscs-preset-gulp": "^1.0.0",
"mocha": "^3.2.0"
"eslint": "^7.0.0",
"eslint-config-gulp": "^5.0.0",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.0.0",
"mocha": "^8.0.0",
"nyc": "^15.0.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [
"forward reference",
Expand Down
3 changes: 0 additions & 3 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 @@ -17,14 +17,14 @@ describe('Forward Reference Registry', function() {

it('returns a function even if not registered', function(done) {
var task = registry.get('nothing');
expect(task).toBeA('function');
expect(typeof task).toEqual('function');
done();
});

it('does not need to be constructed with new', function(done) {
registry = Registry();
var task = registry.get('nothing');
expect(task).toBeA('function');
expect(typeof task).toEqual('function');
done();
});

Expand Down

0 comments on commit efad451

Please sign in to comment.