Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jun 5, 2024
1 parent 612974d commit def1f6c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function assertConfigExportPath(interfaceFile: InterfaceFile): void {
importPathAbsolute === importPathAbsoluteExpected,
`The Vike configuration of ${pc.bold(name)} is exported at ${pc.bold(
importPathAbsolute
)} but it should be exported at ${pc.bold(importPathAbsoluteExpected)} instead.`,
)}, but it should be exported at ${pc.bold(importPathAbsoluteExpected)} instead.`,
{ onlyOnce: true }
)
}
Expand All @@ -42,9 +42,9 @@ function assertExtensionName(interfaceFile: InterfaceFile): void {
if (name) {
assertWarning(
name === nameDeduced,
`The setting ${pc.bold('name')} defined at ${filePathToShowToUser} is ${pc.bold(name)} but it should be ${pc.bold(
nameDeduced
)} instead (the name of the npm package).`,
`The setting ${pc.bold('name')} defined at ${filePathToShowToUser} is ${pc.bold(
name
)}, but it should be ${pc.bold(nameDeduced)} instead (the name of the npm package).`,
{ onlyOnce: true }
)
} else {
Expand Down Expand Up @@ -101,15 +101,15 @@ function assertExtensionsPeerDependencies(interfaceFilesRelevantList: InterfaceF
if (reqName === 'vike') {
assertUsage(
isVersionRange(PROJECT_VERSION, reqVersion),
`${errBase} version ${pc.bold(reqVersion)} but ${pc.bold(PROJECT_VERSION)} is installed.`
`${errBase} version ${pc.bold(reqVersion)}, but ${pc.bold(PROJECT_VERSION)} is installed.`
)
return
}
const extensionVersion = extensions[reqName]
assertUsage(extensionVersion, `${errBase}.`)
assertUsage(
isVersionRange(extensionVersion, reqVersion),
`${errBase} version ${pc.bold(reqVersion)} but ${pc.bold(extensionVersion)} is installed.`
`${errBase} version ${pc.bold(reqVersion)}, but ${pc.bold(extensionVersion)} is installed.`
)
})
})
Expand Down Expand Up @@ -156,7 +156,7 @@ function getExtensionVersion(name: string, interfaceFile: InterfaceFile): string
name === nameExpected,
`The setting ${pc.bold('name')} defined at ${filePathToShowToUser} is ${pc.bold(
JSON.stringify(name)
)} but it should be equal to ${pc.bold(JSON.stringify(nameExpected))} (the value of ${packageJsonPath}${pc.dim(
)}, but it should be equal to ${pc.bold(JSON.stringify(nameExpected))} (the value of ${packageJsonPath}${pc.dim(
'#'
)}${pc.bold('name')})`,
{ onlyOnce: true }
Expand Down

0 comments on commit def1f6c

Please sign in to comment.