8000 Stable Version 1.4.0. · digitaldeployment/js-data@6289cd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6289cd9

Browse files
committed
Stable Version 1.4.0.
1 parent 33577f6 commit 6289cd9

File tree

9 files changed

+41
-25
lines changed

9 files changed

+41
-25
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
##### 1.4.0 - 24 February 2015
2+
3+
###### Backwards compatible api changes
4+
- #51 - Allow resource instances to be created from a base class
5+
16
##### 1.3.0 - 11 February 2015
27

38
###### Backwards compatible api changes

Gruntfile.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ module.exports = function (grunt) {
4646
uglify: {
4747
main: {
4848
options: {
49+
sourceMap: true,
50+
sourceMapName: 'dist/js-data.min.map',
4951
banner: '/**\n' +
5052
'* @author Jason Dobry <jason.dobry@gmail.com>\n' +
5153
'* @file js-data.min.js\n' +

dist/js-data-debug.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @author Jason Dobry <jason.dobry@gmail.com>
33
* @file dist/js-data-debug.js
4-
* @version 1.3.0 - Homepage <http://www.js-data.io/>
4+
* @version 1.4.0 - Homepage <http://www.js-data.io/>
55
* @copyright (c) 2014 Jason Dobry
66
* @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>
77
*
@@ -3298,7 +3298,7 @@ function DS(options) {
32983298
} catch (e) {
32993299
}
33003300

3301-
if (!Schemator) {
3301+
if (!Schemator || DSUtils.isEmpty(Schemator)) {
33023302
try {
33033303
Schemator = window.Schemator;
33043304
} catch (e) {
@@ -3537,10 +3537,12 @@ function defineResource(definition) {
35373537
if (typeof def.useClass === 'function') {
35383538
eval('function ' + def['class'] + '() { def.useClass.call(this); }');
35393539
def[def['class']] = eval(def['class']);
3540-
def[def['class']].prototype = (function(proto) {
3541-
function ctor() { }
3542-
ctor.prototype = proto;
3543-
return new ctor();
3540+
def[def['class']].prototype = (function (proto) {
3541+
function Ctor() {
3542+
}
3543+
3544+
Ctor.prototype = proto;
3545+
return new Ctor();
35443546
})(def.useClass.prototype);
35453547
} else {
35463548
eval('function ' + def['class'] + '() {}');
@@ -4696,9 +4698,9 @@ module.exports = {
46964698
DSUtils: require('./utils'),
46974699
DSErrors: require('./errors'),
46984700
version: {
4699-
full: '1.3.0',
4701+
full: '1.4.0',
47004702
major: parseInt('1', 10),
4701-
minor: parseInt('3', 10),
4703+
minor: parseInt('4', 10),
47024704
patch: parseInt('0', 10),
47034705
alpha: 'false' !== 'false' ? 'false' : false,
47044706
beta: 'false' !== 'false' ? 'false' : false

dist/js-data.js

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @author Jason Dobry <jason.dobry@gmail.com>
33
* @file dist/js-data.js
4-
* @version 1.3.0 - Homepage <http://www.js-data.io/>
4+
* @version 1.4.0 - Homepage <http://www.js-data.io/>
55
* @copyright (c) 2014 Jason Dobry
66
* @license MIT <https://github.com/js-data/js-data/blob/master/LICENSE>
77
*
@@ -3287,7 +3287,7 @@ function DS(options) {
32873287
} catch (e) {
32883288
}
32893289

3290-
if (!Schemator) {
3290+
if (!Schemator || DSUtils.isEmpty(Schemator)) {
32913291
try {
32923292
Schemator = window.Schemator;
32933293
} catch (e) {
@@ -3521,10 +3521,12 @@ function defineResource(definition) {
35213521
if (typeof def.useClass === 'function') {
35223522
eval('function ' + def['class'] + '() { def.useClass.call(this); }');
35233523
def[def['class']] = eval(def['class']);
3524-
def[def['class']].prototype = (function(proto) {
3525-
function ctor() { }
3526-
ctor.prototype = proto;
3527-
return new ctor();
3524+
def[def['class']].prototype = (function (proto) {
3525+
function Ctor() {
3526+
}
3527+
3528+
Ctor.prototype = proto;
3529+
return new Ctor();
35283530
})(def.useClass.prototype);
35293531
} else {
35303532
eval('function ' + def['class'] + '() {}');
@@ -4661,9 +4663,9 @@ module.exports = {
46614663
DSUtils: require('./utils'),
46624664
DSErrors: require('./errors'),
46634665
version: {
4664-
full: '1.3.0',
4666+
full: '1.4.0',
46654667
major: parseInt('1', 10),
4666-
minor: parseInt('3', 10),
4668+
minor: parseInt('4', 10),
46674669
patch: parseInt('0', 10),
46684670
alpha: 'false' !== 'false' ? 'false' : false,
46694671
beta: 'false' !== 'false' ? 'false' : false

dist/js-data.min.js

Lines changed: 5 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js-data.min.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "js-data",
33
"description": "Robust, framework-agnostic in-memory data store.",
4-
"version": "1.3.0",
4+
"version": "1.4.0",
55
"homepage": "http://www.js-data.io",
66
"repository": {
77
"type": "git",

src/datastore/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ function DS(options) {
311311
} catch (e) {
312312
}
313313

314-
if (DSUtils.isEmpty(Schemator)) {
314+
if (!Schemator || DSUtils.isEmpty(Schemator)) {
315315
try {
316316
Schemator = window.Schemator;
317317
} catch (e) {

src/datastore/sync_methods/defineResource.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,12 @@ function defineResource(definition) {
154154
if (typeof def.useClass === 'function') {
155155
eval('function ' + def['class'] + '() { def.useClass.call(this); }');
156156
def[def['class']] = eval(def['class']);
157-
def[def['class']].prototype = (function(proto) {
158-
function ctor() { }
159-
ctor.prototype = proto;
160-
return new ctor();
157+
def[def['class']].prototype = (function (proto) {
158+
function Ctor() {
159+
}
160+
161+
Ctor.prototype = proto;
162+
return new Ctor();
161163
})(def.useClass.prototype);
162164
} else {
163165
eval('function ' + def['class'] + '() {}');

0 commit comments

Comments
 (0)
0