From 84020d7b4549298407dad919594b3aa034a95b90 Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 9 Jan 2023 13:56:12 -0800 Subject: [PATCH 1/2] Add test to make sure properties aren't overwritten --- actions-languageservice/src/hover.test.ts | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/actions-languageservice/src/hover.test.ts b/actions-languageservice/src/hover.test.ts index 598ed0b..329987a 100644 --- a/actions-languageservice/src/hover.test.ts +++ b/actions-languageservice/src/hover.test.ts @@ -51,6 +51,25 @@ jobs: ); }); + it("property values are not overwritten", async () => { + const input1 = `on: push +jobs: + build: + ti|meout-minutes: 10 + cancel-timeout-minutes: 10`; + const result1 = await hover(...getPositionFromCursor(input1)); + expect(result1).not.toBeUndefined(); + + const input2 = `on: push +jobs: + build: + timeout-minutes: 10 + ca|ncel-timeout-minutes: 10`; + const result2 = await hover(...getPositionFromCursor(input2)); + expect(result2).not.toBeUndefined(); + expect(result1?.contents).not.toEqual(result2?.contents); + }); + it("on a value in a sequence", async () => { const input = `on: [pull_request, pu|sh] From c4d3a7bcdd138b20d128cb61822890ee8bbfa49f Mon Sep 17 00:00:00 2001 From: Jacob Wallraff Date: Mon, 9 Jan 2023 14:30:35 -0800 Subject: [PATCH 2/2] Update parser version --- package-lock.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package-lock.json b/package-lock.json index 4358410..bd2cffa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -702,9 +702,9 @@ "link": true }, "node_modules/@github/actions-workflow-parser": { - "version": "0.0.41", - "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.41/234e6042ee06199b4314589ad77dfd7fe0debe6d", - "integrity": "sha512-s27gUhNH80YhFmkcQ5GE5BA5D15xbQ48YjwKCwYKN+ndldaOhpqa+v5Q+NfZlNwBmJ/8lJZob09/IiGRgFq7ag==", + "version": "0.0.43", + "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.43/67508b2dc0381b6d13591227aa82a4ff9fc8aeaf", + "integrity": "sha512-cT8mAhcv5xh+asyHU9maLaLwexAPAb88P4DNx1HIAV+OlMOIH3oe5tXJIq67xtkVRKVJzHrvhy16HfLG9uKGpw==", "license": "MIT", "dependencies": { "@github/actions-expressions": "*", @@ -13565,9 +13565,9 @@ } }, "@github/actions-workflow-parser": { - "version": "0.0.41", - "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.41/234e6042ee06199b4314589ad77dfd7fe0debe6d", - "integrity": "sha512-s27gUhNH80YhFmkcQ5GE5BA5D15xbQ48YjwKCwYKN+ndldaOhpqa+v5Q+NfZlNwBmJ/8lJZob09/IiGRgFq7ag==", + "version": "0.0.43", + "resolved": "https://npm.pkg.github.com/download/@github/actions-workflow-parser/0.0.43/67508b2dc0381b6d13591227aa82a4ff9fc8aeaf", + "integrity": "sha512-cT8mAhcv5xh+asyHU9maLaLwexAPAb88P4DNx1HIAV+OlMOIH3oe5tXJIq67xtkVRKVJzHrvhy16HfLG9uKGpw==", "requires": { "@github/actions-expressions": "*", "yaml": "^2.0.0-8"