Skip to content

Commit 854b949

Browse files
committed
fix: runtime failure when using es2024 features
1 parent 80bebd0 commit 854b949

File tree

5 files changed

+17
-3
lines changed

5 files changed

+17
-3
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@eslint/compat": "^1.1.1",
3838
"@eslint/eslintrc": "^3.1.0",
3939
"@eslint/js": "^9.11.1",
40+
"@opentf/std": "^0.13.0",
4041
"@total-typescript/ts-reset": "^0.6.1",
4142
"@types/eslint__js": "^8.42.3",
4243
"@types/node": "^22.7.4",

pnpm-lock.yaml

+9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/return-dispatch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as core from "@actions/core";
33
import { ActionOutputs, type ActionConfig } from "./action.ts";
44
import * as api from "./api.ts";
55
import * as constants from "./constants.ts";
6-
import { getBranchName, type BranchNameResult } from "./utils.ts";
6+
import { type BranchNameResult } from "./utils.ts";
77

88
export function shouldRetryOrThrow(
99
error: Error,

src/test-utils/logging.mock.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import * as core from "@actions/core";
2+
import { symDiff } from "@opentf/std";
23
import { type MockInstance, vi, expect } from "vitest";
34

45
// Consuming test suites must first call:
@@ -63,7 +64,10 @@ function assertOnlyCalledInner(
6364
);
6465
}
6566

66-
const diff = coreLogMockSet.symmetricDifference(new Set(coreLogMocks));
67+
// Once Node 22 is LTS, this can be:
68+
// const diff = coreLogMockSet.symmetricDifference(new Set(coreLogMocks));
69+
70+
const diff = symDiff([[...coreLogMockSet], coreLogMocks]);
6771

6872
for (const logMock of diff) {
6973
expect(logMock).not.toHaveBeenCalled();

tsconfig.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"target": "esnext",
3+
"target": "es2023",
44
"module": "nodenext",
55
"noEmit": true,
66

0 commit comments

Comments
 (0)