hubot 11.3.4 → 11.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/Robot.mjs +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hubot",
3
- "version": "11.3.4",
3
+ "version": "11.4.0",
4
4
  "author": "hubot",
5
5
  "keywords": [
6
6
  "github",
package/src/Robot.mjs CHANGED
@@ -341,6 +341,10 @@ class Robot {
341
341
  return result
342
342
  }
343
343
 
344
+ async loadts (filePath) {
345
+ return this.loadmjs(filePath)
346
+ }
347
+
344
348
  async loadjs (filePath) {
345
349
  const forImport = this.prepareForImport(filePath)
346
350
  const script = (await import(forImport)).default
@@ -364,7 +368,7 @@ class Robot {
364
368
  const full = path.join(filepath, path.basename(filename))
365
369
 
366
370
  // see https://github.com/hubotio/hubot/issues/1355
367
- if (['js', 'mjs'].indexOf(ext) === -1) {
371
+ if (['js', 'mjs', 'ts'].indexOf(ext) === -1) {
368
372
  this.logger.debug(`Skipping unsupported file type ${full}`)
369
373
  return null
370
374
  }