From c1f79a60aa834d44ef2f85d2359e74f52f897b71 Mon Sep 17 00:00:00 2001 From: Dubhar <77026787+Dubhar@users.noreply.github.com> Date: Thu, 26 Sep 2024 16:47:03 +0200 Subject: [PATCH] fix: --version shows correct version (#6) * fix: --version shows correct version --------- Co-authored-by: Thorsten Jerosch --- package-lock.json | 4 ++-- package.json | 2 +- src/bin/sarif-codeclimate.ts | 4 +++- tsconfig.json | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index e2f217e..d8e219d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sarif-codeclimate", - "version": "2.1.0", + "version": "2.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sarif-codeclimate", - "version": "2.1.0", + "version": "2.1.3", "license": "MIT", "dependencies": { "colors": "^1.4.0", diff --git a/package.json b/package.json index 6719fc9..2bd297b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sarif-codeclimate", - "version": "2.1.2", + "version": "2.1.3", "description": "Convert your SARIF output into a readable JSON compatible with GitLab Code Climate Tool", "main": "out/lib/converter.js", "bin": { diff --git a/src/bin/sarif-codeclimate.ts b/src/bin/sarif-codeclimate.ts index 500309b..609a3d1 100644 --- a/src/bin/sarif-codeclimate.ts +++ b/src/bin/sarif-codeclimate.ts @@ -4,12 +4,14 @@ import { Command } from 'commander'; import { green, red } from 'colors'; import { writeFileSync } from 'fs'; import { convert } from '../lib/converter'; +import { version } from '../../package.json'; + const program = new Command(); program .name('sarif-codeclimate') .description('Converts a SARIF file to a Code Climate JSON file') - .version('2.0.0') + .version(version) .requiredOption('-i, --input ', 'Path to the SARIF file') .option('-o, --output ', 'Path to the Code Climate JSON file') .action((options) => { diff --git a/tsconfig.json b/tsconfig.json index 3b1db73..6182e06 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,8 @@ "module": "commonjs", "declaration": true, "outDir": "./out", - "strict": true + "strict": true, + "resolveJsonModule": true, }, "include": ["src"], "exclude": ["node_modules", "**/__tests__/*"]