Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
],
"dependencies": {
"@cyclonedx/cyclonedx-library": "^8.4.0",
"@cyclonedx/cyclonedx-library": "portal:../cyclonedx-javascript-library",
"@yarnpkg/cli": "^4",
"@yarnpkg/core": "^4",
"@yarnpkg/fslib": "^3",
Expand Down
16 changes: 9 additions & 7 deletions src/_buildtimeInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@ SPDX-License-Identifier: Apache-2.0
Copyright (c) OWASP Foundation. All Rights Reserved.
*/

/* eslint-disable-next-line @typescript-eslint/explicit-function-return-type -- dynamic import helper */
export async function getBuildtimeInfo () {
/*
The included file is generated by `../tools/gather-buildtime-info.cjs`.
Its content is pseudo-dynamic and so is the return type of this function.
*/
return (await import('./__buildtimeInfo.json')).default
import type { NodePackageJson } from "@cyclonedx/cyclonedx-library/Types";

interface BuildtimeInfo {
self: NodePackageJson
[key: string]: NodePackageJson
}

export async function getBuildtimeInfo (): Promise<BuildtimeInfo> {
return (await import('./__buildtimeInfo.json')).default satisfies BuildtimeInfo
}
2 changes: 1 addition & 1 deletion tests/integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ const { spawnSync } = require('node:child_process')
const fs = require('node:fs')
const path = require('node:path')

const { Spec: { Version: SpecVersion }, Validation } = require('@cyclonedx/cyclonedx-library')
const { suite, test } = require('mocha')

const { name: thisName, version: thisVersion } = require('../../package.json')
const { Spec: { Version: SpecVersion }, Validation } = require('@cyclonedx/cyclonedx-library')

const testSetups = [
/* region functional tests */
Expand Down
11 changes: 5 additions & 6 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading