Skip to content

Commit

Permalink
feat(scaffold): apply language lifters after scaffolding a new project
Browse files Browse the repository at this point in the history
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
  • Loading branch information
travi committed Jan 14, 2025
1 parent 890f942 commit 167bda5
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scaffolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export async function scaffold(options) {
projectRoot,
vcs: vcsResults.vcs,
results: mergedResults,
enhancers: {...dependencyUpdaters, ...vcsHosts}
enhancers: {...dependencyUpdaters, ...vcsHosts, ...languages}
});

if (language && language.verificationCommand) {
Expand Down
2 changes: 1 addition & 1 deletion src/scaffolder.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ describe('project scaffolder', () => {
projectRoot: projectPath,
vcs,
results: mergedResults,
enhancers: {...dependencyUpdaters, ...vcsHosts}
enhancers: {...dependencyUpdaters, ...vcsHosts, ...languages}
});
expect(resultsReporter.reportResults).toHaveBeenCalledWith(mergedResults);
});
Expand Down
12 changes: 12 additions & 0 deletions test/integration/features/step_definitions/common-steps.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ When(/^the project is scaffolded$/, async function () {
this.projectName = 'project-name';
this.projectDescription = any.sentence();

this.languageLiftResults = any.simpleObject();

await scaffold({
plugins: {
...this.updatePlugin && {
Expand All @@ -66,6 +68,16 @@ When(/^the project is scaffolded$/, async function () {
info(`Scaffolding ${chosenLanguage} language details for ${projectName}`);

return this.languageScaffolderResults;
},
test: ({projectRoot}) => {
info(`Determining if project at ${projectRoot} uses the ${chosenLanguage} language`);

return true;
},
lift: ({projectRoot}) => {
info(`Applying the ${chosenLanguage} language lifter to the project at ${projectRoot}`);

return this.languageLiftResults;
}
}
}
Expand Down

0 comments on commit 167bda5

Please sign in to comment.