-
Notifications
You must be signed in to change notification settings - Fork 5
Conversation
18e3874
to
a7b6592
Compare
a7b6592
to
6630678
Compare
|
||
### Add the features to your project | ||
It upgrades the package to the latest version and copies the latest feature files to the project's `./features/` directory. It won't overwrite the existing files as the names of the new files get suffixed with version. Then it's up to you to compare the old and new files, spot changes, and update the project's test suite. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can also use postinstall
npm hook for copying the files, so users could upgrade the package version using a default flow (npm outdated
/npm install ...
), and the hook would handle additional logic.
Also account on the scenario that a user will upgrade the package as usual. I think we should ensure the package would contain expected files in any way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's an interesting idea which didn't occur to me. One concern I'd have is that it would implicitly, without asking the user, copy some files over from the package to their code. I'm not sure whether it's not too invasive. I kind of like the explicit step user takes - they know what they're doing, they're doing it willingly, they can easily retry, etc.
@artem-zakharchenko I replied to some of your comments and addressed the others in comments. Could you please re-review? |
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adding CLI to streamline the workflow with the template. Also adding extensive docs on the topic. Addressing several issues here:
This is a part of the plan outlined here: apiaryio/dredd#917 (comment)
Note that the
upgrade
command isn't tested as the package isn't published here yet and thenpm view
call would just fail now. I'll test theupgrade
command somehow as one of the next steps. Filed as #43I suggest the reviewer to see the README first and learn about how the thing is supposed to work, then dive in to the changes to the code.