Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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: 0 additions & 2 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
"prConcurrentLimit": 1,
// auto-merge if build is OK
"automerge": true,
// ignore js-beautify updates until https://github.com/vuejs/test-utils/pull/1834 is resolved
"ignoreDeps": ["js-beautify"],
"packageRules": [
// group vitest packages update
{
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"dist/index.d.ts"
],
"dependencies": {
"js-beautify": "1.14.6",
"js-beautify": "1.14.9",
"vue-component-type-helpers": "1.8.4"
},
"devDependencies": {
Expand Down
83 changes: 41 additions & 42 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions src/baseWrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import { isElement } from './utils/isElement'
import type { DOMWrapper } from './domWrapper'
import { createDOMWrapper, createVueWrapper } from './wrapperFactory'
import { stringifyNode } from './utils/stringifyNode'
import beautify from 'js-beautify'
import beautify, { HTMLBeautifyOptions } from 'js-beautify'

export default abstract class BaseWrapper<ElementType extends Node>
implements WrapperLike
Expand Down Expand Up @@ -226,8 +226,10 @@ export default abstract class BaseWrapper<ElementType extends Node>
beautify.html(node, {
unformatted: ['code', 'pre', 'em', 'strong', 'span'],
indent_inner_html: true,
indent_size: 2
})
indent_size: 2,
inline_custom_elements: false
// TODO the cast can be removed when @types/js-beautify will be up-to-date
} as HTMLBeautifyOptions)
)
.join('\n')
}
Expand Down