Skip to content

Commit 3d168d4

Browse files
committed
build(deps-dev): update posthtml-include to 2.0.1
1 parent 907de89 commit 3d168d4

File tree

3 files changed

+25
-12
lines changed

3 files changed

+25
-12
lines changed

package-lock.json

+8-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@
1111
},
1212
"scripts": {
1313
"dev": "vitest",
14-
"release": "npm run changelog && npx np",
1514
"docs": "node ./docs-src",
16-
"lint": "biome lint ./src ./scripts",
1715
"test": "vitest run --coverage",
16+
"lint": "biome lint ./src ./scripts",
17+
"release": "npm run changelog && npx np",
1818
"changelog": "conventional-changelog -i CHANGELOG.md -s -r 0 && git add CHANGELOG.md && git commit -m 'chore: update changelog.md' && git push"
1919
},
2020
"keywords": [
@@ -43,7 +43,7 @@
4343
"markdown-it-include": "^2.0.0",
4444
"markdown-it-toc-done-right": "^4.2.0",
4545
"posthtml-beautify": "^0.7.0",
46-
"posthtml-include": "^1.7.4",
46+
"posthtml-include": "^2.0.1",
4747
"posthtml-markdownit": "^3.1.0",
4848
"vitest": "^2.0.4"
4949
}

test/test-plugins.js

+14-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,20 @@ test('Must include file using posthtml-include', async () => {
4545
const actual = `<component src="components/component-with-include.html"></component>`;
4646
const expected = `<div><p>Included file</p></div>`;
4747

48-
const html = await posthtml([plugin({root: './test/templates', tag: 'component', attribute: 'src', plugins: [require('posthtml-include')({root: './test/templates', encoding: 'utf8'})]})]).process(actual).then(result => clean(result.html));
48+
const html = await posthtml([
49+
plugin({
50+
root: './test/templates',
51+
tag: 'component',
52+
attribute: 'src',
53+
plugins: [
54+
require('posthtml-include')({
55+
root: './test/templates',
56+
cwd: './test/templates',
57+
encoding: 'utf8'
58+
})
59+
]
60+
})
61+
]).process(actual).then(result => clean(result.html));
4962

5063
expect(html).toBe(expected);
5164
});

0 commit comments

Comments
 (0)