Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix running error by reverting import with type json #1422

Closed
wants to merge 2 commits into from
Closed
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
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ import {Argv} from "./argv.js";
import {AssertionError} from "assert";
import {Job, cleanupJobResources} from "./job.js";
import {GitlabRunnerPresetValues} from "./gitlab-preset.js";
import packageJson from "../package.json" with { type: "json" };

const jobs: Job[] = [];
const version = JSON.parse("../package.json")["version"];

process.on("SIGINT", async (_: string, code: number) => {
await cleanupJobResources(jobs);
Expand All @@ -26,7 +26,7 @@ process.on("SIGUSR2", async () => await cleanupJobResources(jobs));
const yparser = yargs(process.argv.slice(2));
yparser.parserConfiguration({"greedy-arrays": false})
.showHelpOnFail(false)
.version(packageJson["version"])
.version(version)
.wrap(yparser.terminalWidth?.())
.command({
handler: async (argv) => {
Expand Down
4 changes: 1 addition & 3 deletions src/schema/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import _schema from "./schema.json" with { type: "json" };

const schema: any = _schema;
const schema: any = JSON.parse("./schema.json");
schema.definitions.job_template.properties.gclInjectSSHAgent = {
"type": "boolean",
};
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@
"inlineSources": true,
"strict": true,
"skipLibCheck": true,
"resolveJsonModule": true
}
}
Loading