Skip to content

Commit 48dc2f3

Browse files
DavertMikclaude
andcommitted
feat(step): add name as alias of step title
Steps exposed the helper method only as step.title, while docs (heal recipes) and plugins written for 3.x read step.name and got undefined. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent ff47c22 commit 48dc2f3

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

‎lib/step/base.js‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,18 @@ class Step {
5252
this.setTrace()
5353
}
5454

55+
/**
56+
* Alias of `title`, the name of the helper method this step executes
57+
* @type {string}
58+
*/
59+
get name() {
60+
return this.title
61+
}
62+
63+
set name(name) {
64+
this.title = name
65+
}
66+
5567
setMetaStep(metaStep) {
5668
this.metaStep = metaStep
5769
}

‎test/unit/steps_test.js‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ describe('Steps', () => {
3030
expect(step.title).eql('doSomething')
3131
})
3232

33+
it('has name as alias of title', () => {
34+
expect(step.name).eql('doSomething')
35+
step.name = 'doOther'
36+
expect(step.title).eql('doOther')
37+
})
38+
3339
it('should convert method names for output', () => {
3440
expect(step.humanize()).eql('do something')
3541
})

0 commit comments

Comments
 (0)