Skip to content

Commit 6aa1e18

Browse files
committed
feat(lift): passed dependencies through to the enhancers
1 parent 21b964a commit 6aa1e18

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
}
5959
},
6060
"dependencies": {
61-
"@form8ion/core": "^4.0.0",
61+
"@form8ion/core": "^4.3.0",
6262
"@form8ion/execa-wrapper": "^1.0.0",
6363
"@form8ion/overridable-prompts": "^1.1.0",
6464
"@form8ion/readme": "3.1.0",

src/lift.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import {lift as liftReadme} from '@form8ion/readme';
44

55
import {test as gitIgnoreExists, lift as liftGitignore} from './vcs/git/ignore/index.js';
66

7-
export default async function ({projectRoot, results, enhancers, vcs}) {
7+
export default async function ({projectRoot, results, enhancers, vcs, dependencies}) {
88
const enhancerResults = await applyEnhancers({
99
results,
1010
enhancers: {...enhancers, gitIgnore: {test: gitIgnoreExists, lift: liftGitignore}},
11-
options: {projectRoot, vcs}
11+
options: {projectRoot, vcs},
12+
dependencies
1213
});
1314

1415
await liftReadme({projectRoot, results: deepmerge.all([results, enhancerResults])});

src/lift.test.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ describe('lift', () => {
2121
it('should lift the README based on the provided results', async () => {
2222
const projectRoot = any.string();
2323
const enhancers = any.simpleObject();
24+
const dependencies = any.simpleObject();
2425
const vcs = any.simpleObject();
2526
const results = any.simpleObject();
2627
const enhancerResults = any.simpleObject();
@@ -29,12 +30,13 @@ describe('lift', () => {
2930
.calledWith({
3031
results,
3132
enhancers: {...enhancers, gitIgnore: {test: gitIgnoreExists, lift: liftGitignore}},
32-
options: {projectRoot, vcs}
33+
options: {projectRoot, vcs},
34+
dependencies
3335
})
3436
.mockResolvedValue(enhancerResults);
3537
when(deepmerge.all).calledWith([results, enhancerResults]).mockReturnValue(mergedResults);
3638

37-
expect(await lift({projectRoot, results, enhancers, vcs})).toEqual(enhancerResults);
39+
expect(await lift({projectRoot, results, enhancers, vcs, dependencies})).toEqual(enhancerResults);
3840
expect(readme.lift).toHaveBeenCalledWith({projectRoot, results: mergedResults});
3941
});
4042
});

0 commit comments

Comments
 (0)