Merge branch 'main' into cschleiden/combine-repos
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@github/actions-languageserver",
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"description": "Language server for GitHub Actions",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
@@ -38,7 +38,7 @@
|
||||
"prettier-fix": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@github/actions-languageservice": "^0.1.70",
|
||||
"@github/actions-languageservice": "^0.1.71",
|
||||
"@github/actions-workflow-parser": "*",
|
||||
"@octokit/rest": "^19.0.5",
|
||||
"vscode-languageserver": "^8.0.2",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@github/actions-languageservice",
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"description": "Language service for GitHub Actions",
|
||||
"license": "MIT",
|
||||
"type": "module",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {TextEdit} from "vscode-languageserver-types";
|
||||
import {MarkupContent, TextEdit} from "vscode-languageserver-types";
|
||||
import {complete} from "./complete";
|
||||
import {WorkflowContext} from "./context/workflow-context";
|
||||
import {registerLogger} from "./log";
|
||||
@@ -311,7 +311,7 @@ jobs:
|
||||
]);
|
||||
|
||||
// Includes detail when available. Using continue-on-error as a sample here.
|
||||
expect(result.map(x => x.detail)).toContain(
|
||||
expect(result.map(x => (x.documentation as MarkupContent)?.value)).toContain(
|
||||
"Prevents a job from failing when a step fails. Set to true to allow a job to pass when this step fails."
|
||||
);
|
||||
});
|
||||
@@ -337,7 +337,7 @@ o|
|
||||
const result = await complete(...getPositionFromCursor(input));
|
||||
const onResult = result.find(x => x.label === "on");
|
||||
expect(onResult).not.toBeUndefined();
|
||||
expect(onResult?.detail).toEqual(
|
||||
expect((onResult!.documentation as MarkupContent).value).toEqual(
|
||||
"The name of the GitHub event that triggers the workflow. You can provide a single event string, array of events, array of event types, or an event configuration map that schedules a workflow or restricts the execution of a workflow to specific files, tags, or branch changes. For a list of available events, see https://help.github.com/en/github/automating-your-workflow-with-github-actions/events-that-trigger-workflows."
|
||||
);
|
||||
});
|
||||
@@ -348,7 +348,7 @@ o|
|
||||
const result = await complete(...getPositionFromCursor(input));
|
||||
const dispatchResult = result.find(x => x.label === "workflow_dispatch");
|
||||
expect(dispatchResult).not.toBeUndefined();
|
||||
expect(dispatchResult?.detail).toEqual(
|
||||
expect((dispatchResult!.documentation as MarkupContent).value).toEqual(
|
||||
"You can now create workflows that are manually triggered with the new workflow_dispatch event. You will then see a 'Run workflow' button on the Actions tab, enabling you to easily trigger a run."
|
||||
);
|
||||
});
|
||||
|
||||
@@ -109,7 +109,10 @@ export async function complete(
|
||||
|
||||
const item: CompletionItem = {
|
||||
label: value.label,
|
||||
detail: value.description,
|
||||
documentation: value.description && {
|
||||
kind: "markdown",
|
||||
value: value.description
|
||||
},
|
||||
tags: value.deprecated ? [CompletionItemTag.Deprecated] : undefined,
|
||||
textEdit: replaceRange ? TextEdit.replace(replaceRange, newText) : TextEdit.insert(position, newText)
|
||||
};
|
||||
@@ -212,6 +215,10 @@ function mapExpressionCompletionItem(item: ExpressionCompletionItem, charAfterPo
|
||||
}
|
||||
return {
|
||||
label: item.label,
|
||||
documentation: item.description && {
|
||||
kind: "markdown",
|
||||
value: item.description
|
||||
},
|
||||
insertText: insertText,
|
||||
kind: item.function ? CompletionItemKind.Function : CompletionItemKind.Variable
|
||||
};
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import {TextDocument} from "vscode-languageserver-textdocument";
|
||||
import {hover} from "./hover";
|
||||
import {getPositionFromCursor} from "./test-utils/cursor-position";
|
||||
|
||||
@@ -25,7 +24,6 @@ jobs:
|
||||
expect(result?.contents).toEqual("Runs your workflow when you push a commit or tag.");
|
||||
});
|
||||
|
||||
|
||||
it("on a parameter with a description", async () => {
|
||||
const input = `on: push
|
||||
jobs:
|
||||
@@ -35,7 +33,7 @@ jobs:
|
||||
expect(result).not.toBeUndefined();
|
||||
expect(result?.contents).toEqual(
|
||||
"Prevents a workflow run from failing when a job fails. Set to true to allow a workflow run to pass when this job fails.\n\n" +
|
||||
"**Context:** github, inputs, vars, needs, strategy, matrix"
|
||||
"**Context:** github, inputs, vars, needs, strategy, matrix"
|
||||
);
|
||||
});
|
||||
|
||||
@@ -52,7 +50,7 @@ jobs:
|
||||
});
|
||||
|
||||
it("on a value in a sequence", async () => {
|
||||
const input = `on: [pull_request,
|
||||
const input = `on: [pull_request,
|
||||
pu|sh]
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "browser-playground",
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"description": "",
|
||||
"private": true,
|
||||
"main": "index.js",
|
||||
"type": "module",
|
||||
"dependencies": {
|
||||
"@github/actions-languageserver": "^0.1.70",
|
||||
"@github/actions-languageserver": "^0.1.71",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"monaco-editor-workers": "^0.34.2",
|
||||
"monaco-languageclient": "^4.0.3",
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
|
||||
"useWorkspaces": true,
|
||||
"version": "0.1.70"
|
||||
"version": "0.1.71"
|
||||
}
|
||||
|
||||
Generated
+7
-7
@@ -33,10 +33,10 @@
|
||||
},
|
||||
"actions-languageserver": {
|
||||
"name": "@github/actions-languageserver",
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@github/actions-languageservice": "^0.1.70",
|
||||
"@github/actions-languageservice": "^0.1.71",
|
||||
"@github/actions-workflow-parser": "*",
|
||||
"@octokit/rest": "^19.0.5",
|
||||
"vscode-languageserver": "^8.0.2",
|
||||
@@ -58,7 +58,7 @@
|
||||
},
|
||||
"actions-languageservice": {
|
||||
"name": "@github/actions-languageservice",
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@github/actions-expressions": "*",
|
||||
@@ -102,10 +102,10 @@
|
||||
}
|
||||
},
|
||||
"browser-playground": {
|
||||
"version": "0.1.70",
|
||||
"version": "0.1.71",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@github/actions-languageserver": "^0.1.70",
|
||||
"@github/actions-languageserver": "^0.1.71",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"monaco-editor-workers": "^0.34.2",
|
||||
"monaco-languageclient": "^4.0.3",
|
||||
@@ -14426,7 +14426,7 @@
|
||||
"@github/actions-languageserver": {
|
||||
"version": "file:actions-languageserver",
|
||||
"requires": {
|
||||
"@github/actions-languageservice": "^0.1.70",
|
||||
"@github/actions-languageservice": "^0.1.71",
|
||||
"@github/actions-workflow-parser": "*",
|
||||
"@octokit/rest": "^19.0.5",
|
||||
"@types/jest": "^29.0.3",
|
||||
@@ -17387,7 +17387,7 @@
|
||||
"browser-playground": {
|
||||
"version": "file:browser-playground",
|
||||
"requires": {
|
||||
"@github/actions-languageserver": "^0.1.70",
|
||||
"@github/actions-languageserver": "^0.1.71",
|
||||
"css-loader": "^6.7.2",
|
||||
"monaco-editor-webpack-plugin": "^7.0.1",
|
||||
"monaco-editor-workers": "^0.34.2",
|
||||
|
||||
Reference in New Issue
Block a user