forked from graphprotocol/graph-tooling
-
Notifications
You must be signed in to change notification settings - Fork 0
26 lines (26 loc) · 1.52 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
diff --git a/lib/tarballs/build.js b/lib/tarballs/build.js
index a7577a89c721bf4a52657f037fcc079e8fa9dca3..51c33346763dee8c60a3b59b8c46b6789c496239 100644
--- a/lib/tarballs/build.js
+++ b/lib/tarballs/build.js
@@ -195,8 +195,10 @@ const addDependencies = async (c) => {
else {
const lockpath = (0, node_fs_1.existsSync)(path.join(c.root, 'package-lock.json'))
? path.join(c.root, 'package-lock.json')
- : path.join(c.root, 'npm-shrinkwrap.json');
- await (0, fs_extra_1.copy)(lockpath, path.join(c.workspace(), path.basename(lockpath)));
+ : null;
+ if (lockpath) {
+ await (0, fs_extra_1.copy)(lockpath, path.join(c.workspace(), path.basename(lockpath)));
+ }
await exec('npm install --production', { cwd: c.workspace() });
}
};
@@ -229,7 +231,7 @@ const buildTarget = async (target, c, options) => {
const { bin, version } = c.config;
const { gitSha: sha } = c;
const templateShortKeyCommonOptions = { arch, bin, platform, sha, version };
- const [gzLocalKey, xzLocalKey] = ['.tar.gz', '.tar.xz'].map((ext) => (0, upload_util_1.templateShortKey)('versioned', { ...templateShortKeyCommonOptions, ext }));
+ const [gzLocalKey, xzLocalKey] = ['.tar.gz', '.tar.xz'].map((ext) => (0, upload_util_1.templateShortKey)('unversioned', { ...templateShortKeyCommonOptions, ext }));
const base = path.basename(gzLocalKey);
(0, log_1.log)(`building target ${base}`);
(0, log_1.log)('copying workspace', c.workspace(), workspace);