Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore!: Normalize repository, dropping node <10.13 support #52

Merged
merged 2 commits into from Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 0 additions & 34 deletions .ci/.azure-pipelines-steps.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .ci/.azure-pipelines.yml

This file was deleted.

5 changes: 4 additions & 1 deletion .eslintrc
@@ -1,3 +1,6 @@
{
"extends": "gulp"
"extends": "gulp",
"rules": {
"max-len": 0
}
}
75 changes: 75 additions & 0 deletions .github/workflows/dev.yml
@@ -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
17 changes: 17 additions & 0 deletions .github/workflows/release.yml
@@ -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
3 changes: 3 additions & 0 deletions .prettierignore
@@ -0,0 +1,3 @@
coverage/
.nyc_output/
CHANGELOG.md
11 changes: 0 additions & 11 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2019 Ben Alman <cowboy@rj3.net>, Blaine Bublitz <blaine.bublitz@gmail.com>, and Eric Schoffstall <yo@contra.io>
Copyright (c) 2013-2019, 2021 Ben Alman <cowboy@rj3.net>, 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 Down
33 changes: 15 additions & 18 deletions README.md
Expand Up @@ -6,7 +6,7 @@

# findup-sync

[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-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]

Find the first file matching a given pattern in the current directory or the nearest ancestor directory.

Expand All @@ -29,31 +29,28 @@ var filepath2 = findup('{a,b}*.txt', {cwd: '/some/path', nocase: true});

### `findup(patterns, [options])`

* `patterns` **{String|Array}**: Glob pattern(s) or file path(s) to match against.
* `options` **{Object}**: Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here.
* `returns` **{String}**: Returns the first matching file.
- `patterns` **{String|Array}**: Glob pattern(s) or file path(s) to match against.
- `options` **{Object}**: Options to pass to [micromatch]. Note that if you want to start in a different directory than the current working directory, specify a `cwd` property here.
- `returns` **{String}**: Returns the first matching file.

## License

MIT

[micromatch]: http://github.com/jonschlinkert/micromatch
<!-- prettier-ignore-start -->

[downloads-image]: https://img.shields.io/npm/dm/findup-sync.svg
[downloads-image]: https://img.shields.io/npm/dm/findup-sync.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/findup-sync
[npm-image]: https://img.shields.io/npm/v/findup-sync.svg

[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=7&branchName=master
[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/findup-sync?branchName=master
[npm-image]: https://img.shields.io/npm/v/findup-sync.svg?style=flat-square
[ci-url]: https://github.com/gulpjs/findup-sync/actions?query=workflow:dev
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/findup-sync/dev?style=flat-square
[coveralls-url]: https://coveralls.io/r/gulpjs/findup-sync
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/findup-sync/master.svg

[travis-url]: https://travis-ci.org/gulpjs/findup-sync
[travis-image]: https://img.shields.io/travis/gulpjs/findup-sync.svg?label=travis-ci
<!-- prettier-ignore-nd -->

[appveyor-url]: https://ci.appveyor.com/project/gulpjs/findup-sync
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/findup-sync.svg?label=appveyor
<!-- prettier-ignore-start -->

[coveralls-url]: https://coveralls.io/r/gulpjs/findup-sync
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/findup-sync/master.svg
[micromatch]: http://github.com/jonschlinkert/micromatch
phated marked this conversation as resolved.
Show resolved Hide resolved

[gitter-url]: https://gitter.im/gulpjs/gulp
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
<!-- prettier-ignore-nd -->
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

9 changes: 6 additions & 3 deletions index.js
Expand Up @@ -18,7 +18,7 @@ var mm = require('micromatch');
* @api public
*/

module.exports = function(patterns, options) {
module.exports = function (patterns, options) {
options = options || {};
var cwd = path.resolve(resolveDir(options.cwd || ''));

Expand All @@ -27,7 +27,9 @@ module.exports = function(patterns, options) {
}

if (!Array.isArray(patterns)) {
throw new TypeError('findup-sync expects a string or array as the first argument.');
throw new TypeError(
'findup-sync expects a string or array as the first argument.'
);
}

return lookup(cwd, patterns, options);
Expand Down Expand Up @@ -73,7 +75,7 @@ function matchFile(cwd, pattern, opts) {
}

function findFile(cwd, filename, options) {
var fp = cwd ? path.resolve(cwd, filename) : filename;
var fp = path.resolve(cwd, filename);
return detect(fp, options);
}

Expand All @@ -83,5 +85,6 @@ function tryReaddirSync(fp) {
} catch (err) {
// Ignore error
}
/* istanbul ignore next */
return [];
}
33 changes: 20 additions & 13 deletions package.json
Expand Up @@ -12,7 +12,7 @@
"repository": "gulpjs/findup-sync",
"license": "MIT",
"engines": {
"node": ">= 8"
"node": ">= 10.13.0"
},
"main": "index.js",
"files": [
Expand All @@ -22,26 +22,33 @@
"scripts": {
"lint": "eslint .",
"pretest": "npm run lint",
"test": "nyc mocha --async-only",
"azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
"coveralls": "nyc report --reporter=text-lcov | coveralls"
"test": "nyc mocha --async-only"
},
"dependencies": {
"detect-file": "^1.0.0",
"is-glob": "^4.0.0",
"micromatch": "^4.0.2",
"is-glob": "^4.0.3",
"micromatch": "^4.0.4",
"resolve-dir": "^1.0.1"
},
"devDependencies": {
"coveralls": "github:phated/node-coveralls#2.x",
"eslint": "^6.0.1",
"eslint-config-gulp": "^3.0.1",
"expect": "^1.20.2",
"homedir-polyfill": "^1.0.1",
"eslint": "^7.21.0",
"eslint-config-gulp": "^5.0.1",
"eslint-plugin-node": "^11.1.0",
"expect": "^27.3.1",
"homedir-polyfill": "^1.0.3",
"mocha": "^6.1.4",
"normalize-path": "^3.0.0",
"nyc": "^14.1.1",
"resolve": "^1.4.0"
"nyc": "^15.1.0",
"resolve": "^1.20.0"
},
"nyc": {
"reporter": [
"lcov",
"text-summary"
]
},
"prettier": {
"singleQuote": true
},
"keywords": [
"file",
Expand Down