Explorar el Código

companion: Import url (#2328)

* build: test companion on node 8

* companion: import URL via url module

* build: use higher node 8 version to avoid error mismatch
Ifedapo .A. Olarewaju hace 4 años
padre
commit
3d949ace84
Se han modificado 2 ficheros con 9 adiciones y 0 borrados
  1. 8 0
      .travis.yml
  2. 1 0
      packages/@uppy/companion/src/server/helpers/request.js

+ 8 - 0
.travis.yml

@@ -85,6 +85,14 @@ jobs:
         - nvm install 10.0.0
         - nvm use 10.0.0
         - npm run test:companion
+    - name: 'Run Companion tests (Node.js 8)'
+      node_js: 12
+      services:
+        - docker
+      script:
+        - nvm install 8.16.0
+        - nvm use 8.16.0
+        - npm run test:companion
     # Build the website when things are merged to master
     # https://docs.travis-ci.com/user/deployment/#Conditional-Releases-with-on
     - name: 'Build website'

+ 1 - 0
packages/@uppy/companion/src/server/helpers/request.js

@@ -1,5 +1,6 @@
 const http = require('http')
 const https = require('https')
+const { URL } = require('url')
 const dns = require('dns')
 const ipAddress = require('ip-address')
 const FORBIDDEN_IP_ADDRESS = 'Forbidden IP address'