Skip to content

Commit 19d761c

Browse files
committed
updates
1 parent f871192 commit 19d761c

File tree

363 files changed

+1609
-1230
lines changed

Some content is hidden

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

363 files changed

+1609
-1230
lines changed

.github/workflows/ci.yml

Lines changed: 64 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,73 @@
1-
name: ci
1+
name: CI Pipeline
22

3-
on: [push]
3+
on:
4+
- push
5+
- pull_request
6+
7+
env:
8+
NODE_VERSION: '18'
49

510
jobs:
6-
build:
11+
setup:
12+
name: Setup
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: ${{ env.NODE_VERSION }}
19+
cache: 'pnpm'
20+
- uses: pnpm/action-setup@v4
21+
with:
22+
version: 10
23+
24+
lint:
25+
name: Lint
26+
needs: setup
27+
runs-on: ubuntu-latest
28+
steps:
29+
- uses: actions/checkout@v4
30+
- uses: actions/setup-node@v4
31+
with:
32+
node-version: ${{ env.NODE_VERSION }}
33+
cache: 'pnpm'
34+
- uses: pnpm/action-setup@v4
35+
- run: pnpm install --frozen-lockfile
36+
- run: pnpm lint
37+
38+
test:
39+
name: Test with Coverage
40+
needs: setup
741
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v4
44+
- uses: actions/setup-node@v4
45+
with:
46+
node-version: ${{ env.NODE_VERSION }}
47+
cache: 'pnpm'
48+
- uses: pnpm/action-setup@v4
49+
- run: pnpm install --frozen-lockfile
50+
- run: pnpm test:coverage
851

9-
strategy:
10-
max-parallel: 1
11-
matrix:
12-
node-version: [16.x, 18.x]
52+
- name: Upload coverage to Codecov
53+
uses: codecov/codecov-action@v5
54+
with:
55+
token: ${{ secrets.CODECOV_TOKEN }}
1356

57+
build:
58+
name: Build
59+
needs: [lint, test]
60+
runs-on: ubuntu-latest
1461
steps:
1562
- uses: actions/checkout@v4
16-
- name: Use Node.js ${{ matrix.node-version }}
17-
uses: actions/setup-node@v4
63+
- uses: actions/setup-node@v4
64+
with:
65+
node-version: ${{ env.NODE_VERSION }}
66+
cache: 'pnpm'
67+
- uses: pnpm/action-setup@v4
68+
- run: pnpm install --frozen-lockfile
69+
- run: pnpm build
70+
- uses: actions/upload-artifact@v3
1871
with:
19-
node-version: ${{ matrix.node-version }}
20-
- run: npm install
21-
- name: Create .env file
22-
run: |
23-
touch .env
24-
echo TRELLO_API_KEY=${{ secrets.TRELLO_API_KEY }} >> .env
25-
echo TRELLO_API_TOKEN=${{ secrets.TRELLO_API_TOKEN }} >> .env
26-
- run: npm run build
27-
- run: npm run test
28-
- run: npm run lint
29-
env:
30-
CI: true
72+
name: build-artifacts
73+
path: dist/

eslint.config.mjs

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
1-
import { defineConfig } from "eslint/config";
2-
import globals from "globals";
3-
import js from "@eslint/js";
4-
import tseslint from "typescript-eslint";
1+
import { defineConfig } from 'eslint/config';
2+
import globals from 'globals';
3+
import js from '@eslint/js';
4+
import tseslint from 'typescript-eslint';
5+
import stylistic from '@stylistic/eslint-plugin-js';
6+
import stylisticTs from '@stylistic/eslint-plugin-ts';
57

68
export default defineConfig([
7-
{ files: ["**/*.{js,mjs,cjs,ts}"] },
8-
{ files: ["**/*.{js,mjs,cjs,ts}"], languageOptions: { globals: {...globals.browser, ...globals.node} } },
9-
{ files: ["**/*.{js,mjs,cjs,ts}"], plugins: { js }, extends: ["js/recommended"] },
9+
{ files: ['**/*.{js,mjs,cjs,ts}'] },
10+
{ files: ['**/*.{js,mjs,cjs,ts}'], languageOptions: { globals: {...globals.browser, ...globals.node} } },
11+
{ files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
1012
tseslint.configs.recommended,
13+
{
14+
plugins: {
15+
'@stylistic': stylistic,
16+
'@stylistic/ts': stylisticTs
17+
},
18+
rules: {
19+
'@stylistic/ts/indent': ['error', 2],
20+
'@stylistic/ts/quotes': ['error', 'single'],
21+
'@stylistic/ts/quote-props': ['error', 'as-needed'],
22+
'@stylistic/eol-last': ['error', 'always'],
23+
}
24+
}
1125
]);

package.json

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,10 @@
1313
"prettier": "prettier --write src",
1414
"doc": "typedoc --name \"Trello.js - API library\" --out docs ./src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/trello.js%2Ffavicon.svg",
1515
"lint": "eslint src tests --ext .ts",
16-
"lint:fix": "npm run lint -- --fix",
17-
"test": "npm run test:unit && npm run test:integration && npm run test:e2e",
16+
"lint:fix": "pnpm run lint --fix",
17+
"test": "pnpm run test:unit && pnpm run test:integration",
1818
"test:unit": "vitest run tests/unit",
19-
"test:integration": "vitest run tests/integration --sequence.sequential",
20-
"test:e2e": "vitest run tests/e2e --sequence.sequential"
19+
"test:integration": "vitest run tests/integration --sequence.sequential"
2120
},
2221
"repository": "https://github.com/MrRefactoring/trello.js",
2322
"homepage": "https://mrrefactoring.github.io/trello.js",
@@ -36,13 +35,19 @@
3635
"webhooks",
3736
"atlassian"
3837
],
38+
"engines": {
39+
"node": ">=18"
40+
},
3941
"devDependencies": {
4042
"@eslint/js": "^9.25.0",
4143
"@rollup/plugin-alias": "^5.1.1",
4244
"@rollup/plugin-commonjs": "^28.0.3",
4345
"@rollup/plugin-node-resolve": "^16.0.1",
4446
"@rollup/plugin-typescript": "^12.1.2",
45-
"@types/node": "^20.17.30",
47+
"@stylistic/eslint-plugin-js": "^4.2.0",
48+
"@stylistic/eslint-plugin-ts": "^4.2.0",
49+
"@types/node": "^18.19.86",
50+
"@vitest/coverage-v8": "^3.1.1",
4651
"dotenv": "^16.5.0",
4752
"eslint": "^9.25.0",
4853
"globals": "^16.0.0",
@@ -56,7 +61,6 @@
5661
"vitest": "^3.1.1"
5762
},
5863
"dependencies": {
59-
"axios": "^1.8.4",
6064
"form-data": "^4.0.2",
6165
"zod": "^3.24.3"
6266
}

0 commit comments

Comments
 (0)