parse 3.5.0-alpha.2 → 3.5.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -224,7 +224,7 @@ var config
224
224
  SERVER_AUTH_TOKEN: null,
225
225
  LIVEQUERY_SERVER_URL: null,
226
226
  ENCRYPTED_KEY: null,
227
- VERSION: 'js' + "3.5.0-alpha.2",
227
+ VERSION: 'js' + "3.5.0-alpha.3",
228
228
  APPLICATION_ID: null,
229
229
  JAVASCRIPT_KEY: null,
230
230
  MASTER_KEY: null,
@@ -281,6 +281,15 @@ var ParseSchema = /*#__PURE__*/function () {
281
281
  fieldOptions.defaultValue = options.defaultValue;
282
282
  }
283
283
 
284
+ if (type === 'Date') {
285
+ if (options && options.defaultValue) {
286
+ fieldOptions.defaultValue = {
287
+ __type: 'Date',
288
+ iso: new Date(options.defaultValue)
289
+ };
290
+ }
291
+ }
292
+
284
293
  this._fields[name] = fieldOptions;
285
294
  return this;
286
295
  }
@@ -380,13 +389,6 @@ var ParseSchema = /*#__PURE__*/function () {
380
389
  , options
381
390
  /*: FieldOptions*/
382
391
  ) {
383
- if (options && options.defaultValue) {
384
- options.defaultValue = {
385
- __type: 'Date',
386
- iso: new Date(options.defaultValue)
387
- };
388
- }
389
-
390
392
  return this.addField(name, 'Date', options);
391
393
  }
392
394
  /**
@@ -217,7 +217,7 @@ const config
217
217
  SERVER_AUTH_TOKEN: null,
218
218
  LIVEQUERY_SERVER_URL: null,
219
219
  ENCRYPTED_KEY: null,
220
- VERSION: 'js' + "3.5.0-alpha.2",
220
+ VERSION: 'js' + "3.5.0-alpha.3",
221
221
  APPLICATION_ID: null,
222
222
  JAVASCRIPT_KEY: null,
223
223
  MASTER_KEY: null,
@@ -278,6 +278,15 @@ class ParseSchema {
278
278
  fieldOptions.defaultValue = options.defaultValue;
279
279
  }
280
280
 
281
+ if (type === 'Date') {
282
+ if (options && options.defaultValue) {
283
+ fieldOptions.defaultValue = {
284
+ __type: 'Date',
285
+ iso: new Date(options.defaultValue)
286
+ };
287
+ }
288
+ }
289
+
281
290
  this._fields[name] = fieldOptions;
282
291
  return this;
283
292
  }
@@ -372,13 +381,6 @@ class ParseSchema {
372
381
  , options
373
382
  /*: FieldOptions*/
374
383
  ) {
375
- if (options && options.defaultValue) {
376
- options.defaultValue = {
377
- __type: 'Date',
378
- iso: new Date(options.defaultValue)
379
- };
380
- }
381
-
382
384
  return this.addField(name, 'Date', options);
383
385
  }
384
386
  /**
@@ -8,7 +8,7 @@ var config = {
8
8
  SERVER_AUTH_TOKEN: null,
9
9
  LIVEQUERY_SERVER_URL: null,
10
10
  ENCRYPTED_KEY: null,
11
- VERSION: 'js' + "3.5.0-alpha.2",
11
+ VERSION: 'js' + "3.5.0-alpha.3",
12
12
  APPLICATION_ID: null,
13
13
  JAVASCRIPT_KEY: null,
14
14
  MASTER_KEY: null,
@@ -150,6 +150,15 @@ var ParseSchema = function () {
150
150
  fieldOptions.defaultValue = options.defaultValue;
151
151
  }
152
152
 
153
+ if (type === 'Date') {
154
+ if (options && options.defaultValue) {
155
+ fieldOptions.defaultValue = {
156
+ __type: 'Date',
157
+ iso: new Date(options.defaultValue)
158
+ };
159
+ }
160
+ }
161
+
153
162
  this._fields[name] = fieldOptions;
154
163
  return this;
155
164
  }
@@ -185,13 +194,6 @@ var ParseSchema = function () {
185
194
  }, {
186
195
  key: "addDate",
187
196
  value: function (name, options) {
188
- if (options && options.defaultValue) {
189
- options.defaultValue = {
190
- __type: 'Date',
191
- iso: new Date(options.defaultValue)
192
- };
193
- }
194
-
195
197
  return this.addField(name, 'Date', options);
196
198
  }
197
199
  }, {
@@ -224,7 +224,7 @@ var config
224
224
  SERVER_AUTH_TOKEN: null,
225
225
  LIVEQUERY_SERVER_URL: null,
226
226
  ENCRYPTED_KEY: null,
227
- VERSION: 'js' + "3.5.0-alpha.2",
227
+ VERSION: 'js' + "3.5.0-alpha.3",
228
228
  APPLICATION_ID: null,
229
229
  JAVASCRIPT_KEY: null,
230
230
  MASTER_KEY: null,
@@ -281,6 +281,15 @@ var ParseSchema = /*#__PURE__*/function () {
281
281
  fieldOptions.defaultValue = options.defaultValue;
282
282
  }
283
283
 
284
+ if (type === 'Date') {
285
+ if (options && options.defaultValue) {
286
+ fieldOptions.defaultValue = {
287
+ __type: 'Date',
288
+ iso: new Date(options.defaultValue)
289
+ };
290
+ }
291
+ }
292
+
284
293
  this._fields[name] = fieldOptions;
285
294
  return this;
286
295
  }
@@ -380,13 +389,6 @@ var ParseSchema = /*#__PURE__*/function () {
380
389
  , options
381
390
  /*: FieldOptions*/
382
391
  ) {
383
- if (options && options.defaultValue) {
384
- options.defaultValue = {
385
- __type: 'Date',
386
- iso: new Date(options.defaultValue)
387
- };
388
- }
389
-
390
392
  return this.addField(name, 'Date', options);
391
393
  }
392
394
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "parse",
3
- "version": "3.5.0-alpha.2",
3
+ "version": "3.5.0-alpha.3",
4
4
  "description": "The Parse JavaScript SDK",
5
5
  "homepage": "https://parseplatform.org/",
6
6
  "keywords": [