diff options
-rw-r--r-- | .editorconfig | 3 | ||||
-rw-r--r-- | .gitmodules | 4 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | build/async-bundle.js | 19 | ||||
m--------- | deps/lodash-es | 0 | ||||
-rw-r--r-- | gulpfile.js | 1 | ||||
-rw-r--r-- | package.json | 8 | ||||
-rw-r--r-- | support/build/plugin-lodash-import-rename.js | 2 |
8 files changed, 16 insertions, 25 deletions
diff --git a/.editorconfig b/.editorconfig index 7f502d4..239100f 100644 --- a/.editorconfig +++ b/.editorconfig @@ -8,3 +8,6 @@ trim_trailing_whitespace = true insert_final_newline = true indent_style = space indent_size = 4 + +[package.json] +indent_size = 2 diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index c5976ce..0000000 --- a/.gitmodules +++ /dev/null @@ -1,4 +0,0 @@ -[submodule "deps/lodash-es"] - path = deps/lodash-es - url = https://github.com/lodash/lodash - branch = es @@ -24,10 +24,8 @@ lint: jshint $(SRC) test/*.js mocha_test/* perf/*.js jscs $(SRC) test/*.js mocha_test/* perf/*.js -submodule-clone: - git submodule update --init --recursive -build-bundle: submodule-clone +build-bundle: $(NODE) $(SCRIPTS)/build/modules-cjs.js $(NODE) $(SCRIPTS)/build/aggregate-bundle.js $(NODE) $(SCRIPTS)/build/aggregate-cjs.js diff --git a/build/async-bundle.js b/build/async-bundle.js index d19ad20..d6b8c79 100644 --- a/build/async-bundle.js +++ b/build/async-bundle.js @@ -1246,30 +1246,21 @@ var mapSeries = doSeries(_asyncMap); + /* Built-in method references for those with the same name as other `lodash` methods. */ var nativeCeil = Math.ceil; var nativeMax$2 = Math.max; /** - * The base implementation of `_.range` and `_.rangeRight`. + * The base implementation of `_.range` and `_.rangeRight` without support + * for non-number arguments. * * @private - * @param {number} [start=0] The start of the range. + * @param {number} start The start of the range. * @param {number} end The end of the range. - * @param {number} [step=1] The value to increment or decrement by. + * @param {number} step The value to increment or decrement by. * @param {boolean} [fromRight] Specify iterating from right to left. * @returns {Array} Returns the new array of numbers. */ function baseRange(start, end, step, fromRight) { - start = toNumber(start); - start = start === start ? start : 0; - - if (end === undefined) { - end = start; - start = 0; - } else { - end = toNumber(end) || 0; - } - step = step === undefined ? (start < end ? 1 : -1) : (toNumber(step) || 0); - var index = -1, length = nativeMax$2(nativeCeil((end - start) / (step || 1)), 0), result = Array(length); diff --git a/deps/lodash-es b/deps/lodash-es deleted file mode 160000 -Subproject b94d9760e88c33a8ab0abb36933d5c4bd573018 diff --git a/gulpfile.js b/gulpfile.js index 2655edf..fbc58a1 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,4 +1,5 @@ 'use strict'; +// This is used to generate individual packages for each async method var gulp = require('gulp'); var path = require('path'); diff --git a/package.json b/package.json index 8197cff..1fd6c5e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "async", "description": "Higher-order functions and common patterns for asynchronous code", - "version": "0.5.2", + "version": "2.0.0-alpha", "main": "lib/async.js", "author": "Caolan McMahon", "repository": { @@ -17,7 +17,10 @@ "module", "utility" ], - "dependencies": {}, + "dependencies": { + "lodash": "lodash/lodash#npm", + "lodash-es": "lodash/lodash#es" + }, "devDependencies": { "babel-cli": "^6.3.17", "babel-core": "^6.3.26", @@ -38,7 +41,6 @@ "karma-firefox-launcher": "^0.1.6", "karma-mocha": "^0.2.0", "karma-mocha-reporter": "^1.0.2", - "lodash": "lodash/lodash#npm", "mocha": "^2.2.5", "native-promise-only": "^0.8.0-a", "nodeunit": ">0.0.0", diff --git a/support/build/plugin-lodash-import-rename.js b/support/build/plugin-lodash-import-rename.js index cb765fa..d3c2c70 100644 --- a/support/build/plugin-lodash-import-rename.js +++ b/support/build/plugin-lodash-import-rename.js @@ -14,7 +14,7 @@ export default function() { let dir = dirname(f).split(sep); let relative = _.repeat('../', dir.length + 1); - node.source.value = value.replace(/\blodash\b/, relative + 'deps/lodash-es'); + node.source.value = value.replace(/\blodash\b/, relative + 'node_modules/lodash-es'); } } } |