Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"env": {
"commonjs": true,
"es6": true,
"es2022": true,
"node": true,
"mocha": true
},
Expand All @@ -11,7 +10,8 @@
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaVersion": 2018
"ecmaVersion": 2022,
"sourceType": "module"
},
"ignorePatterns": ["dist/**"],
"rules": {}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/ci-unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ jobs:
permissions:
contents: read
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22, 24]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
# This should match the using value in `actions.yaml`
node-version: 24
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm run lint
- run: npm run test
18 changes: 9 additions & 9 deletions code-build.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
// Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

const core = require("@actions/core");
const github = require("@actions/github");
const { CloudWatchLogs } = require("@aws-sdk/client-cloudwatch-logs");
const { CodeBuild } = require("@aws-sdk/client-codebuild");
const assert = require("assert");
import * as core from "@actions/core";
import * as github from "@actions/github";
import { CloudWatchLogs } from "@aws-sdk/client-cloudwatch-logs";
import { CodeBuild } from "@aws-sdk/client-codebuild";
import assert from "node:assert";

module.exports = {
export {
runBuild,
build,
waitForBuildEndTime,
Expand Down Expand Up @@ -186,12 +186,12 @@ async function waitForBuildEndTime(
);
}

function githubInputs() {
function githubInputs(ctx = github.context) {
const projectName = core.getInput("project-name", { required: true });
const disableSourceOverride =
core.getInput("disable-source-override", { required: false }) === "true";
const { owner, repo } = github.context.repo;
const { payload } = github.context;
const { owner, repo } = ctx.repo;
const { payload } = ctx;
// The github.context.sha is evaluated on import.
// This makes it hard to test.
// So I use the raw ENV.
Expand Down
Loading
Loading