@microsoft/compose-language-service
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -0,1 +1,11 @@ | ||
## 0.3.0 - 17 December 2024 | ||
### Breaking Changes | ||
* New properties have been added to `AlternateYamlLanguageServiceClientCapabilities` | ||
### Added | ||
* CodeLenses are now created for starting individual services or all services right from the compose document. [#157](https://github.com/microsoft/compose-language-service/issues/157) | ||
### Fixed | ||
* The `!reset` and `!override` YAML tags will no longer yield warnings. [#145](https://github.com/microsoft/compose-language-service/issues/145) | ||
## 0.2.0 - 10 May 2023 | ||
@@ -2,0 +12,0 @@ ### Breaking Changes |
@@ -14,2 +14,3 @@ /*!-------------------------------------------------------------------------------------------- | ||
readonly advancedCompletions: boolean; | ||
readonly serviceStartupCodeLens: boolean; | ||
readonly hover: boolean; | ||
@@ -16,0 +17,0 @@ readonly imageLinks: boolean; |
@@ -139,3 +139,3 @@ "use strict"; | ||
buildYamlDocument() { | ||
const yamlDocument = (0, yaml_1.parseDocument)(this.textDocument.getText(), { merge: true, prettyErrors: true }); | ||
const yamlDocument = (0, yaml_1.parseDocument)(this.textDocument.getText(), { merge: true, prettyErrors: true, customTags: ComposeCustomTags }); | ||
if (!(0, yaml_1.isDocument)(yamlDocument)) { | ||
@@ -324,2 +324,11 @@ throw new vscode_languageserver_1.ResponseError(vscode_languageserver_1.ErrorCodes.ParseError, 'Malformed YAML document'); | ||
const Comment = '<comment>'; | ||
// Custom YAML tags that Compose supports | ||
const ComposeCustomTags = [ | ||
{ tag: '!reset', collection: 'seq', resolve: v => v }, | ||
{ tag: '!reset', collection: 'map', resolve: v => v }, | ||
{ tag: '!reset', resolve: v => v }, | ||
{ tag: '!override', collection: 'seq', resolve: v => v }, | ||
{ tag: '!override', collection: 'map', resolve: v => v }, | ||
{ tag: '!override', resolve: v => v }, | ||
]; | ||
//# sourceMappingURL=ComposeDocument.js.map |
@@ -17,2 +17,3 @@ "use strict"; | ||
const KeyHoverProvider_1 = require("./providers/KeyHoverProvider"); | ||
const ServiceStartupCodeLensProvider_1 = require("./providers/ServiceStartupCodeLensProvider"); | ||
const ActionContext_1 = require("./utils/ActionContext"); | ||
@@ -34,2 +35,6 @@ const TelemetryAggregator_1 = require("./utils/telemetry/TelemetryAggregator"); | ||
}, | ||
// Code lenses for starting services | ||
codeLensProvider: { | ||
resolveProvider: false, | ||
}, | ||
// Hover over YAML keys | ||
@@ -56,2 +61,3 @@ hoverProvider: true, | ||
advancedCompletions: false, | ||
serviceStartupCodeLens: false, | ||
hover: false, | ||
@@ -91,2 +97,8 @@ imageLinks: false, | ||
} | ||
if (altYamlCapabilities.serviceStartupCodeLens) { | ||
this._capabilities.codeLensProvider = undefined; | ||
} | ||
else { | ||
this.createLspHandler(this.connection.onCodeLens, new ServiceStartupCodeLensProvider_1.ServiceStartupCodeLensProvider()); | ||
} | ||
if (altYamlCapabilities.hover) { | ||
@@ -93,0 +105,0 @@ this._capabilities.hoverProvider = undefined; |
@@ -152,2 +152,8 @@ "use strict"; | ||
{ | ||
label: 'pull_policy:', | ||
insertText: 'pull_policy: ${1:pullPolicyName}$0', | ||
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet, | ||
isAdvancedComposeCompletion: false, | ||
}, | ||
{ | ||
label: 'volumes:', | ||
@@ -154,0 +160,0 @@ insertText: 'volumes:\n\t-$0', |
{ | ||
"name": "@microsoft/compose-language-service", | ||
"author": "Microsoft Corporation", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"publisher": "ms-azuretools", | ||
@@ -29,4 +29,3 @@ "description": "Language service for Docker Compose documents", | ||
"unittest": "npm test -- --grep /unit/i", | ||
"pretest": "npm run build", | ||
"prepack": "npm run build" | ||
"package": "npm pack" | ||
}, | ||
@@ -33,0 +32,0 @@ "devDependencies": { |
@@ -35,2 +35,4 @@ # Docker Compose Language Service | ||
This language service will emit VS Code-specific telemetry events. If using the service outside of VS Code (e.g. in Vim), these telemetry events can be safely ignored. | ||
## Trademarks | ||
@@ -37,0 +39,0 @@ |
@@ -0,0 +0,0 @@ <!-- BEGIN MICROSOFT SECURITY.MD V0.0.5 BLOCK --> |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
204421
89
2229
44
1