diff --git a/src/lift/lift.js b/src/lift/lift.js index 6533f04f..54176834 100644 --- a/src/lift/lift.js +++ b/src/lift/lift.js @@ -22,7 +22,7 @@ export default async function ({projectRoot, vcs, results, pathWithinParent, enh const { scripts, tags, - dependencies, + dependencies: {javascript: dependencies} = {}, packageManager: manager } = results; @@ -51,7 +51,7 @@ export default async function ({projectRoot, vcs, results, pathWithinParent, enh await liftPackage( deepmerge.all([ - {projectRoot, scripts, tags, dependencies: dependencies.javascript, packageManager, vcs, pathWithinParent}, + {projectRoot, scripts, tags, dependencies, packageManager, vcs, pathWithinParent}, enhancerResults ]) ); diff --git a/src/lift/lift.test.js b/src/lift/lift.test.js index f1a4ff13..c954ad94 100644 --- a/src/lift/lift.test.js +++ b/src/lift/lift.test.js @@ -31,12 +31,11 @@ describe('lift', () => { const tags = any.listOf(any.word); const javascriptDependencies = any.simpleObject(); const dependencies = {...any.simpleObject(), javascript: javascriptDependencies}; - const devDependencies = any.listOf(any.word); const packageManager = any.word(); const manager = any.word(); const enhancerResults = any.simpleObject(); const vcsDetails = any.simpleObject(); - const results = {...any.simpleObject(), scripts, tags, dependencies, devDependencies, packageManager: manager}; + const results = {...any.simpleObject(), scripts, tags, dependencies, packageManager: manager}; const pathWithinParent = any.string(); const packageDetails = any.simpleObject(); const internalEnhancers = { @@ -106,4 +105,10 @@ describe('lift', () => { expect(liftResults).toEqual(enhancerResults); }); + + it('should not error when no dependencies are provided', async () => { + core.applyEnhancers.mockResolvedValue(enhancerResults); + + await lift({projectRoot, vcs: vcsDetails, results: any.simpleObject(), pathWithinParent}); + }); });