Skip to content

Commit

Permalink
chore: fix some comments (#5904)
Browse files Browse the repository at this point in the history
Signed-off-by: sjtucoder <sjtucoder@icloud.com>
  • Loading branch information
sjtucoder authored Jun 17, 2024
1 parent cee82e4 commit 24e30c8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/vite-node/src/source-map-handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function mapSourcePosition(position: OriginalMapping) {
}
let sourceMap = sourceMapCache[position.source]
if (!sourceMap) {
// Call the (overrideable) retrieveSourceMap function to get the source map.
// Call the (overridable) retrieveSourceMap function to get the source map.
const urlAndMap = retrieveSourceMap(position.source)
if (urlAndMap && urlAndMap.map) {
sourceMap = sourceMapCache[position.source] = {
Expand Down Expand Up @@ -300,7 +300,7 @@ function CallSiteToString(this: CallSite) {
const isMethodCall = !(this.isToplevel() || isConstructor)
if (isMethodCall) {
let typeName = this.getTypeName()
// Fixes shim to be backward compatable with Node v0 to v4
// Fixes shim to be backward compatible with Node v0 to v4
if (typeName === '[object Object]') {
typeName = 'null'
}
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/node/error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export function printError(
} as any
}

// Error may have occured even before the configuration was resolved
// Error may have occurred even before the configuration was resolved
if (!project) {
printErrorMessage(e, logger)
return
Expand Down
4 changes: 2 additions & 2 deletions packages/vitest/src/node/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export class StateManager {
const currentFile = existing.find(
i => i.projectName === file.projectName,
)
// keep logs for the previous file because it should alway be initiated before the collections phase
// keep logs for the previous file because it should always be initiated before the collections phase
// which means that all logs are collected during the collection and not inside tests
if (currentFile) {
file.logs = currentFile.logs
Expand All @@ -115,7 +115,7 @@ export class StateManager {
})
}

// this file is reused by ws-client, and shoult not rely on heavy dependencies like workspace
// this file is reused by ws-client, and should not rely on heavy dependencies like workspace
clearFiles(
_project: { config: { name: string | undefined; root: string } },
paths: string[] = [],
Expand Down

0 comments on commit 24e30c8

Please sign in to comment.