Skip to content

Commit

Permalink
v0.12.1 (#371)
Browse files Browse the repository at this point in the history
Co-authored-by: Airtable <[email protected]>
  • Loading branch information
BlakeThomson-at and Airtable committed May 16, 2023
1 parent 2b2902a commit 7dbfd5d
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 19 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# v0.12.1
* Add `recordMetadata` param to `table.select(params)` in order to fetch comment counts, available as `record.commentCount`.

# v0.11.6
* Remove behavior of including `AIRTABLE_API_KEY` in airtable.browser.js via envify
* Add web worker compatibility
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ base.

# Installation

### Node.js
## Node.js

To install airtable.js in a node project:
To install Airtable.js in a node project:

```sh
npm install airtable
```

Airtable.js is compatible with Node 10 and above.

### Browser
## Browser

To use airtable.js in the browser, use [build/airtable.browser.js](build/airtable.browser.js).
To use Airtable.js in the browser, use [build/airtable.browser.js](build/airtable.browser.js).

For a demo, run:

Expand All @@ -33,9 +33,9 @@ cd test/test_files
python -m SimpleHTTPServer
```

Edit `test/test_files/index.html` - put your `BASE_ID` and `API_KEY` (Be careful! You are putting your API key on a web page! Create a separate account and share only one base with it).
Edit `test/test_files/index.html` - put your `BASE_ID` and `API_KEY` (Be careful! You are putting your API key on a web page! Create a separate account and share only one base with it.)

Then open http://localhost:8000/ in your browser.
Then open <http://localhost:8000/> in your browser.

Airtable.js is compatible with browsers supported by the Airtable web app with
the exception of Safari 10.0. Airtable.js supports Safari 10.1 and higher.
Expand All @@ -47,16 +47,16 @@ There are three configurable options available:

* `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`)
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`:

```js
Airtable.configure({ apiKey: 'YOUR_SECRET_API_TOKEN' })
```

Globally via process env (e.g. in 12factor setup).
Globally via process env (e.g. in 12factor setup):

```sh
export AIRTABLE_API_KEY=YOUR_SECRET_API_TOKEN
Expand All @@ -70,9 +70,9 @@ const airtable = new Airtable({endpointUrl: 'https://api-airtable-com-8hw7i1oz63

# Interactive documentation

Go to https://airtable.com/api to see the interactive API documentation for your Airtable bases. Once you select a base, click the "JavaScript" tab to see code snippets using Airtable.js. It'll have examples for all operations you can perform against your base using this library.
Go to <https://airtable.com/api> to see the interactive API documentation for your Airtable bases. Once you select a base, click the "JavaScript" tab to see code snippets using Airtable.js. It'll have examples for all operations you can perform against your base using this library.

You can also view non-interactive API documentation at https://airtable.com/developers/web/api
You can also view non-interactive API documentation at <https://airtable.com/developers/web/api>.

# Promises

Expand Down
2 changes: 1 addition & 1 deletion build/airtable.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ module.exports = objectToQueryParamString;

},{"lodash/isArray":79,"lodash/isNil":85,"lodash/keys":93}],12:[function(require,module,exports){
"use strict";
module.exports = "0.11.6";
module.exports = "0.12.1";

},{}],13:[function(require,module,exports){
"use strict";
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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.11.6",
"version": "0.12.1",
"license": "MIT",
"homepage": "https://github.com/airtable/airtable.js",
"repository": "git://github.com/airtable/airtable.js.git",
Expand Down
4 changes: 3 additions & 1 deletion src/object_map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,6 @@
*
* @hidden
*/
export type ObjectMap<K extends PropertyKey, V> = {[P in K]: V};
/* eslint-disable @typescript-eslint/no-explicit-any */
export type ObjectMap<K extends keyof any, V> = {[P in K]: V};
/* eslint-enable @typescript-eslint/no-explicit-any */
1 change: 0 additions & 1 deletion src/query_params.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ export const paramValidators = {
check.isArrayOf(isString),
'the value for `recordMetadata` should be an array of strings'
),

};

export const URL_CHARACTER_LENGTH_LIMIT = 15000;
Expand Down
2 changes: 1 addition & 1 deletion src/record.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class Record<TFields extends FieldSet> {
this._table = table;
this.id = recordId || recordJson.id;
if (recordJson) {
this.commentCount = recordJson.commentCount;
this.commentCount = recordJson.commentCount;
}
this.setRawJson(recordJson);

Expand Down
2 changes: 1 addition & 1 deletion test/test_files/airtable.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ module.exports = objectToQueryParamString;

},{"lodash/isArray":79,"lodash/isNil":85,"lodash/keys":93}],12:[function(require,module,exports){
"use strict";
module.exports = "0.11.6";
module.exports = "0.12.1";

},{}],13:[function(require,module,exports){
"use strict";
Expand Down

0 comments on commit 7dbfd5d

Please sign in to comment.