Skip to content

build: Release #2049

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 54 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
9d669a9
ci: Fix docs publishing (#1885)
mtrezza May 1, 2023
89ad09d
chore(release): 4.2.0-alpha.1 [skip ci]
semantic-release-bot May 1, 2023
2a3306b
refactor: Bump @babel/runtime-corejs3 from 7.21.0 to 7.21.5 (#1886)
dependabot[bot] May 7, 2023
1ca4dfe
refactor: Bump parse-server from `177891e` to `6207a02` (#1884)
dependabot[bot] May 7, 2023
3776709
refactor: Bump eslint from 8.39.0 to 8.40.0 (#1890)
dependabot[bot] May 9, 2023
1cdfb7d
refactor: Bump @babel/preset-env from 7.21.4 to 7.21.5 (#1888)
dependabot[bot] May 9, 2023
04b15a8
refactor: Bump parse-server from `6207a02` to `559b1de` (#1899)
dependabot[bot] May 12, 2023
5bf2bab
refactor: Bump @babel/core from 7.21.5 to 7.21.8 (#1893)
dependabot[bot] May 12, 2023
e85a239
refactor: Bump jasmine from 4.6.0 to 5.0.0 (#1900)
dependabot[bot] May 15, 2023
4280b4d
refactor: Bump puppeteer from 19.11.1 to 20.2.1 (#1903)
dependabot[bot] May 16, 2023
737db99
refactor: Bump @babel/eslint-parser from 7.21.3 to 7.21.8 (#1904)
dependabot[bot] May 17, 2023
8e29f30
refactor: Bump core-js from 3.30.1 to 3.30.2 (#1906)
dependabot[bot] May 17, 2023
0fd7141
refactor: Bump idb-keyval from 6.2.0 to 6.2.1 (#1905)
dependabot[bot] May 17, 2023
2ba2842
refactor: Bump metro-react-native-babel-preset from 0.76.3 to 0.76.4 …
dependabot[bot] May 18, 2023
ec94d43
refactor: Bump parse-server from `559b1de` to `c78a5a6` (#1908)
dependabot[bot] May 18, 2023
34e6ad1
refactor: Bump puppeteer from 20.2.1 to 20.4.0 (#1916)
dependabot[bot] May 25, 2023
972836a
refactor: Bump @babel/core from 7.21.8 to 7.22.0 (#1918)
dependabot[bot] May 26, 2023
6580529
refactor: Bump @babel/runtime-corejs3 from 7.21.5 to 7.22.3 (#1923)
dependabot[bot] May 30, 2023
8222f3c
fix: Hard-coding of `react-native` path does not work for workspace b…
swittk Jun 8, 2023
473babf
chore(release): 4.2.0-alpha.2 [skip ci]
semantic-release-bot Jun 8, 2023
eb70b93
feat: Add support to invoke a Cloud Function with a custom `installat…
mtrezza Jun 11, 2023
fc22640
chore(release): 4.2.0-alpha.3 [skip ci]
semantic-release-bot Jun 11, 2023
953fd97
test: Fix failing Twitter tests (#1977)
dblythy Jul 21, 2023
c03f72d
refactor: Bump word-wrap from 1.2.3 to 1.2.4 (#1976)
dependabot[bot] Jul 23, 2023
2bad411
feat: Login with username, password and additional authentication dat…
dblythy Jul 23, 2023
2b9e0be
chore(release): 4.2.0-alpha.4 [skip ci]
semantic-release-bot Jul 23, 2023
2b16036
refactor: Bump got and mongodb-runner (#1978)
dependabot[bot] Jul 23, 2023
d2d8318
refactor: Bump @babel/preset-react from 7.18.6 to 7.22.5 (#1967)
dependabot[bot] Jul 23, 2023
dae51a5
refactor: Upgrade @babel/runtime-corejs3 from 7.22.3 to 7.22.5 (#1966)
parseplatformorg Jul 24, 2023
a235857
refactor: Bump @babel/plugin-transform-flow-comments from 7.21.0 to 7…
dependabot[bot] Jul 24, 2023
549b7b3
refactor: Upgrade @babel/runtime-corejs3 from 7.22.5 to 7.22.6 (#1982)
parseplatformorg Jul 25, 2023
54efcf5
refactor: Add TypeScript support (#1985)
dblythy Aug 14, 2023
012ba4c
feat: Add support for excluding keys in `ParseQuery.findAll` (#2000)
dplewis Aug 27, 2023
9c0733f
chore(release): 4.2.0-alpha.5 [skip ci]
semantic-release-bot Aug 27, 2023
343d0d7
feat: Add Bytes type to `Parse.Schema` (#2001)
dplewis Aug 27, 2023
c7b391d
chore(release): 4.2.0-alpha.6 [skip ci]
semantic-release-bot Aug 27, 2023
94e7248
ci: Improve test coverage (#2002)
dplewis Aug 28, 2023
0a490e3
refactor: Bump prettier from 2.8.8 to 3.0.2 (#1992)
dependabot[bot] Aug 29, 2023
54cadf6
refactor: Upgrade @babel/runtime-corejs3 from 7.22.6 to 7.22.10 (#2003)
parseplatformorg Aug 29, 2023
f80d833
docs: Fix incorrect return type in `Parse.Object.getACL` (#2006)
dplewis Aug 29, 2023
7e2585c
fix: `ParseUser.linkWith` doesn't remove anonymous auth data (#2007)
dplewis Aug 29, 2023
395e647
chore(release): 4.2.0-alpha.7 [skip ci]
semantic-release-bot Aug 29, 2023
2446007
feat: Add Cloud Code context accessibility to `ParseUser.logIn` (#2010)
dplewis Aug 30, 2023
6060792
chore(release): 4.2.0-alpha.8 [skip ci]
semantic-release-bot Aug 30, 2023
be0c8a6
feat: Allow overriding `Parse.Error` message with custom message via …
dplewis Sep 1, 2023
c6ffeb2
chore(release): 4.2.0-alpha.9 [skip ci]
semantic-release-bot Sep 1, 2023
ca568a6
feat: Add support for custom EventEmitter (#1999)
dplewis Sep 3, 2023
f973fa4
chore(release): 4.2.0-alpha.10 [skip ci]
semantic-release-bot Sep 3, 2023
942b8dd
refactor: Upgrade @babel/runtime-corejs3 from 7.22.10 to 7.22.11 (#2018)
parseplatformorg Sep 15, 2023
e990326
Merge branch 'release' into build
mtrezza Sep 15, 2023
ccc9f60
release
mtrezza Sep 15, 2023
f30d588
build: Release (#2023)
mtrezza Sep 16, 2023
b821281
chore(release): 4.3.0-beta.1 [skip ci]
semantic-release-bot Sep 16, 2023
f76dbd0
release
mtrezza Nov 16, 2023
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
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ jobs:
uses: mansona/npm-lockfile-version@v1
with:
version: 2
check-types:
name: Check types
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: npm ci
- name: Check types
run: npm run test:types
build:
runs-on: ubuntu-latest
timeout-minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-automated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
docs-publish:
needs: release
if: needs.release.outputs.current_tag != '' && github.ref == 'refs/heads/release'
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-manual-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
docs-publish:
if: github.event.inputs.tag != ''
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion babel-jest.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const babelJest = require('babel-jest');

module.exports = babelJest.createTransformer({
presets: [["@babel/preset-env", {
presets: ["@babel/preset-typescript", ["@babel/preset-env", {
"targets": {
"node": "14"
},
Expand Down
75 changes: 75 additions & 0 deletions changelogs/CHANGELOG_alpha.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,78 @@
# [4.2.0-alpha.10](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.9...4.2.0-alpha.10) (2023-09-03)


### Features

* Add support for custom EventEmitter ([#1999](https://github.com/parse-community/Parse-SDK-JS/issues/1999)) ([ca568a6](https://github.com/parse-community/Parse-SDK-JS/commit/ca568a61771e15afe67c9001f2a728205059f2ae))

# [4.2.0-alpha.9](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.8...4.2.0-alpha.9) (2023-09-01)


### Features

* Allow overriding `Parse.Error` message with custom message via new Core Manager option `PARSE_ERRORS` ([#2014](https://github.com/parse-community/Parse-SDK-JS/issues/2014)) ([be0c8a6](https://github.com/parse-community/Parse-SDK-JS/commit/be0c8a6ff90a7714487ae793e2b68ae04d0c8d0c))

# [4.2.0-alpha.8](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.7...4.2.0-alpha.8) (2023-08-30)


### Features

* Add Cloud Code context accessibility to `ParseUser.logIn` ([#2010](https://github.com/parse-community/Parse-SDK-JS/issues/2010)) ([2446007](https://github.com/parse-community/Parse-SDK-JS/commit/2446007ede4cc5af79e34f27dc1fbcc574d5f717))

# [4.2.0-alpha.7](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.6...4.2.0-alpha.7) (2023-08-29)


### Bug Fixes

* `ParseUser.linkWith` doesn't remove anonymous auth data ([#2007](https://github.com/parse-community/Parse-SDK-JS/issues/2007)) ([7e2585c](https://github.com/parse-community/Parse-SDK-JS/commit/7e2585c5eb84a396900553d55d6a919de4d9a2c0))

# [4.2.0-alpha.6](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.5...4.2.0-alpha.6) (2023-08-27)


### Features

* Add Bytes type to `Parse.Schema` ([#2001](https://github.com/parse-community/Parse-SDK-JS/issues/2001)) ([343d0d7](https://github.com/parse-community/Parse-SDK-JS/commit/343d0d729a57acdd3c9ba5c1dbe5738b3916ea04))

# [4.2.0-alpha.5](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.4...4.2.0-alpha.5) (2023-08-27)


### Features

* Add support for excluding keys in `ParseQuery.findAll` ([#2000](https://github.com/parse-community/Parse-SDK-JS/issues/2000)) ([012ba4c](https://github.com/parse-community/Parse-SDK-JS/commit/012ba4cdab1e3f853625f507c713cef2264a40dd))

# [4.2.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.3...4.2.0-alpha.4) (2023-07-23)


### Features

* Login with username, password and additional authentication data via `ParseUser.logInWithAdditionalAuth` ([#1955](https://github.com/parse-community/Parse-SDK-JS/issues/1955)) ([2bad411](https://github.com/parse-community/Parse-SDK-JS/commit/2bad4119c23372d1b38c811c4b4bb3d06b1b62f0))

# [4.2.0-alpha.3](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.2...4.2.0-alpha.3) (2023-06-11)


### Features

* Add support to invoke a Cloud Function with a custom `installationId` via `Parse.Cloud.run` ([#1939](https://github.com/parse-community/Parse-SDK-JS/issues/1939)) ([eb70b93](https://github.com/parse-community/Parse-SDK-JS/commit/eb70b934b798cb37722c1ac36796596f5373f67d))

# [4.2.0-alpha.2](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0-alpha.1...4.2.0-alpha.2) (2023-06-08)


### Bug Fixes

* Hard-coding of `react-native` path does not work for workspace builds ([#1930](https://github.com/parse-community/Parse-SDK-JS/issues/1930)) ([8222f3c](https://github.com/parse-community/Parse-SDK-JS/commit/8222f3cc2a4a4ee0cdcaf30dd0f9a17e46de7d88))

# [4.2.0-alpha.1](https://github.com/parse-community/Parse-SDK-JS/compare/4.1.0...4.2.0-alpha.1) (2023-05-01)


### Bug Fixes

* `Parse.File.cancel` starts new attempt to save file ([#1781](https://github.com/parse-community/Parse-SDK-JS/issues/1781)) ([b755e42](https://github.com/parse-community/Parse-SDK-JS/commit/b755e42394db8b94b87b0dbefc6cf6f18189c46d))

### Features

* Add `Parse.User.loginAs` ([#1875](https://github.com/parse-community/Parse-SDK-JS/issues/1875)) ([381fcfc](https://github.com/parse-community/Parse-SDK-JS/commit/381fcfc7f9cfda70af7c6dc3a35de59b82b72258))
* Add `ParseQuery.watch` to trigger LiveQuery only on update of specific fields ([#1839](https://github.com/parse-community/Parse-SDK-JS/issues/1839)) ([7479343](https://github.com/parse-community/Parse-SDK-JS/commit/7479343abd8739fe03558ff9b2ce610c34c568ae))

# [4.1.0-alpha.4](https://github.com/parse-community/Parse-SDK-JS/compare/4.1.0-alpha.3...4.1.0-alpha.4) (2023-04-28)


Expand Down
18 changes: 18 additions & 0 deletions changelogs/CHANGELOG_beta.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
# [4.3.0-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/4.2.0...4.3.0-beta.1) (2023-09-16)


### Bug Fixes

* `ParseUser.linkWith` doesn't remove anonymous auth data ([#2007](https://github.com/parse-community/Parse-SDK-JS/issues/2007)) ([7e2585c](https://github.com/parse-community/Parse-SDK-JS/commit/7e2585c5eb84a396900553d55d6a919de4d9a2c0))
* Hard-coding of `react-native` path does not work for workspace builds ([#1930](https://github.com/parse-community/Parse-SDK-JS/issues/1930)) ([8222f3c](https://github.com/parse-community/Parse-SDK-JS/commit/8222f3cc2a4a4ee0cdcaf30dd0f9a17e46de7d88))

### Features

* Add Bytes type to `Parse.Schema` ([#2001](https://github.com/parse-community/Parse-SDK-JS/issues/2001)) ([343d0d7](https://github.com/parse-community/Parse-SDK-JS/commit/343d0d729a57acdd3c9ba5c1dbe5738b3916ea04))
* Add Cloud Code context accessibility to `ParseUser.logIn` ([#2010](https://github.com/parse-community/Parse-SDK-JS/issues/2010)) ([2446007](https://github.com/parse-community/Parse-SDK-JS/commit/2446007ede4cc5af79e34f27dc1fbcc574d5f717))
* Add support for custom EventEmitter ([#1999](https://github.com/parse-community/Parse-SDK-JS/issues/1999)) ([ca568a6](https://github.com/parse-community/Parse-SDK-JS/commit/ca568a61771e15afe67c9001f2a728205059f2ae))
* Add support for excluding keys in `ParseQuery.findAll` ([#2000](https://github.com/parse-community/Parse-SDK-JS/issues/2000)) ([012ba4c](https://github.com/parse-community/Parse-SDK-JS/commit/012ba4cdab1e3f853625f507c713cef2264a40dd))
* Add support to invoke a Cloud Function with a custom `installationId` via `Parse.Cloud.run` ([#1939](https://github.com/parse-community/Parse-SDK-JS/issues/1939)) ([eb70b93](https://github.com/parse-community/Parse-SDK-JS/commit/eb70b934b798cb37722c1ac36796596f5373f67d))
* Allow overriding `Parse.Error` message with custom message via new Core Manager option `PARSE_ERRORS` ([#2014](https://github.com/parse-community/Parse-SDK-JS/issues/2014)) ([be0c8a6](https://github.com/parse-community/Parse-SDK-JS/commit/be0c8a6ff90a7714487ae793e2b68ae04d0c8d0c))
* Login with username, password and additional authentication data via `ParseUser.logInWithAdditionalAuth` ([#1955](https://github.com/parse-community/Parse-SDK-JS/issues/1955)) ([2bad411](https://github.com/parse-community/Parse-SDK-JS/commit/2bad4119c23372d1b38c811c4b4bb3d06b1b62f0))

# [4.2.0-beta.1](https://github.com/parse-community/Parse-SDK-JS/compare/4.1.0...4.2.0-beta.1) (2023-05-01)


Expand Down
14 changes: 7 additions & 7 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ const transformRuntime = ["@babel/plugin-transform-runtime", {
}];

const PRESETS = {
'browser': [["@babel/preset-env", {
'browser': ["@babel/preset-typescript", ["@babel/preset-env", {
"targets": "> 0.25%, not dead"
}]],
'weapp': [["@babel/preset-env", {
'weapp': ["@babel/preset-typescript", ["@babel/preset-env", {
"targets": "> 0.25%, not dead"
}], '@babel/react'],
'node': [["@babel/preset-env", {
'node': ["@babel/preset-typescript", ["@babel/preset-env", {
"targets": { "node": "14" }
}]],
'react-native': ['module:metro-react-native-babel-preset'],
'react-native': ["@babel/preset-typescript", 'module:metro-react-native-babel-preset'],
};
const PLUGINS = {
'browser': [transformRuntime, '@babel/plugin-transform-flow-comments', '@babel/plugin-proposal-class-properties', 'inline-package-json',
Expand Down Expand Up @@ -79,7 +79,7 @@ function compileTask(stream) {
}

gulp.task('compile', function() {
return compileTask(gulp.src('src/*.js'));
return compileTask(gulp.src('src/*.*(js|ts)'));
});

gulp.task('browserify', function(cb) {
Expand Down Expand Up @@ -137,7 +137,7 @@ gulp.task('minify-weapp', function() {

gulp.task('watch', function() {
if (BUILD === 'browser') {
const watcher = gulp.watch('src/*.js', { ignoreInitial: false }, gulp.series('compile', 'browserify', 'minify'));
const watcher = gulp.watch('src/*.*(js|ts)', { ignoreInitial: false }, gulp.series('compile', 'browserify', 'minify'));
watcher.on('add', function(path) {
console.log(`File ${path} was added`);
});
Expand All @@ -146,5 +146,5 @@ gulp.task('watch', function() {
});
return watcher;
}
return compileTask(watch('src/*.js', { ignoreInitial: false, verbose: true }));
return compileTask(watch('src/*.*(js|ts)', { ignoreInitial: false, verbose: true }));
});
67 changes: 40 additions & 27 deletions integration/test/ParseLocalDatastoreTest.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,52 @@
'use strict';

const assert = require('assert');
const Parse = require('../../node');

global.localStorage = require('./mockLocalStorage');
global.WebSocket = require('ws');
const mockRNStorage = require('./mockRNStorage');
const LocalDatastoreUtils = require('../../lib/node/LocalDatastoreUtils');
const serverURL = 'http://localhost:1337/parse';

const { DEFAULT_PIN, PIN_PREFIX, isLocalDatastoreKey } = LocalDatastoreUtils;
function runTest(controller) {
const Parse = require(`../../${controller.name}`);
const LocalDatastoreUtils = require('../../lib/node/LocalDatastoreUtils');

function LDS_KEY(object) {
return Parse.LocalDatastore.getKeyForObject(object);
}
function LDS_FULL_JSON(object) {
const json = object._toFullJSON();
if (object._localId) {
json._localId = object._localId;
const { DEFAULT_PIN, PIN_PREFIX, isLocalDatastoreKey } = LocalDatastoreUtils;

const Item = Parse.Object.extend('Item');
const TestObject = Parse.Object.extend('TestObject');

function LDS_KEY(object) {
return Parse.LocalDatastore.getKeyForObject(object);
}
return json;
}
function runTest(controller) {
function LDS_FULL_JSON(object) {
const json = object._toFullJSON();
if (object._localId) {
json._localId = object._localId;
}
return json;
}

describe(`Parse Object Pinning (${controller.name})`, () => {
beforeEach(async () => {
const StorageController = require(controller.file);
Parse.CoreManager.setAsyncStorage(mockRNStorage);
Parse.CoreManager.setLocalDatastoreController(StorageController);
Parse.enableLocalDatastore();
Parse.CoreManager.setEventEmitter(require('events').EventEmitter);
Parse.User.enableUnsafeCurrentUser();
await Parse.LocalDatastore._clear();
Parse.initialize('integration');
Parse.CoreManager.set('SERVER_URL', serverURL);
Parse.CoreManager.set('MASTER_KEY', 'notsosecret');
const RESTController = Parse.CoreManager.getRESTController();
RESTController._setXHR(require('xmlhttprequest').XMLHttpRequest);
Parse.enableLocalDatastore();
});

function getStorageCount(storage) {
return Object.keys(storage).reduce((acc, key) => acc + (isLocalDatastoreKey(key) ? 1 : 0), 1);
}

it(`${controller.name} can clear localDatastore`, async () => {
const obj1 = new TestObject();
const obj2 = new TestObject();
Expand Down Expand Up @@ -1060,8 +1076,15 @@ function runTest(controller) {
const StorageController = require(controller.file);
Parse.CoreManager.setAsyncStorage(mockRNStorage);
Parse.CoreManager.setLocalDatastoreController(StorageController);
Parse.enableLocalDatastore();
Parse.CoreManager.setEventEmitter(require('events').EventEmitter);
Parse.LocalDatastore._clear();
Parse.User.enableUnsafeCurrentUser();
Parse.initialize('integration');
Parse.CoreManager.set('SERVER_URL', serverURL);
Parse.CoreManager.set('MASTER_KEY', 'notsosecret');
const RESTController = Parse.CoreManager.getRESTController();
RESTController._setXHR(require('xmlhttprequest').XMLHttpRequest);
Parse.enableLocalDatastore();

const numbers = [];
for (let i = 0; i < 10; i++) {
Expand Down Expand Up @@ -2949,20 +2972,10 @@ function runTest(controller) {
}

describe('Parse LocalDatastore', () => {
beforeEach(() => {
Parse.CoreManager.getInstallationController()._setInstallationIdCache('1234');
Parse.enableLocalDatastore();
Parse.User.enableUnsafeCurrentUser();
});

const controllers = [
{ name: 'Default', file: '../../lib/node/LocalDatastoreController' },
{
name: 'React-Native',
file: '../../lib/node/LocalDatastoreController.react-native',
},
{ name: 'node', file: '../../lib/node/LocalDatastoreController' },
{ name: 'react-native', file: '../../lib/react-native/LocalDatastoreController.react-native' },
];

for (let i = 0; i < controllers.length; i += 1) {
const controller = controllers[i];
runTest(controller);
Expand Down
17 changes: 17 additions & 0 deletions integration/test/ParseQueryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -1621,6 +1621,23 @@ describe('Parse Query', () => {
assert.equal(result.get('slice'), 'pizza');
});

it('can exclude keys in findAll', async () => {
const object = new TestObject({
hello: 'world',
foo: 'bar',
slice: 'pizza',
});
await object.save();

const query = new Parse.Query(TestObject);
query.exclude('foo');
query.equalTo('objectId', object.id);
const [result] = await query.findAll();
assert.equal(result.get('foo'), undefined);
assert.equal(result.get('hello'), 'world');
assert.equal(result.get('slice'), 'pizza');
});

it('uses subclasses when creating objects', done => {
const ParentObject = Parse.Object.extend({ className: 'ParentObject' });
let ChildObject = Parse.Object.extend('ChildObject', {
Expand Down
9 changes: 9 additions & 0 deletions integration/test/ParseSchemaTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ describe('Schema', () => {
.addString('stringField')
.addNumber('numberField')
.addBoolean('booleanField')
.addBytes('bytesField')
.addDate('dateField')
.addFile('fileField')
.addGeoPoint('geoPointField')
Expand All @@ -91,6 +92,7 @@ describe('Schema', () => {
assert.equal(result.fields.stringField.type, 'String');
assert.equal(result.fields.numberField.type, 'Number');
assert.equal(result.fields.booleanField.type, 'Boolean');
assert.equal(result.fields.bytesField.type, 'Bytes');
assert.equal(result.fields.dateField.type, 'Date');
assert.equal(result.fields.fileField.type, 'File');
assert.equal(result.fields.geoPointField.type, 'GeoPoint');
Expand Down Expand Up @@ -182,6 +184,7 @@ describe('Schema', () => {
required: true,
defaultValue: '2000-01-01T00:00:00.000Z',
})
.addBytes('bytesField', { required: true, defaultValue: 'ParseA==' })
.addFile('fileField', { required: true, defaultValue: file })
.addGeoPoint('geoPointField', { required: true, defaultValue: point })
.addPolygon('polygonField', { required: true, defaultValue: polygon })
Expand All @@ -204,6 +207,11 @@ describe('Schema', () => {
stringField: { type: 'String', required: true, defaultValue: 'world' },
numberField: { type: 'Number', required: true, defaultValue: 10 },
booleanField: { type: 'Boolean', required: true, defaultValue: false },
bytesField: {
type: 'Bytes',
required: true,
defaultValue: { __type: 'Bytes', base64: 'ParseA==' },
},
dateField: {
type: 'Date',
required: true,
Expand Down Expand Up @@ -245,6 +253,7 @@ describe('Schema', () => {
stringField: 'world',
numberField: 10,
booleanField: false,
bytesField: { __type: 'Bytes', base64: 'ParseA==' },
dateField: { __type: 'Date', iso: '2000-01-01T00:00:00.000Z' },
dateStringField: { __type: 'Date', iso: '2000-01-01T00:00:00.000Z' },
fileField: file.toJSON(),
Expand Down
Loading