From 21a29deec0372fcd45a6c89abb93967ccea21221 Mon Sep 17 00:00:00 2001 From: Jason Wohlgemuth Date: Fri, 26 Oct 2018 20:04:20 +0300 Subject: [PATCH] Replace grunt-openwith opn-cli, update grunt-jsdoc --- Gruntfile.js | 7 - docs/atmosphere.js.html | 10 +- docs/geodetic.js.html | 40 +++-- docs/index.html | 2 +- docs/math.js.html | 2 +- ...odule-atmosphere-Atmospheric%20Strata.html | 2 +- docs/module-atmosphere.html | 2 +- .../module-geodetic-Geospatial%20Formats.html | 2 +- docs/module-geodetic-WGS84%20Datum.html | 2 +- docs/module-geodetic.html | 2 +- docs/module-math.html | 2 +- package-lock.json | 162 ++++++++++++------ package.json | 4 +- 13 files changed, 145 insertions(+), 94 deletions(-) diff --git a/Gruntfile.js b/Gruntfile.js index 1acfd0f..6923c99 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -24,13 +24,6 @@ module.exports = function (grunt) { } } }, - /** - * Open files in browsers for review - * @see {@link https://github.com/jsoverson/grunt-open} - **/ - open: { - docs: { path: __dirname + '/docs/index.html' } - }, benchmark: { options: { displayResults: true }, all: { diff --git a/docs/atmosphere.js.html b/docs/atmosphere.js.html index 14549bd..2c359b8 100644 --- a/docs/atmosphere.js.html +++ b/docs/atmosphere.js.html @@ -98,9 +98,7 @@

atmosphere.js

* @returns {string} The name of the strata that contains the altitude **/ function getStrata(altitude: number): string { - return findKey(ATMOSPHERIC_STRATA, (val) => { - return val[0] <= altitude && altitude <= val[1]; - }); + return findKey(ATMOSPHERIC_STRATA, val => val[0] <= altitude && altitude <= val[1]); } /** * @description Get molecular weight based on layer @@ -169,7 +167,7 @@

atmosphere.js

return h[i]; } function getLayerIndex(altitude: number) { - let inLayer = partial(lte, altitude); + const inLayer = partial(lte, altitude); return range(NUMBER_OF_LAYERS) .map(h) .findIndex(inLayer); @@ -237,7 +235,7 @@

atmosphere.js

1.7, 1.1, 0 - ].map(function(a) {return a === 0 ? a : (a / 1000);});/* eslint-enable no-magic-numbers */ + ].map(a => a === 0 ? a : (a / 1000));/* eslint-enable no-magic-numbers */ return lapseRates[i]; } /** @@ -306,7 +304,7 @@

atmosphere.js


diff --git a/docs/geodetic.js.html b/docs/geodetic.js.html index 4aec235..b59e3f1 100644 --- a/docs/geodetic.js.html +++ b/docs/geodetic.js.html @@ -42,6 +42,19 @@

geodetic.js

// @flow
 type point2 = [number, number];
 type point3 = [number, number, number];
+type DatumObject = {
+    EARTH_AUTHALIC_RADIUS: number,
+    EARTH_EQUATOR_RADIUS: number,
+    EARTH_MEAN_RADIUS: number,
+    FIRST_ECCENTRICITY_SQUARED: number,
+    FLATTENING: number,
+    LINEAR_ECCENTRICITY: number,
+    SEMI_MAJOR_AXIS: number,
+    SEMI_MINOR_AXIS: number
+};
+type FormatsObjects = {
+    CARTESIAN: string
+};
 /**
  * @file Geodesic, cartographic, and geographic
  * @author Jason Wohlgemuth
@@ -66,16 +79,16 @@ 

geodetic.js

function frac(float: number): any { float = abs(float); - let digits = (float !== trunc(float)) ? String(float).split('.')[1].length : 0; + const digits = (float !== trunc(float)) ? String(float).split('.')[1].length : 0; return (float - trunc(float)).toFixed(digits); } function clone(obj) {return JSON.parse(JSON.stringify(obj));} function squared(n: number): number {return n * n;} -function getArguments() {return Array.prototype.slice.apply(arguments);} +function getArguments(...args) {return Array.prototype.slice.apply(args);} function padArrayWithZeroes(n, arr) {return arr.concat(times(n - arr.length, constant(0)));} function onlyAllowNumbers(arr) {return arr.every(isNumber) ? arr : [];} function processInputs(fn) { - let processingSteps = [ + const processingSteps = [ getArguments, flatten, curry(padArrayWithZeroes)(3), @@ -92,7 +105,7 @@

geodetic.js

* @property {string} RADIAN_DEGREES=RadianDegrees * @property {string} CARTESIAN=Cartesian **/ -const FORMATS = Object.create(null, { +const FORMATS: FormatsObjects = Object.create({}, { CARTESIAN: {enumerable: true, value: 'Cartesian'}, DEGREES_MINUTES_SECONDS: {enumerable: true, value: 'DegreesMinuteSeconds'}, DEGREES_DECIMAL_MINUTES: {enumerable: true, value: 'DegreesDecimalMinutes'}, @@ -113,7 +126,7 @@

geodetic.js

* @property {number} AXIS_RATIO=0.996647189335 b/a * @see [DoD World Geodetic System 1984]{@link http://earth-info.nga.mil/GandG/publications/tr8350.2/tr8350_2.html} **/ -const DATUM = Object.create(null, { +const DATUM: DatumObject = Object.create({}, { EARTH_EQUATOR_RADIUS: {enumerable: true, value: 6378137}, EARTH_MEAN_RADIUS: {enumerable: true, value: 6371001}, EARTH_AUTHALIC_RADIUS: {enumerable: true, value: 6371007}, @@ -250,7 +263,7 @@

geodetic.js

const E_SQUARED = squared(E); const R_SQUARED = squared(R); const R_SQUARED_MINUS_E_SQUARED = R_SQUARED - E_SQUARED; - let u = sqrt( + const u = sqrt( (1 / 2) * (R_SQUARED_MINUS_E_SQUARED + sqrt(squared(R_SQUARED_MINUS_E_SQUARED) + (4 * E_SQUARED * Z_SQUARED))) ); const TAN_REDUCED_LATITUDE = (sqrt(squared(u) + E_SQUARED) * z) / (u * Q); @@ -285,7 +298,7 @@

geodetic.js

return null; } const data = value; - const dimension = data.length - data.slice(0).reverse().findIndex(function(val) {return abs(val) > 0;}); + const dimension = data.length - data.slice(0).reverse().findIndex(val => abs(val) > 0); const degrees = trunc(value[0]); let minutes = 0; let seconds = 0; @@ -297,8 +310,7 @@

geodetic.js

minutes = trunc(data[1]); seconds = frac(data[1]) * SECONDS_PER_MINUTE; } else if (dimension === GEOSPATIAL_VALUE_LENGTH) { - minutes = value[1]; - seconds = value[2]; + [, minutes, seconds] = value; } return [ degrees, @@ -326,11 +338,11 @@

geodetic.js

if (value.length !== GEOSPATIAL_VALUE_LENGTH) { return null; } - let data = value; - let dimension = data.length - clone(data).reverse().findIndex((val) => {return abs(val) > 0;}); - let degrees = trunc(data[0]); + const data = value; + const dimension = data.length - clone(data).reverse().findIndex(val => abs(val) > 0); + const degrees = trunc(data[0]); let minutes = 0; - let seconds = 0; + const seconds = 0; /* istanbul ignore else */ if (dimension === 1) { minutes = frac(data[0]) * MINUTES_PER_DEGREE; @@ -373,7 +385,7 @@

geodetic.js


- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/index.html b/docs/index.html index fa8f127..f14a86b 100644 --- a/docs/index.html +++ b/docs/index.html @@ -110,7 +110,7 @@

License

- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/math.js.html b/docs/math.js.html index 2d9266a..7e4939f 100644 --- a/docs/math.js.html +++ b/docs/math.js.html @@ -86,7 +86,7 @@

math.js


- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-atmosphere-Atmospheric%20Strata.html b/docs/module-atmosphere-Atmospheric%20Strata.html index 8117a06..3292f52 100644 --- a/docs/module-atmosphere-Atmospheric%20Strata.html +++ b/docs/module-atmosphere-Atmospheric%20Strata.html @@ -134,7 +134,7 @@


- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-atmosphere.html b/docs/module-atmosphere.html index 6dc0b09..5ac8862 100644 --- a/docs/module-atmosphere.html +++ b/docs/module-atmosphere.html @@ -1362,7 +1362,7 @@

Returns:

- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-geodetic-Geospatial%20Formats.html b/docs/module-geodetic-Geospatial%20Formats.html index ac74c02..6235060 100644 --- a/docs/module-geodetic-Geospatial%20Formats.html +++ b/docs/module-geodetic-Geospatial%20Formats.html @@ -318,7 +318,7 @@
Properties:

- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-geodetic-WGS84%20Datum.html b/docs/module-geodetic-WGS84%20Datum.html index 6b91bf8..350ba63 100644 --- a/docs/module-geodetic-WGS84%20Datum.html +++ b/docs/module-geodetic-WGS84%20Datum.html @@ -418,7 +418,7 @@
Properties:

- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-geodetic.html b/docs/module-geodetic.html index 498c6fa..ae2518e 100644 --- a/docs/module-geodetic.html +++ b/docs/module-geodetic.html @@ -1574,7 +1574,7 @@
Examples

- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/docs/module-math.html b/docs/module-math.html index f0858b8..8530551 100644 --- a/docs/module-math.html +++ b/docs/module-math.html @@ -167,7 +167,7 @@

math


- Generated by JSDoc 3.5.3 on Sat Oct 28 2017 21:27:59 GMT-0500 (CDT) using the Minami theme. + Generated by JSDoc 3.5.5 on Fri Oct 26 2018 20:03:22 GMT+0300 (East Africa Time) using the Minami theme.
diff --git a/package-lock.json b/package-lock.json index 49177eb..3e69989 100644 --- a/package-lock.json +++ b/package-lock.json @@ -2188,9 +2188,9 @@ "optional": true }, "bluebird": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", - "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.2.tgz", + "integrity": "sha512-dhHTWMI7kMx5whMQntl7Vr9C6BvV10lFXDAasnqnrMYhXVCzzk6IO9Fo2L75jXHT07WrOngL1WDXOp+yYS91Yg==", "dev": true }, "bn.js": { @@ -2924,13 +2924,24 @@ } }, "cross-spawn": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-3.0.1.tgz", - "integrity": "sha1-ElYDfsufDF9549bvE14wdwGEuYI=", + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", "dev": true, "requires": { - "lru-cache": "^4.0.1", + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==", + "dev": true + } } }, "cryptiles": { @@ -3997,6 +4008,12 @@ "integrity": "sha1-peeo/7+kk7Q7kju9TKiaU7Y7YSs=", "dev": true }, + "file-type": { + "version": "3.9.0", + "resolved": "http://registry.npmjs.org/file-type/-/file-type-3.9.0.tgz", + "integrity": "sha1-JXoHg4TR24CHvESdEH1SpSZyuek=", + "dev": true + }, "filename-regex": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", @@ -4201,14 +4218,12 @@ "balanced-match": { "version": "1.0.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, "dev": true, - "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -4223,20 +4238,17 @@ "code-point-at": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "concat-map": { "version": "0.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "console-control-strings": { "version": "1.1.0", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "core-util-is": { "version": "1.0.2", @@ -4353,8 +4365,7 @@ "inherits": { "version": "2.0.3", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "ini": { "version": "1.3.5", @@ -4366,7 +4377,6 @@ "version": "1.0.0", "bundled": true, "dev": true, - "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -4381,7 +4391,6 @@ "version": "3.0.4", "bundled": true, "dev": true, - "optional": true, "requires": { "brace-expansion": "^1.1.7" } @@ -4389,14 +4398,12 @@ "minimist": { "version": "0.0.8", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "minipass": { "version": "2.2.4", "bundled": true, "dev": true, - "optional": true, "requires": { "safe-buffer": "^5.1.1", "yallist": "^3.0.0" @@ -4415,7 +4422,6 @@ "version": "0.5.1", "bundled": true, "dev": true, - "optional": true, "requires": { "minimist": "0.0.8" } @@ -4496,8 +4502,7 @@ "number-is-nan": { "version": "1.0.1", "bundled": true, - "dev": true, - "optional": true + "dev": true }, "object-assign": { "version": "4.1.1", @@ -4509,7 +4514,6 @@ "version": "1.4.0", "bundled": true, "dev": true, - "optional": true, "requires": { "wrappy": "1" } @@ -4631,7 +4635,6 @@ "version": "1.0.2", "bundled": true, "dev": true, - "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -4995,13 +4998,14 @@ } }, "grunt-jsdoc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-jsdoc/-/grunt-jsdoc-2.1.0.tgz", - "integrity": "sha1-jCrlCAygnRjXre+Hl2eNRkIaPjo=", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/grunt-jsdoc/-/grunt-jsdoc-2.3.0.tgz", + "integrity": "sha512-gC66TCRXeQMj3HIyqVSBJm8zdUz43e5vaG/PLO/627A1edbJnzxhJV7nF0KqLwMM0RDNu1istC6fvfnYqFKi3w==", "dev": true, "requires": { - "cross-spawn": "^3.0.1", - "jsdoc": "^3.4.0" + "cross-spawn": "^6.0.5", + "jsdoc": "~3.5.5", + "marked": "^0.5.0" } }, "grunt-known-options": { @@ -5063,15 +5067,6 @@ } } }, - "grunt-open": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/grunt-open/-/grunt-open-0.2.3.tgz", - "integrity": "sha1-FFrEUCalf8+qQz/9c5iuRtK9OVc=", - "dev": true, - "requires": { - "open": "~0.0.4" - } - }, "handlebars": { "version": "4.0.12", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.0.12.tgz", @@ -6886,12 +6881,12 @@ "optional": true }, "jsdoc": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.3.tgz", - "integrity": "sha512-K9mjBmCm2P62kqJ5UU6Zj7zZnJoLxZBzgLm2yVv98tqLHYSpIvxUkM+dGBua+yUsvOhXsAh232a/joE+86D4CQ==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/jsdoc/-/jsdoc-3.5.5.tgz", + "integrity": "sha512-6PxB65TAU4WO0Wzyr/4/YhlGovXl0EVYfpKbpSroSj0qBxT4/xod/l40Opkm38dRHRdQgdeY836M0uVnJQG7kg==", "dev": true, "requires": { - "babylon": "~7.0.0-beta.16", + "babylon": "7.0.0-beta.19", "bluebird": "~3.5.0", "catharsis": "~0.8.9", "escape-string-regexp": "~1.0.5", @@ -6906,9 +6901,15 @@ }, "dependencies": { "babylon": { - "version": "7.0.0-beta.16", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.16.tgz", - "integrity": "sha1-RIzu3uwKXvVrYoEuNVa/NsW7l4E=", + "version": "7.0.0-beta.19", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.19.tgz", + "integrity": "sha512-Vg0C9s/REX6/WIXN37UKpv5ZhRi6A4pjHlpkE34+8/a6c2W1Q692n3hmc+SZG5lKRnaExLUbxtJ1SVT+KaCQ/A==", + "dev": true + }, + "marked": { + "version": "0.3.19", + "resolved": "http://registry.npmjs.org/marked/-/marked-0.3.19.tgz", + "integrity": "sha512-ea2eGWOqNxPcXv8dyERdSr/6FmzvWwzjMxpfGB/sbMccXoct+xY+YukPD+QTUZwyvK7BZwcr4m21WBOW41pAkg==", "dev": true } } @@ -7793,9 +7794,9 @@ } }, "marked": { - "version": "0.3.6", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.3.6.tgz", - "integrity": "sha1-ssbGGPzOzk74bE/Gy4p8v1rtqNc=", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.5.1.tgz", + "integrity": "sha512-iUkBZegCZou4AdwbKTwSW/lNDcz5OuRSl3qdcl31Ia0B2QPG0Jn+tKblh/9/eP9/6+4h27vpoh8wel/vQOV0vw==", "dev": true }, "mem": { @@ -8316,11 +8317,36 @@ "mimic-fn": "^1.0.0" } }, - "open": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/open/-/open-0.0.5.tgz", - "integrity": "sha1-QsPhjslUZra/DcQvOilFw/DK2Pw=", - "dev": true + "opn": { + "version": "4.0.2", + "resolved": "http://registry.npmjs.org/opn/-/opn-4.0.2.tgz", + "integrity": "sha1-erwi5kTf9jsKltWrfyeQwPAavJU=", + "dev": true, + "requires": { + "object-assign": "^4.0.1", + "pinkie-promise": "^2.0.0" + } + }, + "opn-cli": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/opn-cli/-/opn-cli-3.1.0.tgz", + "integrity": "sha1-+BmubK4LQRvQFJuFYP5siK2tIPg=", + "dev": true, + "requires": { + "file-type": "^3.6.0", + "get-stdin": "^5.0.1", + "meow": "^3.7.0", + "opn": "^4.0.0", + "temp-write": "^2.1.0" + }, + "dependencies": { + "get-stdin": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", + "integrity": "sha1-Ei4WFZHiH/TFJTAwVpPyDmOTo5g=", + "dev": true + } + } }, "optimist": { "version": "0.6.1", @@ -10259,6 +10285,28 @@ "integrity": "sha1-fLy2S1oUG2ou/CxdLGe04VCyomg=", "dev": true }, + "temp-write": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/temp-write/-/temp-write-2.1.0.tgz", + "integrity": "sha1-WYkJGODvCdVIqqNC9L00CdhATpY=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "mkdirp": "^0.5.0", + "os-tmpdir": "^1.0.0", + "pify": "^2.2.0", + "pinkie-promise": "^2.0.0", + "uuid": "^2.0.1" + }, + "dependencies": { + "uuid": { + "version": "2.0.3", + "resolved": "http://registry.npmjs.org/uuid/-/uuid-2.0.3.tgz", + "integrity": "sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho=", + "dev": true + } + } + }, "test-exclude": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz", diff --git a/package.json b/package.json index 97ad870..bf8ff7c 100644 --- a/package.json +++ b/package.json @@ -35,13 +35,13 @@ "grunt-benchmark": "^1.0.0", "grunt-cli": "^1.3.1", "grunt-contrib-copy": "^1.0.0", - "grunt-jsdoc": "^2.1.0", - "grunt-open": "^0.2.3", + "grunt-jsdoc": "^2.3.0", "jest": "^23.6.0", "jest-flow-transform": "^1.0.1", "jsdoc-babel": "^0.3.0", "load-grunt-tasks": "^3.1.0", "minami": "^1.2.3", + "opn-cli": "^3.1.0", "time-grunt": "^1.1.0", "unflowify": "^1.0.1", "watch": "^1.0.2"