mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-03 05:20:38 -05:00
update deep import of @packages/errors
This commit is contained in:
@@ -7,9 +7,9 @@ import { codeFrameColumns } from '@babel/code-frame'
|
||||
|
||||
import $utils from './utils'
|
||||
import $sourceMapUtils from './source_map_utils'
|
||||
import { stackUtils } from '@packages/errors'
|
||||
|
||||
const { getStackLines, replacedStack, stackWithoutMessage, splitStack, unsplitStack } = stackUtils
|
||||
// Intentionally deep-importing from @packages/errors so as to not bundle the entire @packages/errors in the client unnecessarily
|
||||
import { getStackLines, replacedStack, stackWithoutMessage, splitStack, unsplitStack } from '@packages/errors/src/stackUtils'
|
||||
|
||||
const whitespaceRegex = /^(\s*)*/
|
||||
const stackLineRegex = /^\s*(at )?.*@?\(?.*\:\d+\:\d+\)?$/
|
||||
|
||||
@@ -21,7 +21,7 @@ export const splitStack = (stack: string) => {
|
||||
}, [[], []] as MessageLines)
|
||||
}
|
||||
|
||||
export const unsplitStack = (messageLines: string, stackLines: string[]) => {
|
||||
export const unsplitStack = (messageLines: string | string[], stackLines: string[]) => {
|
||||
return _.castArray(messageLines).concat(stackLines).join('\n')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user