Skip to content

Commit 02a46d6

Browse files
committed
updates
1 parent 032097e commit 02a46d6

File tree

363 files changed

+1657
-1340
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

+1657
-1340
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: 12 additions & 8 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 --plugin typedoc-plugin-extras --footerDate --footerTime --footerTypedocVersion --favicon https://svgshare.com/i/bQb.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
"keywords": [
@@ -26,27 +25,32 @@
2625
"rest",
2726
"api"
2827
],
28+
"engines": {
29+
"node": ">=18"
30+
},
2931
"devDependencies": {
3032
"@eslint/js": "^9.24.0",
3133
"@rollup/plugin-alias": "^5.1.1",
3234
"@rollup/plugin-commonjs": "^28.0.3",
3335
"@rollup/plugin-node-resolve": "^16.0.1",
3436
"@rollup/plugin-typescript": "^12.1.2",
35-
"@types/node": "^20.17.30",
36-
"dotenv": "^16.4.7",
37+
"@stylistic/eslint-plugin-js": "^4.2.0",
38+
"@stylistic/eslint-plugin-ts": "^4.2.0",
39+
"@types/node": "^18.19.86",
40+
"@vitest/coverage-v8": "^3.1.1",
41+
"dotenv": "^16.5.0",
3742
"eslint": "^9.24.0",
3843
"globals": "^16.0.0",
3944
"prettier": "^3.5.3",
4045
"prettier-plugin-jsdoc": "^1.3.2",
41-
"rollup": "^4.39.0",
46+
"rollup": "^4.40.0",
4247
"tslib": "^2.8.1",
4348
"typedoc": "^0.28.2",
4449
"typescript": "^5.8.3",
4550
"typescript-eslint": "^8.29.1",
4651
"vitest": "^3.1.1"
4752
},
4853
"dependencies": {
49-
"axios": "^1.8.4",
5054
"form-data": "^4.0.2",
5155
"zod": "^3.24.2"
5256
}

0 commit comments

Comments
 (0)