Skip to content

Commit

Permalink
chore(deps): update dependency js-beautify to v1.14.9
Browse files Browse the repository at this point in the history
The PR introducing a new option to _not_ inline custom elements has been merged and released,
allowing us to use the new version of js-beautify without introducing a breaking change.

See #1834 for context
  • Loading branch information
cexbrayat committed Jul 20, 2023
1 parent 5426ca2 commit 881646e
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 48 deletions.
2 changes: 0 additions & 2 deletions .github/renovate.json5
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
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
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

0 comments on commit 881646e

Please sign in to comment.