Browse Source

companion-client: Add VERSION properties to RequestClient, Provider

Renée Kooi 5 years ago
parent
commit
5bdf25ab86

+ 2 - 0
packages/@uppy/companion-client/src/Provider.js

@@ -8,6 +8,8 @@ const _getName = (id) => {
 }
 }
 
 
 module.exports = class Provider extends RequestClient {
 module.exports = class Provider extends RequestClient {
+  static VERSION = require('../package.json').version
+
   constructor (uppy, opts) {
   constructor (uppy, opts) {
     super(uppy, opts)
     super(uppy, opts)
     this.provider = opts.provider
     this.provider = opts.provider

+ 2 - 0
packages/@uppy/companion-client/src/RequestClient.js

@@ -8,6 +8,8 @@ function stripSlash (url) {
 }
 }
 
 
 module.exports = class RequestClient {
 module.exports = class RequestClient {
+  static VERSION = require('../package.json').version
+
   constructor (uppy, opts) {
   constructor (uppy, opts) {
     this.uppy = uppy
     this.uppy = uppy
     this.opts = opts
     this.opts = opts