Merge branch 'main' into joshmgross/reusable-wf-outputs
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@github/actions-expressions",
|
"name": "@github/actions-expressions",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@github/actions-languageserver",
|
"name": "@github/actions-languageserver",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"description": "Language server for GitHub Actions",
|
"description": "Language server for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-languageservice": "^0.1.127",
|
"@github/actions-languageservice": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@github/actions-languageservice",
|
"name": "@github/actions-languageservice",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"description": "Language service for GitHub Actions",
|
"description": "Language service for GitHub Actions",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
@@ -38,8 +38,8 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"yaml": "^2.1.1"
|
"yaml": "^2.1.1"
|
||||||
|
|||||||
@@ -278,6 +278,13 @@ jobs:
|
|||||||
expect(result.map(x => x.label)).toEqual(["event"]);
|
expect(result.map(x => x.label)).toEqual(["event"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("auto-complete complex partial", async () => {
|
||||||
|
const input = 'run-name: "run ${{ github.ev| }} run"';
|
||||||
|
const result = await complete(...getPositionFromCursor(input), undefined, contextProviderConfig);
|
||||||
|
|
||||||
|
expect(result.map(x => x.label)).toEqual(["event"]);
|
||||||
|
});
|
||||||
|
|
||||||
it("using default context provider", async () => {
|
it("using default context provider", async () => {
|
||||||
const input =
|
const input =
|
||||||
"on: push\njobs:\n build:\n runs-on: ubuntu-latest\n environment:\n url: ${{ runner.| }}\n steps:\n - run: echo";
|
"on: push\njobs:\n build:\n runs-on: ubuntu-latest\n environment:\n url: ${{ runner.| }}\n steps:\n - run: echo";
|
||||||
|
|||||||
@@ -217,20 +217,18 @@ function getExpressionCompletionItems(
|
|||||||
context: DescriptionDictionary,
|
context: DescriptionDictionary,
|
||||||
pos: Position
|
pos: Position
|
||||||
): CompletionItem[] {
|
): CompletionItem[] {
|
||||||
let expressionInput = "";
|
|
||||||
let currentInput = "";
|
let currentInput = "";
|
||||||
let relCharOffset: number = 0;
|
|
||||||
|
|
||||||
if (isBasicExpression(token)) {
|
if (isBasicExpression(token)) {
|
||||||
expressionInput = currentInput = token.expression;
|
currentInput = token.source || token.expression;
|
||||||
relCharOffset = getRelCharOffset(token.range!, expressionInput, pos);
|
|
||||||
} else {
|
} else {
|
||||||
const stringToken = token.assertString("Expected string token for expression completion");
|
const stringToken = token.assertString("Expected string token for expression completion");
|
||||||
currentInput = stringToken.source || stringToken.value;
|
currentInput = stringToken.source || stringToken.value;
|
||||||
relCharOffset = getRelCharOffset(stringToken.range!, currentInput, pos);
|
|
||||||
expressionInput = (getExpressionInput(currentInput, relCharOffset) || "").trim();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const relCharOffset = getRelCharOffset(token.range!, currentInput, pos);
|
||||||
|
const expressionInput = (getExpressionInput(currentInput, relCharOffset) || "").trim();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return completeExpression(expressionInput, context, [], validatorFunctions).map(item =>
|
return completeExpression(expressionInput, context, [], validatorFunctions).map(item =>
|
||||||
mapExpressionCompletionItem(item, currentInput[relCharOffset])
|
mapExpressionCompletionItem(item, currentInput[relCharOffset])
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@github/actions-workflow-parser",
|
"name": "@github/actions-workflow-parser",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"source": "./src/index.ts",
|
"source": "./src/index.ts",
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
"watch": "tsc --build tsconfig.build.json --watch"
|
"watch": "tsc --build tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -606,9 +606,9 @@ class TemplateReader {
|
|||||||
this._fileId,
|
this._fileId,
|
||||||
token.range,
|
token.range,
|
||||||
`format('${format.join("")}'${args.join("")})`,
|
`format('${format.join("")}'${args.join("")})`,
|
||||||
token.definitionInfo,
|
definitionInfo,
|
||||||
expressionTokens,
|
expressionTokens,
|
||||||
undefined
|
raw
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "browser-playground",
|
"name": "browser-playground",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"description": "",
|
"description": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-languageserver": "^0.1.127",
|
"@github/actions-languageserver": "^0.1.129",
|
||||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||||
"monaco-editor-workers": "^0.34.2",
|
"monaco-editor-workers": "^0.34.2",
|
||||||
"monaco-languageclient": "^4.0.3",
|
"monaco-languageclient": "^4.0.3",
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||||
"useWorkspaces": true,
|
"useWorkspaces": true,
|
||||||
"version": "0.1.127"
|
"version": "0.1.129"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+17
-17
@@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
"actions-expressions": {
|
"actions-expressions": {
|
||||||
"name": "@github/actions-expressions",
|
"name": "@github/actions-expressions",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
@@ -34,11 +34,11 @@
|
|||||||
},
|
},
|
||||||
"actions-languageserver": {
|
"actions-languageserver": {
|
||||||
"name": "@github/actions-languageserver",
|
"name": "@github/actions-languageserver",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-languageservice": "^0.1.127",
|
"@github/actions-languageservice": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"vscode-languageserver": "^8.0.2",
|
"vscode-languageserver": "^8.0.2",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
@@ -59,11 +59,11 @@
|
|||||||
},
|
},
|
||||||
"actions-languageservice": {
|
"actions-languageservice": {
|
||||||
"name": "@github/actions-languageservice",
|
"name": "@github/actions-languageservice",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"vscode-languageserver-textdocument": "^1.0.7",
|
"vscode-languageserver-textdocument": "^1.0.7",
|
||||||
"vscode-languageserver-types": "^3.17.2",
|
"vscode-languageserver-types": "^3.17.2",
|
||||||
"yaml": "^2.1.1"
|
"yaml": "^2.1.1"
|
||||||
@@ -82,10 +82,10 @@
|
|||||||
},
|
},
|
||||||
"actions-workflow-parser": {
|
"actions-workflow-parser": {
|
||||||
"name": "@github/actions-workflow-parser",
|
"name": "@github/actions-workflow-parser",
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"cronstrue": "^2.21.0",
|
"cronstrue": "^2.21.0",
|
||||||
"yaml": "^2.0.0-8"
|
"yaml": "^2.0.0-8"
|
||||||
},
|
},
|
||||||
@@ -105,10 +105,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"browser-playground": {
|
"browser-playground": {
|
||||||
"version": "0.1.127",
|
"version": "0.1.129",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@github/actions-languageserver": "^0.1.127",
|
"@github/actions-languageserver": "^0.1.129",
|
||||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||||
"monaco-editor-workers": "^0.34.2",
|
"monaco-editor-workers": "^0.34.2",
|
||||||
"monaco-languageclient": "^4.0.3",
|
"monaco-languageclient": "^4.0.3",
|
||||||
@@ -14570,8 +14570,8 @@
|
|||||||
"@github/actions-languageserver": {
|
"@github/actions-languageserver": {
|
||||||
"version": "file:actions-languageserver",
|
"version": "file:actions-languageserver",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@github/actions-languageservice": "^0.1.127",
|
"@github/actions-languageservice": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"@octokit/rest": "^19.0.7",
|
"@octokit/rest": "^19.0.7",
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
"fetch-mock": "^9.11.0",
|
"fetch-mock": "^9.11.0",
|
||||||
@@ -14588,8 +14588,8 @@
|
|||||||
"@github/actions-languageservice": {
|
"@github/actions-languageservice": {
|
||||||
"version": "file:actions-languageservice",
|
"version": "file:actions-languageservice",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"@github/actions-workflow-parser": "^0.1.127",
|
"@github/actions-workflow-parser": "^0.1.129",
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
"jest": "^29.0.3",
|
"jest": "^29.0.3",
|
||||||
"prettier": "^2.8.3",
|
"prettier": "^2.8.3",
|
||||||
@@ -14604,7 +14604,7 @@
|
|||||||
"@github/actions-workflow-parser": {
|
"@github/actions-workflow-parser": {
|
||||||
"version": "file:actions-workflow-parser",
|
"version": "file:actions-workflow-parser",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@github/actions-expressions": "^0.1.127",
|
"@github/actions-expressions": "^0.1.129",
|
||||||
"@types/jest": "^29.0.3",
|
"@types/jest": "^29.0.3",
|
||||||
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
"@typescript-eslint/eslint-plugin": "^5.40.0",
|
||||||
"@typescript-eslint/parser": "^5.40.0",
|
"@typescript-eslint/parser": "^5.40.0",
|
||||||
@@ -17562,7 +17562,7 @@
|
|||||||
"browser-playground": {
|
"browser-playground": {
|
||||||
"version": "file:browser-playground",
|
"version": "file:browser-playground",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@github/actions-languageserver": "^0.1.127",
|
"@github/actions-languageserver": "^0.1.129",
|
||||||
"css-loader": "^6.7.2",
|
"css-loader": "^6.7.2",
|
||||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||||
"monaco-editor-workers": "^0.34.2",
|
"monaco-editor-workers": "^0.34.2",
|
||||||
|
|||||||
Reference in New Issue
Block a user