Skip to content

Commit 3b1f109

Browse files
authored
chore: Overhaul and update project (#11)
- Breaking Change: Dropping support for Node 11 and below. - Breaking Change: Dropping support for Flow. - Bug Fix: Resolves #5. Event handlers are cleaned up after each iteration, fixing some memory leak issues. - Bug Fix: Resolves #7. Code no longer depends on babel runtimes or regenerator. - Bug Fix: Handles stream not buffering due to starving the event loop. - Feature: Resolves #1. Now handles `.throw` and `.return` hooks on the async iterator. - Feature: Properly closes stream when finished. - Feature: Added support for TypeScript. - Feature: Support for Node.js versions 12, 14, and 16. - Chore: General overhaul of project setup (should not impact what is published).
1 parent 85933cc commit 3b1f109

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+12060
-807
lines changed

.babelrc

Lines changed: 0 additions & 20 deletions
This file was deleted.

.editorconfig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,8 @@ root = true
44
# Unix-style newlines with a newline ending every file
55
[*]
66
charset = utf-8
7-
trim_trailing_whitespace = true
87
end_of_line = lf
9-
insert_final_newline = true
10-
indent_style = space
118
indent_size = 4
12-
13-
[Makefile]
14-
indent_style = tab
15-
16-
[{package.json,.travis.yml}]
179
indent_style = space
18-
indent_size = 2
10+
insert_final_newline = true
11+
trim_trailing_whitespace = true

.eslintignore

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1-
.idea/
2-
build/
3-
flow-typed/
1+
# project
2+
/.nyc_output/
3+
/coverage/
4+
/lib/
5+
*.tsbuildinfo
6+
*.tgz
7+
8+
# node
9+
/node_modules/
10+
**/npm-debug.log*
11+
12+
# editors
13+
/.idea/
14+
**/*.kate-swp
15+
**/*.swp
16+
**/*~
17+
18+
# git
19+
**/*.orig
20+
21+
# file managers
22+
**/.directory
23+
**/.DS_Store
24+
**/Thumbs.db

.eslintrc.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
"use strict";
2+
const config = {
3+
root: true,
4+
env: {
5+
es2022: true,
6+
node: true,
7+
},
8+
extends: ["eslint:recommended"],
9+
rules: {
10+
strict: ["error"],
11+
"valid-jsdoc": [
12+
"error",
13+
{
14+
requireReturn: false,
15+
requireReturnType: false,
16+
requireParamType: false,
17+
},
18+
],
19+
},
20+
overrides: [
21+
{
22+
files: ["src/**"],
23+
parser: "@typescript-eslint/parser",
24+
parserOptions: {
25+
tsconfigRootDir: __dirname,
26+
project: ["./tsconfig.json"],
27+
},
28+
plugins: ["@typescript-eslint/eslint-plugin"],
29+
extends: [
30+
"eslint:recommended",
31+
"plugin:@typescript-eslint/recommended",
32+
"plugin:@typescript-eslint/recommended-requiring-type-checking",
33+
"prettier",
34+
],
35+
},
36+
],
37+
};
38+
module.exports = config;

.eslintrc.json

Lines changed: 0 additions & 28 deletions
This file was deleted.

.flowconfig

Whitespace-only changes.

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @basicdays

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
3+
updates:
4+
# see: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot
5+
- package-ecosystem: github-actions
6+
directory: "/"
7+
schedule:
8+
interval: daily
9+
reviewers:
10+
- basicdays

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: "build"
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
- v0.2
8+
push:
9+
branches:
10+
- master
11+
- v0.2
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-20.04
16+
strategy:
17+
matrix:
18+
node: ["12", "14", "16"]
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v3
22+
- name: Setup Node
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node }}
26+
- run: npm install
27+
- run: npm run build
28+
- run: npm test

.gitignore

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
# project
22
/.nyc_output/
3-
/build/
43
/coverage/
4+
/lib/
5+
*.tsbuildinfo
6+
*.tgz
57

68
# node
7-
node_modules/
8-
npm-debug.log
9+
/node_modules/
10+
**/npm-debug.log*
911

1012
# editors
11-
/.idea/dictionaries
12-
/.idea/*.local.xml
13-
/.idea/workspace.xml
14-
*.kate-swp
15-
*.swp
13+
/.idea/
14+
**/*.kate-swp
15+
**/*.swp
16+
**/*~
1617

1718
# git
18-
*.orig
19+
**/*.orig
1920

2021
# file managers
21-
.directory
22-
.DS_Store
22+
**/.directory
23+
**/.DS_Store
24+
**/Thumbs.db

0 commit comments

Comments
 (0)