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

🧹 chore(none): repo maintenance / code style #2629

Merged
merged 1 commit into from
Jul 26, 2024
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
6 changes: 1 addition & 5 deletions examples/eslint-9.x.x/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
{
"extends": "@roots/bud/config/tsconfig.json",
"compilerOptions": {
"allowJs": true,
"paths": {
"@src/*": ["./src/*"]
},
"types": ["@roots/bud", "@roots/bud-eslint"]
},
"files": ["./bud.config.ts"],
"include": ["./src"],
"exclude": ["./dist"]
"include": ["./src"]
}
4 changes: 1 addition & 3 deletions sources/@roots/bud-dashboard/src/application.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export interface Props {
devUrl?: URL
displayAssets?: boolean
displayEntrypoints?: boolean
displayHelp?: boolean
displayServerInfo?: boolean
error?: Error
errors?: StatsCompilation[`errors`]
Expand All @@ -50,7 +49,6 @@ export const Application = ({
devUrl,
displayAssets,
displayEntrypoints,
displayHelp,
displayServerInfo,
error,
isolated = 0,
Expand All @@ -63,7 +61,7 @@ export const Application = ({
const {stdout} = useStdout()

compilations = Array.isArray(compilations)
? compilations?.filter(compilation => compilation.hash) ?? []
? (compilations?.filter(compilation => compilation.hash) ?? [])
: []

if (error) {
Expand Down
41 changes: 0 additions & 41 deletions sources/@roots/bud-dashboard/src/errorBoundary.tsx

This file was deleted.

48 changes: 22 additions & 26 deletions sources/@roots/bud-dashboard/src/service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import {render} from '@roots/bud-support/ink/instance'
import isUndefined from '@roots/bud-support/isUndefined'

import {Application, TeletypeApplication} from './application.js'
import ErrorBoundary from './errorBoundary.js'

type Compilations = Array<Omit<StatsCompilation, `children`>>

Expand Down Expand Up @@ -163,31 +162,28 @@ export class Dashboard extends Service implements BudDashboard {
: Application

render(
<ErrorBoundary compilation={stats.toString()}>
<Box flexDirection="column">
<App
basedir={this.app.context.basedir}
close={cb =>
this.app.compiler?.instance?.compilers?.map(c => c.close(cb))
}
compact={compact}
compilations={compilations}
debug={this.app.context.debug}
devUrl={this.app.server?.url}
displayAssets={assets}
displayEntrypoints={entrypoints}
displayServerInfo={this.app.mode === `development` && server}
error={error}
isolated={0}
mode={this.app.mode}
notifier={this.app.notifier}
proxy={this.app.server?.enabledMiddleware?.[`proxy`]}
proxyUrl={this.app.server?.proxyUrl}
publicDevUrl={this.app.server?.publicUrl}
publicProxyUrl={this.app.server?.publicProxyUrl}
/>
</Box>
</ErrorBoundary>,
<Box flexDirection="column">
<App
basedir={this.app.context.basedir}
close={cb =>
this.app.compiler?.instance?.compilers?.map(c => c.close(cb))
}
compact={compact}
compilations={compilations}
debug={this.app.context.debug}
devUrl={this.app.server?.url}
displayAssets={assets}
displayEntrypoints={entrypoints}
displayServerInfo={this.app.mode === `development` && server}
error={error}
mode={this.app.mode}
notifier={this.app.notifier}
proxy={this.app.server?.enabledMiddleware?.[`proxy`]}
proxyUrl={this.app.server?.proxyUrl}
publicDevUrl={this.app.server?.publicUrl}
publicProxyUrl={this.app.server?.publicProxyUrl}
/>
</Box>,
)
}
}
4 changes: 1 addition & 3 deletions sources/@roots/bud-framework/src/module/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,7 @@ export class Module extends Service {
}

logger.scope(`module`).log(`Imported module:`, signifier)

return options.raw ? code : code?.default ?? code
return !options.raw && `default` in code ? code.default : code
}

/**
Expand Down Expand Up @@ -296,7 +295,6 @@ export class Module extends Service {

if (resolved) {
logger.scope(`module`).log(`Cache miss:`, signifier, `=>`, resolved)

this.setResolution(signifier, resolved)
}

Expand Down
Loading