chore: replace `lodash.template` with eta (#5411)

Co-authored-by: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
pull/5413/head
btea 2 weeks ago committed by GitHub
parent 1a702fd6ab
commit 73bbaea028
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -546,6 +546,20 @@ Repository: https://github.com/jquery/esprima
> (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF > (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
> THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
## eta
License: MIT
By: Ben Gubler <nebrelbug@gmail.com>
Repository: https://github.com/bgub/eta
> Copyright 2025 Ben Gubler <nebrelbug@gmail.com>
>
> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## extend-shallow ## extend-shallow
License: MIT License: MIT
@ -904,89 +918,6 @@ Repository: https://github.com/markdown-it/linkify-it
> FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> OTHER DEALINGS IN THE SOFTWARE. > OTHER DEALINGS IN THE SOFTWARE.
## lodash._reinterpolate
License: MIT
By: John-David Dalton <john.david.dalton@gmail.com> (http://allyoucanleet.com/), Benjamin Tan <demoneaux@gmail.com> (https://d10.github.io/), Blaine Bublitz <blaine@iceddev.com> (http://www.iceddev.com/), Kit Cambridge <github@kitcambridge.be> (http://kitcambridge.be/), Mathias Bynens <mathias@qiwi.be> (https://mathiasbynens.be/)
Repository: https://github.com/lodash/lodash
> Copyright 2012-2015 The Dojo Foundation <http://dojofoundation.org/>
> Based on Underscore.js 1.7.0, copyright 2009-2015 Jeremy Ashkenas,
> DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
## lodash.template, lodash.templatesettings
License: MIT
By: John-David Dalton <john.david.dalton@gmail.com>, Mathias Bynens <mathias@qiwi.be>
Repository: https://github.com/lodash/lodash
> Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
>
> Based on Underscore.js, copyright Jeremy Ashkenas,
> DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
>
> This software consists of voluntary contributions made by many
> individuals. For exact contribution history, see the revision history
> available at https://github.com/lodash/lodash
>
> The following license applies to all parts of this software except as
> documented below:
>
> ====
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
>
> ====
>
> Copyright and related rights for sample code are waived via CC0. Sample
> code is defined as all source code displayed within the prose of the
> documentation.
>
> CC0: http://creativecommons.org/publicdomain/zero/1.0/
>
> ====
>
> Files located in the node_modules and vendor directories are externally
> maintained libraries used by this software which have their own
> licenses; we recommend you read them, as their terms may differ from the
> terms above.
## lru-cache ## lru-cache
License: BlueOak-1.0.0 License: BlueOak-1.0.0

@ -112,6 +112,7 @@
"vue": "^3.5.41" "vue": "^3.5.41"
}, },
"devDependencies": { "devDependencies": {
"@arethetypeswrong/cli": "^0.18.5",
"@clack/prompts": "^1.7.0", "@clack/prompts": "^1.7.0",
"@iconify/utils": "^3.1.4", "@iconify/utils": "^3.1.4",
"@mdit-vue/plugin-component": "^3.0.2", "@mdit-vue/plugin-component": "^3.0.2",
@ -127,11 +128,9 @@
"@mdit/plugin-emoji": "^1.1.1", "@mdit/plugin-emoji": "^1.1.1",
"@mdit/plugin-footnote": "^1.0.2", "@mdit/plugin-footnote": "^1.0.2",
"@mdit/plugin-tasklist": "^1.0.2", "@mdit/plugin-tasklist": "^1.0.2",
"@arethetypeswrong/cli": "^0.18.5",
"@polka/compression": "^1.0.0-next.28", "@polka/compression": "^1.0.0-next.28",
"@rolldown/pluginutils": "^1.0.1", "@rolldown/pluginutils": "^1.0.1",
"@types/cross-spawn": "^6.0.6", "@types/cross-spawn": "^6.0.6",
"@types/lodash.template": "^4.5.3",
"@types/mark.js": "^8.11.12", "@types/mark.js": "^8.11.12",
"@types/minimist": "^1.2.5", "@types/minimist": "^1.2.5",
"@types/node": "^26.2.0", "@types/node": "^26.2.0",
@ -142,11 +141,11 @@
"conventional-changelog": "^8.1.1", "conventional-changelog": "^8.1.1",
"conventional-changelog-angular": "^9.2.1", "conventional-changelog-angular": "^9.2.1",
"cross-spawn": "^7.0.6", "cross-spawn": "^7.0.6",
"eta": "^4.6.0",
"get-port": "^7.2.0", "get-port": "^7.2.0",
"gray-matter": "^4.0.3", "gray-matter": "^4.0.3",
"image-size": "^2.0.2", "image-size": "^2.0.2",
"lint-staged": "^17.3.0", "lint-staged": "^17.3.0",
"lodash.template": "^4.18.1",
"lru-cache": "^11.5.2", "lru-cache": "^11.5.2",
"markdown-it": "^14.3.0", "markdown-it": "^14.3.0",
"markdown-it-async": "^2.2.0", "markdown-it-async": "^2.2.0",
@ -192,5 +191,5 @@
"optional": true "optional": true
} }
}, },
"packageManager": "pnpm@11.21.0" "packageManager": "pnpm@11.24.0"
} }

@ -34,7 +34,7 @@ importers:
version: 14.1.2 version: 14.1.2
'@vitejs/plugin-vue': '@vitejs/plugin-vue':
specifier: ^6.0.8 specifier: ^6.0.8
version: 6.0.8(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))(vue@3.5.41(typescript@6.0.3)) version: 6.0.8(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))(vue@3.5.41(typescript@6.0.3))
'@vue/devtools-api': '@vue/devtools-api':
specifier: ^8.2.1 specifier: ^8.2.1
version: 8.2.1 version: 8.2.1
@ -61,7 +61,7 @@ importers:
version: 4.4.3 version: 4.4.3
vite: vite:
specifier: ^8.2.1 specifier: ^8.2.1
version: 8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0) version: 8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)
vue: vue:
specifier: ^3.5.41 specifier: ^3.5.41
version: 3.5.41(typescript@6.0.3) version: 3.5.41(typescript@6.0.3)
@ -123,9 +123,6 @@ importers:
'@types/cross-spawn': '@types/cross-spawn':
specifier: ^6.0.6 specifier: ^6.0.6
version: 6.0.6 version: 6.0.6
'@types/lodash.template':
specifier: ^4.5.3
version: 4.5.3
'@types/mark.js': '@types/mark.js':
specifier: ^8.11.12 specifier: ^8.11.12
version: 8.11.12 version: 8.11.12
@ -156,6 +153,9 @@ importers:
cross-spawn: cross-spawn:
specifier: ^7.0.6 specifier: ^7.0.6
version: 7.0.6 version: 7.0.6
eta:
specifier: ^4.6.0
version: 4.6.0
get-port: get-port:
specifier: ^7.2.0 specifier: ^7.2.0
version: 7.2.0 version: 7.2.0
@ -168,9 +168,6 @@ importers:
lint-staged: lint-staged:
specifier: ^17.3.0 specifier: ^17.3.0
version: 17.3.0 version: 17.3.0
lodash.template:
specifier: ^4.18.1
version: 4.18.1
lru-cache: lru-cache:
specifier: ^11.5.2 specifier: ^11.5.2
version: 11.5.2 version: 11.5.2
@ -257,7 +254,7 @@ importers:
version: 6.0.3 version: 6.0.3
vitest: vitest:
specifier: ^4.1.10 specifier: ^4.1.10
version: 4.1.10(@types/node@26.2.0)(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)) version: 4.1.10(@types/node@26.2.0)(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))
vue-sfc-transformer: vue-sfc-transformer:
specifier: ^0.2.5 specifier: ^0.2.5
version: 0.2.5(patch_hash=06dbce7d98fac77faf5e66a94aa6e04f34c0cc7ec0910ec10848e5f2e08b8b68)(@volar/typescript@2.4.28(typescript@6.0.3))(@vue/compiler-core@3.5.41)(@vue/language-core@3.3.11)(rolldown@1.2.5)(typescript@6.0.3)(vue@3.5.41(typescript@6.0.3)) version: 0.2.5(patch_hash=06dbce7d98fac77faf5e66a94aa6e04f34c0cc7ec0910ec10848e5f2e08b8b68)(@volar/typescript@2.4.28(typescript@6.0.3))(@vue/compiler-core@3.5.41)(@vue/language-core@3.3.11)(rolldown@1.2.5)(typescript@6.0.3)(vue@3.5.41(typescript@6.0.3))
@ -308,7 +305,7 @@ importers:
version: link:.. version: link:..
vitepress-plugin-group-icons: vitepress-plugin-group-icons:
specifier: ^1.7.6 specifier: ^1.7.6
version: 1.7.6(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)) version: 1.7.6(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))
vitepress-plugin-llms: vitepress-plugin-llms:
specifier: ^1.13.4 specifier: ^1.13.4
version: 1.13.4(supports-color@7.2.0) version: 1.13.4(supports-color@7.2.0)
@ -763,12 +760,6 @@ packages:
'@types/linkify-it@5.0.0': '@types/linkify-it@5.0.0':
resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==}
'@types/lodash.template@4.5.3':
resolution: {integrity: sha512-Mo0UYKLu1oXgkV9TVoXZLlXXjyIXlW7ZQRxi/4gQJmzJr63dmicE8gG0OkPjYTKBrBic852q0JzqrtNUWLBIyA==}
'@types/lodash@4.17.25':
resolution: {integrity: sha512-+K1NIO8I+F9/wNulfVvu23QYd0Pe9/OCqRrim4NoYIf1VoEDL90Ve4ClzpyqBLc7NpGGWRvYNCKZ1BE/Jpf8dQ==}
'@types/mark.js@8.11.12': '@types/mark.js@8.11.12':
resolution: {integrity: sha512-244ZnaIBpz4c6xutliAnYVZp6xJlmC569jZqnR3ElO1Y01ooYASSVQEqpd2x0A2UfrgVMs5V9/9tUAdZaDMytQ==} resolution: {integrity: sha512-244ZnaIBpz4c6xutliAnYVZp6xJlmC569jZqnR3ElO1Y01ooYASSVQEqpd2x0A2UfrgVMs5V9/9tUAdZaDMytQ==}
@ -1469,6 +1460,10 @@ packages:
estree-walker@3.0.3: estree-walker@3.0.3:
resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==}
eta@4.6.0:
resolution: {integrity: sha512-lW6is4T1NFOYnmqGZIfvixqj7A7sSvScF+DN8EK6K58xI5MZ5UvYe0GjopxOXQtZvUn4eDdVuZ8XSoYWTMEKwA==}
engines: {node: '>=20'}
expect-type@1.4.0: expect-type@1.4.0:
resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==} resolution: {integrity: sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==}
engines: {node: '>=12.0.0'} engines: {node: '>=12.0.0'}
@ -1813,16 +1808,6 @@ packages:
engines: {node: '>=22.22.1'} engines: {node: '>=22.22.1'}
hasBin: true hasBin: true
lodash._reinterpolate@3.0.0:
resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==}
lodash.template@4.18.1:
resolution: {integrity: sha512-5urZrLnV/VD6zHK5KsVtZgt7H19v51mIzoS0aBNH8yp3I8tbswrEjOABOPY8m8uB7NuibubLrMX+Y0PXsU9X+w==}
deprecated: This package is deprecated. Use https://socket.dev/npm/package/eta instead.
lodash.templatesettings@4.2.0:
resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==}
lodash@4.18.1: lodash@4.18.1:
resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==}
@ -2606,13 +2591,13 @@ packages:
vfile@6.0.3: vfile@6.0.3:
resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==}
vite@8.2.1: vite@8.2.2:
resolution: {integrity: sha512-EU/eS7BH3XROHh2YnBefjM6DBKA6ZeMZEYQbj7NLWg5wHYlhB8B/Mayd5XsgWq+NFYccDOTemRpdETWR6Ka/lw==} resolution: {integrity: sha512-cFKLV/PRgAUlIRm5WjMjJ86jrftzpqcgH+Us+DS8mI3CDNiH30Whrz8uHL3+MOLPAgqbMBAqWdAHAphOAM+z/Q==}
engines: {node: ^20.19.0 || >=22.12.0} engines: {node: ^20.19.0 || >=22.12.0}
hasBin: true hasBin: true
peerDependencies: peerDependencies:
'@types/node': ^20.19.0 || >=22.12.0 '@types/node': ^20.19.0 || >=22.12.0
'@vitejs/devtools': ^0.4.0 '@vitejs/devtools': ^0.4.0 || ^0.5.0
esbuild: '*' esbuild: '*'
jiti: '>=1.21.0' jiti: '>=1.21.0'
less: ^4.0.0 less: ^4.0.0
@ -3244,12 +3229,6 @@ snapshots:
'@types/linkify-it@5.0.0': {} '@types/linkify-it@5.0.0': {}
'@types/lodash.template@4.5.3':
dependencies:
'@types/lodash': 4.17.25
'@types/lodash@4.17.25': {}
'@types/mark.js@8.11.12': '@types/mark.js@8.11.12':
dependencies: dependencies:
'@types/jquery': 4.0.1 '@types/jquery': 4.0.1
@ -3291,10 +3270,10 @@ snapshots:
'@ungap/structured-clone@1.3.3': {} '@ungap/structured-clone@1.3.3': {}
'@vitejs/plugin-vue@6.0.8(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))(vue@3.5.41(typescript@6.0.3))': '@vitejs/plugin-vue@6.0.8(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))(vue@3.5.41(typescript@6.0.3))':
dependencies: dependencies:
'@rolldown/pluginutils': 1.0.1 '@rolldown/pluginutils': 1.0.1
vite: 8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0) vite: 8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)
vue: 3.5.41(typescript@6.0.3) vue: 3.5.41(typescript@6.0.3)
'@vitest/expect@4.1.10': '@vitest/expect@4.1.10':
@ -3306,13 +3285,13 @@ snapshots:
chai: 6.2.2 chai: 6.2.2
tinyrainbow: 3.1.1 tinyrainbow: 3.1.1
'@vitest/mocker@4.1.10(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))': '@vitest/mocker@4.1.10(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))':
dependencies: dependencies:
'@vitest/spy': 4.1.10 '@vitest/spy': 4.1.10
estree-walker: 3.0.3 estree-walker: 3.0.3
magic-string: 0.30.21 magic-string: 0.30.21
optionalDependencies: optionalDependencies:
vite: 8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0) vite: 8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)
'@vitest/pretty-format@4.1.10': '@vitest/pretty-format@4.1.10':
dependencies: dependencies:
@ -3862,6 +3841,8 @@ snapshots:
dependencies: dependencies:
'@types/estree': 1.0.9 '@types/estree': 1.0.9
eta@4.6.0: {}
expect-type@1.4.0: {} expect-type@1.4.0: {}
extend-shallow@2.0.1: extend-shallow@2.0.1:
@ -4180,17 +4161,6 @@ snapshots:
optionalDependencies: optionalDependencies:
yaml: 2.9.0 yaml: 2.9.0
lodash._reinterpolate@3.0.0: {}
lodash.template@4.18.1:
dependencies:
lodash._reinterpolate: 3.0.0
lodash.templatesettings: 4.2.0
lodash.templatesettings@4.2.0:
dependencies:
lodash._reinterpolate: 3.0.0
lodash@4.18.1: {} lodash@4.18.1: {}
log-symbols@7.0.1: log-symbols@7.0.1:
@ -5069,7 +5039,7 @@ snapshots:
'@types/unist': 3.0.3 '@types/unist': 3.0.3
vfile-message: 4.0.3 vfile-message: 4.0.3
vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0): vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0):
dependencies: dependencies:
lightningcss: 1.33.0 lightningcss: 1.33.0
picomatch: 4.0.5 picomatch: 4.0.5
@ -5082,13 +5052,13 @@ snapshots:
jiti: 1.21.7 jiti: 1.21.7
yaml: 2.9.0 yaml: 2.9.0
vitepress-plugin-group-icons@1.7.6(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)): vitepress-plugin-group-icons@1.7.6(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)):
dependencies: dependencies:
'@iconify-json/logos': 1.2.12 '@iconify-json/logos': 1.2.12
'@iconify-json/vscode-icons': 1.2.70 '@iconify-json/vscode-icons': 1.2.70
'@iconify/utils': 3.1.4 '@iconify/utils': 3.1.4
optionalDependencies: optionalDependencies:
vite: 8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0) vite: 8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)
vitepress-plugin-llms@1.13.4(supports-color@7.2.0): vitepress-plugin-llms@1.13.4(supports-color@7.2.0):
dependencies: dependencies:
@ -5109,10 +5079,10 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
vitest@4.1.10(@types/node@26.2.0)(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)): vitest@4.1.10(@types/node@26.2.0)(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)):
dependencies: dependencies:
'@vitest/expect': 4.1.10 '@vitest/expect': 4.1.10
'@vitest/mocker': 4.1.10(vite@8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)) '@vitest/mocker': 4.1.10(vite@8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0))
'@vitest/pretty-format': 4.1.10 '@vitest/pretty-format': 4.1.10
'@vitest/runner': 4.1.10 '@vitest/runner': 4.1.10
'@vitest/snapshot': 4.1.10 '@vitest/snapshot': 4.1.10
@ -5129,7 +5099,7 @@ snapshots:
tinyexec: 1.3.0 tinyexec: 1.3.0
tinyglobby: 0.2.17 tinyglobby: 0.2.17
tinyrainbow: 3.1.1 tinyrainbow: 3.1.1
vite: 8.2.1(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0) vite: 8.2.2(@types/node@26.2.0)(jiti@1.21.7)(yaml@2.9.0)
why-is-node-running: 2.3.0 why-is-node-running: 2.3.0
optionalDependencies: optionalDependencies:
'@types/node': 26.2.0 '@types/node': 26.2.0

@ -12,7 +12,7 @@ import {
select, select,
text text
} from '@clack/prompts' } from '@clack/prompts'
import template from 'lodash.template' import { Eta } from 'eta'
import c from 'picocolors' import c from 'picocolors'
import { slash } from '../shared' import { slash } from '../shared'
@ -190,6 +190,12 @@ export async function scaffold({
const useMjs = userPkg.type !== 'module' const useMjs = userPkg.type !== 'module'
const eta = new Eta({
useWith: true,
autoEscape: false,
autoTrim: false
})
const renderFile = async (file: string) => { const renderFile = async (file: string) => {
const filePath = path.resolve(templateDir, file) const filePath = path.resolve(templateDir, file)
let targetPath = path.resolve(resolvedRoot, file) let targetPath = path.resolve(resolvedRoot, file)
@ -205,7 +211,7 @@ export async function scaffold({
} }
const content = await readFile(filePath) const content = await readFile(filePath)
const compiled = template(content)(data) const compiled = eta.renderString(content, data)
await mkdir(path.dirname(targetPath), { recursive: true }) await mkdir(path.dirname(targetPath), { recursive: true })
await writeFile(targetPath, compiled) await writeFile(targetPath, compiled)

Loading…
Cancel
Save