Socket
Socket
Sign inDemoInstall

airtable

Package Overview
Dependencies
Maintainers
11
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

airtable - npm Package Compare versions

Comparing version 0.10.0 to 0.10.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

# v0.10.1
* Fix error handler in updating an array (#223)
* Fix binding fetch to window (#235)
* Update lodash and node-fetch dependencies
* Widen @types/node dependency
# v0.10.0

@@ -2,0 +8,0 @@ * Convert to TypeScript. The project now comes with .d.ts typescript definition files.

27

lib/base.js

@@ -107,2 +107,4 @@ "use strict";

Base.prototype._checkStatusForError = function (statusCode, body) {
var _a = (body !== null && body !== void 0 ? body : { error: {} }).error, error = _a === void 0 ? {} : _a;
var type = error.type, message = error.message;
if (statusCode === 401) {

@@ -115,8 +117,3 @@ return new airtable_error_1.default('AUTHENTICATION_REQUIRED', 'You should provide valid api key to perform this operation', statusCode);

else if (statusCode === 404) {
return (function () {
var message = body && body.error && body.error.message
? body.error.message
: 'Could not find what you are looking for';
return new airtable_error_1.default('NOT_FOUND', message, statusCode);
})();
return new airtable_error_1.default('NOT_FOUND', message !== null && message !== void 0 ? message : 'Could not find what you are looking for', statusCode);
}

@@ -127,11 +124,3 @@ else if (statusCode === 413) {

else if (statusCode === 422) {
return (function () {
var type = body && body.error && body.error.type
? body.error.type
: 'UNPROCESSABLE_ENTITY';
var message = body && body.error && body.error.message
? body.error.message
: 'The operation cannot be processed';
return new airtable_error_1.default(type, message, statusCode);
})();
return new airtable_error_1.default(type !== null && type !== void 0 ? type : 'UNPROCESSABLE_ENTITY', message !== null && message !== void 0 ? message : 'The operation cannot be processed', statusCode);
}

@@ -148,9 +137,3 @@ else if (statusCode === 429) {

else if (statusCode >= 400) {
return (function () {
var type = body && body.error && body.error.type ? body.error.type : 'UNEXPECTED_ERROR';
var message = body && body.error && body.error.message
? body.error.message
: 'An unexpected error occurred';
return new airtable_error_1.default(type, message, statusCode);
})();
return new airtable_error_1.default(type !== null && type !== void 0 ? type : 'UNEXPECTED_ERROR', message !== null && message !== void 0 ? message : 'An unexpected error occurred', statusCode);
}

@@ -157,0 +140,0 @@ else {

@@ -1,2 +0,2 @@

declare const _default: typeof fetch;
declare const _default: any;
export = _default;

@@ -8,3 +8,3 @@ "use strict";

// istanbul ignore next
typeof window === 'undefined' ? node_fetch_1.default : fetch);
typeof window === 'undefined' ? node_fetch_1.default : window.fetch.bind(window));
//# sourceMappingURL=fetch.js.map

@@ -105,4 +105,3 @@ "use strict";

var requestData = assign_1.default({ records: recordsData }, opts);
this._base.runAction(method, "/" + this._urlEncodedNameOrId() + "/", {}, requestData, function (err, resp, _a) {
var records = _a.records;
this._base.runAction(method, "/" + this._urlEncodedNameOrId() + "/", {}, requestData, function (err, resp, body) {
if (err) {

@@ -112,3 +111,3 @@ done(err);

}
var result = records.map(function (record) {
var result = body.records.map(function (record) {
return new record_1.default(_this, record.id, record);

@@ -115,0 +114,0 @@ });

{
"name": "airtable",
"version": "0.10.0",
"version": "0.10.1",
"license": "MIT",

@@ -17,7 +17,7 @@ "homepage": "https://github.com/airtable/airtable.js",

"dependencies": {
"@types/node": "^14.0.14",
"@types/node": ">=8.0.0 <15",
"abort-controller": "^3.0.0",
"abortcontroller-polyfill": "^1.4.0",
"lodash": "4.17.19",
"node-fetch": "^2.6.0"
"lodash": "^4.17.19",
"node-fetch": "^2.6.1"
},

@@ -76,2 +76,2 @@ "main": "./lib/airtable.js",

}
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc