Fetching the name, version and URL from the package.json file

This commit is contained in:
Peter Murray
2023-12-18 07:16:24 +00:00
committed by GitHub
parent 793303a197
commit 4efffecbc6
3 changed files with 167 additions and 4126 deletions
+162 -4120
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -19,7 +19,7 @@
"bugs": {
"url": "https://github.com/advanced-security/maven-dependency-submission-action/issues"
},
"homepage": "https://github.com/advanced-security/maven-dependency-submission-action#readme",
"homepage": "https://github.com/advanced-security/maven-dependency-submission-action",
"dependencies": {
"@actions/core": "^1.10.1",
"@github/dependency-submission-toolkit": "^1.2.10",
+4 -5
View File
@@ -6,8 +6,7 @@ import { Depgraph, MavenDependencyGraph, parseDependencyJson } from './depgraph'
import { MavenRunner } from './maven-runner';
import { loadFileContents } from './utils/file-utils';
const version = require('../package.json')['version'];
const packageData = require('../package.json');
const DEPGRAPH_MAVEN_PLUGIN_VERSION = '4.0.2';
export type MavenConfiguration = {
@@ -67,9 +66,9 @@ export async function generateSnapshot(directory: string, mvnConfig?: MavenConfi
function getDetector() {
return {
name: 'maven-dependency-submission-action',
url: 'https://github.com/advanced-security/maven-dependency-submission-action',
version: version
name: packageData.name,
url: packageData.homepage,
version: packageData.version
};
}