Skip to content

Commit 34ec8b3

Browse files
committed
Merge PR #3184: patch @ewsjs/xhr to stop overwriting request errors
2 parents cd7539b + 03631c3 commit 34ec8b3

File tree

4 files changed

+186
-3
lines changed

4 files changed

+186
-3
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff --git a/dist/ntlmProvider.js b/dist/ntlmProvider.js
2+
index df9a914110df069ad0a7b3cd4d07461a23aeee2a..e2dc5e7d8cd2e64823fea9fc4ec32fc258a20063 100644
3+
--- a/dist/ntlmProvider.js
4+
+++ b/dist/ntlmProvider.js
5+
@@ -40,7 +40,11 @@ class NtlmProvider {
6+
delete opt['data'];
7+
delete opt['responseType'];
8+
try {
9+
- const response = await (0, axios_1.default)(opt).catch(err => err.response);
10+
+ const response = await (0, axios_1.default)(opt).catch(err => {
11+
+ if (err.response)
12+
+ return err.response;
13+
+ throw err;
14+
+ });
15+
if (!response.headers['www-authenticate'])
16+
throw new Error('www-authenticate not found on response of second request');
17+
let type2msg = (0, ntlm_client_1.decodeType2Message)(response.headers['www-authenticate']);
18+
diff --git a/src/ntlmProvider.ts b/src/ntlmProvider.ts
19+
index e6689cbef424452426ae46ca00cf34abcbb77b88..fb0a47127155229ab886adc39f1059e4ed2a2454 100644
20+
--- a/src/ntlmProvider.ts
21+
+++ b/src/ntlmProvider.ts
22+
@@ -51,7 +51,11 @@ export class NtlmProvider implements IProvider {
23+
delete opt['responseType'];
24+
25+
try {
26+
- const response = await axios(opt).catch(err => err.response);
27+
+ const response = await axios(opt).catch(err => {
28+
+ if (err.response)
29+
+ return err.response;
30+
+ throw err;
31+
+ });
32+
33+
if (!response.headers['www-authenticate'])
34+
throw new Error('www-authenticate not found on response of second request');

docs/alpha-release-process.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Alpha Release Process
2+
3+
This document describes how to create alpha releases for QA testing and early customer access.
4+
5+
## Overview
6+
7+
The Rocket.Chat Desktop app supports three release channels:
8+
- **Stable** (`latest`) - Production releases for all users
9+
- **Beta** - Pre-release testing with broader audience
10+
- **Alpha** - Early testing for QA and select customers
11+
12+
## How Channels Work
13+
14+
| Channel | Version Format | Who Gets It | Update File |
15+
|---------|---------------|-------------|-------------|
16+
| Stable | `4.12.0` | All users (default) | `latest.yml` |
17+
| Beta | `4.12.0-beta.1` | Beta opt-in users | `beta.yml` |
18+
| Alpha | `4.12.0-alpha.1` | Alpha opt-in users | `alpha.yml` |
19+
20+
**Channel hierarchy**: Alpha users receive alpha, beta, AND stable updates. Beta users receive beta AND stable. Stable users only receive stable.
21+
22+
## Creating an Alpha Release
23+
24+
### 1. Create Release Branch
25+
26+
```bash
27+
git checkout master
28+
git pull
29+
git checkout -b release/4.12.0-alpha.1
30+
```
31+
32+
### 2. Update Version
33+
34+
Edit `package.json`:
35+
```json
36+
{
37+
"version": "4.12.0-alpha.1"
38+
}
39+
```
40+
41+
### 3. Commit and Push
42+
43+
```bash
44+
git add package.json
45+
git commit -m "chore: bump version to 4.12.0-alpha.1"
46+
git push origin release/4.12.0-alpha.1
47+
```
48+
49+
### 4. Create and Push Tag
50+
51+
```bash
52+
git tag 4.12.0-alpha.1
53+
git push origin 4.12.0-alpha.1
54+
```
55+
56+
### 5. CI Builds Automatically
57+
58+
The GitHub Actions workflow triggers on tag push and:
59+
- Builds for all platforms (Windows, macOS, Linux)
60+
- Generates `alpha.yml`, `alpha-mac.yml`, `alpha-linux.yml` metadata
61+
- Creates a draft GitHub release marked as **Pre-release**
62+
- Publishes Linux snap to the `edge` channel
63+
64+
### 6. Publish the Release
65+
66+
1. Go to GitHub Releases
67+
2. Find the draft release for your version
68+
3. Review the release notes
69+
4. Click "Publish release"
70+
71+
## How Users Opt Into Alpha
72+
73+
### Option A: Developer Mode (Recommended for QA)
74+
75+
1. Open Settings in the app
76+
2. Enable **Developer Mode**
77+
3. Open **About** dialog (Help > About)
78+
4. Select **Alpha (Experimental)** from the Update Channel dropdown
79+
5. Click **Check for Updates**
80+
81+
The setting persists - users don't need to select it again.
82+
83+
### Option B: Configuration File (For Managed Deployments)
84+
85+
Create `update.json` in the user data directory:
86+
87+
| Platform | Location |
88+
|----------|----------|
89+
| Windows | `%APPDATA%\Rocket.Chat\update.json` |
90+
| macOS | `~/Library/Application Support/Rocket.Chat/update.json` |
91+
| Linux | `~/.config/Rocket.Chat/update.json` |
92+
93+
Content:
94+
```json
95+
{
96+
"channel": "alpha"
97+
}
98+
```
99+
100+
For enterprise deployments where you want to force the setting:
101+
```json
102+
{
103+
"channel": "alpha",
104+
"forced": true
105+
}
106+
```
107+
108+
## Version Numbering Guidelines
109+
110+
- **Alpha**: `4.12.0-alpha.1`, `4.12.0-alpha.2`, etc.
111+
- **Beta**: `4.12.0-beta.1`, `4.12.0-beta.2`, etc.
112+
- **Stable**: `4.12.0`
113+
114+
When promoting:
115+
- Alpha `4.12.0-alpha.5` → Beta `4.12.0-beta.1`
116+
- Beta `4.12.0-beta.3` → Stable `4.12.0`
117+
118+
## Safety Guarantees
119+
120+
- Stable users **never** see alpha releases (they check `latest.yml`, not `alpha.yml`)
121+
- Users must explicitly opt into alpha channel
122+
- Alpha releases are marked as "Pre-release" on GitHub
123+
- Users can switch back to stable at any time
124+
125+
## Troubleshooting
126+
127+
### Alpha update not showing
128+
129+
1. Verify the release is published (not draft)
130+
2. Check that `alpha.yml` exists in the release assets
131+
3. Ensure user has selected "Alpha" channel
132+
4. Check for updates manually via About dialog
133+
134+
### Checking current channel
135+
136+
In Developer Mode, open About dialog - the current channel is shown in the dropdown.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
"@emotion/css": "~11.11.2",
5757
"@emotion/react": "~11.11.3",
5858
"@emotion/styled": "~11.11.0",
59-
"@ewsjs/xhr": "~2.0.2",
59+
"@ewsjs/xhr": "patch:@ewsjs/xhr@npm%3A2.0.2#~/.yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch",
6060
"@rocket.chat/css-in-js": "~0.31.25",
6161
"@rocket.chat/desktop-api": "~1.1.0",
6262
"@rocket.chat/fuselage": "0.58.0",
@@ -156,6 +156,7 @@
156156
"resolutions": {
157157
"@fiahfy/icns-convert/sharp": "0.29.3",
158158
"@fiahfy/ico-convert/sharp": "0.29.3",
159+
"@ewsjs/xhr@npm:^2.0.2": "patch:@ewsjs/xhr@npm%3A2.0.2#~/.yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch",
159160
"cross-spawn": "7.0.6",
160161
"braces": "3.0.3",
161162
"ws": "8.18.0",

yarn.lock

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2019,7 +2019,7 @@ __metadata:
20192019
languageName: node
20202020
linkType: hard
20212021

2022-
"@ewsjs/xhr@npm:^2.0.2, @ewsjs/xhr@npm:~2.0.2":
2022+
"@ewsjs/xhr@npm:2.0.2":
20232023
version: 2.0.2
20242024
resolution: "@ewsjs/xhr@npm:2.0.2"
20252025
dependencies:
@@ -2031,6 +2031,18 @@ __metadata:
20312031
languageName: node
20322032
linkType: hard
20332033

2034+
"@ewsjs/xhr@patch:@ewsjs/xhr@npm%3A2.0.2#~/.yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch":
2035+
version: 2.0.2
2036+
resolution: "@ewsjs/xhr@patch:@ewsjs/xhr@npm%3A2.0.2#~/.yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch::version=2.0.2&hash=5c968f"
2037+
dependencies:
2038+
"@ewsjs/ntlm-client": "npm:^2.0.0"
2039+
axios: "npm:^1.6.0"
2040+
http-cookie-agent: "npm:^5.0.4"
2041+
tough-cookie: "npm:^4.1.3"
2042+
checksum: 10/bfd84076024b9e5b775903e1147076294cc131c9d5a69eb99f9d42b107832ae2e8c60423b856eb1cb8b538ebcc7e47d2c3917970e63538d8072ef615c4187322
2043+
languageName: node
2044+
linkType: hard
2045+
20342046
"@fastify/busboy@npm:^2.0.0":
20352047
version: 2.1.0
20362048
resolution: "@fastify/busboy@npm:2.1.0"
@@ -14881,7 +14893,7 @@ __metadata:
1488114893
"@emotion/css": "npm:~11.11.2"
1488214894
"@emotion/react": "npm:~11.11.3"
1488314895
"@emotion/styled": "npm:~11.11.0"
14884-
"@ewsjs/xhr": "npm:~2.0.2"
14896+
"@ewsjs/xhr": "patch:@ewsjs/xhr@npm%3A2.0.2#~/.yarn/patches/@ewsjs-xhr-npm-2.0.2-77506b0a6c.patch"
1488514897
"@fiahfy/icns-convert": "npm:~0.0.12"
1488614898
"@fiahfy/ico-convert": "npm:~0.0.12"
1488714899
"@kayahr/jest-electron-runner": "npm:29.14.0"

0 commit comments

Comments
 (0)