Skip to content
Open
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"singleQuote": true,
"tabWidth": 2,
"useTabs": false,
"trailingComma": "all",
"arrowParens": "avoid",
"endOfLine": "lf"
}
17 changes: 12 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
os: 'linux'
git:
autocrlf: input
language: node_js
node_js:
- '6'
- '14'
notifications:
email:
on_success: never
on_failure: never
jobs:
include:
- stage: "Tests"
name: Lint Test
script: npm run lint
- stage: 'Build and Test'
name: Format
script: npm run format:check
- script: npm run lint
name: Lint
- script: npm run build
name: Build Test
name: Build
- script: npm run test:unit
name: 'Unit Tests'
18,864 changes: 10,491 additions & 8,373 deletions lib/AvaTaxClient.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/utils/basic_auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
*/

export function createBasicAuthHeader(account, licenseKey) {
const base64Encoded = new Buffer(`${account}:${licenseKey}`).toString(
'base64'
const base64Encoded = Buffer.from(`${account}:${licenseKey}`).toString(
'base64',
);
return `Basic ${base64Encoded}`;
}
10 changes: 5 additions & 5 deletions lib/utils/withTimeout.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export function withTimeout(msecs, promise) {
return new Promise((resolve, reject) => {
const timer = setTimeout(() => {
reject(new Error('timeout'))
}, msecs)
reject(new Error('timeout'));
}, msecs);

promise
.then(value => {
Expand All @@ -12,6 +12,6 @@ export function withTimeout(msecs, promise) {
.catch(reason => {
clearTimeout(timer);
reject(reason);
})
})
}
});
});
}
Loading