Skip to content

Commit a4c4df8

Browse files
author
tremlfl
committed
Switch from Buble to Babel
1 parent 1ce37d4 commit a4c4df8

File tree

3 files changed

+17
-7
lines changed

3 files changed

+17
-7
lines changed

index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,9 @@ class BotiumConnectorDirectline3 {
231231
filename: attachmentName
232232
})
233233
} else {
234-
formData.append('file', (await fetch(attachment.mediaUri)).body, {
234+
const { body } = await fetch(attachment.mediaUri)
235+
236+
formData.append('file', body, {
235237
filename: attachmentName
236238
})
237239
}

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,24 @@
1919
},
2020
"homepage": "https://github.com/codeforequity-at/botium-connector-directline3#readme",
2121
"devDependencies": {
22+
"@babel/core": "^7.2.2",
23+
"@babel/node": "^7.2.2",
24+
"@babel/plugin-transform-runtime": "^7.2.0",
25+
"@babel/preset-env": "^7.2.3",
2226
"eslint": "^5.12.0",
2327
"eslint-config-standard": "^12.0.0",
2428
"eslint-plugin-import": "^2.14.0",
2529
"eslint-plugin-node": "^8.0.1",
2630
"eslint-plugin-promise": "^4.0.1",
2731
"eslint-plugin-standard": "^4.0.0",
2832
"rollup": "^0.58.2",
29-
"rollup-plugin-buble": "^0.19.2",
33+
"rollup-plugin-babel": "^4.3.2",
3034
"rollup-plugin-commonjs": "^9.1.3",
3135
"rollup-plugin-json": "^2.3.0",
3236
"rollup-plugin-node-resolve": "^3.3.0"
3337
},
3438
"dependencies": {
39+
"@babel/runtime": "^7.2.0",
3540
"botframework-directlinejs": "^0.9.17",
3641
"debug": "^3.1.0",
3742
"form-data": "^2.3.3",

rollup.config.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import buble from 'rollup-plugin-buble';
2-
import commonjs from 'rollup-plugin-commonjs';
3-
import json from 'rollup-plugin-json';
1+
import babel from 'rollup-plugin-babel'
2+
import commonjs from 'rollup-plugin-commonjs'
3+
import json from 'rollup-plugin-json'
44

55
export default {
66
input: 'index.js',
@@ -20,7 +20,10 @@ export default {
2020
commonjs({
2121
exclude: 'node_modules/**'
2222
}),
23-
buble({ transforms: { asyncAwait: false } }),
23+
babel({
24+
exclude: 'node_modules/**',
25+
runtimeHelpers: true
26+
}),
2427
json()
2528
]
26-
};
29+
}

0 commit comments

Comments
 (0)