diff --git a/.changeset/upgrade-web-elements-2-5-0.md b/.changeset/upgrade-web-elements-2-5-0.md
new file mode 100644
index 0000000..7fe3ed2
--- /dev/null
+++ b/.changeset/upgrade-web-elements-2-5-0.md
@@ -0,0 +1,19 @@
+---
+"@nylas/react": minor
+---
+
+Upgrade @nylas/web-elements dependency to 2.5.0
+
+### Minor Changes
+
+- Added `nylasSchedulerEditorError` event to `nylas-scheduler-editor` that captures and re-emits errors from child components. In React, use the `onNylasSchedulerEditorError` prop to handle errors from the editor and its children in a single place.
+
+### Patch Changes
+
+- Fixed `nylas-scheduler-editor` showing the configuration list in composable mode instead of rendering the slotted content
+- Fixed cancel and reschedule flows breaking when a booking ref was provided without a session ID by deferring scheduler initialization
+- Fixed cancel after reschedule failing because stale booking IDs were retained. After rescheduling (which creates new booking IDs), the scheduler now correctly updates to the new IDs so subsequent cancel operations target the rescheduled booking.
+- Fixed participant availability and booking calendars not populating when editing an existing configuration due to a prop ordering race condition. Also fixed round-robin participants incorrectly showing the organizer's calendars instead of their own.
+- Fixed participant search in the scheduler editor: search results are now properly added to the participant options store, the dropdown no longer disappears prematurely when selecting a result, and the currently-edited participant row is excluded from duplicate filtering
+- Fixed a bug where the organizer participant's grant_id was dropped when saving a scheduler configuration. The grant_id is now preserved for both organizer and non-organizer participants during edit and save operations. Additionally, async participants added via search or fetch callbacks can now optionally include a grant_id that flows through to the saved configuration.
+- Fixed round-robin configurations not correctly identifying the organizer, which could cause calendar selection and booking calendar assignment to fail when editing an existing round-robin config
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 323f1d3..d785023 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -5,6 +5,39 @@ on:
branches:
- main
workflow_dispatch:
+ inputs:
+ release_type:
+ description: "Release type"
+ required: true
+ type: choice
+ default: "snapshot"
+ options:
+ - "stable"
+ - "snapshot"
+ packages:
+ description: "Packages to publish (snapshots only)"
+ required: false
+ type: choice
+ default: "@nylas/react"
+ options:
+ - "@nylas/connect"
+ - "@nylas/react"
+ snapshot_tag:
+ description: "Snapshot tag (snapshots only)"
+ required: false
+ default: "canary"
+ type: choice
+ options:
+ - "canary"
+ - "alpha"
+ - "beta"
+ - "snapshot"
+ - "dev"
+
+run-name: >-
+ ${{ inputs.release_type == 'snapshot'
+ && format('Snapshot: {0}@{1} by @{2}', inputs.packages, inputs.snapshot_tag, github.actor)
+ || 'Release' }}
# Prevent multiple releases from running at the same time
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -15,6 +48,7 @@ env:
jobs:
release:
name: Release
+ if: inputs.release_type != 'snapshot'
runs-on: ubuntu-latest
permissions:
contents: write # to create release commits and tags
@@ -29,9 +63,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
with:
- # Need full history for changesets
fetch-depth: 0
- # Use a token that can trigger workflows (for release PR creation)
token: ${{ secrets.SDK_RELEASE_PAT }}
- name: Setup Node.js
@@ -92,31 +124,66 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SDK_RELEASE_PAT }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # do not remove this line (https://github.com/changesets/action/issues/98)
- PM_CONFIG_PROVENANCE: true
+ NPM_CONFIG_PROVENANCE: true
- # Slack notification job (only when packages are published)
- notify:
- name: Notify Slack
+ snapshot:
+ name: Publish Snapshot
+ if: inputs.release_type == 'snapshot'
runs-on: ubuntu-latest
- needs: release
- if: needs.release.outputs.published == 'true'
+ permissions:
+ contents: read
+ id-token: write # for NPM provenance
+ timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
with:
- node-version: ${{ env.NODE_VERSION }}
+ fetch-depth: 0
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: ${{ env.NODE_VERSION }}
+ cache: pnpm
+ registry-url: "https://registry.npmjs.org"
+
- name: Install dependencies
run: pnpm install --frozen-lockfile
- - name: Send Slack notification
- run: pnpm slack:notify '${{ needs.release.outputs.publishedPackages }}' ${{ secrets.SLACK_WEBHOOK_URL }}
+ - name: Create snapshot version
+ run: pnpm changeset version --snapshot ${{ inputs.snapshot_tag }}
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+ - name: Build packages
+ run: pnpm nx run-many -t build --parallel=3 --projects=${{ inputs.packages }}
+
+ - name: Publish snapshot
+ run: |
+ pnpm changeset publish --no-git-tag --snapshot --tag ${{ inputs.snapshot_tag }} | tee /tmp/changeset_publish.log
+
+ echo '### Published Snapshot Packages' >> $GITHUB_STEP_SUMMARY
+ echo '' >> $GITHUB_STEP_SUMMARY
+
+ grep -oP '@nylas/\S+' /tmp/changeset_publish.log | grep '@[0-9]' | sort -u | \
+ sed 's/^/- /' >> $GITHUB_STEP_SUMMARY || echo '- No packages published' >> $GITHUB_STEP_SUMMARY
+
+ echo '' >> $GITHUB_STEP_SUMMARY
+ echo 'Full publish log
' >> $GITHUB_STEP_SUMMARY
+ echo '' >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ cat /tmp/changeset_publish.log >> $GITHUB_STEP_SUMMARY
+ echo '```' >> $GITHUB_STEP_SUMMARY
+ echo ' ' >> $GITHUB_STEP_SUMMARY
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
+ NPM_CONFIG_PROVENANCE: true
+
diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml
deleted file mode 100644
index 0d14617..0000000
--- a/.github/workflows/snapshot.yml
+++ /dev/null
@@ -1,108 +0,0 @@
-name: Publish snapshot
-
-on:
- workflow_dispatch:
- inputs:
- packages:
- required: true
- description: "The packages to publish (e.g. @nylas/connect, @nylas/react)"
- type: choice
- options:
- - "@nylas/connect"
- - "@nylas/react"
- snapshot_tag:
- description: "Snapshot tag (e.g., alpha, beta, canary, dev)"
- required: true
- default: "canary"
- type: choice
- options:
- - "canary"
- - "alpha"
- - "beta"
- - "snapshot"
- - "dev"
- environment:
- required: true
- type: choice
- options:
- - "staging"
- - "production"
- default: "production"
- description: "The environment to publish to (staging or production)"
-run-name: "Publishing ${{ inputs.snapshot_tag }} for ${{ inputs.packages }} to ${{ inputs.environment }} by @${{ github.actor }}"
-
-env:
- NODE_VERSION: ${{ vars.NODE_VERSION }}
- IS_CI: true
-
-permissions:
- contents: read
- id-token: write # needed for provenance data generation
-
-jobs:
- publish-snapshot:
- runs-on: blacksmith-2vcpu-ubuntu-2404
- environment: ${{ inputs.environment }}
- steps:
- # Checkout the repo
- - name: Checkout
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
-
- # Setup Node.js and pnpm
- - uses: pnpm/action-setup@v4
- with:
- run_install: false
-
- - name: Install Node.js
- uses: actions/setup-node@v4
- with:
- node-version: ${{ env.NODE_VERSION }}
- cache: pnpm
- registry-url: "https://registry.npmjs.org"
-
- # Install dependencies
- - name: Install dependencies
- run: pnpm install --frozen-lockfile
-
- # Create snapshot version
- - name: Create snapshot version
- run: pnpm changeset version --snapshot ${{ inputs.snapshot_tag }} && pnpm -r generate:version && git add --all
- env:
- GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
-
- # Build packages
- - name: Build packages
- run: pnpm nx run-many -t build --parallel=3 --projects=${{ inputs.packages }}
- env:
- IMAGE_TAG: ${{ inputs.snapshot_tag }}
-
- # Publish snapshot to npm and output release tags to $GITHUB_STEP_SUMMARY
- - name: Publish snapshot
- run: |
- # Publish packages and capture output
- pnpm changeset publish --no-git-tag --snapshot --tag ${{ inputs.snapshot_tag }} | tee /tmp/changeset_publish.log
-
- # Add formatted output to GitHub step summary
- echo '### 📦 Published Snapshot Packages' >> $GITHUB_STEP_SUMMARY
- echo '' >> $GITHUB_STEP_SUMMARY
-
- # Extract and display only the published package versions
- grep -Eo '🦋[[:space:]]+(@nylas/(connect|react)@[0-9]+\.[0-9]+\.[0-9]+-[a-zA-Z0-9]+)' /tmp/changeset_publish.log | \
- sed 's/🦋[[:space:]]\+/- /' >> $GITHUB_STEP_SUMMARY || echo '- No packages published' >> $GITHUB_STEP_SUMMARY
-
- # Optionally add full log in a collapsible section
- echo '' >> $GITHUB_STEP_SUMMARY
- echo '📋 Full publish log
' >> $GITHUB_STEP_SUMMARY
- echo '' >> $GITHUB_STEP_SUMMARY
- echo '```' >> $GITHUB_STEP_SUMMARY
- cat /tmp/changeset_publish.log >> $GITHUB_STEP_SUMMARY
- echo '```' >> $GITHUB_STEP_SUMMARY
- echo ' ' >> $GITHUB_STEP_SUMMARY
- env:
- GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
- NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
diff --git a/packages/react/package.json b/packages/react/package.json
index 6853589..3e10954 100644
--- a/packages/react/package.json
+++ b/packages/react/package.json
@@ -78,7 +78,7 @@
"dependencies": {
"@nylas/connect": "workspace:^",
"@nylas/core": "^1.2.0",
- "@nylas/web-elements": "2.4.1",
+ "@nylas/web-elements": "2.5.0",
"@stencil/react-output-target": "^1.2.0",
"axios": "^1.7.7",
"dayjs": "1.11.7",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index dd401df..277d244 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -61,8 +61,8 @@ importers:
specifier: ^1.2.0
version: 1.2.0(@stencil/core@4.36.3)
'@nylas/web-elements':
- specifier: 2.4.1
- version: 2.4.1(rollup@4.50.1)
+ specifier: 2.5.0
+ version: 2.5.0(rollup@4.50.1)
'@stencil/react-output-target':
specifier: ^1.2.0
version: 1.2.0(@stencil/core@4.36.3)(@types/react@19.2.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)
@@ -676,8 +676,8 @@ packages:
'@nylas/identity@3.1.0':
resolution: {integrity: sha512-EBW17UBAvsj1cT+BEbawdce9Uy04IsElr8hJJRB3lf8Aod/icdn0mxWdWCyCNrjW6fhRwz0Cv3Sh88DbTbC7yA==}
- '@nylas/web-elements@2.4.1':
- resolution: {integrity: sha512-uPyPIHxzwhmXig4JaKdtsuLdKrPMF9jj2pbZ488ANsZlsiKuVeUfVR1Q82eGocK6Kz+lUInLNr3806QVeQhiKQ==}
+ '@nylas/web-elements@2.5.0':
+ resolution: {integrity: sha512-NILpDdwUgYorLrMcr8z9wnkJ2RzSTfZ5+5Z5YZqBhcNL0oM/Kddro5ItdlwUDsZks+nw287pxHtCUF7ChJcwXQ==}
'@oxlint/darwin-arm64@1.16.0':
resolution: {integrity: sha512-t9sBjbcG15Jgwgw2wY+rtfKEazdkKM/YhcdyjmGYeSjBXaczLfp/gZe03taC2qUHK+t6cxSYNkOLXRLWxaf3tw==}
@@ -3731,7 +3731,7 @@ snapshots:
react: 18.2.0
uuid: 8.3.2
- '@nylas/web-elements@2.4.1(rollup@4.50.1)':
+ '@nylas/web-elements@2.5.0(rollup@4.50.1)':
dependencies:
'@fullcalendar/core': 6.1.8
'@fullcalendar/daygrid': 6.1.8(@fullcalendar/core@6.1.8)