Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long needed maintenance #46

Merged
merged 22 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from 17 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 0 additions & 40 deletions .circleci/config.yml

This file was deleted.

3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lib
.eslintrc.js
jest.config.js
119 changes: 119 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
{
"env": {
"node": true,
"jest": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jest/recommended",
"plugin:security/recommended-legacy",
"plugin:sonarjs/recommended",
"plugin:unicorn/recommended",
"standard"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": "./test/tsconfig.json"
},
"plugins": [
"@typescript-eslint",
"jest",
"security",
"sonarjs",
"unicorn"
],
"ignorePatterns": [
"dist",
"coverage"
],
"rules": {
"indent": [
"error",
2,
{
"MemberExpression": 0,
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"no-console": [
"error"
],
"space-before-blocks": [
"error",
"always"
],
"comma-spacing": [
"error",
{
"before": false,
"after": true
}
],
"keyword-spacing": [
"error",
{
"before": true,
"after": true
}
],
"arrow-spacing": [
"error",
{
"before": true,
"after": true
}
],
"comma-dangle": [
"error",
"never"
],
"curly": [
"error",
"all"
],
"brace-style": [
"error",
"1tbs"
],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"named": "never",
"asyncArrow": "always"
}
],
"func-names": [
"error",
"as-needed"
],
"import/order": [
"error",
{
"groups": [
["builtin", "external"],
["internal", "parent", "sibling", "index"]
],
"alphabetize": {
"order": "asc",
"caseInsensitive": true
},
"newlines-between": "always"
}
],
"unicorn/no-null": "off"
}
}
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly

- package-ecosystem: npm
directory: /
schedule:
interval: monthly
groups:
npm-dependencies:
patterns:
- "*"
71 changes: 71 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '31 7 * * 3'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'TypeScript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support

steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
source-root: src
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl

# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
49 changes: 49 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Run Tests

on:
pull_request:
push:
branches:
- main

concurrency:
group: test-${{ github.ref_name }}
cancel-in-progress: true

jobs:
test:
name: Test
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
services:
rabbit:
image: rabbitmq:management-alpine
env:
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
ports:
- 5672:5672
- 15672:15672
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set Node.js LTS
uses: actions/[email protected]
with:
node-version: lts/*
registry-url: "https://npm.pkg.github.com"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Run Tests
run: npm test
env:
AMQP_ADDRESS: rabbit

- name: Check linting
run: npm run lint
37 changes: 10 additions & 27 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,37 +2,20 @@
logs
*.log

# Runtime data
pids
*.pid
*.seed
.stage

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
.nyc_output
# OS
.DS_Store

# Coverage directory used by tools like istanbul
# Tests
coverage
junit
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# IDEs
.idea
.vscode

# node-waf configuration
.lock-wscript
# Node.js
node_modules

# Compiled binary addons (http://nodejs.org/api/addons.html)
release
# Compiled
lib
dist

# Dependency directory
# https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git-
node_modules

# JSDoc
jsdoc

# MAC specific files
.DS_Store
40 changes: 0 additions & 40 deletions .npmignore

This file was deleted.

1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
Loading