Merge branch 'main' into joshmgross/reusable-inputs-outputs

This commit is contained in:
Josh Gross
2023-02-06 17:32:54 -05:00
10 changed files with 32 additions and 42 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@github/actions-expressions",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@github/actions-languageserver",
"version": "0.1.118",
"version": "0.1.120",
"description": "Language server for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -38,8 +38,8 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@github/actions-languageservice": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-languageservice": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"@octokit/rest": "^19.0.7",
"vscode-languageserver": "^8.0.2",
"vscode-languageserver-textdocument": "^1.0.7",
@@ -56,7 +56,7 @@ const actionMetadata = {
};
it("returns default context when job is undefined", async () => {
const workflowContext = createWorkflowContext(workflow, undefined);
const workflowContext = await createWorkflowContext(workflow, undefined);
const defaultContext = getDefaultStepsContext(workflowContext);
const stepsContext = await getStepsContext(new Octokit(), new TTLCache(), defaultContext, workflowContext);
@@ -68,7 +68,7 @@ it("adds action outputs", async () => {
.sandbox()
.getOnce("https://api.github.com/repos/actions/cache/contents/action.yml?ref=v3", actionMetadata);
const workflowContext = createWorkflowContext(workflow, "build");
const workflowContext = await createWorkflowContext(workflow, "build");
const defaultContext = getDefaultStepsContext(workflowContext);
const stepsContext = await getStepsContext(
@@ -60,7 +60,7 @@ const actionMetadata = {
};
async function getDescription(input: string, mock: fetchMock.FetchMockSandbox) {
const workflowContext = createWorkflowContext(workflow, "build", 0);
const workflowContext = await createWorkflowContext(workflow, "build", 0);
return await getActionInputDescription(
new Octokit({
+3 -3
View File
@@ -1,6 +1,6 @@
{
"name": "@github/actions-languageservice",
"version": "0.1.118",
"version": "0.1.120",
"description": "Language service for GitHub Actions",
"license": "MIT",
"type": "module",
@@ -38,8 +38,8 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"yaml": "^2.1.1"
+2 -2
View File
@@ -1,6 +1,6 @@
{
"name": "@github/actions-workflow-parser",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"type": "module",
"source": "./src/index.ts",
@@ -40,7 +40,7 @@
"watch": "tsc --build tsconfig.build.json --watch"
},
"dependencies": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
@@ -2,7 +2,6 @@ import {TemplateContext} from "../../templates/template-context";
import {TemplateToken} from "../../templates/tokens";
import {TokenType} from "../../templates/tokens/types";
import {ReusableWorkflowJob} from "../workflow-template";
import {convertOn} from "./events";
import {handleTemplateTokenErrors} from "./handle-errors";
import {convertWorkflowJobInputs} from "./job/inputs";
import {convertJobs} from "./jobs";
@@ -30,15 +29,6 @@ export function convertReferencedWorkflow(
}
}
}
if (!onToken) {
return;
}
const events = convertOn(context, onToken);
if (events.workflow_call === undefined) {
context.error(onToken, "workflow_call key is not defined in the referenced workflow.");
}
}
function convertReferencedWorkflowOn(context: TemplateContext, on: TemplateToken, job: ReusableWorkflowJob) {
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "browser-playground",
"version": "0.1.118",
"version": "0.1.120",
"description": "",
"private": true,
"main": "index.js",
"type": "module",
"dependencies": {
"@github/actions-languageserver": "^0.1.118",
"@github/actions-languageserver": "^0.1.120",
"monaco-editor-webpack-plugin": "^7.0.1",
"monaco-editor-workers": "^0.34.2",
"monaco-languageclient": "^4.0.3",
+1 -1
View File
@@ -1,5 +1,5 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"useWorkspaces": true,
"version": "0.1.118"
"version": "0.1.120"
}
+17 -17
View File
@@ -18,7 +18,7 @@
},
"actions-expressions": {
"name": "@github/actions-expressions",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"devDependencies": {
"@types/jest": "^29.0.3",
@@ -34,11 +34,11 @@
},
"actions-languageserver": {
"name": "@github/actions-languageserver",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"dependencies": {
"@github/actions-languageservice": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-languageservice": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"@octokit/rest": "^19.0.7",
"vscode-languageserver": "^8.0.2",
"vscode-languageserver-textdocument": "^1.0.7",
@@ -59,11 +59,11 @@
},
"actions-languageservice": {
"name": "@github/actions-languageservice",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"dependencies": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"vscode-languageserver-textdocument": "^1.0.7",
"vscode-languageserver-types": "^3.17.2",
"yaml": "^2.1.1"
@@ -82,10 +82,10 @@
},
"actions-workflow-parser": {
"name": "@github/actions-workflow-parser",
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"dependencies": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"cronstrue": "^2.21.0",
"yaml": "^2.0.0-8"
},
@@ -105,10 +105,10 @@
}
},
"browser-playground": {
"version": "0.1.118",
"version": "0.1.120",
"license": "MIT",
"dependencies": {
"@github/actions-languageserver": "^0.1.118",
"@github/actions-languageserver": "^0.1.120",
"monaco-editor-webpack-plugin": "^7.0.1",
"monaco-editor-workers": "^0.34.2",
"monaco-languageclient": "^4.0.3",
@@ -14570,8 +14570,8 @@
"@github/actions-languageserver": {
"version": "file:actions-languageserver",
"requires": {
"@github/actions-languageservice": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-languageservice": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"@octokit/rest": "^19.0.7",
"@types/jest": "^29.0.3",
"fetch-mock": "^9.11.0",
@@ -14588,8 +14588,8 @@
"@github/actions-languageservice": {
"version": "file:actions-languageservice",
"requires": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-workflow-parser": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"@github/actions-workflow-parser": "^0.1.120",
"@types/jest": "^29.0.3",
"jest": "^29.0.3",
"prettier": "^2.8.3",
@@ -14604,7 +14604,7 @@
"@github/actions-workflow-parser": {
"version": "file:actions-workflow-parser",
"requires": {
"@github/actions-expressions": "^0.1.118",
"@github/actions-expressions": "^0.1.120",
"@types/jest": "^29.0.3",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
@@ -17562,7 +17562,7 @@
"browser-playground": {
"version": "file:browser-playground",
"requires": {
"@github/actions-languageserver": "^0.1.118",
"@github/actions-languageserver": "^0.1.120",
"css-loader": "^6.7.2",
"monaco-editor-webpack-plugin": "^7.0.1",
"monaco-editor-workers": "^0.34.2",