Comparing version 0.11.5 to 0.11.6
@@ -0,4 +1,8 @@ | ||
# v0.11.6 | ||
* Remove behavior of including `AIRTABLE_API_KEY` in airtable.browser.js via envify | ||
* Add web worker compatibility | ||
# v0.11.5 | ||
* Update select() and list() to support to use POST endpoint when GET url length would exceed Airtable's 16k character limit | ||
* Update select() and list() to explicitly choose to use GET or POST endpoint via new 'method' arg | ||
* Update select() and list() to explicitly choose to use GET or POST endpoint via new 'method' arg | ||
@@ -9,3 +13,3 @@ # v0.11.4 | ||
# v0.11.3 | ||
* Adds a UMD build to use for browser-targeted builds. This fixes an issue where other apps that | ||
* Add a UMD build to use for browser-targeted builds. This fixes an issue where other apps that | ||
use airtable.js as a dependency were bundling code that expects to run in a node environment when | ||
@@ -12,0 +16,0 @@ building for a browser enviornment. |
"use strict"; | ||
// istanbul ignore file | ||
var AbortController; | ||
if (typeof window === 'undefined') { | ||
var browserGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : null; // self is the global in web workers | ||
if (!browserGlobal) { | ||
AbortController = require('abort-controller'); | ||
} | ||
else if ('signal' in new Request('')) { | ||
AbortController = window.AbortController; | ||
AbortController = browserGlobal.AbortController; | ||
} | ||
@@ -10,0 +11,0 @@ else { |
@@ -7,3 +7,4 @@ "use strict"; | ||
var node_fetch_1 = __importDefault(require("node-fetch")); | ||
module.exports = typeof window === 'undefined' ? node_fetch_1.default : window.fetch.bind(window); | ||
var browserGlobal = typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : null; // self is the global in web workers | ||
module.exports = !browserGlobal ? node_fetch_1.default : browserGlobal.fetch.bind(browserGlobal); | ||
//# sourceMappingURL=fetch.js.map |
{ | ||
"name": "airtable", | ||
"version": "0.11.5", | ||
"version": "0.11.6", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/airtable/airtable.js", |
@@ -19,3 +19,5 @@ The official Airtable JavaScript library. | ||
npm install airtable | ||
```sh | ||
npm install airtable | ||
``` | ||
@@ -26,6 +28,7 @@ Airtable.js is compatible with Node 10 and above. | ||
To use airtable.js in the browser, use [airtable.browser.js](https://github.com/Airtable/airtable.js/blob/master/build/airtable.browser.js) which is in the `build` folder. | ||
To use airtable.js in the browser, use [build/airtable.browser.js](build/airtable.browser.js). | ||
For a demo, run: | ||
``` | ||
```sh | ||
cd test/test_files | ||
@@ -47,19 +50,24 @@ python -m SimpleHTTPServer | ||
* `apiKey` - set the token to your secret API token. Visit [your account page](https://airtable.com/account) to create an API token. (`AIRTABLE_API_KEY`) | ||
* `endpointUrl` - the API endpoint to hit. You might want to override | ||
it if you are using an API proxy (e.g. runscope.net) to debug your API calls. (`AIRTABLE_ENDPOINT_URL`) | ||
* `requestTimeout` - the timeout in milliseconds for requests. The default is 5 minutes (`300000`) | ||
* `apiKey` - your secret API token. Visit [/create/tokens](https://airtable.com/create/tokens) to create a personal access token. [OAuth access tokens](https://airtable.com/developers/web/guides/oauth-integrations) can also be used. | ||
* `endpointUrl` - the API endpoint to hit. You might want to override | ||
it if you are using an API proxy (e.g. runscope.net) to debug your API calls. (`AIRTABLE_ENDPOINT_URL`) | ||
* `requestTimeout` - the timeout in milliseconds for requests. The default is 5 minutes (`300000`) | ||
You can set the options globally via `Airtable.configure`: | ||
Airtable.configure({ apiKey: 'YOUR_SECRET_API_KEY' }) | ||
```js | ||
Airtable.configure({ apiKey: 'YOUR_SECRET_API_TOKEN' }) | ||
``` | ||
Globally via process env (e.g. in 12factor setup). | ||
export AIRTABLE_API_KEY=YOUR_SECRET_API_KEY | ||
```sh | ||
export AIRTABLE_API_KEY=YOUR_SECRET_API_TOKEN | ||
``` | ||
You can also override the settings per connection: | ||
var airtable = new Airtable({endpointUrl: 'https://api-airtable-com-8hw7i1oz63iz.runscope.net/'}) | ||
```js | ||
const airtable = new Airtable({endpointUrl: 'https://api-airtable-com-8hw7i1oz63iz.runscope.net/'}) | ||
``` | ||
@@ -70,2 +78,4 @@ # Interactive documentation | ||
You can also view non-interactive API documentation at https://airtable.com/developers/web/api | ||
# Promises | ||
@@ -72,0 +82,0 @@ |
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 too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
361616
8472
103