Skip to content

Commit b382bdc

Browse files
committed
avoid pkg/ project name collisions
1 parent b2c5a1f commit b382bdc

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

dist/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1668,7 +1668,8 @@ function transform_files(
16681668
const readme = docs.content.find(({ name }) => name === "README.md");
16691669
const pkg = docs.content.find(({ name }) => name === "package.json");
16701670

1671-
if (!readme || !pkg) return;
1671+
if (!readme || !pkg || JSON.parse(pkg.content ).name === project)
1672+
return;
16721673

16731674
pkgs.push([
16741675
JSON.parse(pkg.content ).name.replace("@sveltejs/", ""),

src/fs/get_content.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ export function transform_files(
120120
const readme = docs.content.find(({ name }) => name === "README.md");
121121
const pkg = docs.content.find(({ name }) => name === "package.json");
122122

123-
if (!readme || !pkg) return;
123+
if (!readme || !pkg || JSON.parse(pkg.content as string).name === project)
124+
return;
124125

125126
pkgs.push([
126127
JSON.parse(pkg.content as string).name.replace("@sveltejs/", ""),

0 commit comments

Comments
 (0)