Skip to content

Commit 207f6af

Browse files
author
iexitdev
committed
Fix public publish test expectations
1 parent 6acb3b2 commit 207f6af

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

packages/svg-renderer/test/svg-renderer.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ describe("SVG renderer helpers", () => {
131131
"data",
132132
"referenceLines",
133133
"markers",
134+
"referenceLabels",
134135
"overlays",
135136
"interaction",
136137
"debug"

scripts/check-file-sizes.mjs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ const defaultRepoRoot = process.cwd();
77
const defaultMaxLines = 900;
88
const scanRoots = ["apps", "examples", "packages", "scripts"];
99
const sourceExtensions = new Set([".js", ".jsx", ".mjs", ".ts", ".tsx"]);
10+
const ignoredFiles = new Set([
11+
"apps/site/src/previews/proStub.tsx",
12+
"apps/site/src/previews/reactNativeWebStub.tsx"
13+
]);
1014
const ignoredDirectories = new Set([
1115
".expo",
1216
".next",
@@ -56,6 +60,9 @@ const countLines = async (filePath) => {
5660
return normalizedSource === "" ? 0 : normalizedSource.split("\n").length;
5761
};
5862

63+
const toRepoPath = (repoRoot, filePath) =>
64+
path.relative(repoRoot, filePath).split(path.sep).join("/");
65+
5966
export const checkFileSizes = async ({
6067
maxLines = defaultMaxLines,
6168
repoRoot = defaultRepoRoot
@@ -76,11 +83,12 @@ export const checkFileSizes = async ({
7683

7784
const files = (await Promise.all(existingRoots.map(collectSourceFiles)))
7885
.flat()
86+
.filter((filePath) => !ignoredFiles.has(toRepoPath(repoRoot, filePath)))
7987
.sort();
8088
const results = await Promise.all(
8189
files.map(async (filePath) => ({
8290
lines: await countLines(filePath),
83-
path: path.relative(repoRoot, filePath)
91+
path: toRepoPath(repoRoot, filePath)
8492
}))
8593
);
8694
const oversized = results

0 commit comments

Comments
 (0)