Skip to content

Commit 3c1ca25

Browse files
committed
32: add zod schemas
1 parent 3ea6d5d commit 3c1ca25

File tree

387 files changed

+4479
-17136
lines changed

Some content is hidden

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

387 files changed

+4479
-17136
lines changed

.eslintrc

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

.github/workflows/ci.yml

Lines changed: 74 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,86 @@
1-
name: ci
1+
name: CI Pipeline
22

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

510
jobs:
611
build:
12+
name: Build
713
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
816

9-
strategy:
10-
max-parallel: 1
11-
matrix:
12-
node-version: [16.x, 18.x]
17+
- name: Install pnpm
18+
uses: pnpm/action-setup@v4
19+
with:
20+
version: ${{ env.PNPM_VERSION }}
21+
run_install: false
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ env.NODE_VERSION }}
27+
cache: 'pnpm'
1328

29+
- run: pnpm install --frozen-lockfile
30+
- run: pnpm build
31+
32+
lint:
33+
name: Lint
34+
needs: [build]
35+
runs-on: ubuntu-latest
1436
steps:
1537
- uses: actions/checkout@v4
16-
- name: Use Node.js ${{ matrix.node-version }}
38+
39+
# First install pnpm globally
40+
- name: Install pnpm
41+
uses: pnpm/action-setup@v4
42+
with:
43+
version: ${{ env.PNPM_VERSION }}
44+
run_install: false
45+
46+
# Then setup Node.js with pnpm cache
47+
- name: Setup Node.js
1748
uses: actions/setup-node@v4
1849
with:
19-
node-version: ${{ matrix.node-version }}
20-
- run: npm install
21-
- name: Create .env file
50+
node-version: ${{ env.NODE_VERSION }}
51+
cache: 'pnpm'
52+
53+
# Verify installations
54+
- name: Check versions
2255
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
56+
node --version
57+
pnpm --version
58+
59+
- run: pnpm install --frozen-lockfile
60+
- run: pnpm lint
61+
62+
test:
63+
name: Test with Coverage
64+
needs: [build]
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Install pnpm
70+
uses: pnpm/action-setup@v4
71+
with:
72+
version: ${{ env.PNPM_VERSION }}
73+
run_install: false
74+
75+
- name: Setup Node.js
76+
uses: actions/setup-node@v4
77+
with:
78+
node-version: ${{ env.NODE_VERSION }}
79+
cache: 'pnpm'
80+
81+
- run: pnpm install --frozen-lockfile
82+
- run: pnpm test:coverage
83+
- name: Upload coverage to Codecov
84+
uses: codecov/codecov-action@v5
85+
with:
86+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/publish-dev.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Manual Dev Publish
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only
5+
6+
jobs:
7+
publish-dev:
8+
name: Publish Dev Version
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: read
12+
id-token: write # For npm OIDC auth
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '20'
22+
23+
- name: Install pnpm
24+
uses: pnpm/action-setup@v4
25+
with:
26+
version: latest
27+
28+
- name: Install dependencies
29+
run: pnpm install --frozen-lockfile
30+
31+
- name: Generate dev version
32+
id: version
33+
run: |
34+
BASE_VERSION=$(node -p "require('./package.json').version")
35+
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
36+
DEV_VERSION="${BASE_VERSION}-dev-${TIMESTAMP}"
37+
echo "Generated version: $DEV_VERSION"
38+
echo "version=$DEV_VERSION" >> $GITHUB_OUTPUT
39+
40+
- name: Update package version
41+
run: npm pkg set version="${{ steps.version.outputs.version }}"
42+
43+
- name: Build package
44+
run: pnpm run build
45+
46+
- name: Publish to npm (dev tag)
47+
run: pnpm publish --tag dev --no-git-checks
48+
env:
49+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.idea/
2-
out/
2+
dist/
33
node_modules/
44
coverage/
55
docs/

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Trello.js changelog
22

3+
### 2.0.0
4+
5+
- Any mention of telemetry has been eliminated from the project
6+
- todo add full changelog
7+
38
### v1.2.8 (2025-04-21)
49

510
- Fixes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Usability, consistency, and performance are key focuses of trello.js, and it als
2626

2727
## Installation
2828

29-
**Node.js 10.0.0 or newer is required.**
29+
**Node.js 20.0.0 or newer is required.**
3030

3131
Install with the npm:
3232

eslint.config.mjs

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
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';
7+
8+
export default defineConfig([
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'] },
12+
tseslint.configs.recommended,
13+
{
14+
plugins: {
15+
'@stylistic': stylistic,
16+
'@stylistic/ts': stylisticTs,
17+
},
18+
rules: {
19+
'@stylistic/eol-last': ['error', 'always'],
20+
'@stylistic/ts/indent': ['error', 2],
21+
'@stylistic/ts/quote-props': ['error', 'as-needed'],
22+
'@stylistic/ts/quotes': ['error', 'single'],
23+
'@stylistic/ts/semi': 'error',
24+
'@typescript-eslint/consistent-type-imports': 'error',
25+
},
26+
},
27+
]);

0 commit comments

Comments
 (0)