Skip to content

Commit a79ec62

Browse files
authored
Merge branch 'main' into post-stringify
2 parents 8c2572f + 4d20d1c commit a79ec62

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

bin/output-fixing-commands.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,20 @@ const fixingCommands = {
1616
};
1717

1818
const command = process.argv.slice(2);
19+
const currentScriptName = process.env.npm_lifecycle_event;
20+
21+
// Redirect the main lint command, but not individual commands.
22+
if (currentScriptName === 'lint' && command.includes('--fix')) {
23+
console.log(`🔧 Detected --fix flag, running: yarn lint-fix`);
24+
const result = cp.spawnSync('yarn', ['lint-fix'], { stdio: 'inherit' });
25+
process.exitCode = result.status;
26+
process.exit();
27+
}
1928

2029
const result = cp.spawnSync(command[0], command.slice(1), { stdio: 'inherit' });
2130

2231
if (result.status !== 0) {
2332
process.exitCode = result.status;
24-
const currentScriptName = process.env.npm_lifecycle_event;
2533
if (currentScriptName && currentScriptName in fixingCommands) {
2634
console.log(
2735
'💡 You might be able to fix the error by running `yarn ' +

src/profile-logic/profile-data.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ import type {
8585
CallTreeSummaryStrategy,
8686
EventDelayInfo,
8787
ThreadsKey,
88-
resourceTypeEnum,
88+
ResourceTypeEnum,
8989
MarkerPayload,
9090
Address,
9191
AddressProof,
@@ -2822,7 +2822,7 @@ export function getThreadProcessDetails(
28222822
function _shouldShowBothOriginAndFileName(
28232823
fileName: string,
28242824
origin: string,
2825-
resourceType: resourceTypeEnum | null
2825+
resourceType: ResourceTypeEnum | null
28262826
): boolean {
28272827
// If the origin string is just a URL prefix that's part of the
28282828
// filename, it doesn't add any useful information, so only show

src/types/profile.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type IndexIntoLibs = number;
1717
export type IndexIntoNativeSymbolTable = number;
1818
export type IndexIntoCategoryList = number;
1919
export type IndexIntoSubcategoryListForCategory = number;
20-
export type resourceTypeEnum = number;
20+
export type ResourceTypeEnum = number;
2121
export type ThreadIndex = number;
2222
// The Tid is most often a number. However in some cases such as merged profiles
2323
// we could generate a string.
@@ -370,7 +370,7 @@ export type ResourceTable = {
370370
lib: Array<IndexIntoLibs | null>;
371371
name: Array<IndexIntoStringTable>;
372372
host: Array<IndexIntoStringTable | null>;
373-
type: resourceTypeEnum[];
373+
type: ResourceTypeEnum[];
374374
};
375375

376376
/**

0 commit comments

Comments
 (0)