Skip to content

#32: add zod schemas #33

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
124 changes: 0 additions & 124 deletions .eslintrc

This file was deleted.

92 changes: 74 additions & 18 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,86 @@
name: ci
name: CI Pipeline

on: [push]
on:
push:

env:
NODE_VERSION: '18'
PNPM_VERSION: '10'

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

strategy:
max-parallel: 1
matrix:
node-version: [16.x, 18.x]
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm build

lint:
name: Lint
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}

# First install pnpm globally
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

# Then setup Node.js with pnpm cache
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Create .env file
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

# Verify installations
- name: Check versions
run: |
touch .env
echo TRELLO_API_KEY=${{ secrets.TRELLO_API_KEY }} >> .env
echo TRELLO_API_TOKEN=${{ secrets.TRELLO_API_TOKEN }} >> .env
- run: npm run build
- run: npm run test
- run: npm run lint
env:
CI: true
node --version
pnpm --version

- run: pnpm install --frozen-lockfile
- run: pnpm lint

test:
name: Test with Coverage
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'pnpm'

- run: pnpm install --frozen-lockfile
- run: pnpm test:coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/publish-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Manual Dev Publish

on:
workflow_dispatch: # Manual trigger only

jobs:
publish-dev:
name: Publish Dev Version
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # For npm OIDC auth

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

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Generate dev version
id: version
run: |
BASE_VERSION=$(node -p "require('./package.json').version")
TIMESTAMP=$(date -u +"%Y%m%d%H%M%S")
DEV_VERSION="${BASE_VERSION}-dev-${TIMESTAMP}"
echo "Generated version: $DEV_VERSION"
echo "version=$DEV_VERSION" >> $GITHUB_OUTPUT

- name: Update package version
run: npm pkg set version="${{ steps.version.outputs.version }}"

- name: Build package
run: pnpm run build

- name: Publish to npm (dev tag)
run: pnpm publish --tag dev --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.idea/
out/
dist/
node_modules/
coverage/
docs/
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Trello.js changelog

### 2.0.0

- Any mention of telemetry has been eliminated from the project
- todo add full changelog

### v1.2.8 (2025-04-21)

- Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Usability, consistency, and performance are key focuses of trello.js, and it als

## Installation

**Node.js 10.0.0 or newer is required.**
**Node.js 20.0.0 or newer is required.**

Install with the npm:

Expand Down
27 changes: 27 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import stylistic from '@stylistic/eslint-plugin-js';
import stylisticTs from '@stylistic/eslint-plugin-ts';

export default defineConfig([
{ files: ['**/*.{js,mjs,cjs,ts}'] },
{ files: ['**/*.{js,mjs,cjs,ts}'], languageOptions: { globals: { ...globals.browser, ...globals.node } } },
{ files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
tseslint.configs.recommended,
{
plugins: {
'@stylistic': stylistic,
'@stylistic/ts': stylisticTs,
},
rules: {
'@stylistic/eol-last': ['error', 'always'],
'@stylistic/ts/indent': ['error', 2],
'@stylistic/ts/quote-props': ['error', 'as-needed'],
'@stylistic/ts/quotes': ['error', 'single'],
'@stylistic/ts/semi': 'error',
'@typescript-eslint/consistent-type-imports': 'error',
},
},
]);
Loading
Loading