diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 359f683..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1 +0,0 @@ -repo_token: yIxhFqtaaz5iGVYfie9mODehFYogm8S8L diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..4872c5a --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,7 @@ +version: 2 +updates: +- package-ecosystem: npm + directory: "/" + schedule: + interval: daily + open-pull-requests-limit: 10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..70d2a8b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,96 @@ +name: ci + +on: [push, pull_request] + +jobs: + legacy: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ['0.10', '0.12', 4.x, 6.x, 8.x, 10.x, 12.x, 13.x, 14.x, 15.x, 16.x] + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install + run: | + npm install --production && npm install tape + + - name: Run tests + run: | + npm run test + + test: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [18.x, 20.x, 22.x] + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + + - name: Install + run: | + npm install + + - name: Run tests + run: | + npm run test:coverage + + types: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install + run: | + npm install + + - name: Run types tests + run: | + npm run typescript + + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + persist-credentials: false + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 22 + + - name: Install + run: | + npm install + + - name: Lint + run: | + npm run lint diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1970476..0000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: node_js -sudo: false - -node_js: - - 9 - - 8 - - 7 - - 6 - - 5 - - 4 - - 4.0 - - iojs-v3 - - iojs-v2 - - iojs-v1 - - 0.12 - - 0.10 - -cache: - directories: - - node_modules - -after_script: -- npm run coverage - -notifications: - email: - on_success: never - on_failure: always diff --git a/LICENSE b/LICENSE index fbf3a01..56d1590 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2015 Matteo Collina +Copyright (c) 2015-2024 Matteo Collina Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 9897b25..1aaee5d 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,6 @@ # reusify [![npm version][npm-badge]][npm-url] -[![Build Status][travis-badge]][travis-url] -[![Coverage Status][coveralls-badge]][coveralls-url] Reuse your objects and functions for maximum speed. This technique will make any function run ~10% faster. You call your functions a @@ -139,7 +137,3 @@ MIT [npm-badge]: https://badge.fury.io/js/reusify.svg [npm-url]: https://badge.fury.io/js/reusify -[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg -[travis-url]: https://travis-ci.org/mcollina/reusify -[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github -[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..d0a9af6 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,14 @@ +'use strict' + +const base = require('neostandard')({}) + +module.exports = [ + ...base, + { + name: 'old-standard', + rules: { + 'no-var': 'off', + 'object-shorthand': 'off', + } + } +] diff --git a/package.json b/package.json index ac9342b..ac2cb09 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,9 @@ "main": "reusify.js", "types": "reusify.d.ts", "scripts": { - "lint": "standard", - "test": "tape test.js | faucet", - "istanbul": "istanbul cover tape test.js", - "coverage": "npm run istanbul; cat coverage/lcov.info | coveralls", + "lint": "eslint", + "test": "tape test.js", + "test:coverage": "c8 --100 tape test.js", "test:typescript": "tsc" }, "pre-commit": [ @@ -39,12 +38,13 @@ }, "devDependencies": { "@types/node": "^20.1.0", - "coveralls": "^2.13.3", - "faucet": "0.0.1", - "istanbul": "^0.4.5", + "eslint": "^9.13.0", + "neostandard": "^0.11.7", "pre-commit": "^1.2.2", - "standard": "^10.0.3", - "tape": "^4.8.0", + "tape": "^5.0.0", + "c8": "^10.1.2", "typescript": "^5.2.2" + }, + "dependencies": { } }