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

simplify output messages #31454

Merged
merged 5 commits into from
Nov 16, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion bench/nested-deps/bench.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function runNextCommandDev(argv, opts = {}) {
function handleStdout(data) {
const message = data.toString()
const bootupMarkers = {
dev: /compiled successfully/i,
dev: /compiled .*successfully/i,
start: /started server/i,
}
if (
Expand Down
8 changes: 2 additions & 6 deletions packages/next/build/output/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,8 @@ buildStore.subscribe((state) => {
loading: false,
typeChecking: false,
partial:
clientWasLoading && !serverWasLoading && !serverWebWasLoading
? 'client'
: serverWasLoading && !clientWasLoading && !serverWebWasLoading
? 'server'
: serverWebWasLoading && !clientWasLoading && !serverWasLoading
? 'serverWeb'
clientWasLoading && (serverWasLoading || serverWebWasLoading)
? 'client and server'
: undefined,
modules:
(clientWasLoading ? client.modules : 0) +
Expand Down
2 changes: 1 addition & 1 deletion packages/next/build/output/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type OutputState =
| {
loading: false
typeChecking: boolean
partial: 'client' | 'server' | 'serverWeb' | undefined
partial: 'client and server' | undefined
modules: number
errors: string[] | null
warnings: string[] | null
Expand Down
10 changes: 3 additions & 7 deletions packages/next/server/dev/on-demand-entry-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,9 @@ export default function onDemandEntryHandler(

if (entriesChanged) {
reportTrigger(
isApiRoute
? `${normalizedPage} (server only)`
: isMiddleware
? `${normalizedPage} (middleware only)`
: clientOnly
? `${normalizedPage} (client only)`
: normalizedPage
isApiRoute || isMiddleware || clientOnly
? normalizedPage
: `${normalizedPage} (client and server)`
)
invalidator.invalidate()
}
Expand Down
2 changes: 1 addition & 1 deletion test/integration/amphtml/test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ describe('AMP Usage', () => {
})

it('should not contain missing files warning', async () => {
expect(output).toContain('compiled successfully')
expect(output).toContain('compiled client and server successfully')
expect(output).toContain('compiling /only-amp')
expect(output).not.toContain('Could not find files for')
})
Expand Down
2 changes: 1 addition & 1 deletion test/lib/next-test-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ export function runNextCommandDev(argv, stdOut, opts = {}) {
function handleStdout(data) {
const message = data.toString()
const bootupMarkers = {
dev: /compiled successfully/i,
dev: /compiled .*successfully/i,
start: /started server/i,
}
if (
Expand Down