transformalizer
Advanced tools
Comparing version 1.1.2 to 1.1.3
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="1.1.3"></a> | ||
## [1.1.3](https://github.com/GaiamTV/transformalizer/compare/v1.1.2...v1.1.3) (2018-06-15) | ||
### Bug Fixes | ||
* breaks explicit dependency on babel-polyfill ([#26](https://github.com/GaiamTV/transformalizer/issues/26)) ([209d367](https://github.com/GaiamTV/transformalizer/commit/209d367)) | ||
<a name="1.1.2"></a> | ||
@@ -7,0 +17,0 @@ ## [1.1.2](https://github.com/GaiamTV/transformalizer/compare/v1.1.1...v1.1.2) (2017-11-26) |
@@ -6,5 +6,2 @@ 'use strict'; | ||
}); | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
exports.isFunction = isFunction; | ||
@@ -42,3 +39,3 @@ exports.isString = isString; | ||
function isObject(object) { | ||
return object && (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && !Array.isArray(object) && !(object instanceof Date); | ||
return object && typeof object === 'object' && !Array.isArray(object) && !(object instanceof Date); | ||
} | ||
@@ -121,3 +118,3 @@ | ||
if (!isFunction(schema.data.relationships[rel])) { | ||
throw new Error('Invalid Schema: Relationship "' + rel + '" should be a function'); | ||
throw new Error(`Invalid Schema: Relationship "${rel}" should be a function`); | ||
} | ||
@@ -174,3 +171,3 @@ }); | ||
if (resource.id && !isString(resource.id)) { | ||
throw new Error('Primary data resource id "' + resource.id + '" must be a string'); | ||
throw new Error(`Primary data resource id "${resource.id}" must be a string`); | ||
} | ||
@@ -180,7 +177,7 @@ | ||
if (!resource.type) { | ||
throw new Error('Primary data resource "' + resource.id + '" must have a "type" field'); | ||
throw new Error(`Primary data resource "${resource.id}" must have a "type" field`); | ||
} | ||
if (!isString(resource.type)) { | ||
throw new Error('Primary data resource type "' + resource.type + '" must be a string'); | ||
throw new Error(`Primary data resource type "${resource.type}" must be a string`); | ||
} | ||
@@ -190,3 +187,3 @@ | ||
if (resource.attributes && !isObject(resource.attributes)) { | ||
throw new Error('Primary data resource "' + resource.id + ', ' + resource.type + '" field "attributes" must be an object'); | ||
throw new Error(`Primary data resource "${resource.id}, ${resource.type}" field "attributes" must be an object`); | ||
} | ||
@@ -197,3 +194,3 @@ | ||
if (!isObject(resource.relationships)) { | ||
throw new Error('Primary data resource "' + resource.id + ', ' + resource.type + '" field "relationships" must be an object'); | ||
throw new Error(`Primary data resource "${resource.id}, ${resource.type}" field "relationships" must be an object`); | ||
} | ||
@@ -205,3 +202,3 @@ | ||
if (!relationship.data) { | ||
throw new Error('Relationship "' + relationshipName + '" of primary data resource "' + resource.id + ', ' + resource.type + '" must have a "data" field'); | ||
throw new Error(`Relationship "${relationshipName}" of primary data resource "${resource.id}, ${resource.type}" must have a "data" field`); | ||
} | ||
@@ -219,15 +216,15 @@ | ||
if (!d.id) { | ||
throw new Error('Data of relationship "' + relationshipName + '" of primary data resource "' + resource.id + ', ' + resource.type + '" must have an "id" field'); | ||
throw new Error(`Data of relationship "${relationshipName}" of primary data resource "${resource.id}, ${resource.type}" must have an "id" field`); | ||
} | ||
if (!isString(d.id)) { | ||
throw new Error('Data "' + d.id + '" of relationship "' + relationshipName + '" of primary data resource "' + resource.id + ', ' + resource.type + '" must be a string'); | ||
throw new Error(`Data "${d.id}" of relationship "${relationshipName}" of primary data resource "${resource.id}, ${resource.type}" must be a string`); | ||
} | ||
if (!d.type) { | ||
throw new Error('Data "' + d.id + '" of relationship "' + relationshipName + '" of primary data resource "' + resource.id + ', ' + resource.type + '" must have a "type" field'); | ||
throw new Error(`Data "${d.id}" of relationship "${relationshipName}" of primary data resource "${resource.id}, ${resource.type}" must have a "type" field`); | ||
} | ||
if (!isString(d.type)) { | ||
throw new Error('Type "' + d.type + '" of relationship "' + relationshipName + '" of primary data resource "' + resource.id + ', ' + resource.type + '" must be a string'); | ||
throw new Error(`Type "${d.type}" of relationship "${relationshipName}" of primary data resource "${resource.id}, ${resource.type}" must be a string`); | ||
} | ||
@@ -253,3 +250,3 @@ }); | ||
if (!isString(resource.id)) { | ||
throw new Error('Included data resource id "' + resource.id + '" must be a string'); | ||
throw new Error(`Included data resource id "${resource.id}" must be a string`); | ||
} | ||
@@ -259,7 +256,7 @@ | ||
if (!resource.type) { | ||
throw new Error('Included data resource "' + resource.id + '" must have a "type" field'); | ||
throw new Error(`Included data resource "${resource.id}" must have a "type" field`); | ||
} | ||
if (!isString(resource.type)) { | ||
throw new Error('Included data resource type "' + resource.type + '" must be a string'); | ||
throw new Error(`Included data resource type "${resource.type}" must be a string`); | ||
} | ||
@@ -269,3 +266,3 @@ | ||
if (resource.attributes && !isObject(resource.attributes)) { | ||
throw new Error('Included data resource "' + resource.id + ', ' + resource.type + '" field "attributes" must be an object'); | ||
throw new Error(`Included data resource "${resource.id}, ${resource.type}" field "attributes" must be an object`); | ||
} | ||
@@ -276,3 +273,3 @@ | ||
if (!isObject(resource.relationships)) { | ||
throw new Error('Included data resource "' + resource.id + ', ' + resource.type + '" field "relationships" must be an object'); | ||
throw new Error(`Included data resource "${resource.id}, ${resource.type}" field "relationships" must be an object`); | ||
} | ||
@@ -284,3 +281,3 @@ | ||
if (!relationship.data) { | ||
throw new Error('Relationship "' + relationshipName + '" of included data resource "' + resource.id + ', ' + resource.type + '" must have a "data" field'); | ||
throw new Error(`Relationship "${relationshipName}" of included data resource "${resource.id}, ${resource.type}" must have a "data" field`); | ||
} | ||
@@ -298,15 +295,15 @@ | ||
if (!d.id) { | ||
throw new Error('Data of relationship "' + relationshipName + '" of included data resource "' + resource.id + ', ' + resource.type + '" must have an "id" field'); | ||
throw new Error(`Data of relationship "${relationshipName}" of included data resource "${resource.id}, ${resource.type}" must have an "id" field`); | ||
} | ||
if (!isString(d.id)) { | ||
throw new Error('Data "' + d.id + '" of relationship "' + relationshipName + '" of included data resource "' + resource.id + ', ' + resource.type + '" must be a string'); | ||
throw new Error(`Data "${d.id}" of relationship "${relationshipName}" of included data resource "${resource.id}, ${resource.type}" must be a string`); | ||
} | ||
if (!d.type) { | ||
throw new Error('Data "' + d.id + '" of relationship "' + relationshipName + '" of included data resource "' + resource.id + ', ' + resource.type + '" must have a "type" field'); | ||
throw new Error(`Data "${d.id}" of relationship "${relationshipName}" of included data resource "${resource.id}, ${resource.type}" must have a "type" field`); | ||
} | ||
if (!isString(d.type)) { | ||
throw new Error('Type "' + d.type + '" of relationship "' + relationshipName + '" of included data resource "' + resource.id + ', ' + resource.type + '" must be a string'); | ||
throw new Error(`Type "${d.type}" of relationship "${relationshipName}" of included data resource "${resource.id}, ${resource.type}" must be a string`); | ||
} | ||
@@ -319,2 +316,2 @@ }); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL2xpYi91dGlscy5qcyJdLCJuYW1lcyI6WyJpc0Z1bmN0aW9uIiwiaXNTdHJpbmciLCJpc09iamVjdCIsIlRyYW5zZm9ybUVycm9yIiwidmFsaWRhdGVTY2hlbWEiLCJ2YWxpZGF0ZUpzb25BcGlEb2N1bWVudCIsIm9iamVjdCIsImNvbnN0cnVjdG9yIiwiY2FsbCIsImFwcGx5IiwidmFsIiwiQXJyYXkiLCJpc0FycmF5IiwiRGF0ZSIsIm1zZyIsImFyZ3MiLCJwcm90b3R5cGUiLCJfX3Byb3RvX18iLCJFcnJvciIsImNhcHR1cmVTdGFja1RyYWNlIiwibmFtZSIsIm1lc3NhZ2UiLCJzY2hlbWEiLCJkYXRhIiwidW50cmFuc2Zvcm1EYXRhU2NoZW1hIiwiaWQiLCJnZXRJZCIsInRvU3RyaW5nIiwidW50cmFuc2Zvcm1JZCIsInR5cGUiLCJsaW5rcyIsIm1ldGEiLCJhdHRyaWJ1dGVzIiwidW50cmFuc2Zvcm1BdHRyaWJ1dGVzIiwicmVsYXRpb25zaGlwcyIsIk9iamVjdCIsImtleXMiLCJmb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XJjZS5yZWxhdGlvbnNoaXBzKSB7XG4gICAgICAgIGlmICghaXNPYmplY3QocmVzb3VyY2UucmVsYXRpb25zaGlwcykpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFByaW1hcnkgZGF0YSByZXNvdXJjZSBcIiR7cmVzb3VyY2UuaWR9LCAke3Jlc291cmNlLnR5cGV9XCIgZmllbGQgXCJyZWxhdGlvbnNoaXBzXCIgbXVzdCBiZSBhbiBvYmplY3RgKVxuICAgICAgICB9XG5cbiAgICAgICAgT2JqZWN0LmtleXMocmVzb3VyY2UucmVsYXRpb25zaGlwcykuZm9yRWFjaCgocmVsYXRpb25zaGlwTmFtZSkgPT4ge1xuICAgICAgICAgIGNvbnN0IHJlbGF0aW9uc2hpcCA9IHJlc291cmNlLnJlbGF0aW9uc2hpcHNbcmVsYXRpb25zaGlwTmFtZV1cblxuICAgICAgICAgIGlmICghcmVsYXRpb25zaGlwLmRhdGEpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgUmVsYXRpb25zaGlwIFwiJHtyZWxhdGlvbnNoaXBOYW1lfVwiIG9mIHByaW1hcnkgZGF0YSByZXNvdXJjZSBcIiR7cmVzb3VyY2UuaWR9LCAke3Jlc291cmNlLnR5cGV9XCIgbXVzdCBoYXZlIGEgXCJkYXRhXCIgZmllbGRgKVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGxldCBkYXRhXG5cbiAgICAgICAgICBpZiAoIUFycmF5LmlzQXJyYXkocmVsYXRpb25zaGlwLmRhdGEpKSB7XG4gICAgICAgICAgICBkYXRhID0gW3JlbGF0aW9uc2hpcC5kYXRhXVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBkYXRhID0gcmVsYXRpb25zaGlwLmRhdGFcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBkYXRhLmZvckVhY2goKGQpID0+IHtcbiAgICAgICAgICAgIGlmICghZC5pZCkge1xuICAgICAgICAgICAgICB0aHJvdyBu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uICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYERhdGEgXCIke2QuaWR9XCIgb2YgcmVsYXRpb25zaGlwIFwiJHtyZWxhdGlvbnNoaXBOYW1lfVwiIG9mIGluY2x1ZGVkIGRhdGEgcmVzb3VyY2UgXCIke3Jlc291cmNlLmlkfSwgJHtyZXNvdXJjZS50eXBlfVwiIG11c3QgYmUgYSBzdHJpbmdgKVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAoIWQudHlwZSkge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYERhdGEgXCIke2QuaWR9XCIgb2YgcmVsYXRpb25zaGlwIFwiJHtyZWxhdGlvbnNoaXBOYW1lfVwiIG9mIGluY2x1ZGVkIGRhdGEgcmVzb3VyY2UgXCIke3Jlc291cmNlLmlkfSwgJHtyZXNvdXJjZS50eXBlfVwiIG11c3QgaGF2ZSBhIFwidHlwZVwiIGZpZWxkYClcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFpc1N0cmluZyhkLnR5cGUpKSB7XG4gICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgVHlwZSBcIiR7ZC50eXBlfVwiIG9mIHJlbGF0aW9uc2hpcCBcIiR7cmVsYXRpb25zaGlwTmFtZX1cIiBvZiBpbmNsdWRlZCBkYXRhIHJlc291cmNlIFwiJHtyZXNvdXJjZS5pZH0sICR7cmVzb3VyY2UudHlwZX1cIiBtdXN0IGJlIGEgc3RyaW5nYClcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9KVxuICAgICAgICB9KVxuICAgICAgfVxuICAgIH0pXG4gIH1cbn1cbiJdfQ== |
{ | ||
"name": "transformalizer", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "a bare bones node module for building JSON API v1.0 compliant payloads", | ||
@@ -53,3 +53,3 @@ "main": "./dist/transformalizer.js", | ||
"babel-plugin-transform-object-rest-spread": "^6.22.0", | ||
"babel-preset-latest": "^6.22.0", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-register": "^6.22.0", | ||
@@ -68,8 +68,6 @@ "chai": "^3.5.0", | ||
"sinon": "^1.17.7", | ||
"source-map-support": "^0.4.11", | ||
"standard-version": "^4.0.0" | ||
}, | ||
"dependencies": { | ||
"babel-polyfill": "^6.26.0", | ||
"source-map-support": "^0.4.11" | ||
} | ||
"dependencies": {} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
0
142792
21
1011
- Removedbabel-polyfill@^6.26.0
- Removedsource-map-support@^0.4.11
- Removedbabel-polyfill@6.26.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removedregenerator-runtime@0.10.50.11.1(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-support@0.4.18(transitive)