Skip to content

Commit

Permalink
v0.5.2
Browse files Browse the repository at this point in the history
  • Loading branch information
jbbakst committed Jan 15, 2018
1 parent d929ca3 commit a901f22
Show file tree
Hide file tree
Showing 3 changed files with 153 additions and 38 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v0.5.2
* Support for the `cellFormat`, `userLocale`, and `timeZone` parameters

# v0.5.1

* Improved handling of unexpected server errors
Expand Down
186 changes: 149 additions & 37 deletions build/airtable.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,20 @@ Query.paramValidators = {

view:
check(_.isString, 'the value for `view` should be a string'),

cellFormat:
check(function(cellFormat) {
return (
_.isString(cellFormat) &&
_.contains(['json', 'string'], cellFormat)
);
}, 'the value for `cellFormat` should be "json" or "string"'),

timeZone:
check(_.isString, 'the value for `timeZone` should be a string'),

userLocale:
check(_.isString, 'the value for `userLocale` should be a string'),
};

/**
Expand Down Expand Up @@ -2094,7 +2108,7 @@ module.exports = check;
}());

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"_process":16}],14:[function(require,module,exports){
},{"_process":15}],14:[function(require,module,exports){
// http://wiki.commonjs.org/wiki/Unit_Testing/1.0
//
// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8!
Expand Down Expand Up @@ -2456,40 +2470,104 @@ var objectKeys = Object.keys || function (obj) {
};

},{"util/":18}],15:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
// shim for using process in browser
var process = module.exports = {};

// cached from whatever global is present so that test runners that stub it
// don't break things. But we need to wrap it in a try catch in case it is
// wrapped in strict mode code which doesn't define any globals. It's inside a
// function because try/catches deoptimize in certain engines.

var cachedSetTimeout;
var cachedClearTimeout;

function defaultSetTimout() {
throw new Error('setTimeout has not been defined');
}
function defaultClearTimeout () {
throw new Error('clearTimeout has not been defined');
}
(function () {
try {
if (typeof setTimeout === 'function') {
cachedSetTimeout = setTimeout;
} else {
cachedSetTimeout = defaultSetTimout;
}
} catch (e) {
cachedSetTimeout = defaultSetTimout;
}
try {
if (typeof clearTimeout === 'function') {
cachedClearTimeout = clearTimeout;
} else {
cachedClearTimeout = defaultClearTimeout;
}
} catch (e) {
cachedClearTimeout = defaultClearTimeout;
}
} ())
function runTimeout(fun) {
if (cachedSetTimeout === setTimeout) {
//normal enviroments in sane situations
return setTimeout(fun, 0);
}
// if setTimeout wasn't available but was latter defined
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
cachedSetTimeout = setTimeout;
return setTimeout(fun, 0);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedSetTimeout(fun, 0);
} catch(e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedSetTimeout.call(null, fun, 0);
} catch(e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
return cachedSetTimeout.call(this, fun, 0);
}
}

},{}],16:[function(require,module,exports){
// shim for using process in browser

var process = module.exports = {};
}
function runClearTimeout(marker) {
if (cachedClearTimeout === clearTimeout) {
//normal enviroments in sane situations
return clearTimeout(marker);
}
// if clearTimeout wasn't available but was latter defined
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
cachedClearTimeout = clearTimeout;
return clearTimeout(marker);
}
try {
// when when somebody has screwed with setTimeout but no I.E. maddness
return cachedClearTimeout(marker);
} catch (e){
try {
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
return cachedClearTimeout.call(null, marker);
} catch (e){
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
// Some versions of I.E. have different rules for clearTimeout vs setTimeout
return cachedClearTimeout.call(this, marker);
}
}



}
var queue = [];
var draining = false;
var currentQueue;
var queueIndex = -1;

function cleanUpNextTick() {
if (!draining || !currentQueue) {
return;
}
draining = false;
if (currentQueue.length) {
queue = currentQueue.concat(queue);
Expand All @@ -2505,22 +2583,24 @@ function drainQueue() {
if (draining) {
return;
}
var timeout = setTimeout(cleanUpNextTick);
var timeout = runTimeout(cleanUpNextTick);
draining = true;

var len = queue.length;
while(len) {
currentQueue = queue;
queue = [];
while (++queueIndex < len) {
currentQueue[queueIndex].run();
if (currentQueue) {
currentQueue[queueIndex].run();
}
}
queueIndex = -1;
len = queue.length;
}
currentQueue = null;
draining = false;
clearTimeout(timeout);
runClearTimeout(timeout);
}

process.nextTick = function (fun) {
Expand All @@ -2532,7 +2612,7 @@ process.nextTick = function (fun) {
}
queue.push(new Item(fun, args));
if (queue.length === 1 && !draining) {
setTimeout(drainQueue, 0);
runTimeout(drainQueue);
}
};

Expand Down Expand Up @@ -2560,18 +2640,46 @@ process.off = noop;
process.removeListener = noop;
process.removeAllListeners = noop;
process.emit = noop;
process.prependListener = noop;
process.prependOnceListener = noop;

process.listeners = function (name) { return [] }

process.binding = function (name) {
throw new Error('process.binding is not supported');
};

// TODO(shtylman)
process.cwd = function () { return '/' };
process.chdir = function (dir) {
throw new Error('process.chdir is not supported');
};
process.umask = function() { return 0; };

},{}],16:[function(require,module,exports){
if (typeof Object.create === 'function') {
// implementation from standard node.js 'util' module
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
ctor.prototype = Object.create(superCtor.prototype, {
constructor: {
value: ctor,
enumerable: false,
writable: true,
configurable: true
}
});
};
} else {
// old school shim for old browsers
module.exports = function inherits(ctor, superCtor) {
ctor.super_ = superCtor
var TempCtor = function () {}
TempCtor.prototype = superCtor.prototype
ctor.prototype = new TempCtor()
ctor.prototype.constructor = ctor
}
}

},{}],17:[function(require,module,exports){
module.exports = function isBuffer(arg) {
return arg && typeof arg === 'object'
Expand Down Expand Up @@ -3169,7 +3277,7 @@ function hasOwnProperty(obj, prop) {
}

}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{"./support/isBuffer":17,"_process":16,"inherits":15}],19:[function(require,module,exports){
},{"./support/isBuffer":17,"_process":15,"inherits":16}],19:[function(require,module,exports){
(function (global){
/**
* @license
Expand Down Expand Up @@ -10203,16 +10311,20 @@ function noop() {}

},{"global/window":21,"is-function":22,"parse-headers":25,"xtend":26}],21:[function(require,module,exports){
(function (global){
var win;

if (typeof window !== "undefined") {
module.exports = window;
win = window;
} else if (typeof global !== "undefined") {
module.exports = global;
win = global;
} else if (typeof self !== "undefined"){
module.exports = self;
win = self;
} else {
module.exports = {};
win = {};
}

module.exports = win;

}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
},{}],22:[function(require,module,exports){
module.exports = isFunction
Expand Down Expand Up @@ -10409,4 +10521,4 @@ Airtable.Error = AirtableError;
module.exports = Airtable;

}).call(this,require('_process'))
},{"./airtable_error":1,"./base":2,"./class":4,"./record":9,"./table":11,"_process":16,"assert":14}]},{},["airtable"]);
},{"./airtable_error":1,"./base":2,"./class":4,"./record":9,"./table":11,"_process":15,"assert":14}]},{},["airtable"]);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "airtable",
"version": "0.5.1",
"version": "0.5.2",
"homepage": "https://github.com/airtable/airtable.js",
"repository": "git://github.com/airtable/airtable.js.git",
"private": false,
Expand Down

0 comments on commit a901f22

Please sign in to comment.