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 dart where no project is specified #1571

Closed
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
2 changes: 1 addition & 1 deletion lib/cli/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3959,7 +3959,7 @@ export async function createDartBom(path, options) {
);
let dependencies = [];
let pkgList = [];
const parentComponent = determineParentComponent(options);
const parentComponent = createDefaultParentComponent(path, "pub", options);
if (pubFiles.length) {
for (const f of pubFiles) {
if (DEBUG_MODE) {
Expand Down
2 changes: 1 addition & 1 deletion lib/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7442,7 +7442,7 @@ export async function parsePubLockData(pubLockData) {
pkg._integrity = `sha256-${packageData.description?.sha256}`;
}

const purlString = new PackageURL("dart", "", pkg.name, pkg.version)
const purlString = new PackageURL("pub", "", pkg.name, pkg.version)
.toString()
.replace(/%2F/g, "/");
pkg["bom-ref"] = decodeURIComponent(purlString);
Expand Down
4 changes: 2 additions & 2 deletions lib/helpers/utils.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ test("parse pub lock", async () => {
version: "2.11.0",
_integrity:
"sha256-947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c",
"bom-ref": "pkg:dart/[email protected]",
"bom-ref": "pkg:pub/[email protected]",
scope: "required",
});
expect(root_list.length).toEqual(3);
Expand All @@ -2095,7 +2095,7 @@ test("parse pub lock", async () => {
version: "3.0.2",
_integrity:
"sha256-99d63c60f00fac81249ce6410ee015d7b125c63d8278a30da81edf3317a1f6a0",
"bom-ref": "pkg:dart/[email protected]",
"bom-ref": "pkg:pub/[email protected]",
scope: "required",
});
dep_list = parsePubYamlData(
Expand Down
Loading