New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@microsoft/compose-language-service

Package Overview
Dependencies
Maintainers
10
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@microsoft/compose-language-service - npm Package Compare versions

Comparing version 0.0.4-alpha to 0.0.5-alpha

.gitattributes

13

CHANGELOG.md

@@ -0,1 +1,10 @@

## 0.0.5-alpha - 15 December 2021
### Added
* Completions under the `build` section within a service. [#48](https://github.com/microsoft/compose-language-service/issues/48)
### Fixed
* `null` will no longer be inserted on empty maps. [#65](https://github.com/microsoft/compose-language-service/issues/65)
* Lines longer than 80 characters will no longer be wrapped. [#70](https://github.com/microsoft/compose-language-service/issues/70)
* Completions will no longer be suggested on lines that are already complete. [#68](https://github.com/microsoft/compose-language-service/issues/68)
## 0.0.4-alpha - 8 November 2021

@@ -11,6 +20,6 @@ ### Fixed

### Added
* Significantly more completions have been added
* Significantly more completions have been added.
### Removed
* Removed signature help for ports, in favor of completions instead
* Removed signature help for ports, in favor of completions instead.

@@ -17,0 +26,0 @@ ## 0.0.1-alpha - 20 September 2021

4

lib/service/ComposeDocument.js

@@ -321,7 +321,7 @@ "use strict";

// Exported for use by KeyHoverProvider
exports.KeyValueRegex = /^(?<indent> *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:)\s+))(?<value>.*)$/im;
exports.KeyValueRegex = /^(?<indent> *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im;
// A regex for matching an item/value line, i.e. `- value`
const ItemValueRegex = /^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<value>.*)$/im;
// A regex for matching an item/key/value line, i.e. `- key: value`. This will be the top line of a flow map.
const ItemKeyValueRegex = /^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:)\s+))(?<value>.*)$/im;
const ItemKeyValueRegex = /^(?<indent> *)(?<itemInd>(?<itemSep>-) *)(?<key>(?<keyName>[.\w-]+)(?<keyInd>(?<keySep>:) *))(?<value>.*)$/im;
// A regex for matching any value line

@@ -328,0 +328,0 @@ const ValueRegex = /^(?<indent> *)(?<value>\S+)$/im;

@@ -12,2 +12,6 @@ /*!--------------------------------------------------------------------------------------------

matcher?: RegExp;
/**
* Insert text is required in ExtendedCompletionItem
*/
insertText: string;
}

@@ -14,0 +18,0 @@ export declare class CompletionCollection extends Array<ExtendedCompletionItem> {

@@ -16,6 +16,6 @@ "use strict";

if (this.locationRequirements.logicalPaths !== undefined && !this.locationRequirements.logicalPaths.some(p => { var _a; return p.test((_a = params.positionInfo.path) !== null && _a !== void 0 ? _a : ''); })) {
return undefined;
return undefined; // Reject this collection: the logical path requirement is not satisfied
}
if (this.locationRequirements.indentationDepth !== undefined && this.locationRequirements.indentationDepth !== params.positionInfo.indentDepth) {
return undefined;
return undefined; // Reject this collection: the indentation depth requirement is not satisfied
}

@@ -22,0 +22,0 @@ const line = params.document.lineAt(params.position);

@@ -10,2 +10,3 @@ "use strict";

const ProviderBase_1 = require("../ProviderBase");
const BuildCompletionCollection_1 = require("./BuildCompletionCollection");
const PortsCompletionCollection_1 = require("./PortsCompletionCollection");

@@ -26,2 +27,3 @@ const RootCompletionCollection_1 = require("./RootCompletionCollection");

ServiceCompletionCollection_1.ServiceCompletionCollection,
BuildCompletionCollection_1.BuildCompletionCollection,
VolumesCompletionCollection_1.VolumesCompletionCollection,

@@ -52,2 +54,4 @@ PortsCompletionCollection_1.PortsCompletionCollection,

}
// It should be noted, many of the completions include tabs `\t` which aren't allowed in YAML, however,
// VSCode automatically translates these into the configured tab size in spaces. It does the same for line endings.
return results.length > 0 ? results : undefined;

@@ -54,0 +58,0 @@ }

@@ -30,2 +30,3 @@ "use strict";

insertText: 'configs:\n',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
},

@@ -35,2 +36,3 @@ {

insertText: 'networks:\n',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
},

@@ -40,2 +42,3 @@ {

insertText: 'secrets:\n',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
},

@@ -45,2 +48,3 @@ {

insertText: 'services:\n',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
},

@@ -55,4 +59,5 @@ {

insertText: 'volumes:\n',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
},
]);
//# sourceMappingURL=RootCompletionCollection.js.map

@@ -36,7 +36,7 @@ "use strict";

label: 'build:',
insertText: 'build:\n context: ${1:contextPath}\n dockerfile: ${2:Dockerfile}',
insertText: 'build:\n\tcontext: ${1:contextPath}\n\tdockerfile: ${2:Dockerfile}',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,
insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,
detail: 'Long form',
documentation: 'build:\n context: <contextPath>\n dockerfile: <Dockerfile>',
documentation: 'build:\n\tcontext: <contextPath>\n\tdockerfile: <Dockerfile>',
},

@@ -64,3 +64,3 @@ {

label: 'depends_on:',
insertText: 'depends_on:\n - ${1:serviceName}$0',
insertText: 'depends_on:\n\t- ${1:serviceName}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -85,3 +85,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'env_file:',
insertText: 'env_file:\n - ${1:fileName}$0',
insertText: 'env_file:\n\t- ${1:fileName}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -92,3 +92,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'environment:',
insertText: 'environment:\n - ${1:name}=${2:value}$0',
insertText: 'environment:\n\t- ${1:name}=${2:value}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -99,3 +99,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'expose:',
insertText: 'expose:\n - ${1:1234}$0',
insertText: 'expose:\n\t- ${1:1234}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -106,3 +106,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'healthcheck:',
insertText: 'healthcheck:\n test: ["${1:executable}", "${2:arg}"]\n interval: ${3:1m30s}\n timeout: ${4:30s}\n retries: ${5:5}\n start_period: ${6:30s}$0',
insertText: 'healthcheck:\n\ttest: ["${1:executable}", "${2:arg}"]\n\tinterval: ${3:1m30s}\n\ttimeout: ${4:30s}\n\tretries: ${5:5}\n\tstart_period: ${6:30s}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -118,3 +118,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'labels:',
insertText: 'labels:\n - ${1:com.host.description}=${2:label}$0',
insertText: 'labels:\n\t- ${1:com.host.description}=${2:label}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -125,3 +125,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'networks:',
insertText: 'networks:\n - ${1:networkName}$0',
insertText: 'networks:\n\t- ${1:networkName}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -132,3 +132,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'ports:',
insertText: 'ports:\n -$0',
insertText: 'ports:\n\t-$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -139,3 +139,3 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

label: 'volumes:',
insertText: 'volumes:\n -$0',
insertText: 'volumes:\n\t-$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -142,0 +142,0 @@ insertTextMode: vscode_languageserver_1.InsertTextMode.adjustIndentation,

@@ -29,3 +29,3 @@ "use strict";

label: ':containerPath:mode',
insertText: '${2:containerPath}:${3|ro,rw|}$0',
insertText: '${1:containerPath}:${2|ro,rw|}$0',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.Snippet,

@@ -38,2 +38,3 @@ },

insertText: 'ro',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
detail: 'Read-only',

@@ -46,2 +47,3 @@ },

insertText: 'rw',
insertTextFormat: vscode_languageserver_1.InsertTextFormat.PlainText,
detail: 'Read-write',

@@ -48,0 +50,0 @@ },

@@ -19,3 +19,5 @@ "use strict";

indentSeq: true,
simpleKeys: true, // todo?
simpleKeys: true,
nullStr: '',
lineWidth: 0,
};

@@ -22,0 +24,0 @@ const range = vscode_languageserver_1.Range.create(params.document.textDocument.positionAt(0), params.document.textDocument.positionAt(params.document.textDocument.getText().length) // This technically goes past the end of the doc, but it's OK because the protocol accepts this (positions past the end of the doc are rounded backward)

{
"name": "@microsoft/compose-language-service",
"author": "Microsoft Corporation",
"version": "0.0.4-alpha",
"version": "0.0.5-alpha",
"publisher": "ms-azuretools",

@@ -24,3 +24,3 @@ "description": "Language service for Docker Compose documents",

"lint": "eslint --max-warnings 0 src --ext ts",
"test": "mocha --file lib/test/global.test.js lib/test/**/*.test.js",
"test": "mocha --file lib/test/global.test.js --recursive lib/test",
"unittest": "npm test -- --grep /unit/i",

@@ -31,19 +31,19 @@ "pretest": "npm run build",

"devDependencies": {
"@types/chai": "^4.2.14",
"@types/chai": "^4.3.0",
"@types/chai-as-promised": "^7.1.3",
"@types/mocha": "^9.0.0",
"@types/node": "14.x",
"@typescript-eslint/eslint-plugin": "^5.2.0",
"@typescript-eslint/parser": "^5.2.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"chai": "^4.3.0",
"chai-as-promised": "^7.1.1",
"eslint": "^8.1.0",
"eslint": "^8.4.1",
"mocha": "^9.1.1",
"typescript": "^4.4.2"
"typescript": "^4.5.4"
},
"dependencies": {
"vscode-languageserver": "^7.0.0",
"vscode-languageserver-textdocument": "^1.0.1",
"yaml": "^2.0.0-8"
"vscode-languageserver-textdocument": "^1.0.3",
"yaml": "^2.0.0-9"
}
}

@@ -1,2 +0,2 @@

# Docker Compose Language Service (Preview)
# Docker Compose Language Service

@@ -3,0 +3,0 @@ [![Node CI Build and Test](https://github.com/microsoft/compose-language-service/actions/workflows/node.js.yml/badge.svg)](https://github.com/microsoft/compose-language-service/actions/workflows/node.js.yml)

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc