Skip to content

Commit 167bda5

Browse files
committed
feat(scaffold): apply language lifters after scaffolding a new project
BREAKING CHANGE: language lifters are now applied as part of the project scaffolding projects, so steps should be taken to avoid conflicts with any previous executions of those lifters
1 parent 890f942 commit 167bda5

File tree

3 files changed

+14
-2
lines changed

3 files changed

+14
-2
lines changed

src/scaffolder.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export async function scaffold(options) {
6363
projectRoot,
6464
vcs: vcsResults.vcs,
6565
results: mergedResults,
66-
enhancers: {...dependencyUpdaters, ...vcsHosts}
66+
enhancers: {...dependencyUpdaters, ...vcsHosts, ...languages}
6767
});
6868

6969
if (language && language.verificationCommand) {

src/scaffolder.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ describe('project scaffolder', () => {
133133
projectRoot: projectPath,
134134
vcs,
135135
results: mergedResults,
136-
enhancers: {...dependencyUpdaters, ...vcsHosts}
136+
enhancers: {...dependencyUpdaters, ...vcsHosts, ...languages}
137137
});
138138
expect(resultsReporter.reportResults).toHaveBeenCalledWith(mergedResults);
139139
});

test/integration/features/step_definitions/common-steps.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ When(/^the project is scaffolded$/, async function () {
5252
this.projectName = 'project-name';
5353
this.projectDescription = any.sentence();
5454

55+
this.languageLiftResults = any.simpleObject();
56+
5557
await scaffold({
5658
plugins: {
5759
...this.updatePlugin && {
@@ -66,6 +68,16 @@ When(/^the project is scaffolded$/, async function () {
6668
info(`Scaffolding ${chosenLanguage} language details for ${projectName}`);
6769

6870
return this.languageScaffolderResults;
71+
},
72+
test: ({projectRoot}) => {
73+
info(`Determining if project at ${projectRoot} uses the ${chosenLanguage} language`);
74+
75+
return true;
76+
},
77+
lift: ({projectRoot}) => {
78+
info(`Applying the ${chosenLanguage} language lifter to the project at ${projectRoot}`);
79+
80+
return this.languageLiftResults;
6981
}
7082
}
7183
}

0 commit comments

Comments
 (0)