Skip to content

Commit

Permalink
🧹 chore(none): repo maintenance / code style (#2629)
Browse files Browse the repository at this point in the history
## Type of change

**NONE: internal change**
  • Loading branch information
kellymears authored Jul 26, 2024
1 parent ebdb242 commit ca765f1
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 78 deletions.
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

0 comments on commit ca765f1

Please sign in to comment.