diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c739e15..ac97dc1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node: [ '14.17.6', '16.9.1' ] + node: [ '14.17.5', '16.13.0', '17.1.0' ] name: Test on Node.js ${{ matrix.node }} steps: - uses: actions/checkout@v2 diff --git a/.gitignore b/.gitignore index 58b0944..d867837 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ **/.nyc_output/ **/.vscode/ **/bin/ -**/build/ **/coverage/ **/lib/ **/node_modules/ diff --git a/.npmignore b/.npmignore index b555454..e81fa61 100644 --- a/.npmignore +++ b/.npmignore @@ -1,8 +1,7 @@ **/.* -**/.*/ -**/build/ **/coverage/ **/src/ **/test/ **/CODE_OF_CONDUCT.md +**/CONTRIBUTING.md **/tsconfig.json diff --git a/.travis.yml b/.travis.yml index a53fbb7..f74c84b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,7 @@ language: node_js node_js: - 14 - 16 + - 17 notifications: email: false script: diff --git a/CHANGELOG.md b/CHANGELOG.md index c262f9b..53ec2a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,17 @@ # ChangeLogs +## Version 1.1.10 + +- :building_construction: Migration from `terser` to `esbuild` +- :arrow_up: Packages for development are updated + - `@types/node` is upgraded from 16.10.1 to 16.11.7 + - `@typescript-eslint/eslint-plugin` is upgraded from 4.32.0 to 5.3.1 + - `@typescript-eslint/parser` is upgraded from 4.32.0 to 5.3.1 + - `eslint` is upgraded from 7.32.0 to 8.2.0 + - `mocha` is upgraded from 9.1.2 to 9.1.3 + - `ts-node` is upgraded from 10.2.1 to 10.4.0 + - `typescript` is upgraded from 4.4.3 to 4.4.4 + ## Version 1.1.9 - :arrow_up: Packages for development are updated diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..a4b6000 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,92 @@ +# Contributing + +When contributing to this repository, please first discuss the change you wish to make via issue, +email, or any other method with the owners of this repository before making a change. + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +## Pull Request Process + +1. Ensure any install or build dependencies are removed before the end of the layer when doing a + build. +2. Update the README.md with details of changes to the interface, this includes new environment + variables, exposed ports, useful file locations and container parameters. +3. Increase the version numbers in any examples files and the README.md to the new version that this + Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/). +4. You may merge the Pull Request in once you have the sign-off of two other developers, or if you + do not have permission to do that, you may request the second reviewer to merge it for you. + +## Code of Conduct + +### Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +### Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +### Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +### Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +### Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at km.8k6ce+github@gmail.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +### Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/README.md b/README.md index 27e9fed..a8f3cba 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ npm i @kei-g/iterators [npm-image]:https://img.shields.io/npm/v/@kei-g/iterators?logo=npm [npm-url]:https://npmjs.com/@kei-g/iterators [npmsio-url]:https://npms.io/search?q=%40kei-g%2Fiterators -[nyc-cov-image]:https://img.shields.io/nycrc/kei-g/iterators?config=.nycrc.json&label=coverage +[nyc-cov-image]:https://img.shields.io/nycrc/kei-g/iterators?config=.nycrc.json&label=coverage&logo=mocha [quality-image]:https://img.shields.io/npms-io/quality-score/@kei-g/iterators?logo=npm -[travis-image]:https://img.shields.io/travis/com/kei-g/iterators/main.svg?logo=travis +[travis-image]:https://img.shields.io/travis/com/kei-g/iterators/main.svg?label=test%20%26%20build&logo=travis [travis-url]:https://app.travis-ci.com/github/kei-g/iterators diff --git a/package.json b/package.json index 925bf98..90c85b1 100644 --- a/package.json +++ b/package.json @@ -10,18 +10,18 @@ "devDependencies": { "@types/chai": "^4.2.22", "@types/mocha": "^9.0.0", - "@types/node": "^16.10.1", - "@typescript-eslint/eslint-plugin": "^4.32.0", - "@typescript-eslint/parser": "^4.32.0", + "@types/node": "^16.11.7", + "@typescript-eslint/eslint-plugin": "^5.3.1", + "@typescript-eslint/parser": "^5.3.1", "chai": "^4.3.4", - "eslint": "^7.32.0", - "mocha": "^9.1.2", + "esbuild": "^0.13.13", + "eslint": "^8.2.0", + "mocha": "^9.1.3", "npm-run-all": "^4.1.5", "nyc": "^15.1.0", "rimraf": "^3.0.2", - "terser": "^5.9.0", - "ts-node": "^10.2.1", - "typescript": "^4.4.3" + "ts-node": "^10.4.0", + "typescript": "^4.4.4" }, "engines": { "node": ">=14.17.5" @@ -40,27 +40,12 @@ "publishConfig": { "access": "public" }, - "repository": { - "type": "git", - "url": "https://github.com/kei-g/iterators.git" - }, + "repository": "github:kei-g/iterators", "scripts": { - "build": "npm-run-all -p clean lint -s build:tsc -p build:terse:* build:terse:lib:*", - "build:terse:index": "terser build/index.js -c -m -o index.js --toplevel", - "build:terse:lib:circular": "terser build/lib/circular.js -c -m -o lib/circular.js --toplevel", - "build:terse:lib:concat": "terser build/lib/concat.js -c -m -o lib/concat.js --toplevel", - "build:terse:lib:empty": "terser build/lib/empty.js -c -m -o lib/empty.js --toplevel", - "build:terse:lib:index": "terser build/lib/index.js -c -m -o lib/index.js --toplevel", - "build:terse:lib:iterators": "terser build/lib/iterators.js -c -m -o lib/iterators.js --toplevel", - "build:terse:lib:lazy": "terser build/lib/lazy.js -c -m -o lib/lazy.js --toplevel", - "build:terse:lib:linear-number-series": "terser build/lib/linear-number-series.js -c -m -o lib/linear-number-series.js --toplevel", - "build:terse:lib:multiplex": "terser build/lib/multiplex.js -c -m -o lib/multiplex.js --toplevel", - "build:terse:lib:single": "terser build/lib/single.js -c -m -o lib/single.js --toplevel", - "build:terse:lib:take": "terser build/lib/take.js -c -m -o lib/take.js --toplevel", - "build:terse:lib:transform": "terser build/lib/transform.js -c -m -o lib/transform.js --toplevel", - "build:terse:lib:zip": "terser build/lib/zip.js -c -m -o lib/zip.js --toplevel", + "build": "npm-run-all -p clean lint -p build:bundle build:tsc", + "build:bundle": "esbuild src/index.ts --bundle --minify --outfile=index.js --platform=node --target=ES2020", "build:tsc": "tsc", - "clean": "rimraf build/ index.d.ts index.js lib/", + "clean": "rimraf .nyc_output/ coverage/ index.d.ts index.js lib/", "cover": "nyc --check-coverage -r html -r text _mocha", "lint": "eslint src/**/*.ts", "postpublish": "run-s clean", diff --git a/tsconfig.json b/tsconfig.json index 73b368b..1ef48b0 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,6 +5,7 @@ "declaration": true, "declarationDir": ".", "downlevelIteration": true, + "emitDeclarationOnly": true, "emitDecoratorMetadata": false, "esModuleInterop": true, "experimentalDecorators": false, @@ -14,7 +15,6 @@ "module": "CommonJS", "moduleResolution": "node", "newLine": "lf", - "outDir": "build", "pretty": true, "removeComments": false, "skipLibCheck": true,