sonarqube-scanner
Version:
SonarQube/SonarCloud Scanner for the JavaScript world
30 lines (29 loc) • 1.27 kB
JavaScript
;
/*
* sonar-scanner-npm
* Copyright (C) SonarSource Sàrl
* mailto:info AT sonarsource DOT com
*
* You can redistribute and/or modify this program under the terms of
* the Sonar Source-Available License Version 1, as published by SonarSource Sàrl.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the Sonar Source-Available License for more details.
*
* You should have received a copy of the Sonar Source-Available License
* along with this program; if not, see https://sonarsource.com/license/ssal/
*/
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.version = void 0;
// Import version from package.json (located at build/package.json, one level up from build/src/)
const package_json_1 = __importDefault(require("../package.json"));
const packageVersion = package_json_1.default.version;
if (!packageVersion) {
throw new Error('Version not found in package.json. This indicates a build error.');
}
exports.version = packageVersion;