Skip to content

build: release beta #1584

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 32 commits into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
0439862
fix: creating a Parse.File with base64 string fails for some encoding…
justinlettau Jul 28, 2022
200f4b7
chore(release): 3.4.4-alpha.1 [skip ci]
semantic-release-bot Jul 28, 2022
e4cdc30
refactor: upgrade moment from 2.29.3 to 2.29.4 (#1518)
dependabot[bot] Jul 28, 2022
53edcfd
fix: `Parse.User.signUp()` does not pass context to Cloud Code (#1527)
dblythy Aug 16, 2022
ad429fc
chore(release): 3.4.4-alpha.2 [skip ci]
semantic-release-bot Aug 16, 2022
e08f3b6
refactor: upgrade semver-regex and husky (#1530)
dependabot[bot] Aug 16, 2022
299fb0d
feat: add json option to query.each
dplewis Sep 2, 2022
74ec416
add documentation
dplewis Sep 2, 2022
89fd5ec
feat: add `json` option to `Parse.Query.each()` (#1539)
mtrezza Sep 8, 2022
ee73a88
chore(release): 3.5.0-alpha.1 [skip ci]
semantic-release-bot Sep 8, 2022
473949d
fix: remove base64 validation due to validation inefficiency (#1543)
dblythy Sep 12, 2022
1240ae7
chore(release): 3.5.0-alpha.2 [skip ci]
semantic-release-bot Sep 12, 2022
15111f7
fix: `Schema.addField` does not correctly add value of type `Date` (#…
dblythy Sep 14, 2022
7bc91d9
chore(release): 3.5.0-alpha.3 [skip ci]
semantic-release-bot Sep 14, 2022
ca7d448
ci: enable dependabot updates for Parse Server dependency (#1546)
mtrezza Sep 14, 2022
3b5683b
refactor: regenerate `package-lock.json` file (#1553)
dblythy Sep 18, 2022
094fbe2
refactor: bump parse-server from `b2fe087` to `37fed30` (#1556)
dependabot[bot] Sep 20, 2022
d3ca00d
refactor: bump parse-server from `37fed30` to `d9afeb8` (#1557)
dependabot[bot] Sep 21, 2022
68f3ff5
feat: generate `Parse.Object.objectId` automatically when `allowCusto…
musthafa1996 Sep 21, 2022
941b60c
chore(release): 3.5.0-alpha.4 [skip ci]
semantic-release-bot Sep 21, 2022
4d0f783
refactor: bump parse-server from `d9afeb8` to `e824242` (#1558)
dependabot[bot] Sep 22, 2022
599196d
refactor: bump parse-server from `e824242` to `ae8d082` (#1560)
dependabot[bot] Sep 26, 2022
4864d54
refactor: bump parse-server from `ae8d082` to `643d491` (#1562)
dependabot[bot] Sep 27, 2022
ea3e75f
feat: localDatastore support for unsorted distance queries (#1570)
dplewis Oct 11, 2022
32df5ce
chore(release): 3.5.0-alpha.5 [skip ci]
semantic-release-bot Oct 11, 2022
d8ff2f4
refactor: bump parse-server from `643d491` to `0f763da` (#1572)
dependabot[bot] Oct 12, 2022
2712e41
refactor: bump parse-server from `0f763da` to `8c30c81` (#1573)
dependabot[bot] Oct 12, 2022
3560a5e
fix: initialization fails in non-browser environment that doesn't sup…
dplewis Oct 13, 2022
0b55693
chore(release): 3.5.0-alpha.6 [skip ci]
semantic-release-bot Oct 13, 2022
a209873
refactor: bump parse-server from `8c30c81` to `fb50332` (#1577)
dependabot[bot] Oct 21, 2022
0618724
refactor: bump parse-server from `fb50332` to `b54af6b` (#1581)
dependabot[bot] Oct 24, 2022
bc96cf8
Merge branch 'beta' into build-alpha
mtrezza Oct 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Dependabot dependency updates
# Docs: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm"
# Location of package-lock.json
directory: "/"
# Check daily for updates
schedule:
interval: "daily"
commit-message:
# Set commit message prefix
prefix: "refactor"
# Define dependencies to update
allow:
- dependency-name: "parse-server"
58 changes: 58 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,61 @@
# [3.5.0-alpha.6](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.5...3.5.0-alpha.6) (2022-10-13)


### Bug Fixes

* initialization fails in non-browser environment that doesn't support `indexedDB` ([#1569](https://github.com/parse-community/Parse-SDK-JS/issues/1569)) ([3560a5e](https://github.com/parse-community/Parse-SDK-JS/commit/3560a5e422f8e97aa55c1c238d333248bac7f7d6))

# [3.5.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.4...3.5.0-alpha.5) (2022-10-11)


### Features

* localDatastore support for unsorted distance queries ([#1570](https://github.com/parse-community/Parse-SDK-JS/issues/1570)) ([ea3e75f](https://github.com/parse-community/Parse-SDK-JS/commit/ea3e75f1bdeb6e8c3b3e46c909f827daef1978f0))

# [3.5.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.3...3.5.0-alpha.4) (2022-09-21)


### Features

* generate `Parse.Object.objectId` automatically when `allowCustomObjectId` is enabled and no `objectId` is passed ([#1540](https://github.com/parse-community/Parse-SDK-JS/issues/1540)) ([68f3ff5](https://github.com/parse-community/Parse-SDK-JS/commit/68f3ff5b9a471648dcd07d35c706004eaaa173ec))

# [3.5.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.2...3.5.0-alpha.3) (2022-09-14)


### Bug Fixes

* `Schema.addField` does not correctly add value of type `Date` ([#1544](https://github.com/parse-community/Parse-SDK-JS/issues/1544)) ([15111f7](https://github.com/parse-community/Parse-SDK-JS/commit/15111f74a658eefc71a50b6bfb3d25c7997d26a2))

# [3.5.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/3.5.0-alpha.1...3.5.0-alpha.2) (2022-09-12)


### Bug Fixes

* remove base64 validation due to validation inefficiency ([#1543](https://github.com/parse-community/Parse-SDK-JS/issues/1543)) ([473949d](https://github.com/parse-community/Parse-SDK-JS/commit/473949d514a395cf3656b03e083e30fff6e2f22c))

# [3.5.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.4-alpha.2...3.5.0-alpha.1) (2022-09-08)


### Features

* add `json` option to `Parse.Query.each()` ([#1539](https://github.com/parse-community/Parse-SDK-JS/issues/1539)) ([89fd5ec](https://github.com/parse-community/Parse-SDK-JS/commit/89fd5ec6a8e210de3946434c6c88d6de87b6635c))
* add json option to query.each ([299fb0d](https://github.com/parse-community/Parse-SDK-JS/commit/299fb0d49cbbd3c95c2e8a61744bd03e93c33d36))

## [3.4.4-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.4-alpha.1...3.4.4-alpha.2) (2022-08-16)


### Bug Fixes

* `Parse.User.signUp()` does not pass context to Cloud Code ([#1527](https://github.com/parse-community/Parse-SDK-JS/issues/1527)) ([53edcfd](https://github.com/parse-community/Parse-SDK-JS/commit/53edcfd7ad1bd075a6097ba3c129c5f0998ffbfa))

## [3.4.4-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3...3.4.4-alpha.1) (2022-07-28)


### Bug Fixes

* creating a Parse.File with base64 string fails for some encodings ([#1517](https://github.com/parse-community/Parse-SDK-JS/issues/1517)) ([0439862](https://github.com/parse-community/Parse-SDK-JS/commit/0439862cd83dc37f8f3571b68fdaccb6b11b540d))
* subscription to a LiveQuery containing `ParseQuery.select` overrides properties ([#1488](https://github.com/parse-community/Parse-SDK-JS/issues/1488)) ([b80eee4](https://github.com/parse-community/Parse-SDK-JS/commit/b80eee4b010b60d37b34b566880ed19f05d4c801))

## [3.4.3-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/3.4.3-alpha.2...3.4.3-alpha.3) (2022-07-02)


Expand Down
20 changes: 20 additions & 0 deletions integration/test/ParseLocalDatastoreTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2735,6 +2735,26 @@ function runTest(controller) {
assert.equal(objects.length, 1);
});

it(`${controller.name} supports withinKilometers`, async () => {
const object = new TestObject();
const firstPoint = new Parse.GeoPoint({ latitude: 40.0, longitude: -30.0 });
object.set({ location: firstPoint });
await object.save();
await object.pin();

const sorted = false;
const query = new Parse.Query(TestObject);
query.withinKilometers(
'location',
new Parse.GeoPoint({ latitude: 40.0, longitude: -30.0 }),
2,
sorted
);
query.fromLocalDatastore();
const results = await query.find();
assert.equal(results.length, 1);
});

it(`${controller.name} supports withinPolygon`, async () => {
const sacramento = new TestObject();
sacramento.set('location', new Parse.GeoPoint(38.52, -121.5));
Expand Down
166 changes: 121 additions & 45 deletions integration/test/ParseObjectTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2060,59 +2060,135 @@ describe('Parse Object', () => {
expect(obj.get('string')).toBeInstanceOf(String);
});

it('allowCustomObjectId', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;
const customId = `${Date.now()}`;
const object = new Parse.Object('TestObject');
try {
describe('allowCustomObjectId', () => {
it('can save without setting an objectId', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const object = new Parse.Object('TestObject');
await object.save();
fail();
} catch (error) {
expect(error.message).toBe('objectId must not be empty, null or undefined');
}
object.id = customId;
object.set('foo', 'bar');
await object.save();
expect(object.id).toBe(customId);
expect(object.id).toBeDefined();

Parse.allowCustomObjectId = false;
});

it('fails to save when objectId is empty', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const object = new Parse.Object('TestObject');
object.id = '';
await expectAsync(object.save()).toBeRejectedWith(
new Parse.Error(Parse.Error.MISSING_OBJECT_ID, 'objectId must not be empty or null')
);

Parse.allowCustomObjectId = false;
});

it('fails to save when objectId is null', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const object = new Parse.Object('TestObject');
object.id = null;
await expectAsync(object.save()).toBeRejectedWith(
new Parse.Error(Parse.Error.MISSING_OBJECT_ID, 'objectId must not be empty or null')
);

Parse.allowCustomObjectId = false;
});

it('can save with custom objectId', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const customId = `${Date.now()}`;
const object = new Parse.Object('TestObject');
object.id = customId;
object.set('foo', 'bar');
await object.save();
expect(object.id).toBe(customId);

const query = new Parse.Query('TestObject');
const result = await query.get(customId);
expect(result.get('foo')).toBe('bar');
expect(result.id).toBe(customId);

const query = new Parse.Query('TestObject');
const result = await query.get(customId);
expect(result.get('foo')).toBe('bar');
expect(result.id).toBe(customId);
result.set('foo', 'baz');
await result.save();

result.set('foo', 'baz');
await result.save();
const afterSave = await query.get(customId);
expect(afterSave.get('foo')).toBe('baz');

const afterSave = await query.get(customId);
expect(afterSave.get('foo')).toBe('baz');
Parse.allowCustomObjectId = false;
Parse.allowCustomObjectId = false;
});
});

it('allowCustomObjectId saveAll', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;
const customId1 = `${Date.now()}`;
const customId2 = `${Date.now()}`;
const obj1 = new TestObject({ foo: 'bar' });
const obj2 = new TestObject({ foo: 'baz' });
try {
describe('allowCustomObjectId saveAll', () => {
it('can save without setting an objectId', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const obj1 = new TestObject({ foo: 'bar' });
const obj2 = new TestObject({ foo: 'baz' });
await Parse.Object.saveAll([obj1, obj2]);
fail();
} catch (error) {
expect(error.message).toBe('objectId must not be empty, null or undefined');
}
obj1.id = customId1;
obj2.id = customId2;
await Parse.Object.saveAll([obj1, obj2]);
expect(obj1.id).toBe(customId1);
expect(obj2.id).toBe(customId2);
expect(obj1.id).toBeDefined();
expect(obj2.id).toBeDefined();

const query = new Parse.Query(TestObject);
const results = await query.find();
results.forEach(result => {
expect([customId1, customId2].includes(result.id));
Parse.allowCustomObjectId = false;
});

it('fails to save when objectId is empty', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const obj1 = new TestObject({ foo: 'bar' });
obj1.id = '';
const obj2 = new TestObject({ foo: 'baz' });
obj2.id = '';
await expectAsync(Parse.Object.saveAll([obj1, obj2])).toBeRejectedWith(
new Parse.Error(Parse.Error.MISSING_OBJECT_ID, 'objectId must not be empty or null')
);

Parse.allowCustomObjectId = false;
});

it('fails to save when objectId is null', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const obj1 = new TestObject({ foo: 'bar' });
obj1.id = null;
const obj2 = new TestObject({ foo: 'baz' });
obj2.id = null;
await expectAsync(Parse.Object.saveAll([obj1, obj2])).toBeRejectedWith(
new Parse.Error(Parse.Error.MISSING_OBJECT_ID, 'objectId must not be empty or null')
);

Parse.allowCustomObjectId = false;
});

it('can save with custom objectId', async () => {
await reconfigureServer({ allowCustomObjectId: true });
Parse.allowCustomObjectId = true;

const obj1 = new TestObject({ foo: 'bar' });
const customId1 = `${Date.now()}`;
obj1.id = customId1;
const obj2 = new TestObject({ foo: 'baz' });
const customId2 = `${Date.now()}`;
obj1.id = customId2;
await Parse.Object.saveAll([obj1, obj2]);
expect(obj1.id).toBeDefined();
expect(obj2.id).toBeDefined();

const query = new Parse.Query(TestObject);
const results = await query.find();
results.forEach(result => {
expect([customId1, customId2].includes(result.id));
});

Parse.allowCustomObjectId = false;
});
Parse.allowCustomObjectId = false;
});
});
7 changes: 7 additions & 0 deletions integration/test/ParseQueryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ describe('Parse Query', () => {
assert.strictEqual(result.foo, 'bar');
assert.strictEqual(result.className, 'TestObject');
assert.strictEqual(result.objectId, object.id);

await query.each((obj) => {
assert.strictEqual(obj instanceof Parse.Object, false);
assert.strictEqual(obj.foo, 'bar');
assert.strictEqual(obj.className, 'TestObject');
assert.strictEqual(obj.objectId, object.id);
}, { json: true });
});

it('can do query with count', async () => {
Expand Down
1 change: 1 addition & 0 deletions integration/test/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const defaultConfiguration = {
enableForAuthenticatedUser: true,
},
revokeSessionOnPasswordReset: false,
allowCustomObjectId: false,
};

const openConnections = {};
Expand Down
Loading