Skip to content

Commit e47f558

Browse files
authored
build: Release (#2928)
2 parents a622dd7 + 928590e commit e47f558

30 files changed

Lines changed: 3960 additions & 3781 deletions

changelogs/CHANGELOG_alpha.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
# [8.2.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/8.2.0-alpha.1...8.2.0-alpha.2) (2026-02-20)
2+
3+
4+
### Features
5+
6+
* Add request header `X-Parse-Upload-Mode` to identify file upload as binary data via `Buffer`, `Readable`, `ReadableStream` ([#2927](https://github.com/parse-community/Parse-SDK-JS/issues/2927)) ([a66bb06](https://github.com/parse-community/Parse-SDK-JS/commit/a66bb06116f5d4f944372feafef8d630de1fae77))
7+
8+
# [8.2.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.6...8.2.0-alpha.1) (2026-02-20)
9+
10+
11+
### Features
12+
13+
* Add support for file upload as binary data via `Buffer`, `Readable`, `ReadableStream` ([#2925](https://github.com/parse-community/Parse-SDK-JS/issues/2925)) ([e42caf6](https://github.com/parse-community/Parse-SDK-JS/commit/e42caf65ff7c5ea16043e7eac6ac92c13638aca3))
14+
15+
## [8.1.1-alpha.6](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.5...8.1.1-alpha.6) (2026-02-11)
16+
17+
18+
### Bug Fixes
19+
20+
* `Parse.serverURL` not accessible via global `Parse` scope ([#2917](https://github.com/parse-community/Parse-SDK-JS/issues/2917)) ([4e78681](https://github.com/parse-community/Parse-SDK-JS/commit/4e78681881320a0b8ec383955b47d693cb8add9c))
21+
22+
## [8.1.1-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.4...8.1.1-alpha.5) (2026-02-11)
23+
24+
25+
### Bug Fixes
26+
27+
* Type error in `Parse.Query.equalTo` when matching optional array ([#2901](https://github.com/parse-community/Parse-SDK-JS/issues/2901)) ([8c96da9](https://github.com/parse-community/Parse-SDK-JS/commit/8c96da9d507dfd61c907f88861e5233807e7ba36))
28+
29+
## [8.1.1-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.3...8.1.1-alpha.4) (2026-02-09)
30+
31+
32+
### Bug Fixes
33+
34+
* Missing or incorrect type exports ([#2909](https://github.com/parse-community/Parse-SDK-JS/issues/2909)) ([3caa4ec](https://github.com/parse-community/Parse-SDK-JS/commit/3caa4ec995e0cc02082e55e9873e12b3bc10393f))
35+
36+
## [8.1.1-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.2...8.1.1-alpha.3) (2026-02-07)
37+
38+
39+
### Bug Fixes
40+
41+
* Cloud trigger type errors for void returns and subclass constructors ([#2904](https://github.com/parse-community/Parse-SDK-JS/issues/2904)) ([de9f56d](https://github.com/parse-community/Parse-SDK-JS/commit/de9f56d77cca9d86c7035136834673cc0d1dfb17))
42+
43+
## [8.1.1-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.1-alpha.1...8.1.1-alpha.2) (2026-02-07)
44+
45+
46+
### Bug Fixes
47+
48+
* `Parse.Object.createWithoutData` doesn't preserve object subclass ([#2907](https://github.com/parse-community/Parse-SDK-JS/issues/2907)) ([01dc94d](https://github.com/parse-community/Parse-SDK-JS/commit/01dc94d6647d2711d3a865c20935604b24083ed1))
49+
50+
## [8.1.1-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/8.1.0...8.1.1-alpha.1) (2026-02-07)
51+
52+
53+
### Bug Fixes
54+
55+
* `Parse.Query.and/or/nor` loosing custom class types ([#2903](https://github.com/parse-community/Parse-SDK-JS/issues/2903)) ([89fdb07](https://github.com/parse-community/Parse-SDK-JS/commit/89fdb076580f3a9f2fb0106270a6879526eaaacf))
56+
157
# [8.1.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/8.0.4-alpha.1...8.1.0-alpha.1) (2026-02-05)
258

359

integration/test/ParseFileTest.js

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict';
22

33
const assert = require('assert');
4+
const { Readable } = require('stream');
45
const Parse = require('../../node');
56

67
describe('Parse.File', () => {
@@ -144,6 +145,69 @@ describe('Parse.File', () => {
144145
}
145146
});
146147

148+
it('can save file from Buffer', async () => {
149+
const data = Buffer.from([61, 170, 236, 120]);
150+
const file = new Parse.File('buffer-file.bin', data);
151+
await file.save();
152+
153+
assert(file.url());
154+
assert(file.name());
155+
156+
const object = new Parse.Object('TestObject');
157+
object.set('file', file);
158+
await object.save();
159+
160+
const query = new Parse.Query('TestObject');
161+
const result = await query.get(object.id);
162+
assert.equal(result.get('file').name(), file.name());
163+
assert.equal(result.get('file').url(), file.url());
164+
165+
const retrieved = await file.getData();
166+
assert.equal(retrieved, data.toString('base64'));
167+
});
168+
169+
it('can save file from Buffer with content type', async () => {
170+
const data = Buffer.from('hello world');
171+
const file = new Parse.File('hello.txt', data, 'text/plain');
172+
await file.save();
173+
174+
assert(file.url());
175+
const retrieved = await file.getData();
176+
assert.equal(Buffer.from(retrieved, 'base64').toString(), 'hello world');
177+
});
178+
179+
it('can save file from Readable stream', async () => {
180+
const data = Buffer.from([61, 170, 236, 120]);
181+
const stream = Readable.from(data);
182+
const file = new Parse.File('stream-file.bin', stream);
183+
await file.save();
184+
185+
assert(file.url());
186+
assert(file.name());
187+
188+
const object = new Parse.Object('TestObject');
189+
object.set('file', file);
190+
await object.save();
191+
192+
const query = new Parse.Query('TestObject');
193+
const result = await query.get(object.id);
194+
assert.equal(result.get('file').name(), file.name());
195+
assert.equal(result.get('file').url(), file.url());
196+
197+
const retrieved = await file.getData();
198+
assert.equal(retrieved, data.toString('base64'));
199+
});
200+
201+
it('can save file from Readable stream with content type', async () => {
202+
const stream = Readable.from(Buffer.from('hello world'));
203+
const file = new Parse.File('hello.txt', stream, 'text/plain');
204+
await file.save();
205+
206+
assert(file.url());
207+
const retrieved = await file.getData();
208+
assert.equal(Buffer.from(retrieved, 'base64').toString(), 'hello world');
209+
});
210+
147211
it('can save file to localDatastore', async () => {
148212
Parse.enableLocalDatastore();
149213
const file = new Parse.File('parse-js-sdk', [61, 170, 236, 120]);

integration/test/helper.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ const fs = require('fs').promises;
1212
const path = require('path');
1313
const dns = require('dns');
1414
const MockEmailAdapterWithOptions = require('./support/MockEmailAdapterWithOptions');
15+
const MockPushAdapter = require('./support/MockPushAdapter');
1516

1617
// Ensure localhost resolves to ipv4 address first on node v17+
1718
if (dns.setDefaultResultOrder) {
@@ -68,10 +69,7 @@ const defaultConfiguration = {
6869
verbose: false,
6970
silent: true,
7071
push: {
71-
android: {
72-
senderId: 'yolo',
73-
apiKey: 'yolo',
74-
},
72+
adapter: MockPushAdapter,
7573
},
7674
idempotencyOptions: {
7775
paths: ['functions/CloudFunctionIdempotency', 'jobs/CloudJob1', 'jobs/CloudJobParamsInMessage', 'classes/IdempotentTest'],
@@ -85,7 +83,10 @@ const defaultConfiguration = {
8583
revokeSessionOnPasswordReset: false,
8684
allowCustomObjectId: false,
8785
allowClientClassCreation: true,
88-
encodeParseObjectInCloudFunction: true,
86+
enableInsecureAuthAdapters: true,
87+
databaseOptions: {
88+
allowPublicExplain: true,
89+
},
8990
emailAdapter: MockEmailAdapterWithOptions({
9091
fromAddress: 'parse@example.com',
9192
apiKey: 'k',
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module.exports = {
2+
send() {},
3+
getValidPushTypes() { return []; },
4+
};

0 commit comments

Comments
 (0)