diff --git a/CHANGELOG.md b/CHANGELOG.md index b59fc6e4..c7457cc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# v0.5.7 + * Support dotenv for loading config (#59) + * Improve error message is select() is called without args (#70) + * Update dependencies (#73) + # v0.5.6 * Fix crash when specifying sort direction or cellFormat options diff --git a/build/airtable.browser.js b/build/airtable.browser.js index c0fe34d6..cb5e3b85 100644 --- a/build/airtable.browser.js +++ b/build/airtable.browser.js @@ -121,7 +121,11 @@ function callbackToPromise(fn, context, callbackArgIndex) { fn.apply(context, arguments); } else { var args = []; - for (var i = 0; i < arguments.length; i++) { + // If an explicit callbackArgIndex is set, but the function is called + // with too few arguments, we want to push undefined onto args so that + // our constructed callback ends up at the right index. + var argLen = Math.max(arguments.length, callbackArgIndex); + for (var i = 0; i < argLen; i++) { args.push(arguments[i]); } return new Promise(function(resolve, reject) { @@ -141,7 +145,7 @@ function callbackToPromise(fn, context, callbackArgIndex) { module.exports = callbackToPromise; },{}],4:[function(require,module,exports){ -/*jshint strict:false */ +// jshint ignore: start /* Simple JavaScript Inheritance * By John Resig http://ejohn.org/ @@ -21021,7 +21025,7 @@ var Airtable = Class.extend({ init: function(opts) { opts = opts || {}; - const default_config = Airtable.default_config(); + var default_config = Airtable.default_config(); this._apiKey = opts.apiKey || Airtable.apiKey || default_config.apiKey; this._endpointUrl = opts.endpointUrl || Airtable.endpointUrl || default_config.endpointUrl; @@ -21039,14 +21043,16 @@ var Airtable = Class.extend({ } }); -Airtable.default_config = () => ({ - endpointUrl: undefined || 'https://api.airtable.com', - apiVersion: '0.1.0', - apiKey: undefined, - allowUnauthorizedSsl: false, - noRetryIfRateLimited: false, - requestTimeout: 300 * 1000, // 5 minutes -}); +Airtable.default_config = function () { + return { + endpointUrl: undefined || 'https://api.airtable.com', + apiVersion: '0.1.0', + apiKey: undefined, + allowUnauthorizedSsl: false, + noRetryIfRateLimited: false, + requestTimeout: 300 * 1000, // 5 minutes + }; +}; Airtable.configure = function(opts) { Airtable.apiKey = opts.apiKey; diff --git a/package-lock.json b/package-lock.json index 6249de2b..e653f55e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -802,7 +802,7 @@ }, "browserify-aes": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", "dev": true, "requires": { @@ -880,7 +880,7 @@ }, "browserify-rsa": { "version": "4.0.1", - "resolved": "http://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", "dev": true, "requires": { @@ -1248,7 +1248,7 @@ }, "convert-source-map": { "version": "1.1.3", - "resolved": "http://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", "dev": true }, @@ -1281,7 +1281,7 @@ }, "create-hash": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", "dev": true, "requires": { @@ -1294,7 +1294,7 @@ }, "create-hmac": { "version": "1.1.7", - "resolved": "http://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", "dev": true, "requires": { @@ -1580,7 +1580,7 @@ }, "diffie-hellman": { "version": "5.0.3", - "resolved": "http://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", "dev": true, "requires": { @@ -1810,7 +1810,7 @@ }, "eventemitter2": { "version": "0.4.14", - "resolved": "http://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", + "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", "integrity": "sha1-j2G3XN4BKy6esoTUVFWDtWQ7Yas=", "dev": true }, @@ -4591,7 +4591,7 @@ }, "minimist": { "version": "1.2.0", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, @@ -4618,7 +4618,7 @@ }, "mkdirp": { "version": "0.5.1", - "resolved": "http://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", "dev": true, "requires": { @@ -4627,7 +4627,7 @@ "dependencies": { "minimist": { "version": "0.0.8", - "resolved": "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", "dev": true } @@ -5021,7 +5021,7 @@ }, "parse-asn1": { "version": "5.1.1", - "resolved": "http://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.1.tgz", "integrity": "sha512-KPx7flKXg775zZpnp9SxJlz00gTd4BmJ2yJufSc44gMCRrRQ7NSzAcSJQfifuOLgW6bEi+ftrALtsgALeB2Adw==", "dev": true, "requires": { @@ -5309,7 +5309,7 @@ }, "public-encrypt": { "version": "4.0.2", - "resolved": "http://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.2.tgz", "integrity": "sha512-4kJ5Esocg8X3h8YgJsKAuoesBgB7mqH3eowiDzMUPKiRDDE7E/BqqZD1hnTByIaAFiwAw246YEltSq7tdrOH0Q==", "dev": true, "requires": { @@ -6292,7 +6292,7 @@ }, "sha.js": { "version": "2.4.11", - "resolved": "http://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", "dev": true, "requires": { @@ -6302,7 +6302,7 @@ }, "shasum": { "version": "1.0.2", - "resolved": "http://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", "dev": true, "requires": { diff --git a/package.json b/package.json index 8747c35c..8ed04cc8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "airtable", - "version": "0.5.6", + "version": "0.5.7", "homepage": "https://github.com/airtable/airtable.js", "repository": "git://github.com/airtable/airtable.js.git", "private": false, @@ -35,4 +35,4 @@ "engines": { "node": ">= 0.10.0" } -} \ No newline at end of file +}