Skip to content

Commit

Permalink
Release Beta v2.0.0-beta.4 (#247)
Browse files Browse the repository at this point in the history
- [FIX] Memory leak in the `ping` reply

- [BREAKING] Drop support for Node.js below `v18.18.x`
  • Loading branch information
LoboMetalurgico authored Feb 24, 2025
2 parents 9c9af4a + d3394f4 commit 9195e69
Show file tree
Hide file tree
Showing 22 changed files with 3,426 additions and 2,291 deletions.
5 changes: 0 additions & 5 deletions .eslintignore

This file was deleted.

102 changes: 0 additions & 102 deletions .eslintrc.json

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Node v12
uses: actions/setup-node@v3
uses: actions/checkout@v4
- name: Install Node v22
uses: actions/setup-node@v4
with:
node-version: 12
node-version: 22
- name: Install dependencies
run: npm ci
- name: Run ESLint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gitpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
name: Publish Tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: set_var
name: Get Version
run: |
Expand All @@ -32,7 +32,7 @@ jobs:
name: Publish Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- id: set_var
name: Get Version
run: |
Expand All @@ -52,4 +52,4 @@ jobs:
prerelease_regex: ^v[0-9]\.[0-9]\.[0-9]\-
created_tag: v${{ fromJson(steps.set_var.outputs.packageJson).version }}
env:
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
GITHUB_TOKEN: ${{ secrets.BOT_TOKEN }}
8 changes: 4 additions & 4 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ jobs:

strategy:
matrix:
node-version: [12, 14, 16, 18]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Build Project
run: npm run pdeploy
run: npm run build
- name: Run tests
run: npm test
env:
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/packagePublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,29 @@ on:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Setup .npmrc file to publish to npm
- name: Setup .npmrc (NPM)
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 22
registry-url: 'https://registry.npmjs.org'
scope: '@twitchapis'

- name: Update NPM
run: npm install -g npm@latest

- name: Install dependencies
run: npm ci
- name: Prepare package
run: npm run pdeploy

- name: Publish to npm
working-directory: ./build
run: npm publish
run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
8 changes: 8 additions & 0 deletions .hintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": [
"development"
],
"hints": {
"typescript-config/strict": "off"
}
}
7 changes: 0 additions & 7 deletions .prettierignore

This file was deleted.

8 changes: 0 additions & 8 deletions .prettierrc.json

This file was deleted.

5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## v2.0.0-beta.4
- [FIX] Memory leak in the "ping" reply

- [BREAKING] Drop support for Node.js below 18.18.x

## v2.0.0-beta.3
- [FIX] Fixed an issue caused by twitch sending numbers as strings in the `message` event.
- This fix is made especially for the `bits` field of the `message` event.
Expand Down
120 changes: 120 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import globals from 'globals';
import tsParser from '@typescript-eslint/parser';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default [{
ignores: ['build/**/*', 'tests/**/*'],
}, ...compat.extends(
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
), {
plugins: {
'@typescript-eslint': typescriptEslint,
},

languageOptions: {
globals: {
...globals.commonjs,
...globals.node,
},

parser: tsParser,
ecmaVersion: 2020,
sourceType: 'module',
},

rules: {
'@typescript-eslint/ban-ts-ignore': ['off'],
'@typescript-eslint/explicit-function-return-type': ['error'],
'@typescript-eslint/interface-name-prefix': ['off'],
'@typescript-eslint/no-explicit-any': ['off'],
'@typescript-eslint/no-unused-expressions': ['error'],
'@typescript-eslint/no-var-requires': ['off'],
'@typescript-eslint/no-use-before-define': ['error'],
'@typescript-eslint/no-non-null-assertion': ['off'],
'array-bracket-spacing': ['warn', 'never'],
capIsNew: ['off'],
'comma-dangle': ['error', 'always-multiline'],
'computed-property-spacing': 'warn',

'default-case': ['error', {
commentPattern: '^no default$',
}],

'eol-last': ['error', 'always'],

indent: ['warn', 2, {
SwitchCase: 1,
}],

'keyword-spacing': ['warn', {
before: true,
after: true,
}],

'linebreak-style': ['error', 'unix'],

'max-len': ['warn', {
code: 250,
ignoreComments: true,
ignoreUrls: true,
}],

'new-cap': 0,
'no-async-promise-executor': ['off'],
'no-await-in-loop': 'warn',
'no-caller': 2,
'no-compare-neg-zero': 'error',
'no-cond-assign': [2, 'except-parens'],
'no-empty-pattern': ['off'],
'no-template-curly-in-string': 'error',
'no-unsafe-negation': 'error',
'no-undef': ['error'],
'no-unused-vars': 'off',

'no-empty': ['error', {
allowEmptyCatch: true,
}],

'no-console': 'off',
'no-multi-spaces': 'warn',

'no-use-before-define': [2, {
functions: false,
classes: false,
variables: false,
}],

'no-var': ['off'],
'no-prototype-builtins': ['off'],
'object-curly-spacing': ['error', 'always'],

'prefer-const': ['warn', {
destructuring: 'all',
}],

quotes: ['error', 'single', {
allowTemplateLiterals: true,
}],

strict: ['error', 'global'],
semi: ['error', 'always'],
'spaced-comment': ['warn', 'always'],
'sort-keys': ['off'],
'space-before-function-paren': ['off'],
'space-infix-ops': 'warn',
},
}];
Loading

0 comments on commit 9195e69

Please sign in to comment.