Repository: sveltejs/cli
Pull request #598 (2025-06-19 22:33:15)

docs: improvements to the `devtools-json` docs
- you won't get that error log anymore, but will get the message in https://github.com/sveltejs/kit/pull/13905

changeset-bot[bot]: ###  ⚠️  No Changeset found

Latest commit: 0cc70fc25adeca8c7c1c3107bc80d03b80283a83

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. **If these changes should result in a version bump, you need to add a changeset.**

<details><summary>This PR includes no changesets</summary>

  When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

</details>

[Click here to learn what changesets are, and how to add one](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md).

[Click here if you're a maintainer who wants to add a changeset to this PR](https://github.com/sveltejs/cli/new/benmccann-patch-1?filename=.changeset/serious-poems-cry.md&value=---%0A%0A---%0A%0Adocs%3A%20improvements%20to%20the%20%60devtools-json%60%20docs%0A)


svelte-docs-bot[bot]: <!-- automated-preview-comment -->
**Preview**: https://svelte-dev-git-preview-cli-598-svelte.vercel.app/
pkg-pr-new[bot]: 
[Open in StackBlitz](https://pkg.pr.new/template/9c613c4c-8bd4-43a5-80f8-ba47ee3fa08b)


```
npx https://pkg.pr.new/sveltejs/cli/sv@598
```


```
npx https://pkg.pr.new/sveltejs/cli/svelte-migrate@598
```


_commit: <a href="https://github.com/sveltejs/cli/runs/44446141957"><code>0cc70fc</code></a>_

manuel3108: Ignore the failing tests here, they are currently broken for the cli

Patch:
diff --git a/.changeset/brown-peas-shop.md b/.changeset/brown-peas-shop.md
new file mode 100644
index 0000000..268da46
--- /dev/null
+++ b/.changeset/brown-peas-shop.md
@@ -0,0 +1,5 @@
+---
+"sv": patch
+---
+
+chore: don't select `devtools-json` by default
diff --git a/community-addon-template/src/index.js b/community-addon-template/src/index.js
index 5882006..1190d7e 100644
--- a/community-addon-template/src/index.js
+++ b/community-addon-template/src/index.js
@@ -27,7 +27,7 @@ export default defineAddon({
 		sv.file('src/DemoComponent.svelte', (content) => {
 			if (!options.demo) return content;
 			const { script, generateCode } = parseSvelte(content, { typescript });
-			imports.addDefault(script.ast, '../addon-template-demo.txt?raw', 'demo');
+			imports.addDefault(script.ast, { from: '../addon-template-demo.txt?raw', as: 'demo' });
 			return generateCode({ script: script.generateCode(), template: '{demo}' });
 		});
 	}
diff --git a/documentation/docs/30-add-ons/60-devtools-json.md b/documentation/docs/30-add-ons/60-devtools-json.md
index 6fabf64..87aa2c3 100644
--- a/documentation/docs/30-add-ons/60-devtools-json.md
+++ b/documentation/docs/30-add-ons/60-devtools-json.md
@@ -2,13 +2,26 @@
 title: devtools-json
 ---
 
-`devtools-json` is essentially a vite plugin [vite-plugin-devtools-json](https://github.com/ChromeDevTools/vite-plugin-devtools-json/) for generating the Chrome DevTools project settings file on-the-fly in the devserver.
+The `devtools-json` add-on installs [`vite-plugin-devtools-json`](https://github.com/ChromeDevTools/vite-plugin-devtools-json/), which is a Vite plugin for generating a Chromium DevTools project settings file on-the-fly in the development server. This file is served from `/.well-known/appspecific/com.chrome.devtools.json` and tells Chromium browsers where your project's source code lives so that you can use [the workspaces feature](https://developer.chrome.com/docs/devtools/workspaces) to edit source files in the browser.
 
-It will prevent this server log:
+> [!NOTE]
+> Installing the plugin enables the feature for all users connecting to the dev server with a Chromium browser, and allows the browser to read and write all files within the directory. If using Chrome's AI Assistance feature, this may also result in data being sent to Google.
 
-```sh
-Not found: /.well-known/appspecific/com.chrome.devtools.json
-```
+You can prevent the request from being issued on your machine by disabling the feature in your browser. You can do this in Chrome by visiting `chrome://flags` and disabling the "DevTools Project Settings". You may also be interested in disabling "DevTools Automatic Workspace Folders" since it’s closely related.
+
+You can also prevent the web server from issuing a notice regarding the incoming request for all developers of your application by handling the request yourself. For example, you can create a file named `.well-known/appspecific/com.chrome.devtools.json` with the contents `"Go away, Chrome DevTools!"` or you can add logic to respond to the request in your [`handle`](https://svelte.dev/docs/kit/hooks#Server-hooks-handle) hook:
+
+```js
+/// file: src/hooks.server.js
+import { dev } from '$app/environment';
+
+export function handle({ event, resolve }) {
+  if (dev && event.url.pathname === '/.well-known/appspecific/com.chrome.devtools.json') {
+    return new Response(undefined, { status: 404 });
+  }
+  
+  return resolve(event);
+}
 
 ## Usage
 
@@ -18,4 +31,4 @@ npx sv add devtools-json
 
 ## What you get
 
-- the `vite` plugin added to your vite plugin options.
+- `vite-plugin-devtools-json` added to your Vite plugin options
diff --git a/packages/addons/common.ts b/packages/addons/common.ts
index b03d9d5..a1a8f2c 100644
--- a/packages/addons/common.ts
+++ b/packages/addons/common.ts
@@ -22,22 +22,22 @@ export function addEslintConfigPrettier(content: string): string {
 	}
 
 	svelteImportName ??= 'svelte';
-	imports.addDefault(ast, 'eslint-plugin-svelte', svelteImportName);
-	imports.addDefault(ast, 'eslint-config-prettier', 'prettier');
+	imports.addDefault(ast, { from: 'eslint-plugin-svelte', as: svelteImportName });
+	imports.addDefault(ast, { from: 'eslint-config-prettier', as: 'prettier' });
 
-	const fallbackConfig = common.expressionFromString('[]');
-	const defaultExport = exports.defaultExport(ast, fallbackConfig);
+	const fallbackConfig = common.parseExpression('[]');
+	const defaultExport = exports.createDefault(ast, { fallback: fallbackConfig });
 	const eslintConfig = defaultExport.value;
 	if (eslintConfig.type !== 'ArrayExpression' && eslintConfig.type !== 'CallExpression')
 		return content;
 
-	const prettier = common.expressionFromString('prettier');
-	const sveltePrettierConfig = common.expressionFromString(`${svelteImportName}.configs.prettier`);
-	const configSpread = common.createSpreadElement(sveltePrettierConfig);
+	const prettier = common.parseExpression('prettier');
+	const sveltePrettierConfig = common.parseExpression(`${svelteImportName}.configs.prettier`);
+	const configSpread = common.createSpread(sveltePrettierConfig);
 
 	const nodesToInsert = [];
-	if (!common.hasNode(eslintConfig, prettier)) nodesToInsert.push(prettier);
-	if (!common.hasNode(eslintConfig, configSpread)) nodesToInsert.push(configSpread);
+	if (!common.contains(eslintConfig, prettier)) nodesToInsert.push(prettier);
+	if (!common.contains(eslintConfig, configSpread)) nodesToInsert.push(configSpread);
 
 	const elements =
 		eslintConfig.type === 'ArrayExpression' ? eslintConfig.elements : eslintConfig.arguments;
diff --git a/packages/addons/devtools-json/index.ts b/packages/addons/devtools-json/index.ts
index fe8ba6f..a0962d4 100644
--- a/packages/addons/devtools-json/index.ts
+++ b/packages/addons/devtools-json/index.ts
@@ -8,13 +8,6 @@ export default defineAddon({
 	homepage: 'https://github.com/ChromeDevTools/vite-plugin-devtools-json',
 	options: {},
 
-	setup: ({ defaultSelection }) => {
-		defaultSelection({
-			create: true,
-			add: false
-		});
-	},
-
 	run: ({ sv, typescript }) => {
 		const ext = typescript ? 'ts' : 'js';
 
@@ -25,14 +18,21 @@ export default defineAddon({
 			const { ast, generateCode } = parseScript(content);
 
 			const vitePluginName = 'devtoolsJson';
-			imports.addDefault(ast, 'vite-plugin-devtools-json', vitePluginName);
+			imports.addDefault(ast, { from: 'vite-plugin-devtools-json', as: vitePluginName });
+
+			const { value: rootObject } = exports.createDefault(ast, {
+				fallback: functions.createCall({ name: 'defineConfig', args: [] })
+			});
+
+			const param1 = functions.getArgument(rootObject, {
+				index: 0,
+				fallback: object.create({})
+			});
 
-			const { value: rootObject } = exports.defaultExport(ast, functions.call('defineConfig', []));
-			const param1 = functions.argumentByIndex(rootObject, 0, object.createEmpty());
+			const pluginsArray = object.property(param1, { name: 'plugins', fallback: array.create() });
+			const pluginFunctionCall = functions.createCall({ name: vitePluginName, args: [] });
 
-			const pluginsArray = object.property(param1, 'plugins', array.createEmpty());
-			const pluginFunctionCall = functions.call(vitePluginName, []);
-			array.push(pluginsArray, pluginFunctionCall);
+			array.append(pluginsArray, pluginFunctionCall);
 
 			return generateCode();
 		});
diff --git a/packages/addons/drizzle/index.ts b/packages/addons/drizzle/index.ts
index 29a6b84..1dd8403 100644
--- a/packages/addons/drizzle/index.ts
+++ b/packages/addons/drizzle/index.ts
@@ -195,18 +195,16 @@ export default defineAddon({
 		sv.file(`drizzle.config.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
 
-			imports.addNamed(ast, 'drizzle-kit', { defineConfig: 'defineConfig' });
+			imports.addNamed(ast, { from: 'drizzle-kit', imports: { defineConfig: 'defineConfig' } });
 
-			common.addStatement(
-				ast,
-				common.statementFromString(
+			ast.body.push(
+				common.parseStatement(
 					"if (!process.env.DATABASE_URL) throw new Error('DATABASE_URL is not set');"
 				)
 			);
 
-			exports.defaultExport(
-				ast,
-				common.expressionFromString(`
+			exports.createDefault(ast, {
+				fallback: common.parseExpression(`
 					defineConfig({
 						schema: "./src/lib/server/db/schema.${typescript ? 'ts' : 'js'}",
 						dialect: "${options.sqlite === 'turso' ? 'turso' : options.database}",
@@ -217,7 +215,7 @@ export default defineAddon({
 						verbose: true,
 						strict: true
 					})`)
-			);
+			});
 
 			return generateCode();
 		});
@@ -227,44 +225,60 @@ export default defineAddon({
 
 			let userSchemaExpression;
 			if (options.database === 'sqlite') {
-				imports.addNamed(ast, 'drizzle-orm/sqlite-core', {
-					sqliteTable: 'sqliteTable',
-					integer: 'integer'
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/sqlite-core',
+					imports: {
+						sqliteTable: 'sqliteTable',
+						integer: 'integer'
+					}
 				});
 
-				userSchemaExpression = common.expressionFromString(`sqliteTable('user', {
+				userSchemaExpression = common.parseExpression(`sqliteTable('user', {
 					id: integer('id').primaryKey(),
 					age: integer('age')
 				})`);
 			}
 			if (options.database === 'mysql') {
-				imports.addNamed(ast, 'drizzle-orm/mysql-core', {
-					mysqlTable: 'mysqlTable',
-					serial: 'serial',
-					int: 'int'
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/mysql-core',
+					imports: {
+						mysqlTable: 'mysqlTable',
+						serial: 'serial',
+						int: 'int'
+					}
 				});
 
-				userSchemaExpression = common.expressionFromString(`mysqlTable('user', {
+				userSchemaExpression = common.parseExpression(`mysqlTable('user', {
 					id: serial('id').primaryKey(),
 					age: int('age'),
 				})`);
 			}
 			if (options.database === 'postgresql') {
-				imports.addNamed(ast, 'drizzle-orm/pg-core', {
-					pgTable: 'pgTable',
-					serial: 'serial',
-					integer: 'integer'
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/pg-core',
+					imports: {
+						pgTable: 'pgTable',
+						serial: 'serial',
+						integer: 'integer'
+					}
 				});
 
-				userSchemaExpression = common.expressionFromString(`pgTable('user', {
+				userSchemaExpression = common.parseExpression(`pgTable('user', {
 					id: serial('id').primaryKey(),
 					age: integer('age'),
 				})`);
 			}
 
 			if (!userSchemaExpression) throw new Error('unreachable state...');
-			const userIdentifier = variables.declaration(ast, 'const', 'user', userSchemaExpression);
-			exports.namedExport(ast, 'user', userIdentifier);
+			const userIdentifier = variables.declaration(ast, {
+				kind: 'const',
+				name: 'user',
+				value: userSchemaExpression
+			});
+			exports.createNamed(ast, {
+				name: 'user',
+				fallback: userIdentifier
+			});
 
 			return generateCode();
 		});
@@ -272,83 +286,129 @@ export default defineAddon({
 		sv.file(`${kit?.libDirectory}/server/db/index.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
 
-			imports.addNamed(ast, '$env/dynamic/private', { env: 'env' });
-			imports.addNamespace(ast, './schema', 'schema');
+			imports.addNamed(ast, {
+				from: '$env/dynamic/private',
+				imports: { env: 'env' }
+			});
+			imports.addNamespace(ast, { from: './schema', as: 'schema' });
 
 			// env var checks
-			const dbURLCheck = common.statementFromString(
+			const dbURLCheck = common.parseStatement(
 				"if (!env.DATABASE_URL) throw new Error('DATABASE_URL is not set');"
 			);
-			common.addStatement(ast, dbURLCheck);
+			ast.body.push(dbURLCheck);
 
 			let clientExpression;
 			// SQLite
 			if (options.sqlite === 'better-sqlite3') {
-				imports.addDefault(ast, 'better-sqlite3', 'Database');
-				imports.addNamed(ast, 'drizzle-orm/better-sqlite3', { drizzle: 'drizzle' });
+				imports.addDefault(ast, { from: 'better-sqlite3', as: 'Database' });
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/better-sqlite3',
+					imports: { drizzle: 'drizzle' }
+				});
 
-				clientExpression = common.expressionFromString('new Database(env.DATABASE_URL)');
+				clientExpression = common.parseExpression('new Database(env.DATABASE_URL)');
 			}
 			if (options.sqlite === 'libsql' || options.sqlite === 'turso') {
-				imports.addNamed(ast, '@libsql/client', { createClient: 'createClient' });
-				imports.addNamed(ast, 'drizzle-orm/libsql', { drizzle: 'drizzle' });
+				imports.addNamed(ast, {
+					from: '@libsql/client',
+					imports: { createClient: 'createClient' }
+				});
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/libsql',
+					imports: { drizzle: 'drizzle' }
+				});
 
 				if (options.sqlite === 'turso') {
-					imports.addNamed(ast, '$app/environment', { dev: 'dev' });
+					imports.addNamed(ast, {
+						from: '$app/environment',
+						imports: { dev: 'dev' }
+					});
 					// auth token check in prod
-					const authTokenCheck = common.statementFromString(
+					const authTokenCheck = common.parseStatement(
 						"if (!dev && !env.DATABASE_AUTH_TOKEN) throw new Error('DATABASE_AUTH_TOKEN is not set');"
 					);
-					common.addStatement(ast, authTokenCheck);
+					ast.body.push(authTokenCheck);
 
-					clientExpression = common.expressionFromString(
+					clientExpression = common.parseExpression(
 						'createClient({ url: env.DATABASE_URL, authToken: env.DATABASE_AUTH_TOKEN })'
 					);
 				} else {
-					clientExpression = common.expressionFromString('createClient({ url: env.DATABASE_URL })');
+					clientExpression = common.parseExpression('createClient({ url: env.DATABASE_URL })');
 				}
 			}
 			// MySQL
 			if (options.mysql === 'mysql2' || options.mysql === 'planetscale') {
-				imports.addDefault(ast, 'mysql2/promise', 'mysql');
-				imports.addNamed(ast, 'drizzle-orm/mysql2', { drizzle: 'drizzle' });
+				imports.addDefault(ast, { from: 'mysql2/promise', as: 'mysql' });
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/mysql2',
+					imports: { drizzle: 'drizzle' }
+				});
 
-				clientExpression = common.expressionFromString('mysql.createPool(env.DATABASE_URL)');
+				clientExpression = common.parseExpression('mysql.createPool(env.DATABASE_URL)');
 			}
 			// PostgreSQL
 			if (options.postgresql === 'neon') {
-				imports.addNamed(ast, '@neondatabase/serverless', { neon: 'neon' });
-				imports.addNamed(ast, 'drizzle-orm/neon-http', { drizzle: 'drizzle' });
+				imports.addNamed(ast, {
+					from: '@neondatabase/serverless',
+					imports: { neon: 'neon' }
+				});
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/neon-http',
+					imports: { drizzle: 'drizzle' }
+				});
 
-				clientExpression = common.expressionFromString('neon(env.DATABASE_URL)');
+				clientExpression = common.parseExpression('neon(env.DATABASE_URL)');
 			}
 			if (options.postgresql === 'postgres.js') {
-				imports.addDefault(ast, 'postgres', 'postgres');
-				imports.addNamed(ast, 'drizzle-orm/postgres-js', { drizzle: 'drizzle' });
+				imports.addDefault(ast, { from: 'postgres', as: 'postgres' });
+				imports.addNamed(ast, {
+					from: 'drizzle-orm/postgres-js',
+					imports: { drizzle: 'drizzle' }
+				});
 
-				clientExpression = common.expressionFromString('postgres(env.DATABASE_URL)');
+				clientExpression = common.parseExpression('postgres(env.DATABASE_URL)');
 			}
 
 			if (!clientExpression) throw new Error('unreachable state...');
-			const clientIdentifier = variables.declaration(ast, 'const', 'client', clientExpression);
-			common.addStatement(ast, clientIdentifier);
+			ast.body.push(
+				variables.declaration(ast, {
+					kind: 'const',
+					name: 'client',
+					value: clientExpression
+				})
+			);
 
 			// create drizzle function call
-			const drizzleCall = functions.callByIdentifier('drizzle', ['client']);
+			const drizzleCall = functions.createCall({
+				name: 'drizzle',
+				args: ['client'],
+				useIdentifiers: true
+			});
 
 			// add schema to support `db.query`
 			const paramObject = object.create({
-				schema: variables.identifier('schema')
+				schema: variables.createIdentifier('schema')
 			});
 			if (options.database === 'mysql') {
 				const mode = options.mysql === 'planetscale' ? 'planetscale' : 'default';
-				object.property(paramObject, 'mode', common.createLiteral(mode));
+				object.property(paramObject, {
+					name: 'mode',
+					fallback: common.createLiteral(mode)
+				});
 			}
 			drizzleCall.arguments.push(paramObject);
 
 			// create `db` export
-			const db = variables.declaration(ast, 'const', 'db', drizzleCall);
-			exports.namedExport(ast, 'db', db);
+			const db = variables.declaration(ast, {
+				kind: 'const',
+				name: 'db',
+				value: drizzleCall
+			});
+			exports.createNamed(ast, {
+				name: 'db',
+				fallback: db
+			});
 
 			return generateCode();
 		});
diff --git a/packages/addons/eslint/index.ts b/packages/addons/eslint/index.ts
index 82492ae..265ce1d 100644
--- a/packages/addons/eslint/index.ts
+++ b/packages/addons/eslint/index.ts
@@ -6,6 +6,7 @@ import {
 	functions,
 	imports,
 	object,
+	variables,
 	type AstTypes
 } from '@sveltejs/cli-core/js';
 import { parseJson, parseScript } from '@sveltejs/cli-core/parsers';
@@ -54,38 +55,31 @@ export default defineAddon({
 			const { ast, generateCode } = parseScript(content);
 
 			const eslintConfigs: Array<AstTypes.Expression | AstTypes.SpreadElement> = [];
-
-			imports.addDefault(ast, './svelte.config.js', 'svelteConfig');
-
-			const gitIgnorePathStatement = common.statementFromString(
+			imports.addDefault(ast, { from: './svelte.config.js', as: 'svelteConfig' });
+			const gitIgnorePathStatement = common.parseStatement(
 				"\nconst gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));"
 			);
-			common.addStatement(ast, gitIgnorePathStatement);
+			common.appendStatement(ast, { statement: gitIgnorePathStatement });
 
-			const ignoresConfig = common.expressionFromString('includeIgnoreFile(gitignorePath)');
+			const ignoresConfig = common.parseExpression('includeIgnoreFile(gitignorePath)');
 			eslintConfigs.push(ignoresConfig);
 
-			const jsConfig = common.expressionFromString('js.configs.recommended');
+			const jsConfig = common.parseExpression('js.configs.recommended');
 			eslintConfigs.push(jsConfig);
 
 			if (typescript) {
-				const tsConfig = common.expressionFromString('ts.configs.recommended');
-				eslintConfigs.push(common.createSpreadElement(tsConfig));
+				const tsConfig = common.parseExpression('ts.configs.recommended');
+				eslintConfigs.push(common.createSpread(tsConfig));
 			}
 
-			const svelteConfig = common.expressionFromString('svelte.configs.recommended');
-			eslintConfigs.push(common.createSpreadElement(svelteConfig));
+			const svelteConfig = common.parseExpression('svelte.configs.recommended');
+			eslintConfigs.push(common.createSpread(svelteConfig));
 
-			const globalsBrowser = common.createSpreadElement(
-				common.expressionFromString('globals.browser')
-			);
-			const globalsNode = common.createSpreadElement(common.expressionFromString('globals.node'));
-			const globalsObjLiteral = object.createEmpty();
+			const globalsBrowser = common.createSpread(common.parseExpression('globals.browser'));
+			const globalsNode = common.createSpread(common.parseExpression('globals.node'));
+			const globalsObjLiteral = object.create({});
 			globalsObjLiteral.properties = [globalsBrowser, globalsNode];
-			const off = common.createLiteral('off');
-			const rules = object.create({
-				'"no-undef"': off
-			});
+			const rules = object.create({ '"no-undef"': 'off' });
 
 			if (rules.properties[0].type !== 'Property') {
 				throw new Error('rules.properties[0].type !== "Property"');
@@ -104,9 +98,9 @@ export default defineAddon({
 			];
 
 			const globalsConfig = object.create({
-				languageOptions: object.create({
+				languageOptions: {
 					globals: globalsObjLiteral
-				}),
+				},
 				rules: typescript ? rules : undefined
 			});
 
@@ -114,58 +108,61 @@ export default defineAddon({
 
 			if (typescript) {
 				const svelteTSParserConfig = object.create({
-					files: common.expressionFromString("['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js']"),
-					languageOptions: object.create({
-						parserOptions: object.create({
-							projectService: common.expressionFromString('true'),
-							extraFileExtensions: common.expressionFromString("['.svelte']"),
-							parser: common.expressionFromString('ts.parser'),
-							svelteConfig: common.expressionFromString('svelteConfig')
-						})
-					})
+					files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
+					languageOptions: {
+						parserOptions: {
+							projectService: true,
+							extraFileExtensions: ['.svelte'],
+							parser: variables.createIdentifier('ts.parser'),
+							svelteConfig: variables.createIdentifier('svelteConfig')
+						}
+					}
 				});
 				eslintConfigs.push(svelteTSParserConfig);
 			} else {
 				const svelteTSParserConfig = object.create({
-					files: common.expressionFromString("['**/*.svelte', '**/*.svelte.js']"),
-					languageOptions: object.create({
-						parserOptions: object.create({
-							svelteConfig: common.expressionFromString('svelteConfig')
-						})
-					})
+					files: ['**/*.svelte', '**/*.svelte.js'],
+					languageOptions: {
+						parserOptions: {
+							svelteConfig: variables.createIdentifier('svelteConfig')
+						}
+					}
 				});
 				eslintConfigs.push(svelteTSParserConfig);
 			}
 
 			let exportExpression: AstTypes.ArrayExpression | AstTypes.CallExpression;
 			if (typescript) {
-				const tsConfigCall = functions.call('ts.config', []);
+				const tsConfigCall = functions.createCall({ name: 'ts.config', args: [] });
 				tsConfigCall.arguments.push(...eslintConfigs);
 				exportExpression = tsConfigCall;
 			} else {
-				const eslintArray = array.createEmpty();
-				eslintConfigs.map((x) => array.push(eslintArray, x));
+				const eslintArray = array.create();
+				eslintConfigs.map((x) => array.append(eslintArray, x));
 				exportExpression = eslintArray;
 			}
-
-			const defaultExport = exports.defaultExport(ast, exportExpression);
+			const { value: defaultExport, astNode } = exports.createDefault(ast, {
+				fallback: exportExpression
+			});
 			// if it's not the config we created, then we'll leave it alone and exit out
-			if (defaultExport.value !== exportExpression) {
+			if (defaultExport !== exportExpression) {
 				log.warn('An eslint config is already defined. Skipping initialization.');
 				return content;
 			}
 
 			// type annotate config
 			if (!typescript)
-				common.addJsDocTypeComment(defaultExport.astNode, "import('eslint').Linter.Config[]");
-
-			// imports
-			if (typescript) imports.addDefault(ast, 'typescript-eslint', 'ts');
-			imports.addNamed(ast, 'node:url', { fileURLToPath: 'fileURLToPath' });
-			imports.addDefault(ast, 'globals', 'globals');
-			imports.addDefault(ast, 'eslint-plugin-svelte', 'svelte');
-			imports.addDefault(ast, '@eslint/js', 'js');
-			imports.addNamed(ast, '@eslint/compat', { includeIgnoreFile: 'includeIgnoreFile' });
+				common.addJsDocTypeComment(astNode, { type: "import('eslint').Linter.Config[]" });
+
+			if (typescript) imports.addDefault(ast, { from: 'typescript-eslint', as: 'ts' });
+			imports.addNamed(ast, { from: 'node:url', imports: { fileURLToPath: 'fileURLToPath' } });
+			imports.addDefault(ast, { from: 'globals', as: 'globals' });
+			imports.addDefault(ast, { from: 'eslint-plugin-svelte', as: 'svelte' });
+			imports.addDefault(ast, { from: '@eslint/js', as: 'js' });
+			imports.addNamed(ast, {
+				from: '@eslint/compat',
+				imports: { includeIgnoreFile: 'includeIgnoreFile' }
+			});
 
 			return generateCode();
 		});
diff --git a/packages/addons/lucia/index.ts b/packages/addons/lucia/index.ts
index d2b91e4..153091f 100644
--- a/packages/addons/lucia/index.ts
+++ b/packages/addons/lucia/index.ts
@@ -91,13 +91,30 @@ export default defineAddon({
 
 		sv.file(schemaPath, (content) => {
 			const { ast, generateCode } = parseScript(content);
-			const createTable = (name: string) => js.functions.call(TABLE_TYPE[drizzleDialect], [name]);
-
-			const userDecl = js.variables.declaration(ast, 'const', 'user', createTable('user'));
-			const sessionDecl = js.variables.declaration(ast, 'const', 'session', createTable('session'));
+			const createTable = (name: string) =>
+				js.functions.createCall({
+					name: TABLE_TYPE[drizzleDialect],
+					args: [name]
+				});
+			const userDecl = js.variables.declaration(ast, {
+				kind: 'const',
+				name: 'user',
+				value: createTable('user')
+			});
+			const sessionDecl = js.variables.declaration(ast, {
+				kind: 'const',
+				name: 'session',
+				value: createTable('session')
+			});
 
-			const user = js.exports.namedExport(ast, 'user', userDecl);
-			const session = js.exports.namedExport(ast, 'session', sessionDecl);
+			const user = js.exports.createNamed(ast, {
+				name: 'user',
+				fallback: userDecl
+			});
+			const session = js.exports.createNamed(ast, {
+				name: 'session',
+				fallback: sessionDecl
+			});
 
 			const userTable = getCallExpression(user);
 			const sessionTable = getCallExpression(session);
@@ -107,10 +124,10 @@ export default defineAddon({
 			}
 
 			if (userTable.arguments.length === 1) {
-				userTable.arguments.push(js.object.createEmpty());
+				userTable.arguments.push(js.object.create({}));
 			}
 			if (sessionTable.arguments.length === 1) {
-				sessionTable.arguments.push(js.object.createEmpty());
+				sessionTable.arguments.push(js.object.create({}));
 			}
 
 			const userAttributes = userTable.arguments[1];
@@ -123,80 +140,107 @@ export default defineAddon({
 			}
 
 			if (drizzleDialect === 'sqlite' || drizzleDialect === 'turso') {
-				js.imports.addNamed(ast, 'drizzle-orm/sqlite-core', {
-					sqliteTable: 'sqliteTable',
-					text: 'text',
-					integer: 'integer'
+				js.imports.addNamed(ast, {
+					from: 'drizzle-orm/sqlite-core',
+					imports: {
+						sqliteTable: 'sqliteTable',
+						text: 'text',
+						integer: 'integer'
+					}
 				});
 				js.object.overrideProperties(userAttributes, {
-					id: js.common.expressionFromString("text('id').primaryKey()")
+					properties: {
+						id: js.common.parseExpression("text('id').primaryKey()")
+					}
 				});
 				if (options.demo) {
 					js.object.overrideProperties(userAttributes, {
-						username: js.common.expressionFromString("text('username').notNull().unique()"),
-						passwordHash: js.common.expressionFromString("text('password_hash').notNull()")
+						properties: {
+							username: js.common.parseExpression("text('username').notNull().unique()"),
+							passwordHash: js.common.parseExpression("text('password_hash').notNull()")
+						}
 					});
 				}
 				js.object.overrideProperties(sessionAttributes, {
-					id: js.common.expressionFromString("text('id').primaryKey()"),
-					userId: js.common.expressionFromString(
-						"text('user_id').notNull().references(() => user.id)"
-					),
-					expiresAt: js.common.expressionFromString(
-						"integer('expires_at', { mode: 'timestamp' }).notNull()"
-					)
+					properties: {
+						id: js.common.parseExpression("text('id').primaryKey()"),
+						userId: js.common.parseExpression(
+							"text('user_id').notNull().references(() => user.id)"
+						),
+						expiresAt: js.common.parseExpression(
+							"integer('expires_at', { mode: 'timestamp' }).notNull()"
+						)
+					}
 				});
 			}
 			if (drizzleDialect === 'mysql') {
-				js.imports.addNamed(ast, 'drizzle-orm/mysql-core', {
-					mysqlTable: 'mysqlTable',
-					varchar: 'varchar',
-					datetime: 'datetime'
+				js.imports.addNamed(ast, {
+					from: 'drizzle-orm/mysql-core',
+					imports: {
+						mysqlTable: 'mysqlTable',
+						varchar: 'varchar',
+						datetime: 'datetime'
+					}
 				});
 				js.object.overrideProperties(userAttributes, {
-					id: js.common.expressionFromString("varchar('id', { length: 255 }).primaryKey()")
+					properties: {
+						id: js.common.parseExpression("varchar('id', { length: 255 }).primaryKey()")
+					}
 				});
 				if (options.demo) {
 					js.object.overrideProperties(userAttributes, {
-						username: js.common.expressionFromString(
-							"varchar('username', { length: 32 }).notNull().unique()"
-						),
-						passwordHash: js.common.expressionFromString(
-							"varchar('password_hash', { length: 255 }).notNull()"
-						)
+						properties: {
+							username: js.common.parseExpression(
+								"varchar('username', { length: 32 }).notNull().unique()"
+							),
+							passwordHash: js.common.parseExpression(
+								"varchar('password_hash', { length: 255 }).notNull()"
+							)
+						}
 					});
 				}
 				js.object.overrideProperties(sessionAttributes, {
-					id: js.common.expressionFromString("varchar('id', { length: 255 }).primaryKey()"),
-					userId: js.common.expressionFromString(
-						"varchar('user_id', { length: 255 }).notNull().references(() => user.id)"
-					),
-					expiresAt: js.common.expressionFromString("datetime('expires_at').notNull()")
+					properties: {
+						id: js.common.parseExpression("varchar('id', { length: 255 }).primaryKey()"),
+						userId: js.common.parseExpression(
+							"varchar('user_id', { length: 255 }).notNull().references(() => user.id)"
+						),
+						expiresAt: js.common.parseExpression("datetime('expires_at').notNull()")
+					}
 				});
 			}
 			if (drizzleDialect === 'postgresql') {
-				js.imports.addNamed(ast, 'drizzle-orm/pg-core', {
-					pgTable: 'pgTable',
-					text: 'text',
-					timestamp: 'timestamp'
+				js.imports.addNamed(ast, {
+					from: 'drizzle-orm/pg-core',
+					imports: {
+						pgTable: 'pgTable',
+						text: 'text',
+						timestamp: 'timestamp'
+					}
 				});
 				js.object.overrideProperties(userAttributes, {
-					id: js.common.expressionFromString("text('id').primaryKey()")
+					properties: {
+						id: js.common.parseExpression("text('id').primaryKey()")
+					}
 				});
 				if (options.demo) {
 					js.object.overrideProperties(userAttributes, {
-						username: js.common.expressionFromString("text('username').notNull().unique()"),
-						passwordHash: js.common.expressionFromString("text('password_hash').notNull()")
+						properties: {
+							username: js.common.parseExpression("text('username').notNull().unique()"),
+							passwordHash: js.common.parseExpression("text('password_hash').notNull()")
+						}
 					});
 				}
 				js.object.overrideProperties(sessionAttributes, {
-					id: js.common.expressionFromString("text('id').primaryKey()"),
-					userId: js.common.expressionFromString(
-						"text('user_id').notNull().references(() => user.id)"
-					),
-					expiresAt: js.common.expressionFromString(
-						"timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull()"
-					)
+					properties: {
+						id: js.common.parseExpression("text('id').primaryKey()"),
+						userId: js.common.parseExpression(
+							"text('user_id').notNull().references(() => user.id)"
+						),
+						expiresAt: js.common.parseExpression(
+							"timestamp('expires_at', { withTimezone: true, mode: 'date' }).notNull()"
+						)
+					}
 				});
 			}
 
@@ -215,16 +259,23 @@ export default defineAddon({
 		sv.file(`${kit?.libDirectory}/server/auth.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
 
-			js.imports.addNamespace(ast, '$lib/server/db/schema', 'table');
-			js.imports.addNamed(ast, '$lib/server/db', { db: 'db' });
-			js.imports.addNamed(ast, '@oslojs/encoding', {
-				encodeBase64url: 'encodeBase64url',
-				encodeHexLowerCase: 'encodeHexLowerCase'
+			js.imports.addNamespace(ast, { from: '$lib/server/db/schema', as: 'table' });
+			js.imports.addNamed(ast, { from: '$lib/server/db', imports: { db: 'db' } });
+			js.imports.addNamed(ast, {
+				from: '@oslojs/encoding',
+				imports: {
+					encodeBase64url: 'encodeBase64url',
+					encodeHexLowerCase: 'encodeHexLowerCase'
+				}
 			});
-			js.imports.addNamed(ast, '@oslojs/crypto/sha2', { sha256: 'sha256' });
-			js.imports.addNamed(ast, 'drizzle-orm', { eq: 'eq' });
+			js.imports.addNamed(ast, { from: '@oslojs/crypto/sha2', imports: { sha256: 'sha256' } });
+			js.imports.addNamed(ast, { from: 'drizzle-orm', imports: { eq: 'eq' } });
 			if (typescript) {
-				js.imports.addNamed(ast, '@sveltejs/kit', { RequestEvent: 'RequestEvent' }, true);
+				js.imports.addNamed(ast, {
+					from: '@sveltejs/kit',
+					imports: { RequestEvent: 'RequestEvent' },
+					isType: true
+				});
 			}
 
 			const ms = new MagicString(generateCode().trim());
@@ -348,13 +399,16 @@ export default defineAddon({
 			sv.file('src/app.d.ts', (content) => {
 				const { ast, generateCode } = parseScript(content);
 
-				const locals = js.kit.addGlobalAppInterface(ast, 'Locals');
+				const locals = js.kit.addGlobalAppInterface(ast, { name: 'Locals' });
 				if (!locals) {
 					throw new Error('Failed detecting `locals` interface in `src/app.d.ts`');
 				}
-
-				const user = locals.body.body.find((prop) => js.common.hasTypeProp('user', prop));
-				const session = locals.body.body.find((prop) => js.common.hasTypeProp('session', prop));
+				const user = locals.body.body.find((prop) =>
+					js.common.hasTypeProperty(prop, { name: 'user' })
+				);
+				const session = locals.body.body.find((prop) =>
+					js.common.hasTypeProperty(prop, { name: 'session' })
+				);
 
 				if (!user) {
 					locals.body.body.push(createLuciaType('user'));
@@ -368,8 +422,12 @@ export default defineAddon({
 
 		sv.file(`src/hooks.server.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
-			js.imports.addNamespace(ast, '$lib/server/auth', 'auth');
-			js.kit.addHooksHandle(ast, typescript, 'handleAuth', getAuthHandleContent());
+			js.imports.addNamespace(ast, { from: '$lib/server/auth', as: 'auth' });
+			js.kit.addHooksHandle(ast, {
+				typescript,
+				newHandleName: 'handleAuth',
+				handleContent: getAuthHandleContent()
+			});
 			return generateCode();
 		});
 
diff --git a/packages/addons/mdsvex/index.ts b/packages/addons/mdsvex/index.ts
index 311b373..0ac95bf 100644
--- a/packages/addons/mdsvex/index.ts
+++ b/packages/addons/mdsvex/index.ts
@@ -13,28 +13,39 @@ export default defineAddon({
 		sv.file('svelte.config.js', (content) => {
 			const { ast, generateCode } = parseScript(content);
 
-			imports.addNamed(ast, 'mdsvex', { mdsvex: 'mdsvex' });
+			imports.addNamed(ast, { from: 'mdsvex', imports: { mdsvex: 'mdsvex' } });
 
-			const { value: exportDefault } = exports.defaultExport(ast, object.createEmpty());
+			const { value: exportDefault } = exports.createDefault(ast, {
+				fallback: object.create({})
+			});
 
 			// preprocess
-			let preprocessorArray = object.property(exportDefault, 'preprocess', array.createEmpty());
+			let preprocessorArray = object.property(exportDefault, {
+				name: 'preprocess',
+				fallback: array.create()
+			});
 			const isArray = preprocessorArray.type === 'ArrayExpression';
 
 			if (!isArray) {
 				const previousElement = preprocessorArray;
-				preprocessorArray = array.createEmpty();
-				array.push(preprocessorArray, previousElement);
-				object.overrideProperty(exportDefault, 'preprocess', preprocessorArray);
+				preprocessorArray = array.create();
+				array.append(preprocessorArray, previousElement);
+				object.overrideProperty(exportDefault, {
+					name: 'preprocess',
+					value: preprocessorArray
+				});
 			}
 
-			const mdsvexCall = functions.call('mdsvex', []);
-			array.push(preprocessorArray, mdsvexCall);
+			const mdsvexCall = functions.createCall({ name: 'mdsvex', args: [] });
+			array.append(preprocessorArray, mdsvexCall);
 
 			// extensions
-			const extensionsArray = object.property(exportDefault, 'extensions', array.createEmpty());
-			array.push(extensionsArray, '.svelte');
-			array.push(extensionsArray, '.svx');
+			const extensionsArray = object.property(exportDefault, {
+				name: 'extensions',
+				fallback: array.create()
+			});
+			array.append(extensionsArray, '.svelte');
+			array.append(extensionsArray, '.svx');
 
 			return generateCode();
 		});
diff --git a/packages/addons/paraglide/index.ts b/packages/addons/paraglide/index.ts
index d2b5bf9..92d3894 100644
--- a/packages/addons/paraglide/index.ts
+++ b/packages/addons/paraglide/index.ts
@@ -94,19 +94,26 @@ export default defineAddon({
 			const { ast, generateCode } = parseScript(content);
 
 			const vitePluginName = 'paraglideVitePlugin';
-			imports.addNamed(ast, '@inlang/paraglide-js', { paraglideVitePlugin: vitePluginName });
-
-			const { value: rootObject } = exports.defaultExport(ast, functions.call('defineConfig', []));
-			const param1 = functions.argumentByIndex(rootObject, 0, object.createEmpty());
+			imports.addNamed(ast, {
+				from: '@inlang/paraglide-js',
+				imports: { paraglideVitePlugin: vitePluginName }
+			});
+			const { value: rootObject } = exports.createDefault(ast, {
+				fallback: functions.createCall({ name: 'defineConfig', args: [] })
+			});
+			const param1 = functions.getArgument(rootObject, {
+				index: 0,
+				fallback: object.create({})
+			});
 
-			const pluginsArray = object.property(param1, 'plugins', array.createEmpty());
-			const pluginFunctionCall = functions.call(vitePluginName, []);
+			const pluginsArray = object.property(param1, { name: 'plugins', fallback: array.create() });
+			const pluginFunctionCall = functions.createCall({ name: vitePluginName, args: [] });
 			const pluginConfig = object.create({
-				project: common.createLiteral('./project.inlang'),
-				outdir: common.createLiteral(`./${paraglideOutDir}`)
+				project: './project.inlang',
+				outdir: `./${paraglideOutDir}`
 			});
-			functions.argumentByIndex(pluginFunctionCall, 0, pluginConfig);
-			array.push(pluginsArray, pluginFunctionCall);
+			functions.getArgument(pluginFunctionCall, { index: 0, fallback: pluginConfig });
+			array.append(pluginsArray, pluginFunctionCall);
 
 			return generateCode();
 		});
@@ -114,17 +121,22 @@ export default defineAddon({
 		// reroute hook
 		sv.file(`src/hooks.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
-
-			imports.addNamed(ast, '$lib/paraglide/runtime', {
-				deLocalizeUrl: 'deLocalizeUrl'
+			imports.addNamed(ast, {
+				from: '$lib/paraglide/runtime',
+				imports: { deLocalizeUrl: 'deLocalizeUrl' }
 			});
 
-			const expression = common.expressionFromString(
-				'(request) => deLocalizeUrl(request.url).pathname'
-			);
-			const rerouteIdentifier = variables.declaration(ast, 'const', 'reroute', expression);
+			const expression = common.parseExpression('(request) => deLocalizeUrl(request.url).pathname');
+			const rerouteIdentifier = variables.declaration(ast, {
+				kind: 'const',
+				name: 'reroute',
+				value: expression
+			});
 
-			const existingExport = exports.namedExport(ast, 'reroute', rerouteIdentifier);
+			const existingExport = exports.createNamed(ast, {
+				name: 'reroute',
+				fallback: rerouteIdentifier
+			});
 			if (existingExport.declaration !== rerouteIdentifier) {
 				log.warn('Adding the reroute hook automatically failed. Add it manually');
 			}
@@ -135,9 +147,9 @@ export default defineAddon({
 		// handle hook
 		sv.file(`src/hooks.server.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
-
-			imports.addNamed(ast, '$lib/paraglide/server', {
-				paraglideMiddleware: 'paraglideMiddleware'
+			imports.addNamed(ast, {
+				from: '$lib/paraglide/server',
+				imports: { paraglideMiddleware: 'paraglideMiddleware' }
 			});
 
 			const hookHandleContent = `({ event, resolve }) => paraglideMiddleware(event.request, ({ request, locale }) => {
@@ -146,7 +158,11 @@ export default defineAddon({
 			transformPageChunk: ({ html }) => html.replace('%paraglide.lang%', locale)
 		});
 	});`;
-			kitJs.addHooksHandle(ast, typescript, 'handleParaglide', hookHandleContent);
+			kitJs.addHooksHandle(ast, {
+				typescript,
+				newHandleName: 'handleParaglide',
+				handleContent: hookHandleContent
+			});
 
 			return generateCode();
 		});
@@ -190,12 +206,12 @@ export default defineAddon({
 			// add usage example
 			sv.file(`${kit.routesDirectory}/demo/paraglide/+page.svelte`, (content) => {
 				const { script, template, generateCode } = parseSvelte(content, { typescript });
-
-				imports.addNamed(script.ast, '$lib/paraglide/messages.js', { m: 'm' });
-				imports.addNamed(script.ast, '$app/navigation', { goto: 'goto' });
-				imports.addNamed(script.ast, '$app/state', { page: 'page' });
-				imports.addNamed(script.ast, '$lib/paraglide/runtime', {
-					setLocale: 'setLocale'
+				imports.addNamed(script.ast, { from: '$lib/paraglide/messages.js', imports: { m: 'm' } });
+				imports.addNamed(script.ast, { from: '$app/navigation', imports: { goto: 'goto' } });
+				imports.addNamed(script.ast, { from: '$app/state', imports: { page: 'page' } });
+				imports.addNamed(script.ast, {
+					from: '$lib/paraglide/runtime',
+					imports: { setLocale: 'setLocale' }
 				});
 
 				const scriptCode = new MagicString(script.generateCode());
diff --git a/packages/addons/playwright/index.ts b/packages/addons/playwright/index.ts
index 315d892..a738f55 100644
--- a/packages/addons/playwright/index.ts
+++ b/packages/addons/playwright/index.ts
@@ -45,27 +45,30 @@ export default defineAddon({
 
 		sv.file(`playwright.config.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
-			const defineConfig = common.expressionFromString('defineConfig({})');
-			const defaultExport = exports.defaultExport(ast, defineConfig);
+			const defineConfig = common.parseExpression('defineConfig({})');
+			const { value: defaultExport } = exports.createDefault(ast, { fallback: defineConfig });
 
 			const config = {
 				webServer: object.create({
-					command: common.createLiteral('npm run build && npm run preview'),
-					port: common.expressionFromString('4173')
+					command: 'npm run build && npm run preview',
+					port: 4173
 				}),
 				testDir: common.createLiteral('e2e')
 			};
 
 			if (
-				defaultExport.value.type === 'CallExpression' &&
-				defaultExport.value.arguments[0]?.type === 'ObjectExpression'
+				defaultExport.type === 'CallExpression' &&
+				defaultExport.arguments[0]?.type === 'ObjectExpression'
 			) {
 				// uses the `defineConfig` helper
-				imports.addNamed(ast, '@playwright/test', { defineConfig: 'defineConfig' });
-				object.properties(defaultExport.value.arguments[0], config);
-			} else if (defaultExport.value.type === 'ObjectExpression') {
+				imports.addNamed(ast, {
+					from: '@playwright/test',
+					imports: { defineConfig: 'defineConfig' }
+				});
+				object.addProperties(defaultExport.arguments[0], { properties: config });
+			} else if (defaultExport.type === 'ObjectExpression') {
 				// if the config is just an object expression, just add the property
-				object.properties(defaultExport.value, config);
+				object.addProperties(defaultExport, { properties: config });
 			} else {
 				// unexpected config shape
 				log.warn('Unexpected playwright config for playwright add-on. Could not update.');
diff --git a/packages/addons/sveltekit-adapter/index.ts b/packages/addons/sveltekit-adapter/index.ts
index 7bbdef6..dab7651 100644
--- a/packages/addons/sveltekit-adapter/index.ts
+++ b/packages/addons/sveltekit-adapter/index.ts
@@ -76,10 +76,10 @@ export default defineAddon({
 				adapterName = adapterImportDecl.specifiers?.find((s) => s.type === 'ImportDefaultSpecifier')
 					?.local?.name as string;
 			} else {
-				imports.addDefault(ast, adapter.package, adapterName);
+				imports.addDefault(ast, { from: adapter.package, as: adapterName });
 			}
 
-			const { value: config } = exports.defaultExport(ast, object.createEmpty());
+			const { value: config } = exports.createDefault(ast, { fallback: object.create({}) });
 			const kitConfig = config.properties.find(
 				(p) => p.type === 'Property' && p.key.type === 'Identifier' && p.key.name === 'kit'
 			) as AstTypes.Property | undefined;
@@ -94,14 +94,18 @@ export default defineAddon({
 
 				// only overrides the `adapter` property so we can reset it's args
 				object.overrideProperties(kitConfig.value, {
-					adapter: functions.callByIdentifier(adapterName, [])
+					properties: {
+						adapter: functions.createCall({ name: adapterName, args: [], useIdentifiers: true })
+					}
 				});
 			} else {
 				// creates the `kit` property when absent
-				object.properties(config, {
-					kit: object.create({
-						adapter: functions.callByIdentifier(adapterName, [])
-					})
+				object.addProperties(config, {
+					properties: {
+						kit: object.create({
+							adapter: functions.createCall({ name: adapterName, args: [], useIdentifiers: true })
+						})
+					}
 				});
 			}
 
diff --git a/packages/addons/tailwindcss/index.ts b/packages/addons/tailwindcss/index.ts
index fc16cb8..3fae44a 100644
--- a/packages/addons/tailwindcss/index.ts
+++ b/packages/addons/tailwindcss/index.ts
@@ -61,14 +61,19 @@ export default defineAddon({
 			const { ast, generateCode } = parseScript(content);
 
 			const vitePluginName = 'tailwindcss';
-			imports.addDefault(ast, '@tailwindcss/vite', vitePluginName);
+			imports.addDefault(ast, { from: '@tailwindcss/vite', as: vitePluginName });
 
-			const { value: rootObject } = exports.defaultExport(ast, functions.call('defineConfig', []));
-			const param1 = functions.argumentByIndex(rootObject, 0, object.createEmpty());
+			const { value: rootObject } = exports.createDefault(ast, {
+				fallback: functions.createCall({ name: 'defineConfig', args: [] })
+			});
+			const param1 = functions.getArgument(rootObject, {
+				index: 0,
+				fallback: object.create({})
+			});
 
-			const pluginsArray = object.property(param1, 'plugins', array.createEmpty());
-			const pluginFunctionCall = functions.call(vitePluginName, []);
-			array.unshift(pluginsArray, pluginFunctionCall);
+			const pluginsArray = object.property(param1, { name: 'plugins', fallback: array.create() });
+			const pluginFunctionCall = functions.createCall({ name: vitePluginName, args: [] });
+			array.prepend(pluginsArray, pluginFunctionCall);
 
 			return generateCode();
 		});
@@ -107,22 +112,24 @@ export default defineAddon({
 
 			return code;
 		});
-
 		if (!kit) {
 			sv.file('src/App.svelte', (content) => {
 				const { script, generateCode } = parseSvelte(content, { typescript });
-				imports.addEmpty(script.ast, './app.css');
+				imports.addEmpty(script.ast, { from: './app.css' });
 				return generateCode({ script: script.generateCode() });
 			});
 		} else {
 			sv.file(`${kit?.routesDirectory}/+layout.svelte`, (content) => {
 				const { script, template, generateCode } = parseSvelte(content, { typescript });
-				imports.addEmpty(script.ast, '../app.css');
+				imports.addEmpty(script.ast, { from: '../app.css' });
 
 				if (content.length === 0) {
 					const svelteVersion = dependencyVersion('svelte');
 					if (!svelteVersion) throw new Error('Failed to determine svelte version');
-					addSlot(script.ast, template.ast, svelteVersion);
+					addSlot(script.ast, {
+						htmlAst: template.ast,
+						svelteVersion
+					});
 				}
 
 				return generateCode({
diff --git a/packages/cli/commands/add/index.ts b/packages/cli/commands/add/index.ts
index f8b4604..fedc665 100644
--- a/packages/cli/commands/add/index.ts
+++ b/packages/cli/commands/add/index.ts
@@ -201,7 +201,7 @@ export const add = new Command('add')
 
 		common.runCommand(async () => {
 			const selectedAddonIds = selectedAddons.map(({ id }) => id);
-			const { nextSteps } = await runAddCommand(options, selectedAddonIds, 'add');
+			const { nextSteps } = await runAddCommand(options, selectedAddonIds);
 			if (nextSteps) p.note(nextSteps, 'Next steps', { format: (line: string) => line });
 		});
 	});
@@ -209,8 +209,7 @@ export const add = new Command('add')
 type SelectedAddon = { type: 'official' | 'community'; addon: AddonWithoutExplicitArgs };
 export async function runAddCommand(
 	options: Options,
-	selectedAddonIds: string[],
-	from: 'create' | 'add'
+	selectedAddonIds: string[]
 ): Promise<{ nextSteps?: string; packageManager?: AgentName | null }> {
 	const selectedAddons: SelectedAddon[] = selectedAddonIds.map((id) => ({
 		type: 'official',
@@ -391,11 +390,6 @@ export async function runAddCommand(
 	const setups = selectedAddons.length ? selectedAddons.map(({ addon }) => addon) : officialAddons;
 	const addonSetupResults = setupAddons(setups, workspace);
 
-	// get all addons that have been marked to be preselected
-	const initialValues = Object.entries(addonSetupResults)
-		.filter(([_, value]) => value.defaultSelection[from] === true)
-		.map(([key]) => key);
-
 	// prompt which addons to apply
 	if (selectedAddons.length === 0) {
 		const addonOptions = officialAddons
@@ -410,8 +404,7 @@ export async function runAddCommand(
 		const selected = await p.multiselect({
 			message: `What would you like to add to your project? ${pc.dim('(use arrow keys / space bar)')}`,
 			options: addonOptions,
-			required: false,
-			initialValues
+			required: false
 		});
 		if (p.isCancel(selected)) {
 			p.cancel('Operation cancelled.');
diff --git a/packages/cli/commands/add/workspace.ts b/packages/cli/commands/add/workspace.ts
index ac11885..480db5b 100644
--- a/packages/cli/commands/add/workspace.ts
+++ b/packages/cli/commands/add/workspace.ts
@@ -114,10 +114,10 @@ function parseKitOptions(cwd: string) {
 	// We'll error out since we can't safely determine the config object
 	if (!objectExpression) throw new Error('Unexpected svelte config shape from `svelte.config.js`');
 
-	const kit = object.property(objectExpression, 'kit', object.createEmpty());
-	const files = object.property(kit, 'files', object.createEmpty());
-	const routes = object.property(files, 'routes', common.createLiteral());
-	const lib = object.property(files, 'lib', common.createLiteral());
+	const kit = object.property(objectExpression, { name: 'kit', fallback: object.create({}) });
+	const files = object.property(kit, { name: 'files', fallback: object.create({}) });
+	const routes = object.property(files, { name: 'routes', fallback: common.createLiteral('') });
+	const lib = object.property(files, { name: 'lib', fallback: common.createLiteral('') });
 
 	const routesDirectory = (routes.value as string) || 'src/routes';
 	const libDirectory = (lib.value as string) || 'src/lib';
diff --git a/packages/cli/commands/create.ts b/packages/cli/commands/create.ts
index b7ffcaa..5d259c3 100644
--- a/packages/cli/commands/create.ts
+++ b/packages/cli/commands/create.ts
@@ -184,8 +184,7 @@ async function createProject(cwd: ProjectPath, options: Options) {
 				community: [],
 				addons: {}
 			},
-			[],
-			'create'
+			[]
 		);
 		packageManager = pm;
 		addOnNextSteps = nextSteps;
diff --git a/packages/cli/lib/install.ts b/packages/cli/lib/install.ts
index 1ae3d87..86bef82 100644
--- a/packages/cli/lib/install.ts
+++ b/packages/cli/lib/install.ts
@@ -90,8 +90,7 @@ export function setupAddons(
 		const setupResult: AddonSetupResult = {
 			unsupported: [],
 			dependsOn: [],
-			runsAfter: [],
-			defaultSelection: { create: false, add: false }
+			runsAfter: []
 		};
 		addon.setup?.({
 			...workspace,
@@ -100,10 +99,7 @@ export function setupAddons(
 				setupResult.runsAfter.push(name);
 			},
 			unsupported: (reason) => setupResult.unsupported.push(reason),
-			runsAfter: (name) => setupResult.runsAfter.push(name),
-			defaultSelection: (defaultSelection) => {
-				setupResult.defaultSelection = defaultSelection;
-			}
+			runsAfter: (name) => setupResult.runsAfter.push(name)
 		});
 		addonSetupResults[addon.id] = setupResult;
 	}
diff --git a/packages/core/addon/config.ts b/packages/core/addon/config.ts
index dd9daf0..fbce377 100644
--- a/packages/core/addon/config.ts
+++ b/packages/core/addon/config.ts
@@ -38,7 +38,6 @@ export type Addon<Args extends OptionDefinition> = {
 			dependsOn: (name: string) => void;
 			unsupported: (reason: string) => void;
 			runsAfter: (addonName: string) => void;
-			defaultSelection: (args: { create: boolean; add: boolean }) => void;
 		}
 	) => MaybePromise<void>;
 	run: (workspace: Workspace<Args> & { sv: SvApi }) => MaybePromise<void>;
@@ -61,12 +60,7 @@ export function defineAddon<Args extends OptionDefinition>(config: Addon<Args>):
 	return config;
 }
 
-export type AddonSetupResult = {
-	dependsOn: string[];
-	unsupported: string[];
-	runsAfter: string[];
-	defaultSelection: { create: boolean; add: boolean };
-};
+export type AddonSetupResult = { dependsOn: string[]; unsupported: string[]; runsAfter: string[] };
 
 export type AddonWithoutExplicitArgs = Addon<Record<string, Question>>;
 export type AddonConfigWithoutExplicitArgs = Addon<Record<string, Question>>;
diff --git a/packages/core/tooling/css/index.ts b/packages/core/tooling/css/index.ts
index ab69813..565ba76 100644
--- a/packages/core/tooling/css/index.ts
+++ b/packages/core/tooling/css/index.ts
@@ -2,43 +2,46 @@ import { Declaration, Rule, AtRule, Comment, type CssAst, type CssChildNode } fr
 
 export type { CssAst };
 
-export function addRule(ast: CssAst, selector: string): Rule {
-	const rules = ast.nodes.filter((x): x is Rule => x.type === 'rule');
-	let rule = rules.find((x) => x.selector === selector);
+export function addRule(node: CssAst, options: { selector: string }): Rule {
+	const rules = node.nodes.filter((x): x is Rule => x.type === 'rule');
+	let rule = rules.find((x) => x.selector === options.selector);
 
 	if (!rule) {
 		rule = new Rule();
-		rule.selector = selector;
-		ast.nodes.push(rule);
+		rule.selector = options.selector;
+		node.nodes.push(rule);
 	}
 
 	return rule;
 }
 
-export function addDeclaration(ast: Rule | CssAst, property: string, value: string): void {
-	const declarations = ast.nodes.filter((x): x is Declaration => x.type === 'decl');
-	let declaration = declarations.find((x) => x.prop === property);
+export function addDeclaration(
+	node: Rule | CssAst,
+	options: { property: string; value: string }
+): void {
+	const declarations = node.nodes.filter((x): x is Declaration => x.type === 'decl');
+	let declaration = declarations.find((x) => x.prop === options.property);
 
 	if (!declaration) {
-		declaration = new Declaration({ prop: property, value });
-		ast.append(declaration);
+		declaration = new Declaration({ prop: options.property, value: options.value });
+		node.append(declaration);
 	} else {
-		declaration.value = value;
+		declaration.value = options.value;
 	}
 }
 
-export function addImports(ast: Rule | CssAst, imports: string[]): CssChildNode[] {
+export function addImports(node: Rule | CssAst, options: { imports: string[] }): CssChildNode[] {
 	let prev: CssChildNode | undefined;
-	const nodes = imports.map((param) => {
-		const found = ast.nodes.find(
+	const nodes = options.imports.map((param) => {
+		const found = node.nodes.find(
 			(x) => x.type === 'atrule' && x.name === 'import' && x.params === param
 		);
 
 		if (found) return (prev = found);
 
 		const rule = new AtRule({ name: 'import', params: param });
-		if (prev) ast.insertAfter(prev, rule);
-		else ast.prepend(rule);
+		if (prev) node.insertAfter(prev, rule);
+		else node.prepend(rule);
 
 		return (prev = rule);
 	});
@@ -46,25 +49,28 @@ export function addImports(ast: Rule | CssAst, imports: string[]): CssChildNode[
 	return nodes;
 }
 
-export function addAtRule(ast: CssAst, name: string, params: string, append = false): AtRule {
-	const atRules = ast.nodes.filter((x): x is AtRule => x.type === 'atrule');
-	let atRule = atRules.find((x) => x.name === name && x.params === params);
+export function addAtRule(
+	node: CssAst,
+	options: { name: string; params: string; append: boolean }
+): AtRule {
+	const atRules = node.nodes.filter((x): x is AtRule => x.type === 'atrule');
+	let atRule = atRules.find((x) => x.name === options.name && x.params === options.params);
 
 	if (atRule) {
 		return atRule;
 	}
 
-	atRule = new AtRule({ name, params });
-	if (!append) {
-		ast.prepend(atRule);
+	atRule = new AtRule({ name: options.name, params: options.params });
+	if (!options.append) {
+		node.prepend(atRule);
 	} else {
-		ast.append(atRule);
+		node.append(atRule);
 	}
 
 	return atRule;
 }
 
-export function addComment(ast: CssAst, commentValue: string): void {
-	const comment = new Comment({ text: commentValue });
-	ast.append(comment);
+export function addComment(node: CssAst, options: { value: string }): void {
+	const comment = new Comment({ text: options.value });
+	node.append(comment);
 }
diff --git a/packages/core/tooling/html/index.ts b/packages/core/tooling/html/index.ts
index 94dcd88..60b2ae0 100644
--- a/packages/core/tooling/html/index.ts
+++ b/packages/core/tooling/html/index.ts
@@ -6,16 +6,19 @@ import {
 	HtmlElementType,
 	parseHtml
 } from '../index.ts';
-import { addFromString } from '../js/common.ts';
+import { appendFromString } from '../js/common.ts';
 
 export { HtmlElement, HtmlElementType };
 export type { HtmlDocument };
 
-export function div(attributes: Record<string, string> = {}): HtmlElement {
-	return element('div', attributes);
+export function createDiv(attributes: Record<string, string> = {}): HtmlElement {
+	return createElement('div', attributes);
 }
 
-export function element(tagName: string, attributes: Record<string, string> = {}): HtmlElement {
+export function createElement(
+	tagName: string,
+	attributes: Record<string, string> = {}
+): HtmlElement {
 	const element = new HtmlElement(tagName, {}, undefined, HtmlElementType.Tag);
 	element.attribs = attributes;
 	return element;
@@ -38,18 +41,20 @@ export function addFromRawHtml(childNodes: HtmlChildNode[], html: string): void
 
 export function addSlot(
 	jsAst: AstTypes.Program,
-	htmlAst: HtmlDocument,
-	svelteVersion: string
+	options: { htmlAst: HtmlDocument; svelteVersion: string }
 ): void {
 	const slotSyntax =
-		svelteVersion && (svelteVersion.startsWith('4') || svelteVersion.startsWith('3'));
+		options.svelteVersion &&
+		(options.svelteVersion.startsWith('4') || options.svelteVersion.startsWith('3'));
 
 	if (slotSyntax) {
-		const slot = element('slot');
-		appendElement(htmlAst.childNodes, slot);
+		const slot = createElement('slot');
+		appendElement(options.htmlAst.childNodes, slot);
 		return;
 	}
 
-	addFromString(jsAst, 'let { children } = $props();');
-	addFromRawHtml(htmlAst.childNodes, '{@render children()}');
+	appendFromString(jsAst, {
+		code: 'let { children } = $props();'
+	});
+	addFromRawHtml(options.htmlAst.childNodes, '{@render children()}');
 }
diff --git a/packages/core/tooling/js/array.ts b/packages/core/tooling/js/array.ts
index 46da53e..c3ac044 100644
--- a/packages/core/tooling/js/array.ts
+++ b/packages/core/tooling/js/array.ts
@@ -1,7 +1,7 @@
 import { areNodesEqual } from './common.ts';
 import type { AstTypes } from '../index.ts';
 
-export function createEmpty(): AstTypes.ArrayExpression {
+export function create(): AstTypes.ArrayExpression {
 	const arrayExpression: AstTypes.ArrayExpression = {
 		type: 'ArrayExpression',
 		elements: []
@@ -9,40 +9,43 @@ export function createEmpty(): AstTypes.ArrayExpression {
 	return arrayExpression;
 }
 
-export function push(
-	ast: AstTypes.ArrayExpression,
-	data: string | AstTypes.Expression | AstTypes.SpreadElement
+export function append(
+	node: AstTypes.ArrayExpression,
+	element: string | AstTypes.Expression | AstTypes.SpreadElement
 ): void {
-	insertElement(ast, data, true);
+	insertElement(node, element, { insertEnd: true });
 }
-export function unshift(
-	ast: AstTypes.ArrayExpression,
-	data: string | AstTypes.Expression | AstTypes.SpreadElement
+
+export function prepend(
+	node: AstTypes.ArrayExpression,
+	element: string | AstTypes.Expression | AstTypes.SpreadElement
 ): void {
-	insertElement(ast, data, false);
+	insertElement(node, element, { insertEnd: false });
 }
 
 function insertElement(
-	ast: AstTypes.ArrayExpression,
-	data: string | AstTypes.Expression | AstTypes.SpreadElement,
-	insertEnd: boolean
+	node: AstTypes.ArrayExpression,
+	element: string | AstTypes.Expression | AstTypes.SpreadElement,
+	options: { insertEnd: boolean }
 ): void {
-	if (typeof data === 'string') {
-		const existingLiterals = ast.elements.filter((x) => x !== null && x.type === 'Literal');
-		let literal = existingLiterals.find((x) => x.value === data);
+	if (typeof element === 'string') {
+		const existingLiterals = node.elements.filter(
+			(item) => item !== null && item.type === 'Literal'
+		);
+		let literal = existingLiterals.find((item) => item.value === element);
 		if (!literal) {
-			literal = { type: 'Literal', value: data };
+			literal = { type: 'Literal', value: element };
 
-			if (insertEnd) ast.elements.push(literal);
-			else ast.elements.unshift(literal);
+			if (options.insertEnd) node.elements.push(literal);
+			else node.elements.unshift(literal);
 		}
 	} else {
-		const elements = ast.elements;
-		const anyNodeEquals = elements.some((node) => node && areNodesEqual(data, node));
+		const elements = node.elements;
+		const anyNodeEquals = elements.some((item) => item && areNodesEqual(element, item));
 
 		if (!anyNodeEquals) {
-			if (insertEnd) ast.elements.push(data);
-			else ast.elements.unshift(data);
+			if (options.insertEnd) node.elements.push(element);
+			else node.elements.unshift(element);
 		}
 	}
 }
diff --git a/packages/core/tooling/js/common.ts b/packages/core/tooling/js/common.ts
index c6b328c..8812660 100644
--- a/packages/core/tooling/js/common.ts
+++ b/packages/core/tooling/js/common.ts
@@ -2,18 +2,21 @@ import { type AstTypes, Walker, parseScript, serializeScript, stripAst } from '.
 import decircular from 'decircular';
 import dedent from 'dedent';
 
-export function addJsDocTypeComment(node: AstTypes.Node, type: string): void {
+export function addJsDocTypeComment(node: AstTypes.Node, options: { type: string }): void {
 	const comment: AstTypes.Comment = {
 		type: 'Block',
-		value: `* @type {${type}} `
+		value: `* @type {${options.type}} `
 	};
 
 	addComment(node, comment);
 }
 
-export function addJsDocComment(node: AstTypes.Node, params: Record<string, string>): void {
+export function addJsDocComment(
+	node: AstTypes.Node,
+	options: { params: Record<string, string> }
+): void {
 	const commentLines: string[] = [];
-	for (const [key, value] of Object.entries(params)) {
+	for (const [key, value] of Object.entries(options.params)) {
 		commentLines.push(`@param {${key}} ${value}`);
 	}
 
@@ -28,64 +31,72 @@ export function addJsDocComment(node: AstTypes.Node, params: Record<string, stri
 function addComment(node: AstTypes.Node, comment: AstTypes.Comment) {
 	node.leadingComments ??= [];
 
-	const found = node.leadingComments.find((n) => n.type === 'Block' && n.value === comment.value);
+	const found = node.leadingComments.find(
+		(item) => item.type === 'Block' && item.value === comment.value
+	);
 	if (!found) node.leadingComments.push(comment);
 }
 
-export function typeAnnotateExpression(
+export function typeAnnotate(
 	node: AstTypes.Expression,
-	type: string
+	options: { type: string }
 ): AstTypes.TSAsExpression {
 	const expression: AstTypes.TSAsExpression = {
 		type: 'TSAsExpression',
 		expression: node,
-		typeAnnotation: { type: 'TSTypeReference', typeName: { type: 'Identifier', name: type } }
+		typeAnnotation: {
+			type: 'TSTypeReference',
+			typeName: { type: 'Identifier', name: options.type }
+		}
 	};
 
 	return expression;
 }
 
-export function satisfiesExpression(
+export function createSatisfies(
 	node: AstTypes.Expression,
-	type: string
+	options: { type: string }
 ): AstTypes.TSSatisfiesExpression {
 	const expression: AstTypes.TSSatisfiesExpression = {
 		type: 'TSSatisfiesExpression',
 		expression: node,
-		typeAnnotation: { type: 'TSTypeReference', typeName: { type: 'Identifier', name: type } }
+		typeAnnotation: {
+			type: 'TSTypeReference',
+			typeName: { type: 'Identifier', name: options.type }
+		}
 	};
 
 	return expression;
 }
 
-export function createSpreadElement(expression: AstTypes.Expression): AstTypes.SpreadElement {
+export function createSpread(argument: AstTypes.Expression): AstTypes.SpreadElement {
 	return {
 		type: 'SpreadElement',
-		argument: expression
+		argument
 	};
 }
 
-export function createLiteral(value: string | number | boolean | null = null): AstTypes.Literal {
+export function createLiteral(value: string | number | boolean | null): AstTypes.Literal {
 	const literal: AstTypes.Literal = {
 		type: 'Literal',
-		value
+		value: value ?? null
 	};
 
 	return literal;
 }
 
-export function areNodesEqual(ast1: AstTypes.Node, ast2: AstTypes.Node): boolean {
+export function areNodesEqual(node: AstTypes.Node, otherNode: AstTypes.Node): boolean {
 	// We're deep cloning these trees so that we can strip the locations off of them for comparisons.
 	// Without this, we'd be getting false negatives due to slight differences in formatting style.
 	// These ASTs are also filled to the brim with circular references, which prevents
 	// us from using `structuredCloned` directly
 
-	const ast1Clone = stripAst(decircular(ast1), ['loc', 'raw']);
-	const ast2Clone = stripAst(decircular(ast2), ['loc', 'raw']);
-	return serializeScript(ast1Clone) === serializeScript(ast2Clone);
+	const nodeClone = stripAst(decircular(node), ['loc', 'raw']);
+	const otherNodeClone = stripAst(decircular(otherNode), ['loc', 'raw']);
+	return serializeScript(nodeClone) === serializeScript(otherNodeClone);
 }
 
-export function blockStatement(): AstTypes.BlockStatement {
+export function createBlockStatement(): AstTypes.BlockStatement {
 	const statement: AstTypes.BlockStatement = {
 		type: 'BlockStatement',
 		body: []
@@ -93,63 +104,65 @@ export function blockStatement(): AstTypes.BlockStatement {
 	return statement;
 }
 
-export function expressionStatement(expression: AstTypes.Expression): AstTypes.ExpressionStatement {
+export function createExpressionStatement(options: {
+	expression: AstTypes.Expression;
+}): AstTypes.ExpressionStatement {
 	const statement: AstTypes.ExpressionStatement = {
 		type: 'ExpressionStatement',
-		expression
+		expression: options.expression
 	};
 	return statement;
 }
 
-export function addFromString(
-	ast: AstTypes.BlockStatement | AstTypes.Program,
-	value: string
+export function appendFromString(
+	node: AstTypes.BlockStatement | AstTypes.Program,
+	options: { code: string }
 ): void {
-	const program = parseScript(dedent(value));
+	const program = parseScript(dedent(options.code));
 
 	for (const childNode of program.body) {
 		// @ts-expect-error
-		ast.body.push(childNode);
+		node.body.push(childNode);
 	}
 }
 
-export function expressionFromString(value: string): AstTypes.Expression {
-	const program = parseScript(dedent(value));
+export function parseExpression(code: string): AstTypes.Expression {
+	const program = parseScript(dedent(code));
 	stripAst(program, ['raw']);
 	const statement = program.body[0]!;
 	if (statement.type !== 'ExpressionStatement') {
-		throw new Error('value passed was not an expression');
+		throw new Error('Code provided was not an expression');
 	}
 
 	return statement.expression;
 }
 
-export function statementFromString(value: string): AstTypes.Statement {
-	return fromString<AstTypes.Statement>(value);
+export function parseStatement(code: string): AstTypes.Statement {
+	return parseFromString<AstTypes.Statement>(code);
 }
 
-export function fromString<T extends AstTypes.Node>(value: string): T {
-	const program = parseScript(dedent(value));
+export function parseFromString<T extends AstTypes.Node>(code: string): T {
+	const program = parseScript(dedent(code));
 	const statement = program.body[0]!;
 
 	return statement as T;
 }
 
 /** Appends the statement to body of the block if it doesn't already exist */
-export function addStatement(
-	ast: AstTypes.BlockStatement | AstTypes.Program,
-	statement: AstTypes.Statement
+export function appendStatement(
+	node: AstTypes.BlockStatement | AstTypes.Program,
+	options: { statement: AstTypes.Statement }
 ): void {
-	if (!hasNode(ast, statement)) ast.body.push(statement);
+	if (!contains(node, options.statement)) node.body.push(options.statement);
 }
 
 /** Returns `true` if the provided node exists in the AST */
-export function hasNode(ast: AstTypes.Node, nodeToMatch: AstTypes.Node): boolean {
+export function contains(node: AstTypes.Node, targetNode: AstTypes.Node): boolean {
 	let found = false;
-	Walker.walk(ast, null, {
-		_(node, { next, stop }) {
-			if (node.type === nodeToMatch.type) {
-				found = areNodesEqual(node, nodeToMatch);
+	Walker.walk(node, null, {
+		_(currentNode, { next, stop }) {
+			if (currentNode.type === targetNode.type) {
+				found = areNodesEqual(currentNode, targetNode);
 				if (found) stop();
 			}
 			next();
@@ -159,11 +172,13 @@ export function hasNode(ast: AstTypes.Node, nodeToMatch: AstTypes.Node): boolean
 	return found;
 }
 
-export function hasTypeProp(
-	name: string,
-	node: AstTypes.TSInterfaceDeclaration['body']['body'][number]
+export function hasTypeProperty(
+	node: AstTypes.TSInterfaceDeclaration['body']['body'][number],
+	options: { name: string }
 ): boolean {
 	return (
-		node.type === 'TSPropertySignature' && node.key.type === 'Identifier' && node.key.name === name
+		node.type === 'TSPropertySignature' &&
+		node.key.type === 'Identifier' &&
+		node.key.name === options.name
 	);
 }
diff --git a/packages/core/tooling/js/exports.ts b/packages/core/tooling/js/exports.ts
index ea12e76..161222c 100644
--- a/packages/core/tooling/js/exports.ts
+++ b/packages/core/tooling/js/exports.ts
@@ -1,23 +1,23 @@
 import type { AstTypes } from '../index.ts';
 
-export type ExportDefaultReturn<T> = {
+export type ExportDefaultResult<T> = {
 	astNode: AstTypes.ExportDefaultDeclaration;
 	value: T;
 };
 
-export function defaultExport<T extends AstTypes.Expression>(
-	ast: AstTypes.Program,
-	fallbackDeclaration: T
-): ExportDefaultReturn<T> {
-	const existingNode = ast.body.find((x) => x.type === 'ExportDefaultDeclaration');
+export function createDefault<T extends AstTypes.Expression>(
+	node: AstTypes.Program,
+	options: { fallback: T }
+): ExportDefaultResult<T> {
+	const existingNode = node.body.find((item) => item.type === 'ExportDefaultDeclaration');
 	if (!existingNode) {
-		const node: AstTypes.ExportDefaultDeclaration = {
+		const exportNode: AstTypes.ExportDefaultDeclaration = {
 			type: 'ExportDefaultDeclaration',
-			declaration: fallbackDeclaration
+			declaration: options.fallback
 		};
 
-		ast.body.push(node);
-		return { astNode: node, value: fallbackDeclaration };
+		node.body.push(exportNode);
+		return { astNode: exportNode, value: options.fallback };
 	}
 
 	const exportDefaultDeclaration = existingNode;
@@ -28,14 +28,14 @@ export function defaultExport<T extends AstTypes.Expression>(
 
 		let variableDeclaration: AstTypes.VariableDeclaration | undefined;
 		let variableDeclarator: AstTypes.VariableDeclarator | undefined;
-		for (const declaration of ast.body) {
+		for (const declaration of node.body) {
 			if (declaration.type !== 'VariableDeclaration') continue;
 
 			const declarator = declaration.declarations.find(
-				(d): d is AstTypes.VariableDeclarator =>
-					d.type === 'VariableDeclarator' &&
-					d.id.type === 'Identifier' &&
-					d.id.name === identifier.name
+				(declarator): declarator is AstTypes.VariableDeclarator =>
+					declarator.type === 'VariableDeclarator' &&
+					declarator.id.type === 'Identifier' &&
+					declarator.id.name === identifier.name
 			);
 
 			variableDeclarator = declarator;
@@ -53,27 +53,26 @@ export function defaultExport<T extends AstTypes.Expression>(
 	return { astNode: exportDefaultDeclaration, value: declaration };
 }
 
-export function namedExport(
-	ast: AstTypes.Program,
-	name: string,
-	fallback: AstTypes.VariableDeclaration
+export function createNamed(
+	node: AstTypes.Program,
+	options: { name: string; fallback: AstTypes.VariableDeclaration }
 ): AstTypes.ExportNamedDeclaration {
-	const namedExports = ast.body.filter((x) => x.type === 'ExportNamedDeclaration');
-	let namedExport = namedExports.find((x) => {
-		const variableDeclaration = x.declaration as AstTypes.VariableDeclaration;
+	const namedExports = node.body.filter((item) => item.type === 'ExportNamedDeclaration');
+	let namedExport = namedExports.find((exportNode) => {
+		const variableDeclaration = exportNode.declaration as AstTypes.VariableDeclaration;
 		const variableDeclarator = variableDeclaration.declarations[0] as AstTypes.VariableDeclarator;
 		const identifier = variableDeclarator.id as AstTypes.Identifier;
-		return identifier.name === name;
+		return identifier.name === options.name;
 	});
 
 	if (namedExport) return namedExport;
 
 	namedExport = {
 		type: 'ExportNamedDeclaration',
-		declaration: fallback,
+		declaration: options.fallback,
 		specifiers: [],
 		attributes: []
 	};
-	ast.body.push(namedExport);
+	node.body.push(namedExport);
 	return namedExport;
 }
diff --git a/packages/core/tooling/js/function.ts b/packages/core/tooling/js/function.ts
index f670198..2cf539d 100644
--- a/packages/core/tooling/js/function.ts
+++ b/packages/core/tooling/js/function.ts
@@ -1,72 +1,64 @@
 import type { AstTypes } from '../index.ts';
 
-export function call(name: string, args: string[]): AstTypes.CallExpression {
+export function createCall(options: {
+	name: string;
+	args: string[];
+	useIdentifiers?: boolean;
+}): AstTypes.CallExpression {
 	const callExpression: AstTypes.CallExpression = {
 		type: 'CallExpression',
 		callee: {
 			type: 'Identifier',
-			name
+			name: options.name
 		},
 		arguments: [],
 		optional: false
 	};
 
-	for (const argument of args) {
-		callExpression.arguments.push({
-			type: 'Literal',
-			value: argument
-		});
-	}
+	for (const arg of options.args) {
+		let argNode: AstTypes.Expression;
 
-	return callExpression;
-}
+		if (options.useIdentifiers) {
+			argNode = {
+				type: 'Identifier',
+				name: arg
+			};
+		} else {
+			argNode = {
+				type: 'Literal',
+				value: arg
+			};
+		}
 
-export function callByIdentifier(name: string, args: string[]): AstTypes.CallExpression {
-	const callExpression: AstTypes.CallExpression = {
-		type: 'CallExpression',
-		callee: {
-			type: 'Identifier',
-			name
-		},
-		arguments: [],
-		optional: false
-	};
-
-	for (const argument of args) {
-		const identifier: AstTypes.Identifier = {
-			type: 'Identifier',
-			name: argument
-		};
-		callExpression.arguments.push(identifier);
+		callExpression.arguments.push(argNode);
 	}
 
 	return callExpression;
 }
 
-export function arrowFunction(
-	async: boolean,
-	body: AstTypes.Expression | AstTypes.BlockStatement
-): AstTypes.ArrowFunctionExpression {
+export function createArrow(options: {
+	body: AstTypes.Expression | AstTypes.BlockStatement;
+	async: boolean;
+}): AstTypes.ArrowFunctionExpression {
 	const arrowFunction: AstTypes.ArrowFunctionExpression = {
 		type: 'ArrowFunctionExpression',
-		async,
-		body,
+		async: options.async,
+		body: options.body,
 		params: [],
-		expression: body.type !== 'BlockStatement'
+		expression: options.body.type !== 'BlockStatement'
 	};
 
 	return arrowFunction;
 }
 
-export function argumentByIndex<T extends AstTypes.Expression>(
-	ast: AstTypes.CallExpression,
-	i: number,
-	fallback: T
+export function getArgument<T extends AstTypes.Expression>(
+	node: AstTypes.CallExpression,
+	options: { index: number; fallback: T }
 ): T {
-	if (i < ast.arguments.length) {
-		return ast.arguments[i] as T;
+	if (options.index < node.arguments.length) {
+		return node.arguments[options.index] as T;
 	}
 
-	ast.arguments.push(fallback);
-	return fallback;
+	node.arguments.push(options.fallback);
+	return options.fallback;
 }
diff --git a/packages/core/tooling/js/imports.ts b/packages/core/tooling/js/imports.ts
index 81ce9a3..4c99897 100644
--- a/packages/core/tooling/js/imports.ts
+++ b/packages/core/tooling/js/imports.ts
@@ -1,51 +1,51 @@
 import { Walker, type AstTypes } from '../index.ts';
 import { areNodesEqual } from './common.ts';
 
-export function addEmpty(ast: AstTypes.Program, importFrom: string): void {
+export function addEmpty(node: AstTypes.Program, options: { from: string }): void {
 	const expectedImportDeclaration: AstTypes.ImportDeclaration = {
 		type: 'ImportDeclaration',
 		source: {
 			type: 'Literal',
-			value: importFrom
+			value: options.from
 		},
 		specifiers: [],
 		attributes: [],
 		importKind: 'value'
 	};
 
-	addImportIfNecessary(ast, expectedImportDeclaration);
+	addImportIfNecessary(node, expectedImportDeclaration);
 }
 
-export function addNamespace(ast: AstTypes.Program, importFrom: string, importAs: string): void {
+export function addNamespace(node: AstTypes.Program, options: { from: string; as: string }): void {
 	const expectedImportDeclaration: AstTypes.ImportDeclaration = {
 		type: 'ImportDeclaration',
 		importKind: 'value',
-		source: { type: 'Literal', value: importFrom },
+		source: { type: 'Literal', value: options.from },
 		specifiers: [
 			{
 				type: 'ImportNamespaceSpecifier',
-				local: { type: 'Identifier', name: importAs }
+				local: { type: 'Identifier', name: options.as }
 			}
 		],
 		attributes: []
 	};
 
-	addImportIfNecessary(ast, expectedImportDeclaration);
+	addImportIfNecessary(node, expectedImportDeclaration);
 }
 
-export function addDefault(ast: AstTypes.Program, importFrom: string, importAs: string): void {
+export function addDefault(node: AstTypes.Program, options: { from: string; as: string }): void {
 	const expectedImportDeclaration: AstTypes.ImportDeclaration = {
 		type: 'ImportDeclaration',
 		source: {
 			type: 'Literal',
-			value: importFrom
+			value: options.from
 		},
 		specifiers: [
 			{
 				type: 'ImportDefaultSpecifier',
 				local: {
 					type: 'Identifier',
-					name: importAs
+					name: options.as
 				}
 			}
 		],
@@ -53,16 +53,18 @@ export function addDefault(ast: AstTypes.Program, importFrom: string, importAs:
 		importKind: 'value'
 	};
 
-	addImportIfNecessary(ast, expectedImportDeclaration);
+	addImportIfNecessary(node, expectedImportDeclaration);
 }
 
 export function addNamed(
-	ast: AstTypes.Program,
-	importFrom: string,
-	exportedAsImportAs: Record<string, string>,
-	isType = false
+	node: AstTypes.Program,
+	options: {
+		from: string;
+		imports: Record<string, string>;
+		isType?: boolean;
+	}
 ): void {
-	const specifiers = Object.entries(exportedAsImportAs).map(([key, value]) => {
+	const specifiers = Object.entries(options.imports).map(([key, value]) => {
 		const specifier: AstTypes.ImportSpecifier = {
 			type: 'ImportSpecifier',
 			imported: {
@@ -79,10 +81,10 @@ export function addNamed(
 
 	let importDecl: AstTypes.ImportDeclaration | undefined;
 
-	Walker.walk(ast as AstTypes.Node, null, {
-		ImportDeclaration(node) {
-			if (node.source.value === importFrom && node.specifiers) {
-				importDecl = node;
+	Walker.walk(node as AstTypes.Node, null, {
+		ImportDeclaration(declaration) {
+			if (declaration.source.value === options.from && declaration.specifiers) {
+				importDecl = declaration;
 			}
 		}
 	});
@@ -109,26 +111,26 @@ export function addNamed(
 		type: 'ImportDeclaration',
 		source: {
 			type: 'Literal',
-			value: importFrom
+			value: options.from
 		},
 		specifiers,
 		attributes: [],
-		importKind: isType ? 'type' : 'value'
+		importKind: options.isType ? 'type' : 'value'
 	};
 
-	ast.body.unshift(expectedImportDeclaration);
+	node.body.unshift(expectedImportDeclaration);
 }
 
 function addImportIfNecessary(
-	ast: AstTypes.Program,
+	node: AstTypes.Program,
 	expectedImportDeclaration: AstTypes.ImportDeclaration
 ) {
-	const importDeclarations = ast.body.filter((x) => x.type === 'ImportDeclaration');
-	const importDeclaration = importDeclarations.find((x) =>
-		areNodesEqual(x, expectedImportDeclaration)
+	const importDeclarations = node.body.filter((item) => item.type === 'ImportDeclaration');
+	const importDeclaration = importDeclarations.find((item) =>
+		areNodesEqual(item, expectedImportDeclaration)
 	);
 
 	if (!importDeclaration) {
-		ast.body.unshift(expectedImportDeclaration);
+		node.body.unshift(expectedImportDeclaration);
 	}
 }
diff --git a/packages/core/tooling/js/kit.ts b/packages/core/tooling/js/kit.ts
index d9a38a4..fed1cf7 100644
--- a/packages/core/tooling/js/kit.ts
+++ b/packages/core/tooling/js/kit.ts
@@ -1,23 +1,26 @@
 import { Walker, type AstTypes } from '../index.ts';
-import { common, functions, imports, variables, exports } from '../js/index.ts';
+import * as common from './common.ts';
+import * as functions from './function.ts';
+import * as imports from './imports.ts';
+import * as variables from './variables.ts';
+import * as exports from './exports.ts';
 
 export function addGlobalAppInterface(
-	ast: AstTypes.TSProgram,
-	name: 'Error' | 'Locals' | 'PageData' | 'PageState' | 'Platform'
+	node: AstTypes.TSProgram,
+	options: { name: 'Error' | 'Locals' | 'PageData' | 'PageState' | 'Platform' }
 ): AstTypes.TSInterfaceDeclaration {
-	let globalDecl = ast.body
+	let globalDecl = node.body
 		.filter((n) => n.type === 'TSModuleDeclaration')
 		.find((m) => m.global && m.declare);
 
 	if (!globalDecl) {
-		globalDecl = common.fromString<AstTypes.TSModuleDeclaration>('declare global {}');
-		ast.body.push(globalDecl);
+		globalDecl = common.parseFromString<AstTypes.TSModuleDeclaration>('declare global {}');
+		node.body.push(globalDecl);
 	}
 
 	if (globalDecl.body?.type !== 'TSModuleBlock') {
 		throw new Error('Unexpected body type of `declare global` in `src/app.d.ts`');
 	}
-
 	let app: AstTypes.TSModuleDeclaration | undefined;
 	let interfaceNode: AstTypes.TSInterfaceDeclaration | undefined;
 
@@ -29,14 +32,14 @@ export function addGlobalAppInterface(
 			next();
 		},
 		TSInterfaceDeclaration(node) {
-			if (node.id.type === 'Identifier' && node.id.name === name) {
+			if (node.id.type === 'Identifier' && node.id.name === options.name) {
 				interfaceNode = node;
 			}
 		}
 	});
 
 	if (!app) {
-		app = common.fromString<AstTypes.TSModuleDeclaration>('namespace App {}');
+		app = common.parseFromString<AstTypes.TSModuleDeclaration>('namespace App {}');
 		globalDecl.body.body.push(app);
 	}
 
@@ -46,7 +49,9 @@ export function addGlobalAppInterface(
 
 	if (!interfaceNode) {
 		// add the interface if it's missing
-		interfaceNode = common.fromString<AstTypes.TSInterfaceDeclaration>(`interface ${name} {}`);
+		interfaceNode = common.parseFromString<AstTypes.TSInterfaceDeclaration>(
+			`interface ${options.name} {}`
+		);
 		app.body.body.push(interfaceNode);
 	}
 
@@ -54,15 +59,20 @@ export function addGlobalAppInterface(
 }
 
 export function addHooksHandle(
-	ast: AstTypes.Program,
-	typescript: boolean,
-	newHandleName: string,
-	handleContent: string
+	node: AstTypes.Program,
+	options: {
+		typescript: boolean;
+		newHandleName: string;
+		handleContent: string;
+	}
 ): void {
-	if (typescript) {
-		imports.addNamed(ast, '@sveltejs/kit', { Handle: 'Handle' }, true);
+	if (options.typescript) {
+		imports.addNamed(node, {
+			from: '@sveltejs/kit',
+			imports: { Handle: 'Handle' },
+			isType: true
+		});
 	}
-
 	let isSpecifier: boolean = false;
 	let handleName = 'handle';
 	let exportDecl: AstTypes.ExportNamedDeclaration | undefined;
@@ -72,13 +82,14 @@ export function addHooksHandle(
 	// This will grab export references for:
 	// `export { handle }` & `export { foo as handle }`
 	// `export const handle = ...`, & `export function handle() {...}`
-	Walker.walk(ast as AstTypes.Node, null, {
-		ExportNamedDeclaration(node) {
+	Walker.walk(node as AstTypes.Node, null, {
+		ExportNamedDeclaration(declaration) {
 			let maybeHandleDecl: AstTypes.Declaration | undefined;
 
 			// `export { handle }` & `export { foo as handle }`
-			const handleSpecifier = node.specifiers?.find(
-				(s) => s.exported.type === 'Identifier' && s.exported.name === 'handle'
+			const handleSpecifier = declaration.specifiers?.find(
+				(specifier) =>
+					specifier.exported.type === 'Identifier' && specifier.exported.name === 'handle'
 			);
 			if (
 				handleSpecifier &&
@@ -90,106 +101,127 @@ export function addHooksHandle(
 				handleName = (handleSpecifier.local?.name ?? handleSpecifier.exported.name) as string;
 
 				// find the definition
-				const handleFunc = ast.body.find((n) => isFunctionDeclaration(n, handleName));
-				const handleVar = ast.body.find((n) => isVariableDeclaration(n, handleName));
-
+				const handleFunc = node.body.find((item) => isFunctionDeclaration(item, handleName));
+				const handleVar = node.body.find((item) => isVariableDeclaration(item, handleName));
 				maybeHandleDecl = handleFunc ?? handleVar;
 			}
 
-			maybeHandleDecl ??= node.declaration ?? undefined;
+			maybeHandleDecl ??= declaration.declaration ?? undefined;
 
 			// `export const handle`
 			if (maybeHandleDecl && isVariableDeclaration(maybeHandleDecl, handleName)) {
-				exportDecl = node;
+				exportDecl = declaration;
 				originalHandleDecl = maybeHandleDecl;
 			}
 
 			// `export function handle`
 			if (maybeHandleDecl && isFunctionDeclaration(maybeHandleDecl, handleName)) {
-				exportDecl = node;
+				exportDecl = declaration;
 				originalHandleDecl = maybeHandleDecl;
 			}
 		}
 	});
 
-	const newHandle = common.expressionFromString(handleContent);
-	if (common.hasNode(ast, newHandle)) return;
-
+	const newHandle = common.parseExpression(options.handleContent);
+	if (common.contains(node, newHandle)) return;
 	// This is the straightforward case. If there's no existing `handle`, we'll just add one
 	// with the new handle's definition and exit
 	if (!originalHandleDecl || !exportDecl) {
-		const newDecl = variables.declaration(ast, 'const', newHandleName, newHandle);
-		if (typescript) {
-			const declarator = newDecl.declarations[0] as AstTypes.VariableDeclarator;
-			variables.typeAnnotateDeclarator(declarator, 'Handle');
+		const newHandleDecl = variables.declaration(node, {
+			kind: 'const',
+			name: options.newHandleName,
+			value: newHandle
+		});
+
+		if (options.typescript) {
+			const declarator = newHandleDecl.declarations[0] as AstTypes.VariableDeclarator;
+			variables.typeAnnotateDeclarator(declarator, { typeName: 'Handle' });
 		}
-		ast.body.push(newDecl);
+		node.body.push(newHandleDecl);
 
-		const handleDecl = variables.declaration(
-			ast,
-			'const',
-			handleName,
-			common.expressionFromString(newHandleName)
-		);
-		if (typescript) {
+		const handleDecl = variables.declaration(node, {
+			kind: 'const',
+			name: handleName,
+			value: variables.createIdentifier(options.newHandleName)
+		});
+
+		if (options.typescript) {
 			const declarator = handleDecl.declarations[0] as AstTypes.VariableDeclarator;
-			variables.typeAnnotateDeclarator(declarator, 'Handle');
+			variables.typeAnnotateDeclarator(declarator, { typeName: 'Handle' });
 		}
-		exports.namedExport(ast, handleName, handleDecl);
 
+		exports.createNamed(node, {
+			name: handleName,
+			fallback: handleDecl
+		});
 		return;
 	}
 
 	// create the new handle
-	const newDecl = variables.declaration(ast, 'const', newHandleName, newHandle);
-	if (typescript) {
-		const declarator = newDecl.declarations[0] as AstTypes.VariableDeclarator;
-		variables.typeAnnotateDeclarator(declarator, 'Handle');
+	const newHandleDecl = variables.declaration(node, {
+		kind: 'const',
+		name: options.newHandleName,
+		value: newHandle
+	});
+	if (options.typescript) {
+		const declarator = newHandleDecl.declarations[0] as AstTypes.VariableDeclarator;
+		variables.typeAnnotateDeclarator(declarator, { typeName: 'Handle' });
 	}
 
 	// check if `handle` is using a sequence
 	let sequence: AstTypes.CallExpression | undefined;
 	if (originalHandleDecl.type === 'VariableDeclaration') {
 		const handle = originalHandleDecl.declarations.find(
-			(d) => d.type === 'VariableDeclarator' && usingSequence(d, handleName)
+			(declarator) =>
+				declarator.type === 'VariableDeclarator' && usingSequence(declarator, handleName)
 		) as AstTypes.VariableDeclarator | undefined;
 
 		sequence = handle?.init as AstTypes.CallExpression;
 	}
-
 	// If `handle` is already using a `sequence`, then we'll just create the new handle and
 	// append the new handle name to the args of `sequence`
 	// e.g. `export const handle = sequence(some, other, handles, newHandle);`
 	if (sequence) {
 		const hasNewArg = sequence.arguments.some(
-			(arg) => arg.type === 'Identifier' && arg.name === newHandleName
+			(arg) => arg.type === 'Identifier' && arg.name === options.newHandleName
 		);
 		if (!hasNewArg) {
-			sequence.arguments.push(variables.identifier(newHandleName));
+			sequence.arguments.push(variables.createIdentifier(options.newHandleName));
 		}
 
 		// removes the declarations so we can append them in the correct order
-		ast.body = ast.body.filter(
-			(n) => n !== originalHandleDecl && n !== exportDecl && n !== newDecl
+		node.body = node.body.filter(
+			(item) => item !== originalHandleDecl && item !== exportDecl && item !== newHandleDecl
 		);
 		if (isSpecifier) {
 			// if export specifiers are being used (e.g. `export { handle }`), then we'll want
 			// need to also append original handle declaration as it's not part of the export declaration
-			ast.body.push(newDecl, originalHandleDecl, exportDecl);
+			node.body.push(newHandleDecl, originalHandleDecl, exportDecl);
 		} else {
-			ast.body.push(newDecl, exportDecl);
+			node.body.push(newHandleDecl, exportDecl);
 		}
 	}
-
 	// At this point, the existing `handle` doesn't call `sequence`, so we'll need to rename the original
 	// `handle` and create a new `handle` that uses `sequence`
 	// e.g. `const handle = sequence(originalHandle, newHandle);`
 	const NEW_HANDLE_NAME = 'originalHandle';
-	const sequenceCall = functions.callByIdentifier('sequence', [NEW_HANDLE_NAME, newHandleName]);
-	const newHandleDecl = variables.declaration(ast, 'const', handleName, sequenceCall);
 
-	imports.addNamed(ast, '@sveltejs/kit/hooks', { sequence: 'sequence' });
+	const sequenceCall = functions.createCall({
+		name: 'sequence',
+		args: [NEW_HANDLE_NAME, options.newHandleName],
+		useIdentifiers: true
+	});
+
+	const finalHandleDecl = variables.declaration(node, {
+		kind: 'const',
+		name: handleName,
+		value: sequenceCall
+	});
 
+	imports.addNamed(node, {
+		from: '@sveltejs/kit/hooks',
+		imports: { sequence: 'sequence' }
+	});
 	let renameRequired = false;
 	// rename `export const handle`
 	if (originalHandleDecl && isVariableDeclaration(originalHandleDecl, handleName)) {
@@ -206,34 +238,46 @@ export function addHooksHandle(
 	}
 
 	// removes all declarations so that we can re-append them in the correct order
-	ast.body = ast.body.filter((n) => n !== originalHandleDecl && n !== exportDecl && n !== newDecl);
+	node.body = node.body.filter(
+		(item) => item !== originalHandleDecl && item !== exportDecl && item !== newHandleDecl
+	);
 
 	if (isSpecifier) {
-		ast.body.push(originalHandleDecl, newDecl, newHandleDecl, exportDecl);
+		node.body.push(originalHandleDecl, newHandleDecl, finalHandleDecl, exportDecl);
 	}
-
 	if (exportDecl.declaration && renameRequired) {
 		// when we re-append the declarations, we only want to add the declaration
 		// of the (now renamed) original `handle` _without_ the `export` keyword:
 		// e.g. `const originalHandle = ...;`
-		ast.body.push(exportDecl.declaration, newDecl);
+		node.body.push(exportDecl.declaration, newHandleDecl);
 		// `export const handle = sequence(originalHandle, newHandle);`
-		exports.namedExport(ast, handleName, newHandleDecl);
+		exports.createNamed(node, {
+			name: handleName,
+			fallback: finalHandleDecl
+		});
 	} else if (exportDecl.declaration && isVariableDeclaration(originalHandleDecl, handleName)) {
 		// if the previous value of `export const handle = ...` was an identifier
 		// there is no need to rename the handle, we just need to add it to the sequence
 		const variableDeclarator = getVariableDeclarator(originalHandleDecl, handleName);
-		const sequenceCall = functions.callByIdentifier('sequence', [
-			(variableDeclarator?.init as AstTypes.Identifier).name,
-			newHandleName
-		]);
-		const newHandleDecl = variables.declaration(ast, 'const', handleName, sequenceCall);
-		if (typescript) {
-			const declarator = newHandleDecl.declarations[0] as AstTypes.VariableDeclarator;
-			variables.typeAnnotateDeclarator(declarator, 'Handle');
+		const sequenceCall = functions.createCall({
+			name: 'sequence',
+			args: [(variableDeclarator?.init as AstTypes.Identifier).name, options.newHandleName],
+			useIdentifiers: true
+		});
+		const finalHandleDecl = variables.declaration(node, {
+			kind: 'const',
+			name: handleName,
+			value: sequenceCall
+		});
+		if (options.typescript) {
+			const declarator = finalHandleDecl.declarations[0] as AstTypes.VariableDeclarator;
+			variables.typeAnnotateDeclarator(declarator, { typeName: 'Handle' });
 		}
-		ast.body.push(newDecl);
-		exports.namedExport(ast, handleName, newHandleDecl);
+		node.body.push(newHandleDecl);
+		exports.createNamed(node, {
+			name: handleName,
+			fallback: finalHandleDecl
+		});
 	}
 }
 
@@ -258,10 +302,11 @@ function isVariableDeclaration(
 
 function getVariableDeclarator(
 	node: AstTypes.VariableDeclaration,
-	handleName: string
+	variableName: string
 ): AstTypes.VariableDeclarator | undefined {
 	return node.declarations.find(
-		(d) => d.type === 'VariableDeclarator' && d.id.type === 'Identifier' && d.id.name === handleName
+		(d) =>
+			d.type === 'VariableDeclarator' && d.id.type === 'Identifier' && d.id.name === variableName
 	) as AstTypes.VariableDeclarator | undefined;
 }
 
diff --git a/packages/core/tooling/js/object.ts b/packages/core/tooling/js/object.ts
index 8ff2b49..cd65a17 100644
--- a/packages/core/tooling/js/object.ts
+++ b/packages/core/tooling/js/object.ts
@@ -1,35 +1,34 @@
-import type { Expression } from 'estree';
 import type { AstTypes } from '../index.ts';
-import { array, common } from './index.ts';
+import * as array from './array.ts';
+import * as common from './common.ts';
 
 export function property<T extends AstTypes.Expression | AstTypes.Identifier>(
-	ast: AstTypes.ObjectExpression,
-	name: string,
-	fallback: T
+	node: AstTypes.ObjectExpression,
+	options: {
+		name: string;
+		fallback: T;
+	}
 ): T {
-	const objectExpression = ast;
-	const properties = objectExpression.properties.filter(
-		(x): x is AstTypes.Property => x.type === 'Property'
-	);
-	let property = properties.find((x) => (x.key as AstTypes.Identifier).name === name);
+	const properties = node.properties.filter((x): x is AstTypes.Property => x.type === 'Property');
+	let prop = properties.find((x) => (x.key as AstTypes.Identifier).name === options.name);
 	let propertyValue: T;
 
-	if (property) {
-		propertyValue = property.value as T;
+	if (prop) {
+		propertyValue = prop.value as T;
 	} else {
 		let isShorthand = false;
-		if (fallback.type === 'Identifier') {
-			const identifier: AstTypes.Identifier = fallback;
-			isShorthand = identifier.name === name;
+		if (options.fallback.type === 'Identifier') {
+			const identifier: AstTypes.Identifier = options.fallback;
+			isShorthand = identifier.name === options.name;
 		}
 
-		propertyValue = fallback;
-		property = {
+		propertyValue = options.fallback;
+		prop = {
 			type: 'Property',
 			shorthand: isShorthand,
 			key: {
 				type: 'Identifier',
-				name
+				name: options.name
 			},
 			value: propertyValue,
 			kind: 'init',
@@ -37,110 +36,109 @@ export function property<T extends AstTypes.Expression | AstTypes.Identifier>(
 			method: false
 		};
 
-		objectExpression.properties.push(property);
+		node.properties.push(prop);
 	}
 
 	return propertyValue;
 }
 
 export function overrideProperty<T extends AstTypes.Expression>(
-	ast: AstTypes.ObjectExpression,
-	name: string,
-	value: T
+	node: AstTypes.ObjectExpression,
+	options: {
+		name: string;
+		value: T;
+	}
 ): T {
-	const objectExpression = ast;
-	const properties = objectExpression.properties.filter(
-		(x): x is AstTypes.Property => x.type === 'Property'
-	);
-	const prop = properties.find((x) => (x.key as AstTypes.Identifier).name === name);
+	const properties = node.properties.filter((x): x is AstTypes.Property => x.type === 'Property');
+	const prop = properties.find((x) => (x.key as AstTypes.Identifier).name === options.name);
 
 	if (!prop) {
-		return property(ast, name, value);
+		return property(node, {
+			name: options.name,
+			fallback: options.value
+		});
 	}
 
-	prop.value = value;
+	prop.value = options.value;
 
-	return value;
+	return options.value;
 }
 
 export function overrideProperties<T extends AstTypes.Expression>(
-	ast: AstTypes.ObjectExpression,
-	obj: Record<string, T | undefined>
+	node: AstTypes.ObjectExpression,
+	options: {
+		properties: Record<string, T | undefined>;
+	}
 ): void {
-	for (const [prop, value] of Object.entries(obj)) {
+	for (const [prop, value] of Object.entries(options.properties)) {
 		if (value === undefined) continue;
-		overrideProperty(ast, prop, value);
+		overrideProperty(node, { name: prop, value });
 	}
 }
 
-export function properties<T extends AstTypes.Expression>(
-	ast: AstTypes.ObjectExpression,
-	obj: Record<string, T | undefined>
+export function addProperties<T extends AstTypes.Expression>(
+	node: AstTypes.ObjectExpression,
+	options: {
+		properties: Record<string, T | undefined>;
+	}
 ): void {
-	for (const [prop, value] of Object.entries(obj)) {
+	for (const [prop, value] of Object.entries(options.properties)) {
 		if (value === undefined) continue;
-		property(ast, prop, value);
+		property(node, {
+			name: prop,
+			fallback: value
+		});
 	}
 }
 
-export function removeProperty(ast: AstTypes.ObjectExpression, property: string): void {
-	const properties = ast.properties.filter((x): x is AstTypes.Property => x.type === 'Property');
-	const propIdx = properties.findIndex((x) => (x.key as AstTypes.Identifier).name === property);
+export function removeProperty(
+	node: AstTypes.ObjectExpression,
+	options: {
+		name: string;
+	}
+): void {
+	const properties = node.properties.filter((x): x is AstTypes.Property => x.type === 'Property');
+	const propIdx = properties.findIndex((x) => (x.key as AstTypes.Identifier).name === options.name);
 
 	if (propIdx !== -1) {
-		ast.properties.splice(propIdx, 1);
+		node.properties.splice(propIdx, 1);
 	}
 }
 
-export function create<T extends AstTypes.Expression>(
-	obj: Record<string, T | undefined>
-): AstTypes.ObjectExpression {
-	const objExpression = createEmpty();
+type ObjectPrimitiveValues = string | number | boolean | undefined | null;
+type ObjectValues = ObjectPrimitiveValues | Record<string, any> | ObjectValues[];
+type ObjectMap = Record<string, ObjectValues | AstTypes.Expression>;
 
-	for (const [prop, value] of Object.entries(obj)) {
-		if (value === undefined) continue;
-		property(objExpression, prop, value);
-	}
-
-	return objExpression;
-}
-
-type ObjectPrimitiveValues = string | number | boolean | undefined;
-type ObjectValues = ObjectPrimitiveValues | ObjectMap | ObjectValues[];
-type ObjectMap = { [property: string]: ObjectValues };
-
-// todo: potentially make this the default `create` method in the future
-export function createFromPrimitives(obj: ObjectMap): AstTypes.ObjectExpression {
-	const objExpression = createEmpty();
+export function create(properties: ObjectMap): AstTypes.ObjectExpression {
+	const objExpression: AstTypes.ObjectExpression = {
+		type: 'ObjectExpression',
+		properties: []
+	};
 
-	const getExpression = (value: ObjectValues) => {
-		let expression: Expression;
+	const getExpression = (value: any): AstTypes.Expression => {
+		let expression: AstTypes.Expression;
 		if (Array.isArray(value)) {
-			expression = array.createEmpty();
+			expression = array.create();
 			for (const v of value) {
-				array.push(expression, getExpression(v));
+				array.append(expression, getExpression(v));
 			}
 		} else if (typeof value === 'object' && value !== null) {
-			expression = createFromPrimitives(value);
+			// if the type property is defined, we assume it's an AST type
+			expression = value.type !== undefined ? (value as AstTypes.Expression) : create(value);
 		} else {
 			expression = common.createLiteral(value);
 		}
 		return expression;
 	};
 
-	for (const [prop, value] of Object.entries(obj)) {
+	for (const [prop, value] of Object.entries(properties)) {
 		if (value === undefined) continue;
 
-		property(objExpression, prop, getExpression(value));
+		property(objExpression, {
+			name: prop,
+			fallback: getExpression(value)
+		});
 	}
 
 	return objExpression;
 }
-
-export function createEmpty(): AstTypes.ObjectExpression {
-	const objectExpression: AstTypes.ObjectExpression = {
-		type: 'ObjectExpression',
-		properties: []
-	};
-	return objectExpression;
-}
diff --git a/packages/core/tooling/js/variables.ts b/packages/core/tooling/js/variables.ts
index bd652df..88af68d 100644
--- a/packages/core/tooling/js/variables.ts
+++ b/packages/core/tooling/js/variables.ts
@@ -1,34 +1,36 @@
 import type { AstTypes } from '../index.ts';
 
 export function declaration(
-	ast: AstTypes.Program | AstTypes.Declaration,
-	kind: 'const' | 'let' | 'var',
-	name: string,
-	value: AstTypes.Expression
+	node: AstTypes.Program | AstTypes.Declaration,
+	options: {
+		kind: 'const' | 'let' | 'var';
+		name: string;
+		value: AstTypes.Expression;
+	}
 ): AstTypes.VariableDeclaration {
 	const declarations =
-		ast.type === 'Program'
-			? ast.body.filter((x): x is AstTypes.VariableDeclaration => x.type === 'VariableDeclaration')
-			: [ast as AstTypes.VariableDeclaration];
+		node.type === 'Program'
+			? node.body.filter((x): x is AstTypes.VariableDeclaration => x.type === 'VariableDeclaration')
+			: [node as AstTypes.VariableDeclaration];
 	let declaration = declarations.find((x) => {
 		const declarator = x.declarations[0] as AstTypes.VariableDeclarator;
 		const identifier = declarator.id as AstTypes.Identifier;
-		return identifier.name === name;
+		return identifier.name === options.name;
 	});
 
 	if (declaration) return declaration;
 
 	declaration = {
 		type: 'VariableDeclaration',
-		kind,
+		kind: options.kind,
 		declarations: [
 			{
 				type: 'VariableDeclarator',
 				id: {
 					type: 'Identifier',
-					name
+					name: options.name
 				},
-				init: value
+				init: options.value
 			}
 		]
 	};
@@ -36,7 +38,7 @@ export function declaration(
 	return declaration;
 }
 
-export function identifier(name: string): AstTypes.Identifier {
+export function createIdentifier(name: string): AstTypes.Identifier {
 	const identifier: AstTypes.Identifier = {
 		type: 'Identifier',
 		name
@@ -46,7 +48,9 @@ export function identifier(name: string): AstTypes.Identifier {
 
 export function typeAnnotateDeclarator(
 	node: AstTypes.VariableDeclarator,
-	typeName: string
+	options: {
+		typeName: string;
+	}
 ): AstTypes.VariableDeclarator {
 	if (node.id.type === 'Identifier') {
 		node.id.typeAnnotation = {
@@ -55,7 +59,7 @@ export function typeAnnotateDeclarator(
 				type: 'TSTypeReference',
 				typeName: {
 					type: 'Identifier',
-					name: typeName
+					name: options.typeName
 				}
 			}
 		};
diff --git a/packages/migrate/migrations/self-closing-tags/migrate.spec.js b/packages/migrate/migrations/self-closing-tags/migrate.spec.js
index 421f005..c8baf8e 100644
--- a/packages/migrate/migrations/self-closing-tags/migrate.spec.js
+++ b/packages/migrate/migrations/self-closing-tags/migrate.spec.js
@@ -17,7 +17,7 @@ const tests = {
 	'<slot />': '<slot />',
 	'<svelte:options customElement="my-element" /><slot />':
 		'<svelte:options customElement="my-element" /><slot></slot>',
-	'<svelte:options namespace="foreign" /><foo />': '<svelte:options namespace="foreign" /><foo />',
+	'<svelte:options namespace="html" /><Foo />': '<svelte:options namespace="html" /><Foo />',
 	'<script>console.log("<div />")</script>': '<script>console.log("<div />")</script>',
 	'<script lang="ts">let a: string = ""</script><div />':
 		'<script lang="ts">let a: string = ""</script><div></div>',
diff --git a/packages/migrate/package.json b/packages/migrate/package.json
index 5b9d291..33ef375 100644
--- a/packages/migrate/package.json
+++ b/packages/migrate/package.json
@@ -42,7 +42,7 @@
 		"@types/node": "^18.19.112",
 		"@types/prompts": "^2.4.9",
 		"@types/semver": "^7.7.0",
-		"svelte": "^4.2.20"
+		"svelte": "^5.34.0"
 	},
 	"keywords": [
 		"migration",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 49c3bda..959d7df 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -19,7 +19,7 @@ importers:
         version: link:packages/create
       '@sveltejs/eslint-config':
         specifier: ^8.2.0
-        version: 8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.13.1(eslint@9.29.0))(eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.6))(eslint@9.29.0)(typescript-eslint@8.34.1(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3)
+        version: 8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.13.1(eslint@9.29.0))(eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.7))(eslint@9.29.0)(typescript-eslint@8.34.1(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3)
       '@svitejs/changesets-changelog-github-compact':
         specifier: ^1.2.0
         version: 1.2.0
@@ -34,7 +34,7 @@ importers:
         version: 9.29.0
       eslint-plugin-svelte:
         specifier: ^3.9.2
-        version: 3.9.2(eslint@9.29.0)(svelte@5.34.6)
+        version: 3.9.2(eslint@9.29.0)(svelte@5.34.7)
       magic-string:
         specifier: ^0.30.17
         version: 0.30.17
@@ -46,7 +46,7 @@ importers:
         version: 2.5.15(prettier@3.5.3)
       prettier-plugin-svelte:
         specifier: ^3.4.0
-        version: 3.4.0(prettier@3.5.3)(svelte@5.34.6)
+        version: 3.4.0(prettier@3.5.3)(svelte@5.34.7)
       rolldown:
         specifier: 1.0.0-beta.1
         version: 1.0.0-beta.1(@babel/runtime@7.27.6)
@@ -55,7 +55,7 @@ importers:
         version: link:packages/cli
       svelte:
         specifier: ^5.34.6
-        version: 5.34.6
+        version: 5.34.7
       typescript:
         specifier: ^5.8.3
         version: 5.8.3
@@ -249,8 +249,8 @@ importers:
         specifier: ^7.7.0
         version: 7.7.0
       svelte:
-        specifier: ^4.2.20
-        version: 4.2.20
+        specifier: ^5.34.0
+        version: 5.34.7
 
 packages:
 
@@ -1088,9 +1088,6 @@ packages:
   code-block-writer@13.0.3:
     resolution: {integrity: sha512-Oofo0pq3IKnsFtuHqSF7TqBfr71aeyZDVJ0HpmqB7FBM2qEigL0iPONSCZSO9pE9dZTAxANe5XHG9Uy0YMv8cg==}
 
-  code-red@1.0.4:
-    resolution: {integrity: sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==}
-
   color-convert@2.0.1:
     resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==}
     engines: {node: '>=7.0.0'}
@@ -1113,10 +1110,6 @@ packages:
     resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==}
     engines: {node: '>= 8'}
 
-  css-tree@2.3.1:
-    resolution: {integrity: sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==}
-    engines: {node: ^10 || ^12.20.0 || ^14.13.0 || >=15.0.0}
-
   cssesc@3.0.0:
     resolution: {integrity: sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==}
     engines: {node: '>=4'}
@@ -1604,9 +1597,6 @@ packages:
   map-stream@0.1.0:
     resolution: {integrity: sha512-CkYQrPYZfWnu/DAmVCpTSX/xHpKZ80eKh2lAkyA6AJTef6bW+6JpbQZN5rofum7da+SyN1bi5ctTm+lTfcCW3g==}
 
-  mdn-data@2.0.30:
-    resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==}
-
   merge2@1.4.1:
     resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==}
     engines: {node: '>= 8'}
@@ -1742,9 +1732,6 @@ packages:
   pause-stream@0.0.11:
     resolution: {integrity: sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==}
 
-  periscopic@3.1.0:
-    resolution: {integrity: sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==}
-
   picocolors@1.1.1:
     resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
 
@@ -1993,12 +1980,8 @@ packages:
       svelte:
         optional: true
 
-  svelte@4.2.20:
-    resolution: {integrity: sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q==}
-    engines: {node: '>=16'}
-
-  svelte@5.34.6:
-    resolution: {integrity: sha512-dNhOyaHEHXItGojz2e6aCeoU0FUD+teDcbqJkPI/iMBMKwP9MyHtXYRKIzN4ehlBnLB6Do0pUY0RUSZQ/Zpcog==}
+  svelte@5.34.7:
+    resolution: {integrity: sha512-5PEg+QQKce4t1qiOtVUhUS3AQRTtxJyGBTpxLcNWnr0Ve8q4r06bMo0Gv8uhtCPWlztZHoi3Ye7elLhu+PCTMg==}
     engines: {node: '>=18'}
 
   synckit@0.11.8:
@@ -2790,13 +2773,13 @@ snapshots:
     dependencies:
       acorn: 8.15.0
 
-  '@sveltejs/eslint-config@8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.13.1(eslint@9.29.0))(eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.6))(eslint@9.29.0)(typescript-eslint@8.34.1(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3)':
+  '@sveltejs/eslint-config@8.2.0(@stylistic/eslint-plugin-js@2.10.1(eslint@9.29.0))(eslint-config-prettier@9.1.0(eslint@9.29.0))(eslint-plugin-n@17.13.1(eslint@9.29.0))(eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.7))(eslint@9.29.0)(typescript-eslint@8.34.1(eslint@9.29.0)(typescript@5.8.3))(typescript@5.8.3)':
     dependencies:
       '@stylistic/eslint-plugin-js': 2.10.1(eslint@9.29.0)
       eslint: 9.29.0
       eslint-config-prettier: 9.1.0(eslint@9.29.0)
       eslint-plugin-n: 17.13.1(eslint@9.29.0)
-      eslint-plugin-svelte: 3.9.2(eslint@9.29.0)(svelte@5.34.6)
+      eslint-plugin-svelte: 3.9.2(eslint@9.29.0)(svelte@5.34.7)
       globals: 15.15.0
       typescript: 5.8.3
       typescript-eslint: 8.34.1(eslint@9.29.0)(typescript@5.8.3)
@@ -3082,14 +3065,6 @@ snapshots:
 
   code-block-writer@13.0.3: {}
 
-  code-red@1.0.4:
-    dependencies:
-      '@jridgewell/sourcemap-codec': 1.5.0
-      '@types/estree': 1.0.8
-      acorn: 8.15.0
-      estree-walker: 3.0.3
-      periscopic: 3.1.0
-
   color-convert@2.0.1:
     dependencies:
       color-name: 1.1.4
@@ -3108,11 +3083,6 @@ snapshots:
       shebang-command: 2.0.0
       which: 2.0.2
 
-  css-tree@2.3.1:
-    dependencies:
-      mdn-data: 2.0.30
-      source-map-js: 1.2.1
-
   cssesc@3.0.0: {}
 
   dataloader@1.4.0: {}
@@ -3243,7 +3213,7 @@ snapshots:
       minimatch: 9.0.5
       semver: 7.7.2
 
-  eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.6):
+  eslint-plugin-svelte@3.9.2(eslint@9.29.0)(svelte@5.34.7):
     dependencies:
       '@eslint-community/eslint-utils': 4.7.0(eslint@9.29.0)
       '@jridgewell/sourcemap-codec': 1.5.0
@@ -3255,9 +3225,9 @@ snapshots:
       postcss-load-config: 3.1.4(postcss@8.5.6)
       postcss-safe-parser: 7.0.1(postcss@8.5.6)
       semver: 7.7.2
-      svelte-eslint-parser: 1.2.0(svelte@5.34.6)
+      svelte-eslint-parser: 1.2.0(svelte@5.34.7)
     optionalDependencies:
-      svelte: 5.34.6
+      svelte: 5.34.7
     transitivePeerDependencies:
       - ts-node
 
@@ -3602,8 +3572,6 @@ snapshots:
 
   map-stream@0.1.0: {}
 
-  mdn-data@2.0.30: {}
-
   merge2@1.4.1: {}
 
   micromatch@4.0.8:
@@ -3724,12 +3692,6 @@ snapshots:
     dependencies:
       through: 2.3.8
 
-  periscopic@3.1.0:
-    dependencies:
-      '@types/estree': 1.0.8
-      estree-walker: 3.0.3
-      is-reference: 3.0.3
-
   picocolors@1.1.1: {}
 
   picomatch@2.3.1: {}
@@ -3783,10 +3745,10 @@ snapshots:
     optionalDependencies:
       prettier: 3.5.3
 
-  prettier-plugin-svelte@3.4.0(prettier@3.5.3)(svelte@5.34.6):
+  prettier-plugin-svelte@3.4.0(prettier@3.5.3)(svelte@5.34.7):
     dependencies:
       prettier: 3.5.3
-      svelte: 5.34.6
+      svelte: 5.34.7
 
   prettier@2.8.8: {}
 
@@ -3962,7 +3924,7 @@ snapshots:
     dependencies:
       has-flag: 4.0.0
 
-  svelte-eslint-parser@1.2.0(svelte@5.34.6):
+  svelte-eslint-parser@1.2.0(svelte@5.34.7):
     dependencies:
       eslint-scope: 8.4.0
       eslint-visitor-keys: 4.2.1
@@ -3971,26 +3933,9 @@ snapshots:
       postcss-scss: 4.0.9(postcss@8.5.6)
       postcss-selector-parser: 7.1.0
     optionalDependencies:
-      svelte: 5.34.6
-
-  svelte@4.2.20:
-    dependencies:
-      '@ampproject/remapping': 2.3.0
-      '@jridgewell/sourcemap-codec': 1.5.0
-      '@jridgewell/trace-mapping': 0.3.25
-      '@types/estree': 1.0.8
-      acorn: 8.15.0
-      aria-query: 5.3.2
-      axobject-query: 4.1.0
-      code-red: 1.0.4
-      css-tree: 2.3.1
-      estree-walker: 3.0.3
-      is-reference: 3.0.3
-      locate-character: 3.0.0
-      magic-string: 0.30.17
-      periscopic: 3.1.0
+      svelte: 5.34.7
 
-  svelte@5.34.6:
+  svelte@5.34.7:
     dependencies:
       '@ampproject/remapping': 2.3.0
       '@jridgewell/sourcemap-codec': 1.5.0


Test patch:
diff --git a/packages/addons/_tests/eslint/test.ts b/packages/addons/_tests/eslint/test.ts
index c25ccc1..34e9a45 100644
--- a/packages/addons/_tests/eslint/test.ts
+++ b/packages/addons/_tests/eslint/test.ts
@@ -19,7 +19,7 @@ test.concurrent.for(variants)('core - %s', async (variant, { page, ...ctx }) =>
 
 	expect(() => execSync('pnpm lint', { cwd, stdio: 'pipe' })).toThrowError();
 
-	expect(() => execSync('pnpm eslint --fix .', { cwd, stdio: 'pipe' })).not.toThrowError();
+	expect(() => execSync('pnpm eslint --fix .', { cwd, stdio: 'inherit' })).not.toThrowError();
 
 	expect(() => execSync('pnpm lint', { cwd, stdio: 'pipe' })).not.toThrowError();
 });
diff --git a/packages/addons/_tests/mdsvex/test.ts b/packages/addons/_tests/mdsvex/test.ts
index 13f71ab..655432c 100644
--- a/packages/addons/_tests/mdsvex/test.ts
+++ b/packages/addons/_tests/mdsvex/test.ts
@@ -38,11 +38,11 @@ function addFixture(cwd: string, variant: string) {
 
 	const src = fs.readFileSync(page, 'utf8');
 	const { script, template, generateCode } = parseSvelte(src);
-	imports.addDefault(script.ast, './Demo.svx', 'Demo');
+	imports.addDefault(script.ast, { from: './Demo.svx', as: 'Demo' });
 
-	const div = html.div({ class: 'mdsvex' });
+	const div = html.createDiv({ class: 'mdsvex' });
 	html.appendElement(template.ast.childNodes, div);
-	const mdsvexNode = html.element('Demo');
+	const mdsvexNode = html.createElement('Demo');
 	html.appendElement(div.childNodes, mdsvexNode);
 
 	const content = generateCode({
diff --git a/packages/addons/vitest-addon/index.ts b/packages/addons/vitest-addon/index.ts
index 7a3637c..0c844a6 100644
--- a/packages/addons/vitest-addon/index.ts
+++ b/packages/addons/vitest-addon/index.ts
@@ -96,11 +96,10 @@ export default defineAddon({
 				`;
 			});
 		}
-
 		sv.file(`vite.config.${ext}`, (content) => {
 			const { ast, generateCode } = parseScript(content);
 
-			const clientObjectExpression = object.createFromPrimitives({
+			const clientObjectExpression = object.create({
 				extends: `./vite.config.${ext}`,
 				test: {
 					name: 'client',
@@ -116,7 +115,7 @@ export default defineAddon({
 				}
 			});
 
-			const serverObjectExpression = object.createFromPrimitives({
+			const serverObjectExpression = object.create({
 				extends: `./vite.config.${ext}`,
 				test: {
 					name: 'server',
@@ -126,19 +125,30 @@ export default defineAddon({
 				}
 			});
 
-			const defineConfigFallback = functions.call('defineConfig', []);
-			const { value: defineWorkspaceCall } = exports.defaultExport(ast, defineConfigFallback);
+			const defineConfigFallback = functions.createCall({ name: 'defineConfig', args: [] });
+			const { value: defineWorkspaceCall } = exports.createDefault(ast, {
+				fallback: defineConfigFallback
+			});
 			if (defineWorkspaceCall.type !== 'CallExpression') {
 				log.warn('Unexpected vite config. Could not update.');
 			}
 
-			const vitestConfig = functions.argumentByIndex(defineWorkspaceCall, 0, object.createEmpty());
-			const testObject = object.property(vitestConfig, 'test', object.createEmpty());
+			const vitestConfig = functions.getArgument(defineWorkspaceCall, {
+				index: 0,
+				fallback: object.create({})
+			});
+			const testObject = object.property(vitestConfig, {
+				name: 'test',
+				fallback: object.create({})
+			});
 
-			const workspaceArray = object.property(testObject, 'projects', array.createEmpty());
+			const workspaceArray = object.property(testObject, {
+				name: 'projects',
+				fallback: array.create()
+			});
 
-			if (componentTesting) array.push(workspaceArray, clientObjectExpression);
-			if (unitTesting) array.push(workspaceArray, serverObjectExpression);
+			if (componentTesting) array.append(workspaceArray, clientObjectExpression);
+			if (unitTesting) array.append(workspaceArray, serverObjectExpression);
 
 			return generateCode();
 		});
diff --git a/packages/core/tests/css/common/add-at-rule/run.ts b/packages/core/tests/css/common/add-at-rule/run.ts
index 72b86e9..29eb693 100644
--- a/packages/core/tests/css/common/add-at-rule/run.ts
+++ b/packages/core/tests/css/common/add-at-rule/run.ts
@@ -1,6 +1,6 @@
 import { addAtRule, type CssAst } from '@sveltejs/cli-core/css';
 
 export function run(ast: CssAst): void {
-	addAtRule(ast, 'tailwind', "'lib/path/file.ext'", false);
-	addAtRule(ast, 'tailwind', "'lib/path/file1.ext'", true);
+	addAtRule(ast, { name: 'tailwind', params: "'lib/path/file.ext'", append: false });
+	addAtRule(ast, { name: 'tailwind', params: "'lib/path/file1.ext'", append: true });
 }
diff --git a/packages/core/tests/css/common/add-comment/run.ts b/packages/core/tests/css/common/add-comment/run.ts
index d0c8659..00cc6b2 100644
--- a/packages/core/tests/css/common/add-comment/run.ts
+++ b/packages/core/tests/css/common/add-comment/run.ts
@@ -1,5 +1,5 @@
 import { addComment, type CssAst } from '@sveltejs/cli-core/css';
 
 export function run(ast: CssAst): void {
-	addComment(ast, 'foo comment');
+	addComment(ast, { value: 'foo comment' });
 }
diff --git a/packages/core/tests/css/common/add-imports/run.ts b/packages/core/tests/css/common/add-imports/run.ts
index 85c871e..54ee93d 100644
--- a/packages/core/tests/css/common/add-imports/run.ts
+++ b/packages/core/tests/css/common/add-imports/run.ts
@@ -1,5 +1,7 @@
 import { addImports, type CssAst } from '@sveltejs/cli-core/css';
 
 export function run(ast: CssAst): void {
-	addImports(ast, ["'lib/path/file.css'"]);
+	addImports(ast, {
+		imports: ["'lib/path/file.css'"]
+	});
 }
diff --git a/packages/core/tests/css/common/add-rule/run.ts b/packages/core/tests/css/common/add-rule/run.ts
index d911204..786055b 100644
--- a/packages/core/tests/css/common/add-rule/run.ts
+++ b/packages/core/tests/css/common/add-rule/run.ts
@@ -1,6 +1,11 @@
 import { addDeclaration, addRule, type CssAst } from '@sveltejs/cli-core/css';
 
 export function run(ast: CssAst): void {
-	const barSelectorRule = addRule(ast, '.bar');
-	addDeclaration(barSelectorRule, 'color', 'blue');
+	const barSelectorRule = addRule(ast, {
+		selector: '.bar'
+	});
+	addDeclaration(barSelectorRule, {
+		property: 'color',
+		value: 'blue'
+	});
 }
diff --git a/packages/core/tests/html/common/create-div/run.ts b/packages/core/tests/html/common/create-div/run.ts
index 4e4d964..26adf58 100644
--- a/packages/core/tests/html/common/create-div/run.ts
+++ b/packages/core/tests/html/common/create-div/run.ts
@@ -1,7 +1,12 @@
-import { div, appendElement, insertElement, type HtmlDocument } from '@sveltejs/cli-core/html';
+import {
+	createDiv,
+	appendElement,
+	insertElement,
+	type HtmlDocument
+} from '@sveltejs/cli-core/html';
 
 export function run(ast: HtmlDocument): void {
-	const emptyDiv = div();
+	const emptyDiv = createDiv();
 	insertElement(ast.childNodes, emptyDiv);
 	appendElement(ast.childNodes, emptyDiv);
 }
diff --git a/packages/core/tests/html/common/create-element/run.ts b/packages/core/tests/html/common/create-element/run.ts
index 99205f4..f3b2f6b 100644
--- a/packages/core/tests/html/common/create-element/run.ts
+++ b/packages/core/tests/html/common/create-element/run.ts
@@ -1,7 +1,12 @@
-import { element, appendElement, insertElement, type HtmlDocument } from '@sveltejs/cli-core/html';
+import {
+	createElement,
+	appendElement,
+	insertElement,
+	type HtmlDocument
+} from '@sveltejs/cli-core/html';
 
 export function run(ast: HtmlDocument): void {
-	const emptySpan = element('span');
+	const emptySpan = createElement('span');
 	insertElement(ast.childNodes, emptySpan);
 	appendElement(ast.childNodes, emptySpan);
 }
diff --git a/packages/core/tests/js/arrays/push-object-array/output.ts b/packages/core/tests/js/arrays/append-object-array/output.ts
similarity index 100%
rename from packages/core/tests/js/arrays/push-object-array/output.ts
rename to packages/core/tests/js/arrays/append-object-array/output.ts
diff --git a/packages/core/tests/js/arrays/append-object-array/run.ts b/packages/core/tests/js/arrays/append-object-array/run.ts
new file mode 100644
index 0000000..cfba227
--- /dev/null
+++ b/packages/core/tests/js/arrays/append-object-array/run.ts
@@ -0,0 +1,14 @@
+import { array, object, variables, type AstTypes } from '@sveltejs/cli-core/js';
+
+export function run(ast: AstTypes.Program): void {
+	const array1 = array.create();
+	const object1 = object.create({ test: true });
+	const object2 = object.create({ test2: 'string' });
+	array.append(array1, object1);
+	array.append(array1, object2);
+	array.append(array1, object2); // avoid duplication
+
+	// create declaration so that we serialize everything
+	const declaration = variables.declaration(ast, { kind: 'const', name: 'array', value: array1 });
+	ast.body.push(declaration);
+}
diff --git a/packages/core/tests/js/arrays/push-string-array/output.ts b/packages/core/tests/js/arrays/append-string-array/output.ts
similarity index 100%
rename from packages/core/tests/js/arrays/push-string-array/output.ts
rename to packages/core/tests/js/arrays/append-string-array/output.ts
diff --git a/packages/core/tests/js/arrays/append-string-array/run.ts b/packages/core/tests/js/arrays/append-string-array/run.ts
new file mode 100644
index 0000000..354fcb2
--- /dev/null
+++ b/packages/core/tests/js/arrays/append-string-array/run.ts
@@ -0,0 +1,16 @@
+import { array, variables, type AstTypes } from '@sveltejs/cli-core/js';
+
+export function run(ast: AstTypes.Program): void {
+	const array1 = array.create();
+	array.append(array1, 'test');
+	array.append(array1, 'test2');
+	array.append(array1, 'test'); // make sure items are not duplicated
+
+	// create declaration so that we serialize everything
+	const declaration = variables.declaration(ast, {
+		kind: 'const',
+		name: 'array',
+		value: array1
+	});
+	ast.body.push(declaration);
+}
diff --git a/packages/core/tests/js/arrays/empty-array/run.ts b/packages/core/tests/js/arrays/empty-array/run.ts
index 0d4241d..e5f0787 100644
--- a/packages/core/tests/js/arrays/empty-array/run.ts
+++ b/packages/core/tests/js/arrays/empty-array/run.ts
@@ -1,9 +1,13 @@
 import { array, variables, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const emptyArray = array.createEmpty();
+	const emptyArray = array.create();
 
 	// create declaration so that we serialize everything
-	const declaration = variables.declaration(ast, 'const', 'array', emptyArray);
+	const declaration = variables.declaration(ast, {
+		kind: 'const',
+		name: 'array',
+		value: emptyArray
+	});
 	ast.body.push(declaration);
 }
diff --git a/packages/core/tests/js/arrays/unshift-object-array/output.ts b/packages/core/tests/js/arrays/prepend-object-array/output.ts
similarity index 100%
rename from packages/core/tests/js/arrays/unshift-object-array/output.ts
rename to packages/core/tests/js/arrays/prepend-object-array/output.ts
diff --git a/packages/core/tests/js/arrays/prepend-object-array/run.ts b/packages/core/tests/js/arrays/prepend-object-array/run.ts
new file mode 100644
index 0000000..e3cf4d5
--- /dev/null
+++ b/packages/core/tests/js/arrays/prepend-object-array/run.ts
@@ -0,0 +1,15 @@
+import { array, object, variables, type AstTypes } from '@sveltejs/cli-core/js';
+
+export function run(ast: AstTypes.Program): void {
+	const array1 = array.create();
+
+	const object1 = object.create({ test: true });
+	const object2 = object.create({ test2: 'string' });
+	array.prepend(array1, object1);
+	array.prepend(array1, object2);
+	array.prepend(array1, object2); // avoid duplication
+
+	// create declaration so that we serialize everything
+	const declaration = variables.declaration(ast, { kind: 'const', name: 'array', value: array1 });
+	ast.body.push(declaration);
+}
diff --git a/packages/core/tests/js/arrays/unshift-string-array/output.ts b/packages/core/tests/js/arrays/prepend-string-array/output.ts
similarity index 100%
rename from packages/core/tests/js/arrays/unshift-string-array/output.ts
rename to packages/core/tests/js/arrays/prepend-string-array/output.ts
diff --git a/packages/core/tests/js/arrays/prepend-string-array/run.ts b/packages/core/tests/js/arrays/prepend-string-array/run.ts
new file mode 100644
index 0000000..7c3bcb8
--- /dev/null
+++ b/packages/core/tests/js/arrays/prepend-string-array/run.ts
@@ -0,0 +1,16 @@
+import { array, variables, type AstTypes } from '@sveltejs/cli-core/js';
+
+export function run(ast: AstTypes.Program): void {
+	const array1 = array.create();
+	array.prepend(array1, 'test');
+	array.prepend(array1, 'test2');
+	array.prepend(array1, 'test'); // make sure items are not duplicated
+
+	// create declaration so that we serialize everything
+	const declaration = variables.declaration(ast, {
+		kind: 'const',
+		name: 'array',
+		value: array1
+	});
+	ast.body.push(declaration);
+}
diff --git a/packages/core/tests/js/arrays/push-object-array/run.ts b/packages/core/tests/js/arrays/push-object-array/run.ts
deleted file mode 100644
index 26ba00e..0000000
--- a/packages/core/tests/js/arrays/push-object-array/run.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { array, object, common, variables, type AstTypes } from '@sveltejs/cli-core/js';
-
-export function run(ast: AstTypes.Program): void {
-	const array1 = array.createEmpty();
-
-	const object1 = object.create({ test: common.expressionFromString('true') });
-	const object2 = object.create({ test2: common.createLiteral('string') });
-	array.push(array1, object1);
-	array.push(array1, object2);
-	array.push(array1, object2); // avoid duplication
-
-	// create declaration so that we serialize everything
-	const declaration = variables.declaration(ast, 'const', 'array', array1);
-	ast.body.push(declaration);
-}
diff --git a/packages/core/tests/js/arrays/push-string-array/run.ts b/packages/core/tests/js/arrays/push-string-array/run.ts
deleted file mode 100644
index 80d5ea1..0000000
--- a/packages/core/tests/js/arrays/push-string-array/run.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { array, variables, type AstTypes } from '@sveltejs/cli-core/js';
-
-export function run(ast: AstTypes.Program): void {
-	const array1 = array.createEmpty();
-	array.push(array1, 'test');
-	array.push(array1, 'test2');
-	array.push(array1, 'test'); // make sure items are not duplicated
-
-	// create declaration so that we serialize everything
-	const declaration = variables.declaration(ast, 'const', 'array', array1);
-	ast.body.push(declaration);
-}
diff --git a/packages/core/tests/js/arrays/unshift-object-array/run.ts b/packages/core/tests/js/arrays/unshift-object-array/run.ts
deleted file mode 100644
index 7cbb780..0000000
--- a/packages/core/tests/js/arrays/unshift-object-array/run.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { array, object, common, variables, type AstTypes } from '@sveltejs/cli-core/js';
-
-export function run(ast: AstTypes.Program): void {
-	const array1 = array.createEmpty();
-
-	const object1 = object.create({ test: common.expressionFromString('true') });
-	const object2 = object.create({ test2: common.createLiteral('string') });
-	array.unshift(array1, object1);
-	array.unshift(array1, object2);
-	array.unshift(array1, object2); // avoid duplication
-
-	// create declaration so that we serialize everything
-	const declaration = variables.declaration(ast, 'const', 'array', array1);
-	ast.body.push(declaration);
-}
diff --git a/packages/core/tests/js/arrays/unshift-string-array/run.ts b/packages/core/tests/js/arrays/unshift-string-array/run.ts
deleted file mode 100644
index 7767c2e..0000000
--- a/packages/core/tests/js/arrays/unshift-string-array/run.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { array, variables, type AstTypes } from '@sveltejs/cli-core/js';
-
-export function run(ast: AstTypes.Program): void {
-	const array1 = array.createEmpty();
-	array.unshift(array1, 'test');
-	array.unshift(array1, 'test2');
-	array.unshift(array1, 'test'); // make sure items are not duplicated
-
-	// create declaration so that we serialize everything
-	const declaration = variables.declaration(ast, 'const', 'array', array1);
-	ast.body.push(declaration);
-}
diff --git a/packages/core/tests/js/common/expression-from-string/run.ts b/packages/core/tests/js/common/expression-from-string/run.ts
index f831db6..db22a93 100644
--- a/packages/core/tests/js/common/expression-from-string/run.ts
+++ b/packages/core/tests/js/common/expression-from-string/run.ts
@@ -1,13 +1,12 @@
 import { common, exports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	exports.defaultExport(
-		ast,
-		common.expressionFromString(`
+	exports.createDefault(ast, {
+		fallback: common.parseExpression(`
 			defineConfig({
 				path: "some/string/as/path.js",
 				valid: true
 			})
 		`)
-	);
+	});
 }
diff --git a/packages/core/tests/js/common/jsdoc-comment/run.ts b/packages/core/tests/js/common/jsdoc-comment/run.ts
index 169d668..c0b6c06 100644
--- a/packages/core/tests/js/common/jsdoc-comment/run.ts
+++ b/packages/core/tests/js/common/jsdoc-comment/run.ts
@@ -4,6 +4,6 @@ export function run(ast: AstTypes.Program): void {
 	const functionDeclaration = ast.body[0] as AstTypes.FunctionDeclaration;
 
 	common.addJsDocComment(functionDeclaration, {
-		'import("$lib/paraglide/runtime").AvailableLanguageTag': 'newLanguage'
+		params: { 'import("$lib/paraglide/runtime").AvailableLanguageTag': 'newLanguage' }
 	});
 }
diff --git a/packages/core/tests/js/common/jsdoc-type-comment/run.ts b/packages/core/tests/js/common/jsdoc-type-comment/run.ts
index 9bcf000..9b5e5a0 100644
--- a/packages/core/tests/js/common/jsdoc-type-comment/run.ts
+++ b/packages/core/tests/js/common/jsdoc-type-comment/run.ts
@@ -1,9 +1,15 @@
 import { common, variables, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const declaration = variables.declaration(ast, 'const', 'foo', { type: 'Literal', value: 42 });
+	const declaration = variables.declaration(ast, {
+		kind: 'const',
+		name: 'foo',
+		value: { type: 'Literal', value: 42 }
+	});
 
-	common.addJsDocTypeComment(declaration, 'number');
+	common.addJsDocTypeComment(declaration, {
+		type: 'number'
+	});
 
 	ast.body.push(declaration);
 }
diff --git a/packages/core/tests/js/exports/default-export-with-variable/run.ts b/packages/core/tests/js/exports/default-export-with-variable/run.ts
index 6515509..757a244 100644
--- a/packages/core/tests/js/exports/default-export-with-variable/run.ts
+++ b/packages/core/tests/js/exports/default-export-with-variable/run.ts
@@ -1,11 +1,17 @@
-import { object, common, variables, exports, type AstTypes } from '@sveltejs/cli-core/js';
+import { object, variables, exports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
 	const object1 = object.create({
-		test: common.createLiteral('string')
+		test: 'string'
+	});
+	const variable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'object',
+		value: object1
 	});
-	const variable = variables.declaration(ast, 'const', 'object', object1);
 	ast.body.push(variable);
 
-	exports.defaultExport(ast, variables.identifier('object'));
+	exports.createDefault(ast, {
+		fallback: variables.createIdentifier('object')
+	});
 }
diff --git a/packages/core/tests/js/exports/default-export/run.ts b/packages/core/tests/js/exports/default-export/run.ts
index 8e0d9fc..55089cb 100644
--- a/packages/core/tests/js/exports/default-export/run.ts
+++ b/packages/core/tests/js/exports/default-export/run.ts
@@ -1,9 +1,11 @@
-import { object, common, exports, type AstTypes } from '@sveltejs/cli-core/js';
+import { object, exports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
 	const object1 = object.create({
-		test: common.createLiteral('string')
+		test: 'string'
 	});
 
-	exports.defaultExport(ast, object1);
+	exports.createDefault(ast, {
+		fallback: object1
+	});
 }
diff --git a/packages/core/tests/js/exports/named-export-with-existing/run.ts b/packages/core/tests/js/exports/named-export-with-existing/run.ts
index fc0609f..1199894 100644
--- a/packages/core/tests/js/exports/named-export-with-existing/run.ts
+++ b/packages/core/tests/js/exports/named-export-with-existing/run.ts
@@ -1,12 +1,22 @@
 import { common, variables, object, exports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const variableFallback = variables.declaration(ast, 'const', 'variable', object.createEmpty());
+	const variableFallback = variables.declaration(ast, {
+		kind: 'const',
+		name: 'variable',
+		value: object.create({})
+	});
 
-	const existingExport = exports.namedExport(ast, 'named', variableFallback);
+	const existingExport = exports.createNamed(ast, {
+		name: 'named',
+		fallback: variableFallback
+	});
 	const variableDeclaration = existingExport?.declaration as AstTypes.VariableDeclaration;
 	const variableDeclarator = variableDeclaration.declarations[0] as AstTypes.VariableDeclarator;
 	const objectExpression = variableDeclarator.init as AstTypes.ObjectExpression;
 
-	object.property(objectExpression, 'test2', common.createLiteral('string2'));
+	object.property(objectExpression, {
+		name: 'test2',
+		fallback: common.createLiteral('string2')
+	});
 }
diff --git a/packages/core/tests/js/exports/named-export/run.ts b/packages/core/tests/js/exports/named-export/run.ts
index 67d468d..d7eec40 100644
--- a/packages/core/tests/js/exports/named-export/run.ts
+++ b/packages/core/tests/js/exports/named-export/run.ts
@@ -1,20 +1,28 @@
-import { common, variables, object, exports, type AstTypes } from '@sveltejs/cli-core/js';
+import { variables, object, exports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
 	const object1 = object.create({
-		test: common.createLiteral('string')
+		test: 'string'
+	});
+	const variable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'variable',
+		value: object1
 	});
-	const variable = variables.declaration(ast, 'const', 'variable', object1);
 
 	const object2 = object.create({
-		test2: common.createLiteral('string2')
+		test2: 'string2'
+	});
+	const variable2 = variables.declaration(ast, {
+		kind: 'const',
+		name: 'variable2',
+		value: object2
 	});
-	const variable2 = variables.declaration(ast, 'const', 'variable2', object2);
 
-	exports.namedExport(ast, 'variable', variable);
-	exports.namedExport(ast, 'variable2', variable2);
+	exports.createNamed(ast, { name: 'variable', fallback: variable });
+	exports.createNamed(ast, { name: 'variable2', fallback: variable2 });
 
 	// overriding should work
-	exports.namedExport(ast, 'variable', variable);
-	exports.namedExport(ast, 'variable2', variable2);
+	exports.createNamed(ast, { name: 'variable', fallback: variable });
+	exports.createNamed(ast, { name: 'variable2', fallback: variable2 });
 }
diff --git a/packages/core/tests/js/functions/arrow-function/run.ts b/packages/core/tests/js/functions/arrow-function/run.ts
index 5856f8b..680d0d9 100644
--- a/packages/core/tests/js/functions/arrow-function/run.ts
+++ b/packages/core/tests/js/functions/arrow-function/run.ts
@@ -1,19 +1,25 @@
 import { functions, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const insideExpression = common.expressionFromString("console.log('foo')");
-	const functionCall = functions.arrowFunction(false, insideExpression);
-	const expression = common.expressionStatement(functionCall);
+	const insideExpression = common.parseExpression("console.log('foo')");
+	const functionCall = functions.createArrow({
+		body: insideExpression,
+		async: false
+	});
+	const expression = common.createExpressionStatement({ expression: functionCall });
 	ast.body.push(expression);
 
-	const blockStatement = common.blockStatement();
-	const insideExpression2 = common.expressionFromString("console.log('foo');");
-	const insideExpression3 = common.expressionFromString("console.log('bar');");
-	const expression2 = common.expressionStatement(insideExpression2);
-	const expression3 = common.expressionStatement(insideExpression3);
+	const blockStatement = common.createBlockStatement();
+	const insideExpression2 = common.parseExpression("console.log('foo');");
+	const insideExpression3 = common.parseExpression("console.log('bar');");
+	const expression2 = common.createExpressionStatement({ expression: insideExpression2 });
+	const expression3 = common.createExpressionStatement({ expression: insideExpression3 });
 	blockStatement.body.push(expression2);
 	blockStatement.body.push(expression3);
-	const functionCall2 = functions.arrowFunction(false, blockStatement);
-	const expression4 = common.expressionStatement(functionCall2);
+	const functionCall2 = functions.createArrow({
+		body: blockStatement,
+		async: false
+	});
+	const expression4 = common.createExpressionStatement({ expression: functionCall2 });
 	ast.body.push(expression4);
 }
diff --git a/packages/core/tests/js/functions/function-call-by-identifier/run.ts b/packages/core/tests/js/functions/function-call-by-identifier/run.ts
index ebbb373..781a82a 100644
--- a/packages/core/tests/js/functions/function-call-by-identifier/run.ts
+++ b/packages/core/tests/js/functions/function-call-by-identifier/run.ts
@@ -1,7 +1,11 @@
 import { functions, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const functionCall = functions.callByIdentifier('foo', ['a']);
-	const expression = common.expressionStatement(functionCall);
+	const functionCall = functions.createCall({
+		name: 'foo',
+		args: ['a'],
+		useIdentifiers: true
+	});
+	const expression = common.createExpressionStatement({ expression: functionCall });
 	ast.body.push(expression);
 }
diff --git a/packages/core/tests/js/functions/function-call/run.ts b/packages/core/tests/js/functions/function-call/run.ts
index 41fe064..09f7bb9 100644
--- a/packages/core/tests/js/functions/function-call/run.ts
+++ b/packages/core/tests/js/functions/function-call/run.ts
@@ -1,7 +1,10 @@
 import { functions, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const functionCall = functions.call('foo', ['bar']);
-	const expression = common.expressionStatement(functionCall);
+	const functionCall = functions.createCall({
+		name: 'foo',
+		args: ['bar']
+	});
+	const expression = common.createExpressionStatement({ expression: functionCall });
 	ast.body.push(expression);
 }
diff --git a/packages/core/tests/js/imports/avoid-duplicating-imports/run.ts b/packages/core/tests/js/imports/avoid-duplicating-imports/run.ts
index faacdcd..a9af4af 100644
--- a/packages/core/tests/js/imports/avoid-duplicating-imports/run.ts
+++ b/packages/core/tests/js/imports/avoid-duplicating-imports/run.ts
@@ -1,7 +1,7 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addEmpty(ast, 'package/file.js');
-	imports.addDefault(ast, 'package', 'MyPackage');
-	imports.addNamed(ast, 'package2', { Named: 'Named' });
+	imports.addEmpty(ast, { from: 'package/file.js' });
+	imports.addDefault(ast, { from: 'package', as: 'MyPackage' });
+	imports.addNamed(ast, { from: 'package2', imports: { Named: 'Named' } });
 }
diff --git a/packages/core/tests/js/imports/default-import/run.ts b/packages/core/tests/js/imports/default-import/run.ts
index 7f50dd3..87a2809 100644
--- a/packages/core/tests/js/imports/default-import/run.ts
+++ b/packages/core/tests/js/imports/default-import/run.ts
@@ -1,5 +1,5 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addDefault(ast, 'package', 'MyPackage');
+	imports.addDefault(ast, { from: 'package', as: 'MyPackage' });
 }
diff --git a/packages/core/tests/js/imports/empty-import/run.ts b/packages/core/tests/js/imports/empty-import/run.ts
index 505bce3..6d2b5d9 100644
--- a/packages/core/tests/js/imports/empty-import/run.ts
+++ b/packages/core/tests/js/imports/empty-import/run.ts
@@ -1,8 +1,8 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addEmpty(ast, './relativ/file.css');
+	imports.addEmpty(ast, { from: './relativ/file.css' });
 
 	// allow importing from npm packages
-	imports.addEmpty(ast, 'package/file.css');
+	imports.addEmpty(ast, { from: 'package/file.css' });
 }
diff --git a/packages/core/tests/js/imports/named-import-merging/run.ts b/packages/core/tests/js/imports/named-import-merging/run.ts
index c6cb2c6..9bbe239 100644
--- a/packages/core/tests/js/imports/named-import-merging/run.ts
+++ b/packages/core/tests/js/imports/named-import-merging/run.ts
@@ -1,5 +1,5 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addNamed(ast, 'package', { namedTwo: 'namedTwo' }, false);
+	imports.addNamed(ast, { from: 'package', imports: { namedTwo: 'namedTwo' }, isType: false });
 }
diff --git a/packages/core/tests/js/imports/named-import/run.ts b/packages/core/tests/js/imports/named-import/run.ts
index f16bd0e..04f349c 100644
--- a/packages/core/tests/js/imports/named-import/run.ts
+++ b/packages/core/tests/js/imports/named-import/run.ts
@@ -1,9 +1,9 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addNamed(ast, 'package', { namedOne: 'namedOne' }, false);
+	imports.addNamed(ast, { from: 'package', imports: { namedOne: 'namedOne' }, isType: false });
 
-	imports.addNamed(ast, '@sveltejs/kit', { Handle: 'Handle' }, false);
+	imports.addNamed(ast, { from: '@sveltejs/kit', imports: { Handle: 'Handle' }, isType: false });
 	// adding the same import twice should not produce two imports
-	imports.addNamed(ast, '@sveltejs/kit', { Handle: 'Handle' }, false);
+	imports.addNamed(ast, { from: '@sveltejs/kit', imports: { Handle: 'Handle' }, isType: false });
 }
diff --git a/packages/core/tests/js/imports/namespaced-import/run.ts b/packages/core/tests/js/imports/namespaced-import/run.ts
index 7cf3989..2d4fea6 100644
--- a/packages/core/tests/js/imports/namespaced-import/run.ts
+++ b/packages/core/tests/js/imports/namespaced-import/run.ts
@@ -1,9 +1,9 @@
 import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	imports.addNamespace(ast, 'package', 'foo');
+	imports.addNamespace(ast, { from: 'package', as: 'foo' });
 
-	imports.addNamespace(ast, './some-file', 'bar');
+	imports.addNamespace(ast, { from: './some-file', as: 'bar' });
 	// adding the same import twice should not produce two imports
-	imports.addNamespace(ast, './some-file', 'bar');
+	imports.addNamespace(ast, { from: './some-file', as: 'bar' });
 }
diff --git a/packages/core/tests/js/imports/reverse-order/run.ts b/packages/core/tests/js/imports/reverse-order/run.ts
index d786161..9603da3 100644
--- a/packages/core/tests/js/imports/reverse-order/run.ts
+++ b/packages/core/tests/js/imports/reverse-order/run.ts
@@ -3,14 +3,14 @@ import { imports, type AstTypes } from '@sveltejs/cli-core/js';
 export function run(ast: AstTypes.Program): void {
 	// imports should be added HERE in the reverse order
 	// so that the imports are added from the top (unshift)
-	imports.addDefault(ast, 'p5', 'MyPackage');
-	imports.addEmpty(ast, 'p4');
-	imports.addNamed(ast, 'p3', { namedTwo: 'namedTwo' }, false);
-	imports.addNamespace(ast, './p2', 'bar');
-	imports.addNamespace(ast, 'p1', 'foo');
+	imports.addDefault(ast, { from: 'p5', as: 'MyPackage' });
+	imports.addEmpty(ast, { from: 'p4' });
+	imports.addNamed(ast, { from: 'p3', imports: { namedTwo: 'namedTwo' }, isType: false });
+	imports.addNamespace(ast, { from: './p2', as: 'bar' });
+	imports.addNamespace(ast, { from: 'p1', as: 'foo' });
 
 	// adding the same import twice should not produce two imports
-	imports.addNamespace(ast, './p2', 'bar');
+	imports.addNamespace(ast, { from: './p2', as: 'bar' });
 	// adding the same import for the 3rd time. Only the first one should be kept.
-	imports.addNamespace(ast, './p2', 'bar');
+	imports.addNamespace(ast, { from: './p2', as: 'bar' });
 }
diff --git a/packages/core/tests/js/object/create-from-primitives/output.ts b/packages/core/tests/js/object/create-from-primitives/output.ts
deleted file mode 100644
index b941979..0000000
--- a/packages/core/tests/js/object/create-from-primitives/output.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-const empty = {};
-
-// prettier-ignore
-const created = {
-	foo: 1,
-	bar: 'string',
-	object: { foo: 'hello', nested: { bar: 'world' } },
-	array: [
-		123,
-		'hello',
-		{ foo: 'bar', bool: true },
-		[456, '789']
-	]
-};
diff --git a/packages/core/tests/js/object/create-from-primitives/run.ts b/packages/core/tests/js/object/create-from-primitives/run.ts
deleted file mode 100644
index 8bd4598..0000000
--- a/packages/core/tests/js/object/create-from-primitives/run.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { variables, object, type AstTypes } from '@sveltejs/cli-core/js';
-
-export function run(ast: AstTypes.Program): void {
-	const emptyObject = object.createFromPrimitives({});
-	const emptyVariable = variables.declaration(ast, 'const', 'empty', emptyObject);
-	ast.body.push(emptyVariable);
-
-	const createdObject = object.createFromPrimitives({
-		foo: 1,
-		bar: 'string',
-		baz: undefined,
-		object: {
-			foo: 'hello',
-			nested: {
-				bar: 'world'
-			}
-		},
-		array: [123, 'hello', { foo: 'bar', bool: true }, [456, '789']]
-	});
-	const createdVariable = variables.declaration(ast, 'const', 'created', createdObject);
-	createdVariable.leadingComments = [{ type: 'Line', value: ' prettier-ignore' }];
-	ast.body.push(createdVariable);
-}
diff --git a/packages/core/tests/js/object/create/output.ts b/packages/core/tests/js/object/create/output.ts
index a633f4a..28ad96e 100644
--- a/packages/core/tests/js/object/create/output.ts
+++ b/packages/core/tests/js/object/create/output.ts
@@ -1,2 +1,15 @@
 const empty = {};
 const created = { foo: 1, bar: 'string' };
+
+// prettier-ignore
+const created2 = {
+	foo: 1,
+	bar: 'string',
+	object: { foo: 'hello', nested: { bar: 'world' } },
+	array: [
+		123,
+		'hello',
+		{ foo: 'bar', bool: true },
+		[456, '789']
+	]
+};
diff --git a/packages/core/tests/js/object/create/run.ts b/packages/core/tests/js/object/create/run.ts
index f5b51c3..8bdd272 100644
--- a/packages/core/tests/js/object/create/run.ts
+++ b/packages/core/tests/js/object/create/run.ts
@@ -1,14 +1,42 @@
 import { variables, object, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const emptyObject = object.createEmpty();
-	const emptyVariable = variables.declaration(ast, 'const', 'empty', emptyObject);
+	const emptyObject = object.create({});
+	const emptyVariable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'empty',
+		value: emptyObject
+	});
 	ast.body.push(emptyVariable);
 
 	const createdObject = object.create({
 		foo: common.createLiteral(1),
 		bar: common.createLiteral('string')
 	});
-	const createdVariable = variables.declaration(ast, 'const', 'created', createdObject);
+	const createdVariable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'created',
+		value: createdObject
+	});
 	ast.body.push(createdVariable);
+
+	const createdObject2 = object.create({
+		foo: 1,
+		bar: 'string',
+		baz: undefined,
+		object: {
+			foo: 'hello',
+			nested: {
+				bar: 'world'
+			}
+		},
+		array: [123, 'hello', { foo: 'bar', bool: true }, [456, '789']]
+	});
+	const createdVariable2 = variables.declaration(ast, {
+		kind: 'const',
+		name: 'created2',
+		value: createdObject2
+	});
+	createdVariable2.leadingComments = [{ type: 'Line', value: ' prettier-ignore' }];
+	ast.body.push(createdVariable2);
 }
diff --git a/packages/core/tests/js/object/override-property/run.ts b/packages/core/tests/js/object/override-property/run.ts
index 9f284df..29f513e 100644
--- a/packages/core/tests/js/object/override-property/run.ts
+++ b/packages/core/tests/js/object/override-property/run.ts
@@ -1,12 +1,21 @@
 import { variables, object, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const variable = variables.declaration(ast, 'const', 'test', object.createEmpty());
+	const variable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'test',
+		value: object.create({})
+	});
 	const objectDeclarator = variable.declarations[0] as AstTypes.VariableDeclarator;
 	const objectExpression = objectDeclarator.init as AstTypes.ObjectExpression;
-	object.overrideProperty(objectExpression, 'foo', common.createLiteral(2));
+	object.overrideProperty(objectExpression, {
+		name: 'foo',
+		value: common.createLiteral(2)
+	});
 	object.overrideProperties(objectExpression, {
-		bar: common.createLiteral('string2'),
-		lorem: common.createLiteral(false)
+		properties: {
+			bar: common.createLiteral('string2'),
+			lorem: common.createLiteral(false)
+		}
 	});
 }
diff --git a/packages/core/tests/js/object/property/run.ts b/packages/core/tests/js/object/property/run.ts
index 59866df..cf90f5e 100644
--- a/packages/core/tests/js/object/property/run.ts
+++ b/packages/core/tests/js/object/property/run.ts
@@ -1,9 +1,16 @@
 import { variables, object, common, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const variable = variables.declaration(ast, 'const', 'test', object.createEmpty());
+	const variable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'test',
+		value: object.create({})
+	});
 	const objectDeclarator = variable.declarations[0] as AstTypes.VariableDeclarator;
 	const objectExpression = objectDeclarator.init as AstTypes.ObjectExpression;
 
-	object.property(objectExpression, 'bar', common.createLiteral('string'));
+	object.property(objectExpression, {
+		name: 'bar',
+		fallback: common.createLiteral('string')
+	});
 }
diff --git a/packages/core/tests/js/object/remove-property/run.ts b/packages/core/tests/js/object/remove-property/run.ts
index d5c38e0..9f7f2b8 100644
--- a/packages/core/tests/js/object/remove-property/run.ts
+++ b/packages/core/tests/js/object/remove-property/run.ts
@@ -1,9 +1,13 @@
 import { variables, object, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const variable = variables.declaration(ast, 'const', 'test', object.createEmpty());
+	const variable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'test',
+		value: object.create({})
+	});
 	const objectDeclarator = variable.declarations[0] as AstTypes.VariableDeclarator;
 	const objectExpression = objectDeclarator.init as AstTypes.ObjectExpression;
-	object.removeProperty(objectExpression, 'foo');
-	object.removeProperty(objectExpression, 'bar');
+	object.removeProperty(objectExpression, { name: 'foo' });
+	object.removeProperty(objectExpression, { name: 'bar' });
 }
diff --git a/packages/core/tests/js/variables/declaration/run.ts b/packages/core/tests/js/variables/declaration/run.ts
index 01b7a04..a4a5bda 100644
--- a/packages/core/tests/js/variables/declaration/run.ts
+++ b/packages/core/tests/js/variables/declaration/run.ts
@@ -1,17 +1,20 @@
 import { variables, common, object, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const testNumberVariable = variables.declaration(
-		ast,
-		'const',
-		'testNumber',
-		common.createLiteral(2)
-	);
+	const testNumberVariable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'testNumber',
+		value: common.createLiteral(2)
+	});
 	ast.body.push(testNumberVariable);
 
 	const objectExpression = object.create({
-		foo: common.createLiteral('bar')
+		foo: 'bar'
+	});
+	const testObjectVariable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'testObject',
+		value: objectExpression
 	});
-	const testObjectVariable = variables.declaration(ast, 'const', 'testObject', objectExpression);
 	ast.body.push(testObjectVariable);
 }
diff --git a/packages/core/tests/js/variables/identifier/run.ts b/packages/core/tests/js/variables/identifier/run.ts
index 5ab8962..5cb2a14 100644
--- a/packages/core/tests/js/variables/identifier/run.ts
+++ b/packages/core/tests/js/variables/identifier/run.ts
@@ -1,6 +1,10 @@
 import { variables, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
-	const barVariable = variables.declaration(ast, 'const', 'bar', variables.identifier('foo'));
+	const barVariable = variables.declaration(ast, {
+		kind: 'const',
+		name: 'bar',
+		value: variables.createIdentifier('foo')
+	});
 	ast.body.push(barVariable);
 }
diff --git a/packages/core/tests/js/variables/type-annotate-declarator/run.ts b/packages/core/tests/js/variables/type-annotate-declarator/run.ts
index fc07460..b9cc154 100644
--- a/packages/core/tests/js/variables/type-annotate-declarator/run.ts
+++ b/packages/core/tests/js/variables/type-annotate-declarator/run.ts
@@ -2,6 +2,8 @@ import { variables, type AstTypes } from '@sveltejs/cli-core/js';
 
 export function run(ast: AstTypes.Program): void {
 	const decl = ast.body[0] as any;
-	const annotatedDecl = variables.typeAnnotateDeclarator(decl.declarations[0], 'string');
+	const annotatedDecl = variables.typeAnnotateDeclarator(decl.declarations[0], {
+		typeName: 'string'
+	});
 	decl.declarations[0] = annotatedDecl;
 }