Skip to content

Commit

Permalink
chore: Overhaul and update project (#11)
Browse files Browse the repository at this point in the history
-   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).
  • Loading branch information
basicdays authored Mar 16, 2022
1 parent 85933cc commit 3b1f109
Show file tree
Hide file tree
Showing 46 changed files with 12,060 additions and 807 deletions.
20 changes: 0 additions & 20 deletions .babelrc

This file was deleted.

11 changes: 2 additions & 9 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,8 @@ root = true
# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
trim_trailing_whitespace = true
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4

[Makefile]
indent_style = tab

[{package.json,.travis.yml}]
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
27 changes: 24 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
.idea/
build/
flow-typed/
# project
/.nyc_output/
/coverage/
/lib/
*.tsbuildinfo
*.tgz

# node
/node_modules/
**/npm-debug.log*

# editors
/.idea/
**/*.kate-swp
**/*.swp
**/*~

# git
**/*.orig

# file managers
**/.directory
**/.DS_Store
**/Thumbs.db
38 changes: 38 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"use strict";
const config = {
root: true,
env: {
es2022: true,
node: true,
},
extends: ["eslint:recommended"],
rules: {
strict: ["error"],
"valid-jsdoc": [
"error",
{
requireReturn: false,
requireReturnType: false,
requireParamType: false,
},
],
},
overrides: [
{
files: ["src/**"],
parser: "@typescript-eslint/parser",
parserOptions: {
tsconfigRootDir: __dirname,
project: ["./tsconfig.json"],
},
plugins: ["@typescript-eslint/eslint-plugin"],
extends: [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"prettier",
],
},
],
};
module.exports = config;
28 changes: 0 additions & 28 deletions .eslintrc.json

This file was deleted.

Empty file removed .flowconfig
Empty file.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @basicdays
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2

updates:
# see: https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/keeping-your-actions-up-to-date-with-github-dependabot
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: daily
reviewers:
- basicdays
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: "build"

on:
pull_request:
branches:
- master
- v0.2
push:
branches:
- master
- v0.2

jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node: ["12", "14", "16"]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run build
- run: npm test
24 changes: 13 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
# project
/.nyc_output/
/build/
/coverage/
/lib/
*.tsbuildinfo
*.tgz

# node
node_modules/
npm-debug.log
/node_modules/
**/npm-debug.log*

# editors
/.idea/dictionaries
/.idea/*.local.xml
/.idea/workspace.xml
*.kate-swp
*.swp
/.idea/
**/*.kate-swp
**/*.swp
**/*~

# git
*.orig
**/*.orig

# file managers
.directory
.DS_Store
**/.directory
**/.DS_Store
**/Thumbs.db
6 changes: 0 additions & 6 deletions .idea/encodings.xml

This file was deleted.

17 changes: 0 additions & 17 deletions .idea/inspectionProfiles/Project_Default.xml

This file was deleted.

7 changes: 0 additions & 7 deletions .idea/jsLibraryMappings.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/misc.xml

This file was deleted.

8 changes: 0 additions & 8 deletions .idea/modules.xml

This file was deleted.

9 changes: 0 additions & 9 deletions .idea/node-stream-to-async-iterator.iml

This file was deleted.

6 changes: 0 additions & 6 deletions .idea/vcs.xml

This file was deleted.

7 changes: 7 additions & 0 deletions .mocharc.cover.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"require": ["./src/test/index.ts"],
"spec": [
"./src/**/*.test.{ts,tsx,js,mjs}",
"./src/test/**/*.{ts,tsx,js,mjs}"
]
}
4 changes: 4 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"require": ["./lib/test/index.js"],
"spec": ["./lib/**/*.test.js", "./lib/test/**/*.js"]
}
6 changes: 5 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
test/
*
!lib/**/*
lib/**/*.map
lib/**/*.test.{d.ts,js}
lib/test/**/*
24 changes: 24 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# project
/.nyc_output/
/coverage/
/lib/
*.tsbuildinfo
*.tgz

# node
/node_modules/
**/npm-debug.log*

# editors
/.idea/
**/*.kate-swp
**/*.swp
**/*~

# git
**/*.orig

# file managers
**/.directory
**/.DS_Store
**/Thumbs.db
8 changes: 0 additions & 8 deletions .travis.yml

This file was deleted.

16 changes: 16 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "pwa-node",
"request": "launch",
"name": "Test",
"skipFiles": ["<node_internals>/**"],
"runtimeExecutable": "npm",
"runtimeArgs": ["test"]
}
]
}
7 changes: 7 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"editor.codeActionsOnSave": {
"source.fixAll.eslint": true
},
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
27 changes: 27 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "build",
"group": {
"kind": "build",
"isDefault": true
},
"problemMatcher": [],
"label": "npm: build",
"detail": "run-p 'build:*'"
},
{
"type": "npm",
"script": "test:mocha",
"problemMatcher": [],
"label": "npm: test:mocha",
"detail": "mocha",
"group": {
"kind": "test",
"isDefault": true
}
}
]
}
Loading

0 comments on commit 3b1f109

Please sign in to comment.