@mapbox/mapbox-gl-style-spec
Advanced tools
Comparing version 10.0.0 to 10.0.1-test-publish.1
@@ -54,9 +54,11 @@ // @flow | ||
const overloads = Array.isArray(definition) ? | ||
const availableOverloads = Array.isArray(definition) ? | ||
[[definition[1], definition[2]]] : | ||
definition.overloads.filter(overload => ( | ||
!Array.isArray(overload[0][0]) || // varags | ||
overload[0][0].length === args.length - 1 // correct param count | ||
)); | ||
definition.overloads; | ||
const overloads = availableOverloads.filter(([signature]) => ( | ||
!Array.isArray(signature) || // varags | ||
signature.length === args.length - 1 // correct param count | ||
)); | ||
// First parse all the args | ||
@@ -103,3 +105,3 @@ const parsedArgs: Array<Expression> = []; | ||
assert(signatureContext.errors.length > 0); | ||
assert(!signatureContext || signatureContext.errors.length > 0); | ||
@@ -109,3 +111,4 @@ if (overloads.length === 1) { | ||
} else { | ||
const signatures = overloads | ||
const expected = overloads.length ? overloads : availableOverloads; | ||
const signatures = expected | ||
.map(([params]) => stringifySignature(params)) | ||
@@ -112,0 +115,0 @@ .join(' | '); |
@@ -103,3 +103,3 @@ // @flow | ||
const [r, g, b, a] = v.value; | ||
return `rgba(${r * 255}, ${g * 255}, ${b * 255}, ${a})`; | ||
return `rgba(${r * 255},${g * 255},${b * 255},${a})`; | ||
} else { | ||
@@ -255,2 +255,7 @@ return JSON.stringify(v); | ||
], | ||
'sqrt': [ | ||
NumberType, | ||
[NumberType], | ||
(ctx, [x]) => Math.sqrt(x.evaluate(ctx)) | ||
], | ||
'log10': [ | ||
@@ -257,0 +262,0 @@ NumberType, |
{ | ||
"name": "@mapbox/mapbox-gl-style-spec", | ||
"description": "a specification for mapbox gl styles", | ||
"version": "10.0.0", | ||
"version": "10.0.1-test-publish.1", | ||
"author": "Mapbox", | ||
@@ -12,3 +12,26 @@ "keywords": [ | ||
"license": "ISC", | ||
"main": "index.js", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"copy-flow-typed": "cp -R ../../flow-typed .", | ||
"build": "../../node_modules/.bin/browserify style-spec.js --no-builtins --no-bundle-external --insert-global-vars=\"__filename,__dirname\" --standalone=mapboxGlStyleSpecification | ../../node_modules/.bin/derequire > dist/index.js", | ||
"prepublish": "in-publish && yarn copy-flow-typed && yarn build || not-in-publish", | ||
"postpublish": "in-publish && rm -r flow-typed dist/index.js || not-in-publish" | ||
}, | ||
"browserify": { | ||
"transform": [ | ||
"unflowify", | ||
[ | ||
"bubleify", | ||
{ | ||
"bubleError": true, | ||
"transforms": { | ||
"dangerousForOf": true | ||
}, | ||
"objectAssign": "Object.assign" | ||
} | ||
], | ||
"brfs", | ||
"./build/strictify" | ||
] | ||
}, | ||
"repository": { | ||
@@ -25,3 +48,7 @@ "type": "git", | ||
"dependencies": { | ||
"@mapbox/unitbezier": "^0.0.0", | ||
"brfs": "^1.4.0", | ||
"bubleify": "^0.7.0", | ||
"csscolorparser": "~1.0.2", | ||
"in-publish": "^2.0.0", | ||
"jsonlint-lines-primitives": "~1.6.0", | ||
@@ -31,4 +58,5 @@ "lodash.isequal": "^3.0.4", | ||
"rw": "^1.3.3", | ||
"sort-object": "^0.3.2" | ||
"sort-object": "^0.3.2", | ||
"unflowify": "^1.0.0" | ||
} | ||
} |
@@ -23,3 +23,3 @@ | ||
module.exports = function validateStyle(style, styleSpec) { | ||
const index = require('./'); | ||
const index = require('./style-spec'); | ||
@@ -26,0 +26,0 @@ if (style instanceof String || typeof style === 'string' || style instanceof Buffer) { |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
385905
97
11583
1
11
2
+ Added@mapbox/unitbezier@^0.0.0
+ Addedbrfs@^1.4.0
+ Addedbubleify@^0.7.0
+ Addedin-publish@^2.0.0
+ Addedunflowify@^1.0.0
+ Added@mapbox/unitbezier@0.0.0(transitive)
+ Addedacorn@3.3.07.4.1(transitive)
+ Addedacorn-jsx@3.0.1(transitive)
+ Addedacorn-object-spread@1.0.0(transitive)
+ Addedansi-regex@2.1.1(transitive)
+ Addedansi-styles@2.2.1(transitive)
+ Addedbabylon@6.18.0(transitive)
+ Addedbrfs@1.6.1(transitive)
+ Addedbuble@0.15.2(transitive)
+ Addedbubleify@0.7.0(transitive)
+ Addedbuffer-equal@0.0.1(transitive)
+ Addedbuffer-from@1.1.2(transitive)
+ Addedchalk@1.1.3(transitive)
+ Addedconcat-stream@1.6.2(transitive)
+ Addedconvert-source-map@1.9.0(transitive)
+ Addedcore-util-is@1.0.3(transitive)
+ Addeddeep-is@0.1.4(transitive)
+ Addedduplexer2@0.1.4(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedescodegen@1.9.12.1.0(transitive)
+ Addedesprima@3.1.34.0.1(transitive)
+ Addedestraverse@4.3.05.3.0(transitive)
+ Addedesutils@2.0.3(transitive)
+ Addedfalafel@2.2.5(transitive)
+ Addedfast-levenshtein@2.0.6(transitive)
+ Addedflow-remove-types@1.2.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhas@1.0.4(transitive)
+ Addedhas-ansi@2.0.0(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedin-publish@2.0.1(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedis-core-module@2.15.1(transitive)
+ Addedisarray@1.0.02.0.5(transitive)
+ Addedlevn@0.3.0(transitive)
+ Addedmagic-string@0.14.00.22.5(transitive)
+ Addedmerge-source-map@1.0.4(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedobject-assign@4.1.1(transitive)
+ Addedobject-inspect@1.4.1(transitive)
+ Addedoptionator@0.8.3(transitive)
+ Addedos-homedir@1.0.2(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedprelude-ls@1.1.2(transitive)
+ Addedprocess-nextick-args@2.0.1(transitive)
+ Addedquote-stream@1.0.2(transitive)
+ Addedreadable-stream@2.3.8(transitive)
+ Addedresolve@1.22.8(transitive)
+ Addedsafe-buffer@5.1.2(transitive)
+ Addedshallow-copy@0.0.1(transitive)
+ Addedsource-map@0.5.70.6.1(transitive)
+ Addedstatic-eval@2.1.1(transitive)
+ Addedstatic-module@2.2.5(transitive)
+ Addedstring_decoder@1.1.1(transitive)
+ Addedstrip-ansi@3.0.1(transitive)
+ Addedsupports-color@2.0.0(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedthrough@2.3.8(transitive)
+ Addedthrough2@2.0.5(transitive)
+ Addedtype-check@0.3.2(transitive)
+ Addedtypedarray@0.0.6(transitive)
+ Addedunflowify@1.0.1(transitive)
+ Addedutil-deprecate@1.0.2(transitive)
+ Addedvlq@0.2.3(transitive)
+ Addedword-wrap@1.2.5(transitive)
+ Addedxtend@4.0.2(transitive)