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
56 changes: 45 additions & 11 deletions .github/workflows/pr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,38 +4,35 @@ on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
# Also run on pushes to main for consistency
push:
branches: [main]

# Cancel in-progress runs for the same PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: ${{ vars.NODE_VERSION }}

jobs:
test:
name: Test Suite
# Code quality checks (fast, no build required)
quality:
name: Code Quality
runs-on: ubuntu-latest
timeout-minutes: 15

timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
# Fetch full history for Nx affected commands (optional optimization)
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"
node-version: ${{ env.NODE_VERSION }}

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "10.6.3"
run_install: false

- name: Get pnpm store directory
Expand Down Expand Up @@ -63,6 +60,43 @@ jobs:
- name: Check formatting
run: pnpm format:check

# Build and test (slower, runs in parallel with quality)
test:
name: Build & Test
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

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

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-

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

- name: Build packages
run: pnpm build

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ on:
# Prevent multiple releases from running at the same time
concurrency: ${{ github.workflow }}-${{ github.ref }}

env:
NODE_VERSION: ${{ vars.NODE_VERSION }}

jobs:
release:
name: Release
Expand All @@ -31,13 +34,12 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION }}
registry-url: "https://registry.npmjs.org"

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "10.6.3"
run_install: false

- name: Get pnpm store directory
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ on:
run-name: "Publishing ${{ inputs.snapshot_tag }} for ${{ inputs.packages }} to ${{ inputs.environment }} by @${{ github.actor }}"

env:
NODE_VERSION: 22.12.0
PNPM_VERSION: 10.7.1
NODE_VERSION: ${{ vars.NODE_VERSION }}
IS_CI: true

permissions:
Expand All @@ -52,9 +51,8 @@ jobs:
fetch-depth: 0

# Setup Node.js and pnpm
- uses: pnpm/action-setup@v3
- uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
run_install: false

- name: Install Node.js
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ Modern, secure OAuth connection library for Nylas APIs.
npm install @nylas/connect
```

### [`@nylas/react`](./packages/react/)

React components and hooks for Nylas API integration.

- **TypeScript-first** with full type safety
- Works with React 18 and 19
- Pre-built UI components for email, calendar, and contacts
- OAuth connection hooks and utilities
- Modular exports for tree-shaking

[**📖 Documentation →**](./packages/react/README.md)

```bash
npm install @nylas/react
```

---

## 🛠 Development
Expand Down
1 change: 1 addition & 0 deletions nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"targetDefaults": {
"build": {
"cache": true,
"dependsOn": ["^build"],
"inputs": ["default", "^default"],
"outputs": ["{projectRoot}/dist"]
},
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": ">=22.0.0",
"pnpm": ">=9.0.0"
},
"packageManager": "pnpm@10.6.3",
"packageManager": "pnpm@10.7.1",
"scripts": {
"build": "nx run-many -t build",
"test": "nx run-many -t test",
Expand Down
6 changes: 5 additions & 1 deletion packages/nylas-connect/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@
],
"repository": {
"type": "git",
"url": "git+https://github.com/nylas/nylas.git"
"url": "git+https://github.com/nylas/javascript.git"
},
"bugs": {
"url": "https://github.com/nylas/javascript/issues"
},
"homepage": "https://github.com/nylas/javascript#readme",
"author": "Nylas Inc.",
"license": "MIT",
"publishConfig": {
Expand Down
6 changes: 5 additions & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@
},
"repository": {
"type": "git",
"url": "git+https://github.com/nylas/nylas.git"
"url": "git+https://github.com/nylas/javascript.git"
},
"bugs": {
"url": "https://github.com/nylas/javascript/issues"
},
"homepage": "https://github.com/nylas/javascript#readme",
"keywords": [
"nylas",
"react",
Expand Down