Skip to content

Commit 0281ead

Browse files
committed
plugins: Add template/package-lock.json so npm 7 doesn't get stuck
Additionally we stop using --link inside test-headlamp-plugin.sh so that it tests more closely what users will run. Previously this would hang when using npm v7.
1 parent 6cd5a73 commit 0281ead

File tree

3 files changed

+6771
-2
lines changed

3 files changed

+6771
-2
lines changed

plugins/headlamp-plugin/bin/headlamp-plugin.js

+2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function create(name, link) {
2626
const templateFolder = path.resolve(__dirname, '..', 'template');
2727
const indexPath = path.join(dstFolder, 'src', 'index.tsx');
2828
const packagePath = path.join(dstFolder, 'package.json');
29+
const packageLockPath = path.join(dstFolder, 'package-lock.json');
2930

3031
if (fs.existsSync(name)) {
3132
console.error(`"${name}" already exists, not initializing`);
@@ -51,6 +52,7 @@ function create(name, link) {
5152
}
5253

5354
replaceFileVariables(packagePath);
55+
replaceFileVariables(packageLockPath);
5456
replaceFileVariables(indexPath);
5557

5658
// This can be used to make testing locally easier.

0 commit comments

Comments
 (0)