Skip to content

Commit

Permalink
Change hasDependencies property to check package.json contents
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteAutumn committed Jan 31, 2022
1 parent 9785b75 commit 629efc6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "aws-lambda.js",
"version": "0.0.3",
"version": "0.0.4",
"main": "dist/lambda.js",
"repository": {
"type": "git",
Expand Down
5 changes: 4 additions & 1 deletion scripts/prepareBuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ const makeBuildDir = async (event) => {

console.log(
Buffer.from(
JSON.stringify({ hasDependencies: true, dependencyScan, buildDirHash })
JSON.stringify({
hasDependencies: Object.keys(packageJson.dependencies).length > 0,
dependencyScan, buildDirHash
})
).toString("base64")
);

Expand Down

0 comments on commit 629efc6

Please sign in to comment.