Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update addon dependencies #357

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/late-rules-yell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'sv': patch
---

chore: update addon dependencies
25 changes: 12 additions & 13 deletions packages/addons/drizzle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,25 @@ export default defineAddon({
run: ({ sv, typescript, options, kit }) => {
const ext = typescript ? 'ts' : 'js';

sv.dependency('drizzle-orm', '^0.33.0');
sv.devDependency('drizzle-kit', '^0.22.0');
sv.dependency('drizzle-orm', '^0.38.2');
sv.devDependency('drizzle-kit', '^0.30.1');

// MySQL
if (options.mysql === 'mysql2') sv.dependency('mysql2', '^3.11.0');
if (options.mysql === 'planetscale') sv.dependency('@planetscale/database', '^1.18.0');
if (options.mysql === 'mysql2') sv.dependency('mysql2', '^3.11.5');
if (options.mysql === 'planetscale') sv.dependency('@planetscale/database', '^1.19.0');

// PostgreSQL
if (options.postgresql === 'neon') sv.dependency('@neondatabase/serverless', '^0.9.4');
if (options.postgresql === 'postgres.js') sv.dependency('postgres', '^3.4.4');
if (options.postgresql === 'neon') sv.dependency('@neondatabase/serverless', '^0.10.4');
if (options.postgresql === 'postgres.js') sv.dependency('postgres', '^3.4.5');

// SQLite
if (options.sqlite === 'better-sqlite3') {
sv.dependency('better-sqlite3', '^11.1.2');
sv.devDependency('@types/better-sqlite3', '^7.6.11');
sv.dependency('better-sqlite3', '^11.7.0');
sv.devDependency('@types/better-sqlite3', '^7.6.12');
}

if (options.sqlite === 'libsql' || options.sqlite === 'turso')
sv.dependency('@libsql/client', '^0.9.0');
sv.dependency('@libsql/client', '^0.14.0');

sv.file('.env', (content) => generateEnvFileContent(content, options));
sv.file('.env.example', (content) => generateEnvFileContent(content, options));
Expand Down Expand Up @@ -179,7 +179,6 @@ export default defineAddon({
const objExpression = exportDefault.arguments?.[0];
if (!objExpression || objExpression.type !== 'ObjectExpression') return content;

const driver = options.sqlite === 'turso' ? common.createLiteral('turso') : undefined;
const authToken =
options.sqlite === 'turso'
? common.expressionFromString('process.env.DATABASE_AUTH_TOKEN')
Expand All @@ -192,12 +191,12 @@ export default defineAddon({
authToken
}),
verbose: { type: 'BooleanLiteral', value: true },
strict: { type: 'BooleanLiteral', value: true },
driver
strict: { type: 'BooleanLiteral', value: true }
});

const dialect = options.sqlite === 'turso' ? 'turso' : options.database;
object.overrideProperties(objExpression, {
dialect: common.createLiteral(options.database)
dialect: common.createLiteral(dialect)
});

// The `driver` property is only required for _some_ sqlite DBs.
Expand Down
10 changes: 5 additions & 5 deletions packages/addons/eslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ export default defineAddon({
run: ({ sv, typescript, dependencyVersion }) => {
const prettierInstalled = Boolean(dependencyVersion('prettier'));

sv.devDependency('eslint', '^9.7.0');
sv.devDependency('@eslint/compat', '^1.2.3');
sv.devDependency('globals', '^15.0.0');
sv.devDependency('eslint-plugin-svelte', '^2.36.0');
sv.devDependency('eslint', '^9.17.0');
sv.devDependency('@eslint/compat', '^1.2.4');
sv.devDependency('globals', '^15.14.0');
sv.devDependency('eslint-plugin-svelte', '^2.46.1');

if (typescript) sv.devDependency('typescript-eslint', '^8.0.0');
if (typescript) sv.devDependency('typescript-eslint', '^8.18.1');

if (prettierInstalled) sv.devDependency('eslint-config-prettier', '^9.1.0');

Expand Down
2 changes: 1 addition & 1 deletion packages/addons/lucia/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default defineAddon({

if (options.demo) {
// password hashing for demo
sv.dependency('@node-rs/argon2', '^1.1.0');
sv.dependency('@node-rs/argon2', '^2.0.2');
}

sv.file(`drizzle.config.${ext}`, (content) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/mdsvex/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default defineAddon({
homepage: 'https://mdsvex.pngwn.io',
options: {},
run: ({ sv }) => {
sv.devDependency('mdsvex', '^0.11.2');
sv.devDependency('mdsvex', '^0.12.3');

sv.file('svelte.config.js', (content) => {
const { ast, generateCode } = parseScript(content);
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/paraglide/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default defineAddon({

const paraglideOutDir = 'src/lib/paraglide';

sv.dependency('@inlang/paraglide-sveltekit', '^0.11.1');
sv.dependency('@inlang/paraglide-sveltekit', '^0.15.0');

sv.file('project.inlang/settings.json', (content) => {
if (content) return content;
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/playwright/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineAddon({
run: ({ sv, typescript }) => {
const ext = typescript ? 'ts' : 'js';

sv.devDependency('@playwright/test', '^1.45.3');
sv.devDependency('@playwright/test', '^1.49.1');

sv.file('package.json', (content) => {
const { data, generateCode } = parseJson(content);
Expand Down
4 changes: 2 additions & 2 deletions packages/addons/prettier/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ export default defineAddon({
homepage: 'https://prettier.io',
options: {},
run: ({ sv, dependencyVersion }) => {
sv.devDependency('prettier', '^3.3.2');
sv.devDependency('prettier-plugin-svelte', '^3.2.6');
sv.devDependency('prettier', '^3.4.2');
sv.devDependency('prettier-plugin-svelte', '^3.3.2');

sv.file('.prettierignore', (content) => {
if (content) return content;
Expand Down
4 changes: 2 additions & 2 deletions packages/addons/tailwindcss/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ export default defineAddon({
const ext = typescript ? 'ts' : 'js';
const prettierInstalled = Boolean(dependencyVersion('prettier'));

sv.devDependency('tailwindcss', '^3.4.9');
sv.devDependency('tailwindcss', '^3.4.17');
sv.devDependency('autoprefixer', '^10.4.20');

if (prettierInstalled) sv.devDependency('prettier-plugin-tailwindcss', '^0.6.5');
if (prettierInstalled) sv.devDependency('prettier-plugin-tailwindcss', '^0.6.9');

for (const plugin of plugins) {
if (!options.plugins.includes(plugin.id)) continue;
Expand Down
2 changes: 1 addition & 1 deletion packages/addons/vitest-addon/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default defineAddon({
run: ({ sv, typescript }) => {
const ext = typescript ? 'ts' : 'js';

sv.devDependency('vitest', '^2.0.4');
sv.devDependency('vitest', '^2.1.8');

sv.file('package.json', (content) => {
const { data, generateCode } = parseJson(content);
Expand Down
Loading