From 4b423eaabf1a7ed1ee878059e64145dd4dba3c0f Mon Sep 17 00:00:00 2001 From: Kenan Yildirim Date: Wed, 6 Sep 2023 17:46:02 -0400 Subject: [PATCH] feat: drop Node.js v14 and v16 BREAKING CHANGE: Node.js v14 and v16 are no longer supported. --- .github/workflows/nodejs.yml | 4 ++-- .github/workflows/release.yml | 10 +++++++++- .npmrc | 1 + LICENSE.txt | 2 +- bench/batch.js | 2 +- bench/many.js | 2 +- index.js | 2 +- package.json | 16 ++++++++-------- tsconfig.json | 2 +- 9 files changed, 25 insertions(+), 16 deletions(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8d9b673..eb24874 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -5,10 +5,10 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [14, 16, 18, 20] + node-version: [18, 20] os: [ubuntu-latest] steps: - - uses: actions/checkout@v3.6.0 + - uses: actions/checkout@v4.0.0 - name: Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3.8.1 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0bc587..a8567bc 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,10 +3,17 @@ on: push: branches: - master +permissions: + contents: read jobs: release: name: release runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + issues: write + pull-requests: write steps: - uses: actions/setup-node@v3.8.1 with: @@ -15,11 +22,12 @@ jobs: run: | npm install -g npm npm --version - - uses: actions/checkout@v3.6.0 + - uses: actions/checkout@v4.0.0 - name: Install dependencies uses: bahmutov/npm-install@v1.8.34 with: useLockFile: false + - run: npm audit signatures - name: Release run: npm run release env: diff --git a/.npmrc b/.npmrc index c1ca392..d24eaae 100644 --- a/.npmrc +++ b/.npmrc @@ -1 +1,2 @@ package-lock = false +provenance = true diff --git a/LICENSE.txt b/LICENSE.txt index b013510..e2a9c36 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright 2016–2022 Kenan Yildirim +Copyright 2016–2023 Kenan Yildirim Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/bench/batch.js b/bench/batch.js index 73d2fcb..57212ef 100644 --- a/bench/batch.js +++ b/bench/batch.js @@ -16,7 +16,7 @@ const suite = new Benchmark.Suite(); // 2. Have player 1 play a match versus every other player, in a single batch. // 3. Get the new rating, deviation, and volatility of player 1. -/* eslint-disable no-console, no-unused-vars */ +/* eslint-disable no-console */ suite.add('glicko2-lite', () => { const players = []; diff --git a/bench/many.js b/bench/many.js index 9e58a10..6357536 100644 --- a/bench/many.js +++ b/bench/many.js @@ -14,7 +14,7 @@ const suite = new Benchmark.Suite(); // 2. Have player 1 play a match versus every other player, one at a time. // 3. Get the new rating, deviation, and volatility of player 1. -/* eslint-disable no-console, no-unused-vars */ +/* eslint-disable no-console */ suite.add('glicko2-lite', () => { const players = []; diff --git a/index.js b/index.js index 99ac9c0..91b4a44 100644 --- a/index.js +++ b/index.js @@ -9,7 +9,7 @@ * @property {number} gphij * @property {number} emmp * @property {number} score -*/ + */ /** * @param {number} rating diff --git a/package.json b/package.json index 7809116..9f82d54 100644 --- a/package.json +++ b/package.json @@ -5,13 +5,13 @@ "keywords": [ "statistics" ], - "repository": "KenanY/glicko2-lite", + "repository": "github:kenany/glicko2-lite", "license": "MIT", "author": "Kenan Yildirim (https://kenany.me/)", "main": "index.js", "types": "index.d.ts", "engines": { - "node": "14 || 16 || 18 || >=20" + "node": "18 || >=20" }, "files": [ "CHANGELOG.md", @@ -36,10 +36,10 @@ }, "dependencies": {}, "devDependencies": { - "@kenan/eslint-config": "^10.0.2", + "@kenan/eslint-config": "^11.0.0", "@semantic-release/changelog": "^6.0.3", "@semantic-release/git": "^10.0.1", - "@tsconfig/node14": "^14.1.0", + "@tsconfig/node18": "^18.2.1", "@types/almost-equal": "^1.1.0", "@types/lodash.isfunction": "^3.0.7", "@types/tape": "^5.6.0", @@ -47,14 +47,14 @@ "beautify-benchmark": "^0.2.4", "benchmark": "^2.1.4", "conventional-changelog-conventionalcommits": "^6.1.0", - "eslint": "^8.47.0", + "eslint": "^8.48.0", "glicko2": "^1.1.0", "glicko2.ts": "^1.3.2", "lodash.isfunction": "^3.0.9", "rimraf": "^5.0.1", - "semantic-release": "^21.0.9", + "semantic-release": "^21.1.1", "tape": "^5.6.6", - "type-coverage": "^2.26.0", - "typescript": "^5.1.6" + "type-coverage": "^2.26.2", + "typescript": "^5.2.2" } } diff --git a/tsconfig.json b/tsconfig.json index 7a6248f..b13aedc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "@tsconfig/node14/tsconfig.json", + "extends": "@tsconfig/node18/tsconfig.json", "compilerOptions": { "allowJs": true, "checkJs": true,