From 6f851ac489c2a0654a714decec6590a68dbd0757 Mon Sep 17 00:00:00 2001 From: Michael Shanks Date: Mon, 3 Aug 2020 15:28:45 +0100 Subject: [PATCH] bugfix: create app pointing to hardcoded standard-components version --- packages/server/src/utilities/createAppPackage.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/server/src/utilities/createAppPackage.js b/packages/server/src/utilities/createAppPackage.js index b970a1985f..6ce3cde9c9 100644 --- a/packages/server/src/utilities/createAppPackage.js +++ b/packages/server/src/utilities/createAppPackage.js @@ -5,6 +5,8 @@ const fetch = require("node-fetch") const tar = require("tar-fs") const zlib = require("zlib") const { promisify } = require("util") +const packageJson = require("../../package.json") + const streamPipeline = promisify(stream.pipeline) exports.appPackageFolder = (config, appname) => @@ -17,7 +19,7 @@ exports.downloadExtractComponentLibraries = async appFolder => { for (let lib of LIBRARIES) { // download tarball // TODO: make sure the latest version is always downloaded - const registryUrl = `https://registry.npmjs.org/@budibase/${lib}/-/${lib}-0.1.2.tgz` + const registryUrl = `https://registry.npmjs.org/@budibase/${lib}/-/${lib}-${packageJson.version}.tgz` const response = await fetch(registryUrl) if (!response.ok) throw new Error(`unexpected response ${response.statusText}`)