airtable-plusplus
Advanced tools
Comparing version 0.2.0 to 0.2.1
@@ -199,3 +199,3 @@ import type { QueryParams } from 'airtable/lib/query_params'; | ||
* | ||
* @param key - Primary key to compare value in passed in data object with dest row | ||
* @param key - The column you want to use as a unique ID | ||
* @param data - Updated data | ||
@@ -202,0 +202,0 @@ * @returns Array of record objects |
@@ -193,3 +193,3 @@ "use strict"; | ||
* | ||
* @param key - Primary key to compare value in passed in data object with dest row | ||
* @param key - The column you want to use as a unique ID | ||
* @param data - Updated data | ||
@@ -201,3 +201,4 @@ * @returns Array of record objects | ||
throw new Error('Key and data are required, but not provided'); | ||
const rows = (await this.read({ filterByFormula: `${this._formatColumnFilter(key)} = ${data[key]}` })); | ||
console.log(`{${key}} = ${data[key]}`); | ||
const rows = (await this.read({ filterByFormula: `{${key}} = "${data[key]}"` })); | ||
return rows.length === 0 ? this.create(data) : rows.map((row) => this.update(row.id, data)); | ||
@@ -204,0 +205,0 @@ } |
{ | ||
"name": "airtable-plusplus", | ||
"version": "0.2.0", | ||
"version": "0.2.1", | ||
"description": "A TypeScript fork of `airtable-plus`, the Airtable Node library designed for async/await.", | ||
@@ -50,3 +50,4 @@ "main": "./dist/AirtablePlusPlus.js", | ||
"dependencies": { | ||
"airtable": "^0.10.1" | ||
"airtable": "^0.10.1", | ||
"tslib": "^2.1.0" | ||
}, | ||
@@ -61,12 +62,12 @@ "devDependencies": { | ||
"@semantic-release/git": "^9.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.15.2", | ||
"@typescript-eslint/parser": "^4.15.2", | ||
"commitlint": "^11.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.19.0", | ||
"@typescript-eslint/parser": "^4.19.0", | ||
"commitlint": "^12.0.1", | ||
"eslint": "^7.20.0", | ||
"eslint-config-prettier": "^8.0.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"husky": "^5.1.1", | ||
"husky": "^5.2.0", | ||
"prettier": "^2.2.1", | ||
"semantic-release": "^17.3.9", | ||
"typedoc": "^0.20.32", | ||
"typedoc": "^0.20.33", | ||
"typedoc-twilio-theme": "^1.0.1", | ||
@@ -73,0 +74,0 @@ "typescript": "^4.2.2" |
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
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
24721
435
2
+ Addedtslib@^2.1.0
+ Addedtslib@2.8.1(transitive)