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

[core] Remove unused use client #38967

Merged
merged 6 commits into from
Oct 30, 2023
Merged
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
1 change: 0 additions & 1 deletion packages/mui-base/src/ClickAwayListener/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
'use client';
export * from './ClickAwayListener';
1 change: 0 additions & 1 deletion packages/mui-base/src/Dropdown/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
'use client';
export * from './Dropdown';
export * from './Dropdown.types';
1 change: 0 additions & 1 deletion packages/mui-base/src/FocusTrap/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
'use client';
export { FocusTrap } from './FocusTrap';
export * from './FocusTrap.types';
1 change: 0 additions & 1 deletion packages/mui-base/src/FormControl/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';
export { FormControl } from './FormControl';

export { FormControlContext } from './FormControlContext';
Expand Down
1 change: 0 additions & 1 deletion packages/mui-base/src/Modal/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
'use client';
export { Modal } from './Modal';
export * from './Modal.types';
export * from './modalClasses';
1 change: 0 additions & 1 deletion packages/mui-material/src/GlobalStyles/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
'use client';
export { default } from './GlobalStyles';
32 changes: 0 additions & 32 deletions packages/rsc-builder/buildRsc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,21 +73,6 @@ async function processFile(
await fse.writeFile(filename, newContents);
}

function getIndexFile(directory: string) {
const items = fse.readdirSync(directory);

const indexFile = items.reduce((prev, curr) => {
if (!/^index.(js|ts)/.test(curr)) {
return prev;
}
return curr;
}, '');

return {
filename: path.join(directory, indexFile),
};
}

async function findAll(
directories: string[],
grep: RegExp | null,
Expand Down Expand Up @@ -124,24 +109,11 @@ async function run(argv: yargs.ArgumentsCamelCase<CommandOptions>) {
];
}

const indexFile = getIndexFile(projectSrc);

try {
processFile(indexFile.filename);
} catch (error: any) {
error.message = `${path.relative(process.cwd(), indexFile.filename)}: ${error.message}`;
throw error;
}

const components = await findAll(directories, grep, findComponents);

components.forEach(async (component) => {
try {
processFile(component.filename);

if (component.indexFilename) {
processFile(component.indexFilename);
}
} catch (error: any) {
error.message = `${path.relative(process.cwd(), component.filename)}: ${error.message}`;
throw error;
Expand All @@ -153,10 +125,6 @@ async function run(argv: yargs.ArgumentsCamelCase<CommandOptions>) {
hooks.forEach(async (hook) => {
try {
processFile(hook.filename);

if (hook.indexFilename) {
processFile(hook.indexFilename);
}
} catch (error: any) {
error.message = `${path.relative(process.cwd(), hook.filename)}: ${error.message}`;
throw error;
Expand Down