Skip to content

Commit dfb9b45

Browse files
Merge pull request #309 from Azure/main
Merge main into release/stable/v2 for v2.4.1 stable release
2 parents 6a46546 + 4d0863d commit dfb9b45

File tree

13 files changed

+731
-3130
lines changed

13 files changed

+731
-3130
lines changed
Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
---
2+
name: prepare-release
3+
description: Prepare a release for the Azure App Configuration JavaScript Provider. Use when user mentions release preparation, version bump, creating merge PRs, preview release, or stable release for this project.
4+
---
5+
6+
# Prepare Release
7+
8+
This skill automates the release preparation workflow for the [Azure App Configuration JavaScript Provider](https://github.com/Azure/AppConfiguration-JavaScriptProvider) project.
9+
10+
## When to Use This Skill
11+
12+
Use this skill when you need to:
13+
- Bump the package version for a new stable or preview release
14+
- Create merge PRs to sync branches (main → preview, main → release/stable, preview → release)
15+
- Prepare all the PRs needed before publishing a new release
16+
- Resolve merge conflicts between main and preview branches
17+
18+
## Background
19+
20+
### Repository Information
21+
- **GitHub Repo**: https://github.com/Azure/AppConfiguration-JavaScriptProvider
22+
- **Package Name**: `@azure/app-configuration-provider`
23+
24+
### Branch Structure
25+
- `main` – primary development branch for stable releases
26+
- `preview` – development branch for preview releases
27+
- `release/stable/v{major}` – release branch for stable versions (e.g., `release/stable/v2`)
28+
- `release/v{major}` – release branch for preview versions (e.g., `release/v2`)
29+
30+
### Version Files
31+
The version must be updated in **all four locations** simultaneously:
32+
1. `src/version.ts` – line 4: `export const VERSION = "<version>";`
33+
2. `package.json` – line 3: `"version": "<version>",`
34+
3. `package-lock.json` – line 3: `"version": "<version>",`
35+
4. `package-lock.json` – line 9: `"version": "<version>",`
36+
37+
### Version Format
38+
- **Stable**: `{major}.{minor}.{patch}` (e.g., `2.4.0`)
39+
- **Preview**: `{major}.{minor}.{patch}-preview` (e.g., `2.4.1-preview`)
40+
41+
## Quick Start
42+
43+
Ask the user whether this is a **stable** or **preview** release, and what the **new version number** should be. Then follow the appropriate workflow below.
44+
45+
---
46+
47+
### Workflow A: Stable Release
48+
49+
#### Step 1: Version Bump PR
50+
51+
Create a version bump PR targeting `main` by running the version bump script:
52+
53+
```bash
54+
./scripts/version-bump.sh <new_version>
55+
```
56+
57+
For example: `./scripts/version-bump.sh 2.5.0`
58+
59+
The script will automatically:
60+
1. Read the current version from `src/version.ts`.
61+
2. Create a new branch from `main` named `<username>/version-<new_version>` (e.g., `linglingye/version-2.5.0`).
62+
3. Update the version in all four files (`src/version.ts`, `package.json`, `package-lock.json` lines 3 and 9).
63+
4. Commit, push, and create a PR to `main` with title: `Version bump <new_version>`.
64+
65+
When the script prompts `Proceed? [y/N]`, confirm by entering `y`.
66+
67+
#### Step 2: Merge Main to Release Branch
68+
69+
After the version bump PR is merged, create a PR to merge `main` into the stable release branch by running:
70+
71+
```bash
72+
./scripts/merge-to-release.sh <new_version>
73+
```
74+
75+
For example: `./scripts/merge-to-release.sh 2.5.0`
76+
77+
When the script prompts `Proceed? [y/N]`, confirm by entering `y`.
78+
79+
> **Important**: Use "Merge commit" (not squash) when merging this PR to preserve commit history.
80+
81+
---
82+
83+
### Workflow B: Preview Release
84+
85+
#### Step 1: Merge Main to Preview (Conflict Resolution)
86+
87+
Create a PR to merge `main` into `preview`. This will likely have conflicts.
88+
89+
1. Fetch the latest `main` and `preview` branches.
90+
2. Create a new branch from `preview` named `<username>/resolve-conflict` (or similar).
91+
3. Merge `main` into this branch. If there are conflicts, inform the user and let them resolve manually.
92+
4. Push the branch and create a PR targeting `preview` with title: `Merge main to preview`.
93+
94+
> **Important**: Use "Merge commit" (not squash) when merging this PR.
95+
96+
**Sample PR**: https://github.com/Azure/AppConfiguration-JavaScriptProvider/pull/272
97+
98+
#### Step 2: Version Bump PR
99+
100+
After the merge-to-preview PR is merged, create a version bump PR targeting `preview` by running the version bump script with the `--preview` flag:
101+
102+
```bash
103+
./scripts/version-bump.sh <new_version> --preview
104+
```
105+
106+
For example: `./scripts/version-bump.sh 2.5.1-preview --preview`
107+
108+
When the script prompts `Proceed? [y/N]`, confirm by entering `y`.
109+
110+
#### Step 3: Merge Preview to Release Branch
111+
112+
After the version bump PR is merged, create a PR to merge `preview` into the preview release branch by running:
113+
114+
```bash
115+
./scripts/merge-to-release.sh <new_version> --preview
116+
```
117+
118+
For example: `./scripts/merge-to-release.sh 2.5.1-preview --preview`
119+
120+
When the script prompts `Proceed? [y/N]`, confirm by entering `y`.
121+
122+
> **Important**: Use "Merge commit" (not squash) when merging this PR.
123+
124+
---
125+
126+
## Review Checklist
127+
128+
Each PR should be reviewed with the following checks:
129+
- [ ] Version is updated consistently across all 3 files
130+
- [ ] No unintended file changes are included
131+
- [ ] Merge PRs use **merge commit** strategy (not squash)
132+
- [ ] Branch names follow the naming conventions
133+
- [ ] All CI checks pass

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,4 +410,4 @@ types/
410410
*.tgz
411411

412412
# examples
413-
examples/package-lock.json
413+
examples/*/package-lock.json

examples/console-app/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ To run the examples using the published version of the package:
3131
npm install
3232
```
3333

34+
This will install all required packages listed in `package.json` with their latest compatible versions.
35+
3436
2. There are two ways to run the examples using correct credentials:
3537

3638
- Edit the file `.env.template`, adding the access keys to your App Configuration store. and rename the file from `.env.template` to just `.env`. The examples will read this file automatically.

0 commit comments

Comments
 (0)