Skip to content

Commit 38e78e3

Browse files
authored
[TW-4662] chore(react,ci): upgrade @nylas/web-elements to 2.5.0 (#51)
1 parent de36291 commit 38e78e3

File tree

5 files changed

+106
-128
lines changed

5 files changed

+106
-128
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@nylas/react": minor
3+
---
4+
5+
Upgrade @nylas/web-elements dependency to 2.5.0
6+
7+
### Minor Changes
8+
9+
- 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.
10+
11+
### Patch Changes
12+
13+
- Fixed `nylas-scheduler-editor` showing the configuration list in composable mode instead of rendering the slotted content
14+
- Fixed cancel and reschedule flows breaking when a booking ref was provided without a session ID by deferring scheduler initialization
15+
- 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.
16+
- 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.
17+
- 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
18+
- 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.
19+
- 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

.github/workflows/release.yml

Lines changed: 81 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,39 @@ on:
55
branches:
66
- main
77
workflow_dispatch:
8+
inputs:
9+
release_type:
10+
description: "Release type"
11+
required: true
12+
type: choice
13+
default: "snapshot"
14+
options:
15+
- "stable"
16+
- "snapshot"
17+
packages:
18+
description: "Packages to publish (snapshots only)"
19+
required: false
20+
type: choice
21+
default: "@nylas/react"
22+
options:
23+
- "@nylas/connect"
24+
- "@nylas/react"
25+
snapshot_tag:
26+
description: "Snapshot tag (snapshots only)"
27+
required: false
28+
default: "canary"
29+
type: choice
30+
options:
31+
- "canary"
32+
- "alpha"
33+
- "beta"
34+
- "snapshot"
35+
- "dev"
36+
37+
run-name: >-
38+
${{ inputs.release_type == 'snapshot'
39+
&& format('Snapshot: {0}@{1} by @{2}', inputs.packages, inputs.snapshot_tag, github.actor)
40+
|| 'Release' }}
841
942
# Prevent multiple releases from running at the same time
1043
concurrency: ${{ github.workflow }}-${{ github.ref }}
@@ -15,6 +48,7 @@ env:
1548
jobs:
1649
release:
1750
name: Release
51+
if: inputs.release_type != 'snapshot'
1852
runs-on: ubuntu-latest
1953
permissions:
2054
contents: write # to create release commits and tags
@@ -29,9 +63,7 @@ jobs:
2963
- name: Checkout code
3064
uses: actions/checkout@v4
3165
with:
32-
# Need full history for changesets
3366
fetch-depth: 0
34-
# Use a token that can trigger workflows (for release PR creation)
3567
token: ${{ secrets.SDK_RELEASE_PAT }}
3668

3769
- name: Setup Node.js
@@ -92,31 +124,66 @@ jobs:
92124
GITHUB_TOKEN: ${{ secrets.SDK_RELEASE_PAT }}
93125
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
94126
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} # do not remove this line (https://github.com/changesets/action/issues/98)
95-
PM_CONFIG_PROVENANCE: true
127+
NPM_CONFIG_PROVENANCE: true
96128

97-
# Slack notification job (only when packages are published)
98-
notify:
99-
name: Notify Slack
129+
snapshot:
130+
name: Publish Snapshot
131+
if: inputs.release_type == 'snapshot'
100132
runs-on: ubuntu-latest
101-
needs: release
102-
if: needs.release.outputs.published == 'true'
133+
permissions:
134+
contents: read
135+
id-token: write # for NPM provenance
136+
timeout-minutes: 15
103137

104138
steps:
105139
- name: Checkout code
106140
uses: actions/checkout@v4
107-
108-
- name: Setup Node.js
109-
uses: actions/setup-node@v4
110141
with:
111-
node-version: ${{ env.NODE_VERSION }}
142+
fetch-depth: 0
112143

113144
- name: Setup pnpm
114145
uses: pnpm/action-setup@v4
115146
with:
116147
run_install: false
117148

149+
- name: Setup Node.js
150+
uses: actions/setup-node@v4
151+
with:
152+
node-version: ${{ env.NODE_VERSION }}
153+
cache: pnpm
154+
registry-url: "https://registry.npmjs.org"
155+
118156
- name: Install dependencies
119157
run: pnpm install --frozen-lockfile
120158

121-
- name: Send Slack notification
122-
run: pnpm slack:notify '${{ needs.release.outputs.publishedPackages }}' ${{ secrets.SLACK_WEBHOOK_URL }}
159+
- name: Create snapshot version
160+
run: pnpm changeset version --snapshot ${{ inputs.snapshot_tag }}
161+
env:
162+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
163+
164+
- name: Build packages
165+
run: pnpm nx run-many -t build --parallel=3 --projects=${{ inputs.packages }}
166+
167+
- name: Publish snapshot
168+
run: |
169+
pnpm changeset publish --no-git-tag --snapshot --tag ${{ inputs.snapshot_tag }} | tee /tmp/changeset_publish.log
170+
171+
echo '### Published Snapshot Packages' >> $GITHUB_STEP_SUMMARY
172+
echo '' >> $GITHUB_STEP_SUMMARY
173+
174+
grep -oP '@nylas/\S+' /tmp/changeset_publish.log | grep '@[0-9]' | sort -u | \
175+
sed 's/^/- /' >> $GITHUB_STEP_SUMMARY || echo '- No packages published' >> $GITHUB_STEP_SUMMARY
176+
177+
echo '' >> $GITHUB_STEP_SUMMARY
178+
echo '<details><summary>Full publish log</summary>' >> $GITHUB_STEP_SUMMARY
179+
echo '' >> $GITHUB_STEP_SUMMARY
180+
echo '```' >> $GITHUB_STEP_SUMMARY
181+
cat /tmp/changeset_publish.log >> $GITHUB_STEP_SUMMARY
182+
echo '```' >> $GITHUB_STEP_SUMMARY
183+
echo '</details>' >> $GITHUB_STEP_SUMMARY
184+
env:
185+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
186+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
187+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
188+
NPM_CONFIG_PROVENANCE: true
189+

.github/workflows/snapshot.yml

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

packages/react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878
"dependencies": {
7979
"@nylas/connect": "workspace:^",
8080
"@nylas/core": "^1.2.0",
81-
"@nylas/web-elements": "2.4.1",
81+
"@nylas/web-elements": "2.5.0",
8282
"@stencil/react-output-target": "^1.2.0",
8383
"axios": "^1.7.7",
8484
"dayjs": "1.11.7",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)