Skip to content

Commit c110ed1

Browse files
coreyfarrellphated
andcommittedOct 31, 2021
chore!: Normalize repository, dropping node <10.13 support (#101)
Co-authored-by: Blaine Bublitz <blaine.bublitz@gmail.com>
1 parent 95fdea5 commit c110ed1

15 files changed

+206
-110
lines changed
 

‎.github/workflows/dev.yml

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: dev
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- main
8+
env:
9+
CI: true
10+
11+
jobs:
12+
prettier:
13+
name: Format code
14+
runs-on: ubuntu-latest
15+
if: ${{ github.event_name == 'push' }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Prettier
22+
uses: gulpjs/prettier_action@v3.0
23+
with:
24+
commit_message: 'chore: Run prettier'
25+
prettier_options: '--write .'
26+
27+
test:
28+
name: Tests for Node ${{ matrix.node }} on ${{ matrix.os }}
29+
runs-on: ${{ matrix.os }}
30+
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
node: [10, 12, 14, 16]
35+
os: [ubuntu-latest, windows-latest, macos-latest]
36+
37+
steps:
38+
- name: Clone repository
39+
uses: actions/checkout@v2
40+
41+
- name: Set Node.js version
42+
uses: actions/setup-node@v2
43+
with:
44+
node-version: ${{ matrix.node }}
45+
46+
- run: node --version
47+
- run: npm --version
48+
49+
- name: Install npm dependencies
50+
run: npm install
51+
52+
- name: Run lint
53+
run: npm run lint
54+
55+
- name: Run tests
56+
run: npm test
57+
58+
- name: Coveralls
59+
uses: coverallsapp/github-action@v1.1.2
60+
with:
61+
github-token: ${{ secrets.GITHUB_TOKEN }}
62+
flag-name: ${{matrix.os}}-node-${{ matrix.node }}
63+
parallel: true
64+
65+
coveralls:
66+
needs: test
67+
name: Finish up
68+
69+
runs-on: ubuntu-latest
70+
steps:
71+
- name: Coveralls Finished
72+
uses: coverallsapp/github-action@v1.1.2
73+
with:
74+
github-token: ${{ secrets.GITHUB_TOKEN }}
75+
parallel-finished: true

‎.github/workflows/release.yml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: release
2+
on:
3+
push:
4+
branches:
5+
- master
6+
- main
7+
8+
jobs:
9+
release-please:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: GoogleCloudPlatform/release-please-action@v2
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
release-type: node
16+
package-name: release-please-action

‎.gitignore

+42-4
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,67 @@
11
# Logs
22
logs
33
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
47

58
# Runtime data
69
pids
710
*.pid
811
*.seed
12+
*.pid.lock
913

1014
# Directory for instrumented libs generated by jscoverage/JSCover
1115
lib-cov
1216

1317
# Coverage directory used by tools like istanbul
1418
coverage
1519

20+
# nyc test coverage
21+
.nyc_output
22+
1623
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
1724
.grunt
1825

26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
1929
# node-waf configuration
2030
.lock-wscript
2131

22-
# Compiled binary addons (http://nodejs.org/api/addons.html)
32+
# Compiled binary addons (https://nodejs.org/api/addons.html)
2333
build/Release
2434

25-
# Dependency directory
26-
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git
27-
node_modules
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# TypeScript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
2850

51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# dotenv environment variables file
58+
.env
59+
60+
# next.js build output
61+
.next
62+
63+
# Garbage files
2964
.DS_Store
65+
66+
# Test results
67+
test.xunit

‎.jscsrc

-3
This file was deleted.

‎.npmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

‎.prettierignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
coverage/
2+
.nyc_output/
3+
CHANGELOG.md

‎.travis.yml

-9
This file was deleted.

‎LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

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

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

‎README.md

+9-13
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66

77
# glob-stream
88

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

1111
A [Readable Stream][readable-stream-url] interface over [node-glob][node-glob-url].
1212

1313
## Usage
1414

15-
```javascript
15+
```js
1616
var gs = require('glob-stream');
1717

1818
var readable = gs('./files/**/*.coffee', { /* options */ });
@@ -131,23 +131,19 @@ The maintainers of glob-stream and thousands of other packages are working with
131131

132132
MIT
133133

134+
<!-- prettier-ignore-start -->
134135
[node-glob-url]: https://github.com/isaacs/node-glob
135136
[glob-parent-url]: https://github.com/es128/glob-parent
136137
[allow-empty-url]: #optionsallowempty
137138
[readable-stream-url]: https://nodejs.org/api/stream.html#stream_readable_streams
138139

139-
[downloads-image]: http://img.shields.io/npm/dm/glob-stream.svg
140+
[downloads-image]: https://img.shields.io/npm/dm/glob-stream.svg?style=flat-square
140141
[npm-url]: https://www.npmjs.com/package/glob-stream
141-
[npm-image]: http://img.shields.io/npm/v/glob-stream.svg
142-
143-
[travis-url]: https://travis-ci.org/gulpjs/glob-stream
144-
[travis-image]: http://img.shields.io/travis/gulpjs/glob-stream.svg?label=travis-ci
142+
[npm-image]: https://img.shields.io/npm/v/glob-stream.svg?style=flat-square
145143

146-
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-stream
147-
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-stream.svg?label=appveyor
144+
[ci-url]: https://github.com/gulpjs/glob-stream/actions?query=workflow:dev
145+
[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/glob-stream/dev?style=flat-square
148146

149147
[coveralls-url]: https://coveralls.io/r/gulpjs/glob-stream
150-
[coveralls-image]: http://img.shields.io/coveralls/gulpjs/glob-stream.svg
151-
152-
[gitter-url]: https://gitter.im/gulpjs/gulp
153-
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
148+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-stream/master.svg?style=flat-square
149+
<!-- prettier-ignore-end -->

‎appveyor.yml

-25
This file was deleted.

‎package.json

+30-24
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22
"name": "glob-stream",
33
"version": "6.1.0",
44
"description": "A Readable Stream interface over node-glob.",
5-
"author": "Gulp Team <team@gulpjs.com> (http://gulpjs.com/)",
5+
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
66
"contributors": [
77
"Eric Schoffstall <yo@contra.io>",
88
"Blaine Bublitz <blaine.bublitz@gmail.com>"
99
],
1010
"repository": "gulpjs/glob-stream",
1111
"license": "MIT",
1212
"engines": {
13-
"node": ">= 0.10"
13+
"node": ">=10.13.0"
1414
},
1515
"main": "index.js",
1616
"files": [
@@ -19,34 +19,40 @@
1919
"LICENSE"
2020
],
2121
"scripts": {
22-
"lint": "eslint . && jscs index.js readable.js test/",
22+
"lint": "eslint .",
2323
"pretest": "npm run lint",
24-
"test": "mocha --async-only",
25-
"cover": "istanbul cover _mocha --report lcovonly",
26-
"coveralls": "npm run cover && istanbul-coveralls"
24+
"test": "nyc mocha --async-only"
2725
},
2826
"dependencies": {
29-
"extend": "^3.0.0",
30-
"glob": "^7.1.1",
31-
"glob-parent": "^3.1.0",
27+
"extend": "^3.0.2",
28+
"glob": "^7.2.0",
29+
"glob-parent": "^6.0.2",
3230
"is-negated-glob": "^1.0.0",
33-
"ordered-read-streams": "^1.0.0",
34-
"pumpify": "^1.3.5",
35-
"readable-stream": "^2.1.5",
36-
"remove-trailing-separator": "^1.0.1",
37-
"to-absolute-glob": "^2.0.0",
38-
"unique-stream": "^2.0.2"
31+
"ordered-read-streams": "^1.0.1",
32+
"pumpify": "^2.0.1",
33+
"readable-stream": "^3.6.0",
34+
"remove-trailing-separator": "^1.1.0",
35+
"to-absolute-glob": "^2.0.2",
36+
"unique-stream": "^2.3.1"
3937
},
4038
"devDependencies": {
41-
"eslint": "^1.10.3",
42-
"eslint-config-gulp": "^2.0.0",
43-
"expect": "^1.19.0",
44-
"istanbul": "^0.4.3",
45-
"istanbul-coveralls": "^1.0.3",
46-
"jscs": "^2.4.0",
47-
"jscs-preset-gulp": "^1.0.0",
48-
"mississippi": "^1.2.0",
49-
"mocha": "^2.4.5"
39+
"eslint": "^7.0.0",
40+
"eslint-config-gulp": "^5.0.0",
41+
"eslint-plugin-node": "^11.1.0",
42+
"expect": "^27.0.0",
43+
"mississippi": "^4.0.0",
44+
"mocha": "^8.0.0",
45+
"nyc": "^15.0.1",
46+
"sinon": "^9.2.3"
47+
},
48+
"nyc": {
49+
"reporter": [
50+
"lcov",
51+
"text-summary"
52+
]
53+
},
54+
"prettier": {
55+
"singleQuote": true
5056
},
5157
"keywords": [
5258
"glob",

‎test/.eslintrc

-3
This file was deleted.

‎test/.gitkeep

Whitespace-only changes.

‎test/index.js

+11-11
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ describe('glob-stream', function() {
148148

149149
function assert(pathObjs) {
150150
expect(pathObjs.length).toEqual(3);
151-
expect(pathObjs).toInclude(expected[0]);
152-
expect(pathObjs).toInclude(expected[1]);
153-
expect(pathObjs).toInclude(expected[2]);
151+
expect(pathObjs).toContainEqual(expected[0]);
152+
expect(pathObjs).toContainEqual(expected[1]);
153+
expect(pathObjs).toContainEqual(expected[2]);
154154
}
155155

156156
pipe([
@@ -397,8 +397,8 @@ describe('glob-stream', function() {
397397

398398
function assert(pathObjs) {
399399
expect(pathObjs.length).toEqual(2);
400-
expect(pathObjs).toInclude(expected[0]);
401-
expect(pathObjs).toInclude(expected[1]);
400+
expect(pathObjs).toContainEqual(expected[0]);
401+
expect(pathObjs).toContainEqual(expected[1]);
402402
}
403403

404404
pipe([
@@ -608,7 +608,7 @@ describe('glob-stream', function() {
608608

609609
it('emits an error when file not found on singular path', function(done) {
610610
function assert(err) {
611-
expect(err).toMatch(/File not found with singular glob/);
611+
expect(err.toString()).toMatch(/File not found with singular glob/);
612612
done();
613613
}
614614

@@ -620,7 +620,7 @@ describe('glob-stream', function() {
620620

621621
it('does not emit an error when file not found on glob containing {}', function(done) {
622622
function assert(err) {
623-
expect(err).toNotExist();
623+
expect(err).not.toEqual(expect.anything());
624624
done();
625625
}
626626

@@ -632,7 +632,7 @@ describe('glob-stream', function() {
632632

633633
it('does not emit an error on singular path when allowEmpty is true', function(done) {
634634
function assert(err) {
635-
expect(err).toNotExist();
635+
expect(err).not.toEqual(expect.anything());
636636
done();
637637
}
638638

@@ -644,7 +644,7 @@ describe('glob-stream', function() {
644644

645645
it('emits an error when a singular path in multiple paths not found', function(done) {
646646
function assert(err) {
647-
expect(err).toMatch(/File not found with singular glob/);
647+
expect(err.toString()).toMatch(/File not found with singular glob/);
648648
done();
649649
}
650650

@@ -656,7 +656,7 @@ describe('glob-stream', function() {
656656

657657
it('emits an error when a singular path in multiple paths/globs not found', function(done) {
658658
function assert(err) {
659-
expect(err).toMatch(/File not found with singular glob/);
659+
expect(err.toString()).toMatch(/File not found with singular glob/);
660660
done();
661661
}
662662

@@ -700,7 +700,7 @@ describe('options', function() {
700700

701701
var stream = globStream(dir + '/fixtures/stuff/run.dmc', opts);
702702
expect(Object.keys(opts).length).toEqual(0);
703-
expect(opts).toNotEqual(defaultedOpts);
703+
expect(opts).not.toEqual(defaultedOpts);
704704

705705
pipe([
706706
stream,

‎test/readable.js

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
var expect = require('expect');
4+
var sinon = require('sinon');
45
var miss = require('mississippi');
56

67
var stream = require('../readable');
@@ -34,11 +35,12 @@ describe('readable stream', function() {
3435

3536
it('throws an error if you try to write to it', function(done) {
3637
var gs = stream('notfound', [], { cwd: dir });
38+
gs.on('error', function () {});
3739

3840
try {
3941
gs.write({});
4042
} catch (err) {
41-
expect(err).toExist();
43+
expect(err).toEqual(expect.anything());
4244
done();
4345
}
4446
});
@@ -74,7 +76,7 @@ describe('readable stream', function() {
7476

7577
function assert(pathObjs) {
7678
expect(pathObjs.length).toBe(1);
77-
expect(pathObjs[0]).toMatch(expected);
79+
expect(pathObjs[0]).toMatchObject(expected);
7880
}
7981

8082
pipe([
@@ -104,9 +106,9 @@ describe('readable stream', function() {
104106

105107
function assert(pathObjs) {
106108
expect(pathObjs.length).toBe(3);
107-
expect(pathObjs).toInclude(expected[0]);
108-
expect(pathObjs).toInclude(expected[1]);
109-
expect(pathObjs).toInclude(expected[2]);
109+
expect(pathObjs).toContainEqual(expected[0]);
110+
expect(pathObjs).toContainEqual(expected[1]);
111+
expect(pathObjs).toContainEqual(expected[2]);
110112
}
111113

112114
pipe([
@@ -118,7 +120,7 @@ describe('readable stream', function() {
118120
it('pauses the globber upon backpressure', function(done) {
119121
var gs = stream('./fixtures/**/*.dmc', [], { cwd: dir, highWaterMark: 1 });
120122

121-
var spy = expect.spyOn(gs._globber, 'pause').andCallThrough();
123+
var spy = sinon.spy(gs._globber, 'pause');
122124

123125
function waiter(pathObj, _, cb) {
124126
setTimeout(function() {
@@ -128,8 +130,8 @@ describe('readable stream', function() {
128130

129131
function assert(pathObjs) {
130132
expect(pathObjs.length).toEqual(3);
131-
expect(spy.calls.length).toEqual(2);
132-
spy.restore();
133+
expect(spy.callCount).toEqual(2);
134+
sinon.restore();
133135
}
134136

135137
pipe([
@@ -142,12 +144,12 @@ describe('readable stream', function() {
142144
it('destroys the stream with an error if no match is found', function(done) {
143145
var gs = stream('notfound', []);
144146

145-
var spy = expect.spyOn(gs, 'destroy').andCallThrough();
147+
var spy = sinon.spy(gs, 'destroy');
146148

147149
function assert(err) {
148-
spy.restore();
149-
expect(spy).toHaveBeenCalledWith(err);
150-
expect(err).toMatch(/File not found with singular glob/);
150+
sinon.restore();
151+
expect(spy.getCall(0).args[0]).toBe(err);
152+
expect(err.toString()).toMatch(/File not found with singular glob/);
151153
done();
152154
}
153155

@@ -166,13 +168,12 @@ describe('readable stream', function() {
166168
cb(expectedError);
167169
}
168170

169-
var spy = expect.spyOn(gs, 'destroy').andCallThrough();
170-
var fsStub = expect.spyOn(fs, 'readdir').andCall(stubError);
171+
var spy = sinon.spy(gs, 'destroy');
172+
sinon.stub(fs, 'readdir').callsFake(stubError);
171173

172174
function assert(err) {
173-
fsStub.restore();
174-
spy.restore();
175-
expect(spy).toHaveBeenCalledWith(err);
175+
sinon.restore();
176+
expect(spy.called).toEqual(true);
176177
expect(err).toBe(expectedError);
177178
done();
178179
}

0 commit comments

Comments
 (0)
Please sign in to comment.