Skip to content

Commit

Permalink
Deprecate stylua.releaseVersion
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnnyMorganz committed Dec 30, 2023
1 parent bb0c505 commit fcab9a9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions stylua-vscode/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ To view the changelog of the StyLua binary, see [here](https://github.com/Johnny

## [Unreleased]

### Deprecated

- `stylua.releaseVersion` is deprecated (as it required continual updates of available versions). Prefer `stylua.targetReleaseVersion` and the `Stylua: Select Version` command

### Added

- Added configuration option `stylua.configPath` to provide a direct path to a `stylua.toml` file. Note: this will override any workspace config lookup
Expand Down
3 changes: 2 additions & 1 deletion stylua-vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"enumDescriptions": [
"The most recent version released. This will always keep you up to date."
],
"markdownDescription": "The release version to install. This is overridden by `#stylua.targetReleaseVersion#`."
"markdownDescription": "The release version to install. This is overridden by `#stylua.targetReleaseVersion#`.",
"markdownDeprecationMessage": "Use `#stylua.targetReleaseVersion#` instead, and the `Stylua: Select Version` command."
},
"stylua.targetReleaseVersion": {
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions stylua-vscode/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export const getDesiredVersion = (): string => {
const config = vscode.workspace.getConfiguration("stylua");
const targetVersion = config.get<string>("targetReleaseVersion", "").trim();
if (targetVersion.length === 0) {
// TODO: Backwards compatibility to support deprecated setting `stylua.releaseVersion`
return config.get<string>("releaseVersion", "latest");
}
return targetVersion;
Expand Down

0 comments on commit fcab9a9

Please sign in to comment.