Skip to content

Commit cf7283d

Browse files
authored
V8.0.5 release (#721)
1 parent 8ecd912 commit cf7283d

6 files changed

Lines changed: 195 additions & 4 deletions

File tree

Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
---
2+
name: nylas-nodejs-release
3+
description: >-
4+
Prepares nylas-nodejs SDK releases on a versioned release branch with CHANGELOG
5+
updates, version bump, git tag, and PR body. Stops for the maintainer to run
6+
npm publish, then after confirmation creates the GitHub Release from the tag.
7+
Use when the user wants to ship a new SDK version, cut a release branch, update
8+
CHANGELOG.md, npm version, tag, open a release PR, publish to npm, or create a
9+
GitHub Release.
10+
---
11+
12+
# nylas-nodejs SDK release
13+
14+
Automate **everything up to npm publish** and **GitHub Release creation after merge**, with explicit **human checkpoints** for publishing and confirmation.
15+
16+
## Principles
17+
18+
- **Never** commit or paste npm tokens, `.npmrc` secrets, or session credentials. Publishing uses `npm login` on the maintainer’s machine only.
19+
- **Release branch name**: `vX.Y.Z-release` (example: `v8.0.5-release`).
20+
- **CHANGELOG** follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) at repo root: `CHANGELOG.md`.
21+
- **Traceability**: Each changelog line should reference the relevant **PR**, **commit(s)**, and **closed issues** where applicable (see PR description template below).
22+
23+
## When the user starts a release
24+
25+
Ask for (if not already given):
26+
27+
1. Target **semver** `X.Y.Z` (no leading `v` in the version number for `package.json`).
28+
2. **Release date** for the changelog (ISO-style: `YYYY-MM-DD`).
29+
3. Whether this is **latest** or **canary** (see [reference.md](reference.md) for canary/dist-tag).
30+
31+
---
32+
33+
## Phase 1 — Branch and changelog (agent)
34+
35+
1. Ensure work is based on **`main`** with intended changes already merged (or document what is included).
36+
2. Create and checkout **`vX.Y.Z-release`** from `main`:
37+
- `git fetch origin main && git checkout -b vX.Y.Z-release origin/main`
38+
3. **CHANGELOG.md**:
39+
- If there is an `## [Unreleased]` section: rename it to `## [X.Y.Z] - YYYY-MM-DD` and fill sections (**Added** / **Changed** / **Fixed** / **Breaking change**, etc.).
40+
- If there is no Unreleased section: add a new top section after the intro paragraphs:
41+
- `## [X.Y.Z] - YYYY-MM-DD`
42+
- Match existing style (see recent entries in `CHANGELOG.md`).
43+
- For each bullet, include PR/issue links like `([#NNN](https://github.com/nylas/nylas-nodejs/pull/NNN))` where possible.
44+
4. Commit: `chore(release): prepare vX.Y.Z` (or team convention).
45+
5. Push the branch: `git push -u origin vX.Y.Z-release`.
46+
47+
**Stop and show** the user: branch name, diff summary, and the new changelog section.
48+
49+
---
50+
51+
## Phase 2 — Version, tag, PR (agent; user may need to run commands locally)
52+
53+
1. **Pre-flight before `npm run build` / publish**: Confirm there are **no test files** under `src/` that would ship in the package (team rule).
54+
2. Run **`npm version X.Y.Z`** (semver only; no `v` prefix in the command argument).
55+
- This bumps `package.json`, runs the `version` lifecycle script (`export-version` updates `src/version.ts` for the User-Agent), creates a **commit**, and a **git tag** `vX.Y.Z` (default npm tag prefix).
56+
3. Push branch and tags:
57+
- `git push origin vX.Y.Z-release`
58+
- `git push origin vX.Y.Z` (or `git push origin --tags` if that is the team norm—prefer pushing the explicit tag to avoid stray tags).
59+
60+
**Open a PR** `vX.Y.Z-release``main` with this **description template**:
61+
62+
```markdown
63+
## Release vX.Y.Z (YYYY-MM-DD)
64+
65+
### Changelog
66+
67+
[Paste the full `## [X.Y.Z] - YYYY-MM-DD` section from CHANGELOG.md]
68+
69+
### References
70+
71+
For each line above, link the implementing commits and closed issues (example pattern):
72+
73+
- **Summary of the change** — commit `abc1234` / PR #123 / closes #456
74+
75+
(Add community / contributor credits if applicable.)
76+
```
77+
78+
Ask the user to wait for **CI green** on the PR.
79+
80+
4. After CI passes, run **`npm run build`** on the release branch to validate the artifact locally.
81+
82+
**Checkpoint — npm publish (maintainer only)**
83+
Tell the user clearly:
84+
85+
- Publishing requires **npm credentials** with publish rights, configured via **`npm login`** on their machine (see [reference.md](reference.md) for prerequisites). Do not store secrets in the repo.
86+
- They should run **`npm publish`** (or **`npm publish --tag canary`** for canary) from the clean release branch **after** CI passes and build is verified.
87+
- They should verify the package on npm when done.
88+
89+
**Wait** until the user explicitly confirms both:
90+
91+
1. **npm**: “The package is published (and dist-tag is correct).”
92+
2. **Git**: “The release PR is merged to `main`.”
93+
94+
Do **not** create the GitHub Release until both are confirmed.
95+
96+
---
97+
98+
## Phase 3 — GitHub Release (agent, after confirmation)
99+
100+
Only after the user confirms **published + PR merged**:
101+
102+
1. Ensure local `main` is up to date: `git fetch origin main && git checkout main && git pull origin main`.
103+
2. Verify tag `vX.Y.Z` exists on the remote (merged release flow should have the tag from `npm version`; if not, stop and ask).
104+
3. Create the GitHub Release **from tag `vX.Y.Z`** with:
105+
- **Title**: `vX.Y.Z` (or `nylas vX.Y.Z` to match past releases).
106+
- **Body**: Same changelog content and PR/issue/commit references as the merged PR; tag community contributors for credit when applicable.
107+
108+
Prefer the **`gh` CLI** when available:
109+
110+
```bash
111+
gh release create "vX.Y.Z" --title "vX.Y.Z" --notes-file - <<'EOF'
112+
<Paste release notes; same as PR/changelog>
113+
EOF
114+
```
115+
116+
If `gh` is not available, give exact **GitHub UI** steps: Repository → Releases → Draft a new release → choose tag `vX.Y.Z` → paste notes.
117+
118+
---
119+
120+
## Copy-paste checklist
121+
122+
Track progress in the chat:
123+
124+
```text
125+
Phase 1 — Prep
126+
- [ ] Branch vX.Y.Z-release from main
127+
- [ ] CHANGELOG [X.Y.Z] section complete with links
128+
- [ ] Pushed branch
129+
130+
Phase 2 — Version & PR
131+
- [ ] No stray tests under src/
132+
- [ ] npm version X.Y.Z (version.ts + tag)
133+
- [ ] Pushed branch + tag
134+
- [ ] PR opened with changelog + references
135+
- [ ] CI green; npm run build OK
136+
- [ ] User ran npm publish (or canary)
137+
- [ ] User confirmed published + PR merged
138+
139+
Phase 3 — GitHub
140+
- [ ] gh release create (or UI) from vX.Y.Z with full notes
141+
```
142+
143+
---
144+
145+
## Additional topics
146+
147+
- Canary releases, promoting `latest`, and verifying npm: [reference.md](reference.md)
148+
- Example release PR style: https://github.com/nylas/nylas-nodejs/pull/590
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# nylas-nodejs release — reference
2+
3+
## Prerequisites (maintainer machine)
4+
5+
- **npm**: Account with **publish** rights to the `nylas` package on npm.
6+
- Configure credentials with **`npm login`** on the machine used to publish. Do not commit tokens, session strings, or `.npmrc` secrets to the repository.
7+
- Obtain credentials through your **organization’s approved** credential process (e.g. team password manager). Never paste secrets into chat or commit them.
8+
9+
## Canary releases
10+
11+
```bash
12+
npm publish --tag canary
13+
```
14+
15+
### Promote a canary to latest
16+
17+
```bash
18+
npm dist-tag add nylas@X.Y.Z latest
19+
```
20+
21+
Replace `X.Y.Z` with the published version.
22+
23+
### Verify on npm
24+
25+
Open https://www.npmjs.com/package/nylas and confirm **latest** (or **canary**) matches the intended version.
26+
27+
## GitHub Release notes
28+
29+
Mirror the **merged PR description**: same changelog text, PR/issue/commit references, and contributor credits as in the PR.
30+
31+
## Version script behavior
32+
33+
`npm version` runs the `version` script in `package.json`, which refreshes `src/version.ts` via `scripts/exportVersion.js` for the SDK User-Agent string.
34+
35+
## Safety
36+
37+
- Confirm **no test files** under `src/` before build/publish if that would ship unwanted files.
38+
- Prefer **explicit push** of the release tag rather than pushing all local tags.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [8.0.5] - 2026-03-23
9+
10+
### Added
11+
- Add scheduling availability API: `scheduler.availability.get()` for `/v3/scheduling/availability` ([#720](https://github.com/nylas/nylas-nodejs/pull/720))
12+
813
## [8.0.4] - 2026-03-18
914

1015
### Added

package-lock.json

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nylas",
3-
"version": "8.0.4",
3+
"version": "8.0.5",
44
"description": "A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.",
55
"main": "lib/cjs/nylas.js",
66
"types": "lib/types/nylas.d.ts",

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
// This file is generated by scripts/exportVersion.js
2-
export const SDK_VERSION = '8.0.4';
2+
export const SDK_VERSION = '8.0.5';

0 commit comments

Comments
 (0)