feat(cli)!: rename --cdktf-version in init#228
Conversation
a54a126 to
68b7105
Compare
jsteinich
left a comment
There was a problem hiding this comment.
Can you also prep a PR on https://github.com/open-constructs/cdk-terrain-docs about the change?
Likely going to hold this a bit since I think we'll have at least one more release before introducing breaking changes.
| if ( | ||
| argv.fromTerraformProject && | ||
| [".", process.cwd()].includes(argv.fromTerraformProject) | ||
| ) { |
There was a problem hiding this comment.
Won't this now ignore having an empty string set for fromTerraformProject while previously it would have errored?
There was a problem hiding this comment.
The "" case was included in the .includes before, but it's now covered in the argv.fromTerraformProject conditional. The latter is needed for Typescript to discern that that field is defined.
open-constructs/cdk-terrain-docs#13 Side note, it would be nice if the docs were merged into this repo so we didn't have split commits. |
The `init` CLI command currently accepts a `--cdktf-version` option. This change renames it to `--cdktn-version`.
|
oops, I merged the docs PR thinking this was already merged and part of the 0.23.4 release - I'll revert and re-open the PR on docs. I think we are comfortable on CI/CD in this repo and can merge docs repo back in (will take some time for me to verify the mintlify configs for it and all..) |
docs PR was opened (I merged it accidentally too soon)
|
Thanks for the update. For this flag rename, I’d prefer we make it a two-release transition rather than removing the old spelling immediately:
Because .option("cdktn-version", {
alias: "cdktf-version",
type: "string",
desc: "The cdktn version to use while creating a new project.",
default: pkg.version,
})
.deprecateOption(
"cdktf-version",
"Use --cdktn-version instead. --cdktf-version will be removed in a future release.",
)That keeps the new flag canonical while preserving backward compatibility for one release cycle. |
The
initCLI command currently accepts a--cdktf-versionoption. This change renames it to--cdktn-version.Related issue
Fixes #
Description
cdktn init --cdktf-version->cdktn init --cdktn-versionThis is a breaking change, but should hopefully not be too disruptive.
Checklist