Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support dockercompose language #25

Merged
merged 1 commit into from
Jun 1, 2024

Conversation

dalbitresb12
Copy link
Contributor

This is the same as #9 but for Docker Compose files.

There's issues (see microsoft/vscode-docker#4196, microsoft/vscode-docker#4220) in the Docker extension repository which reference redhat-developer/vscode-yaml#1000, but none of them noticed that the developers of RedHat's YAML extension already closed a similar issue as won't fix.

With this PR, this extension would at least fill the gap that RedHat's extension doesn't (seem to) want to support.

The following lines should be added to the settings.json file, as well as installing the Docker extension:

{
  "[dockercompose]": {
    "editor.defaultFormatter": "bluebrown.yamlfmt"
  }
}

PS.: I had to change the engines.vscode property in package.json for the extension to be packaged. I don't know if you want me to change that for you in this PR or want to do it yourself. Tests might fail due to this.

@bluebrown
Copy link
Owner

@dalbitresb12 , thanks, the test is passing. What issue did you have with the engine?

@dalbitresb12
Copy link
Contributor Author

I was getting the following error after running npx vsce package:

@types/vscode ^1.89.0 greater than engines.vscode ^1.80.0. Either upgrade engines.vscode or use an older @types/vscode version

So I had to update engines.vscode to ^1.89.0 to match the version of @types/vscode which was updated in #20.

@dalbitresb12
Copy link
Contributor Author

dalbitresb12 commented May 29, 2024

Well, you can just ignore me. I was using npx vsce package thinking that it would be the same as running it with npm run package since just using that wasn't working for me in Windows. Turns out it's not the same for some reason. Might be just some weird Windows thing.

I did have to update the package script in package.json from node_modules/.bin/vsce package to vsce package for the script to work without changing engines.vscode.

EDIT:

Well, I was wrong again. It is the same, I had just forgotten that I had already changed engines.vscode to match the types package. Running either npx vsce package or npm run package returns the same error as in my previous comment.

@bluebrown
Copy link
Owner

So I had to update engines.vscode to ^1.89.0 to match the version of @types/vscode which was updated in #20.

Ok, thanks.

@bluebrown bluebrown merged commit 74e0465 into bluebrown:main Jun 1, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants