From 881728bb5ee00feb179254ef93848019f0cce977 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ivar=20Conradi=20=C3=98sthus?= Date: Fri, 8 Apr 2022 11:45:23 +0200 Subject: [PATCH] fix: expose unleash-frontend version in index.js (#661) --- frontend/index.js | 6 ++++-- frontend/package.json | 4 +++- frontend/yarn.lock | 5 +++++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/frontend/index.js b/frontend/index.js index 6c3d74dd1a..1eff7e6952 100644 --- a/frontend/index.js +++ b/frontend/index.js @@ -1,7 +1,9 @@ - - +require('pkginfo')(module, 'version'); const path = require('path'); +const { version } = module.exports; + module.exports = { publicFolder: path.join(__dirname, 'build'), + version }; diff --git a/frontend/package.json b/frontend/package.json index 8111029ba5..c5115ecaa4 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -118,5 +118,7 @@ "cypress" ] }, - "dependencies": {} + "dependencies": { + "pkginfo": "^0.4.1" + } } diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 670abf1106..2773585cb2 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -7142,6 +7142,11 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" +pkginfo@^0.4.1: + version "0.4.1" + resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.4.1.tgz#b5418ef0439de5425fc4995042dced14fb2a84ff" + integrity sha1-tUGO8EOd5UJfxJlQQtztFPsqhP8= + popper.js@1.16.1-lts: version "1.16.1-lts" resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.16.1-lts.tgz#cf6847b807da3799d80ee3d6d2f90df8a3f50b05"