Skip to content

Commit a9f6f62

Browse files
authored
Merge branch 'golevelup:master' into master
2 parents c087d02 + 6ca2d16 commit a9f6f62

File tree

79 files changed

+16558
-12223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+16558
-12223
lines changed

.eslintrc.js

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -7,63 +7,63 @@ concurrency:
77
cancel-in-progress: true
88

99
env:
10-
LATEST_NODE_VERSION: 18
10+
LATEST_NODE_VERSION: 20
1111

1212
jobs:
1313
ci:
1414
runs-on: ubuntu-latest
1515

1616
strategy:
1717
matrix:
18-
node: [18, 19, 20]
18+
node: [20, 22]
1919
fail-fast: false
2020

2121
services:
2222
rabbitmq:
2323
image: rabbitmq:management
2424
env:
25-
RABBITMQ_ERLANG_COOKIE: "SWQOKODSQALRPCLNMEQG"
26-
RABBITMQ_DEFAULT_USER: "rabbitmq"
27-
RABBITMQ_DEFAULT_PASS: "rabbitmq"
28-
RABBITMQ_DEFAULT_VHOST: "/"
25+
RABBITMQ_ERLANG_COOKIE: 'SWQOKODSQALRPCLNMEQG'
26+
RABBITMQ_DEFAULT_USER: 'rabbitmq'
27+
RABBITMQ_DEFAULT_PASS: 'rabbitmq'
28+
RABBITMQ_DEFAULT_VHOST: '/'
2929
ports:
3030
- 5672/tcp
3131

3232
steps:
3333
- name: Checkout
34-
uses: actions/checkout@v2
34+
uses: actions/checkout@v4
3535

36-
- name: Setup Node.js ${{ matrix.node }}
37-
uses: actions/setup-node@v2
36+
- uses: actions/checkout@v4
37+
- name: Install pnpm
38+
uses: pnpm/action-setup@v4
3839
with:
39-
node-version: ${{ matrix.node }}
40-
cache: 'yarn'
40+
version: 9
41+
42+
- name: Use Node.js ${{ matrix.node-version }}
43+
uses: actions/setup-node@v4
44+
with:
45+
node-version: ${{ matrix.node-version }}
46+
cache: 'pnpm'
4147

4248
- name: Install dependencies
43-
run: yarn install
49+
run: pnpm i --prefer-offline
4450

4551
- name: Build
46-
run: yarn build
47-
48-
- name: Build ts-vitest
49-
if: matrix.node == 18
50-
run: yarn build:vitest
52+
run: pnpm build --concurrency=12
5153

5254
- name: Run unit tests
53-
run: yarn test:ci
55+
run: pnpm test:ci
5456

5557
- name: Run Vitest unit tests
56-
if: matrix.node == 18
57-
run: yarn test:vitest:ci
58+
run: pnpm test:vitest:ci
5859

5960
- name: Publish code coverage
6061
if: matrix.node == env.LATEST_NODE_VERSION
6162
run: echo Not Implemented Yet
6263

6364
- name: Run integration tests
6465
run: |
65-
yarn --cwd ./integration/rabbitmq
66-
yarn test:ci:integration
66+
pnpm test:ci:integration
6767
env:
6868
NODE_ENV: ci
6969
RABBITMQ_HOST: localhost
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Close inactive issues
2+
on:
3+
schedule:
4+
- cron: "30 1 * * *"
5+
6+
jobs:
7+
close-issues:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
issues: write
11+
pull-requests: write
12+
steps:
13+
- uses: actions/stale@v9
14+
with:
15+
days-before-issue-stale: 30
16+
days-before-issue-close: 14
17+
stale-issue-label: "stale"
18+
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
19+
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
20+
days-before-pr-stale: -1
21+
days-before-pr-close: -1
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,4 @@ packages/testing/*/lib
66
.idea
77
coverage/
88
tsconfig.build.tsbuildinfo
9-
yarn-error.log
109
integration/rabbitmq/dist

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
commitlint --edit $1

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lint-staged

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
14
1+
20

.vscode/settings.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
{
2-
"editor.formatOnSave": true
3-
}
2+
"editor.formatOnSave": true,
3+
"cSpell.words": ["rabbitmq", "Vitest"],
4+
"typescript.tsdk": "node_modules/typescript/lib"
5+
}

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ Pick a good branch name. Try something that summarizes what you're doing in a de
3333
- `docs/improve-readme`
3434
- `fix/{number}some-bug`
3535

36-
## 4. Install Dependencies with Yarn
36+
## 4. Install Dependencies with PNPM
3737

38-
Make sure that before you start writing code you run `yarn` at the root of the repo in order to make sure that all githooks are registered and packages are installed. This will help to ensure that when it's time to commit your changes that everything is in order.
38+
Make sure that before you start writing code you run `pnpm i` at the root of the repo in order to make sure that all githooks are registered and packages are installed. This will help to ensure that when it's time to commit your changes that everything is in order.
3939

4040
## 5. Make your change
4141

@@ -46,7 +46,7 @@ Write some awesome code that makes Go Level Up better! :muscle:
4646
This part is easy, just use the included scripts to guide you through a prompt to generate your commit message.
4747

4848
```
49-
yarn commit
49+
pnpm commit
5050
```
5151

5252
Be sure to include a reference to the issue number when prompted using `#{number}` syntax eg:

eslint.config.mjs

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
2+
import globals from 'globals';
3+
import tsParser from '@typescript-eslint/parser';
4+
import path from 'node:path';
5+
import { fileURLToPath } from 'node:url';
6+
import js from '@eslint/js';
7+
import { FlatCompat } from '@eslint/eslintrc';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default [
18+
{
19+
ignores: ['**/*.d.ts', '**/node_modules/', '**/*.js'],
20+
},
21+
...compat.extends('plugin:@typescript-eslint/recommended', 'prettier'),
22+
{
23+
plugins: {
24+
'@typescript-eslint': typescriptEslint,
25+
},
26+
27+
languageOptions: {
28+
globals: {
29+
...globals.node,
30+
...globals.jest,
31+
},
32+
33+
parser: tsParser,
34+
ecmaVersion: 2018,
35+
sourceType: 'commonjs',
36+
37+
parserOptions: {
38+
source: 'module',
39+
},
40+
},
41+
42+
rules: {
43+
'@typescript-eslint/no-explicit-any': 'off',
44+
'@typescript-eslint/explicit-function-return-type': 'off',
45+
'@typescript-eslint/interface-name-prefix': 'off',
46+
'@typescript-eslint/camelcase': 'off',
47+
},
48+
},
49+
];

0 commit comments

Comments
 (0)