@@ -4,7 +4,7 @@ import { b } from 'code-red';
44 * @param {any } program
55 * @param {import('estree').Identifier } name
66 * @param {string } banner
7- * @param {any } sveltePath
7+ * @param {any } svelte_path
88 * @param {Array<{ name: string; alias: import('estree').Identifier }> } helpers
99 * @param {Array<{ name: string; alias: import('estree').Identifier }> } globals
1010 * @param {import('estree').ImportDeclaration[] } imports
@@ -15,21 +15,21 @@ export default function create_module(
1515 program ,
1616 name ,
1717 banner ,
18- sveltePath = 'svelte' ,
18+ svelte_path = 'svelte' ,
1919 helpers ,
2020 globals ,
2121 imports ,
2222 module_exports ,
2323 exports_from
2424) {
25- const internal_path = `${ sveltePath } /internal` ;
25+ const internal_path = `${ svelte_path } /internal` ;
2626 helpers . sort ( ( a , b ) => ( a . name < b . name ? - 1 : 1 ) ) ;
2727 globals . sort ( ( a , b ) => ( a . name < b . name ? - 1 : 1 ) ) ;
2828 return esm (
2929 program ,
3030 name ,
3131 banner ,
32- sveltePath ,
32+ svelte_path ,
3333 internal_path ,
3434 helpers ,
3535 globals ,
@@ -41,11 +41,11 @@ export default function create_module(
4141
4242/**
4343 * @param {any } source
44- * @param {any } sveltePath
44+ * @param {any } svelte_path
4545 */
46- function edit_source ( source , sveltePath ) {
46+ function edit_source ( source , svelte_path ) {
4747 return source === 'svelte' || source . startsWith ( 'svelte/' )
48- ? source . replace ( 'svelte' , sveltePath )
48+ ? source . replace ( 'svelte' , svelte_path )
4949 : source ;
5050}
5151
@@ -84,7 +84,7 @@ function get_internal_globals(globals, helpers) {
8484 * @param {any } program
8585 * @param {import('estree').Identifier } name
8686 * @param {string } banner
87- * @param {string } sveltePath
87+ * @param {string } svelte_path
8888 * @param {string } internal_path
8989 * @param {Array<{ name: string; alias: import('estree').Identifier }> } helpers
9090 * @param {Array<{ name: string; alias: import('estree').Identifier }> } globals
@@ -96,7 +96,7 @@ function esm(
9696 program ,
9797 name ,
9898 banner ,
99- sveltePath ,
99+ svelte_path ,
100100 internal_path ,
101101 helpers ,
102102 globals ,
@@ -118,7 +118,7 @@ function esm(
118118
119119 /** @param {any } node */
120120 function rewrite_import ( node ) {
121- const value = edit_source ( node . source . value , sveltePath ) ;
121+ const value = edit_source ( node . source . value , svelte_path ) ;
122122 if ( node . source . value !== value ) {
123123 node . source . value = value ;
124124 node . source . raw = null ;
0 commit comments