Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
6 changes: 6 additions & 0 deletions .changeset/brown-frogs-live.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'cursor-api': major
'cursor-cli': major
---

refactor: restructure project for monorepo setup and update ESLint configuration
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
46 changes: 29 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI

on:
push:
branches: [ main, develop ]
branches: [ main, dev ]
pull_request:
branches: [ main ]

Expand All @@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
node-version: [18, 22, 24]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v4
Expand All @@ -24,23 +24,27 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

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

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Run linting
run: npm run lint
run: pnpm run lint

- name: Run type checking
run: npm run type-check
run: pnpm run type-check

- name: Run tests
run: npm run test:coverage
run: pnpm run test:coverage

- name: Upload coverage to Codecov
if: matrix.node-version == 22
uses: codecov/codecov-action@v5
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: xwartz/cursor-api
Expand All @@ -56,26 +60,30 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'

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

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Build package
run: npm run build
run: pnpm run build

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/
path: packages/cursor-api/dist/

e2e-test:
runs-on: ubuntu-latest
needs: build
strategy:
matrix:
node-version: [18, 22, 24]
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v4
Expand All @@ -84,16 +92,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

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

- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: dist
path: dist/
path: packages/cursor-api/dist/

- name: Install dependencies
run: npm ci
run: pnpm install

- name: Run E2E tests
run: npm run test:e2e
run: pnpm run test:e2e
62 changes: 31 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,40 +10,40 @@ env:

jobs:
release:
name: Release
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'skip ci') }}
permissions:
contents: write
issues: write
pull-requests: write
id-token: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
persist-credentials: true

- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 22
cache: 'npm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm run test

- name: Build package
run: npm run build

- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm run release
- name: Checkout Repo
uses: actions/checkout@v4
with:
# This is important for semantic-release to be able to determine the last release
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
registry-url: 'https://registry.npmjs.org'

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

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

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
# This will run `pnpm run release` if a release should be published
publish: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ dist/
build/
.next/
out/
bin/

# Environment variables
.env
Expand Down
18 changes: 0 additions & 18 deletions .releaserc.json

This file was deleted.

Loading