Skip to content

Commit fec204a

Browse files
committed
fix ci issues
1 parent da17c78 commit fec204a

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

packages/bundle-size-checker/src/sizeDiff.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* @description Represents a single bundle size snapshot
3-
* @typedef {Object.<string, SizeSnapshotEntry>} SizeSnapshot
3+
* @typedef {Object.<string, import('./types').SizeSnapshotEntry>} SizeSnapshot
44
*
55
* @description Represents a single bundle size comparison
66
* @typedef {Object} Size
@@ -31,7 +31,7 @@
3131
* @property {number} fileCounts.total - Total number of files
3232
*/
3333

34-
/** @type {SizeSnapshotEntry} */
34+
/** @type {import('./types').SizeSnapshotEntry} */
3535
const nullSnapshot = { parsed: 0, gzip: 0 };
3636

3737
/**

packages/bundle-size-checker/src/types.ts

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// Upload configuration with optional properties
2-
interface UploadConfig {
2+
export interface UploadConfig {
33
repo?: string; // The repository name (e.g., "mui/material-ui")
44
branch?: string; // Optional branch name (defaults to current Git branch)
55
isPullRequest?: boolean; // Whether this is a pull request build (defaults to CI detection)
66
}
77

88
// Normalized upload configuration where all properties are defined
9-
interface NormalizedUploadConfig {
9+
export interface NormalizedUploadConfig {
1010
repo: string; // The repository name (e.g., "mui/material-ui")
1111
branch: string; // Branch name
1212
isPullRequest: boolean; // Whether this is a pull request build
@@ -15,7 +15,7 @@ interface NormalizedUploadConfig {
1515
// EntryPoint types
1616
type StringEntry = string;
1717

18-
interface ObjectEntry {
18+
export interface ObjectEntry {
1919
id: string; // Unique identifier for the entry (renamed from 'name')
2020
code?: string; // Code to be executed in the virtual module (now optional)
2121
import?: string; // Optional package name to import
@@ -28,7 +28,7 @@ interface ObjectEntry {
2828
export type EntryPoint = StringEntry | ObjectEntry;
2929

3030
// Bundle size checker config with optional upload config
31-
interface BundleSizeCheckerConfigObject {
31+
export interface BundleSizeCheckerConfigObject {
3232
entrypoints: EntryPoint[];
3333
upload?: UploadConfig | boolean | null;
3434
comment?: boolean; // Whether to post PR comments (defaults to true)
@@ -41,15 +41,15 @@ export type BundleSizeCheckerConfig =
4141
| (() => BundleSizeCheckerConfigObject | Promise<BundleSizeCheckerConfigObject>);
4242

4343
// Normalized bundle size checker config with all properties defined
44-
interface NormalizedBundleSizeCheckerConfig {
44+
export interface NormalizedBundleSizeCheckerConfig {
4545
entrypoints: ObjectEntry[];
4646
upload: NormalizedUploadConfig | null; // null means upload is disabled
4747
comment: boolean; // Whether to post PR comments
4848
replace: Record<string, string>; // String replacements to apply during bundling
4949
}
5050

5151
// Command line argument types
52-
interface CommandLineArgs {
52+
export interface CommandLineArgs {
5353
analyze?: boolean;
5454
output?: string;
5555
verbose?: boolean;
@@ -58,27 +58,27 @@ interface CommandLineArgs {
5858
debug?: boolean;
5959
}
6060

61-
interface ReportCommandArgs {
61+
export interface ReportCommandArgs {
6262
pr?: number;
6363
owner?: string;
6464
repo?: string;
6565
}
6666

6767
// Diff command argument types
68-
interface DiffCommandArgs {
68+
export interface DiffCommandArgs {
6969
base: string;
7070
head?: string;
7171
output?: 'json' | 'markdown';
7272
reportUrl?: string;
7373
}
7474

7575
// PR command argument types
76-
interface PrCommandArgs {
76+
export interface PrCommandArgs {
7777
prNumber: number;
7878
output?: 'json' | 'markdown';
7979
}
8080

81-
interface PrInfo {
81+
export interface PrInfo {
8282
number: number;
8383
base: {
8484
ref: string;
@@ -93,7 +93,7 @@ interface PrInfo {
9393
};
9494
}
9595

96-
interface SizeSnapshotEntry {
96+
export interface SizeSnapshotEntry {
9797
parsed: number;
9898
gzip: number;
9999
}

tsconfig.configs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{
22
"extends": ["./tsconfig.base.json", "./tsconfig.node.json"],
3+
"compilerOptions": {
4+
"skipLibCheck": true
5+
},
36
"files": ["./eslint.config.mjs", "./prettier.config.mjs", "./babel.config.js"],
47
"include": ["**/vite.config.*"],
58
"exclude": ["**/build"]

0 commit comments

Comments
 (0)