Skip to content

Commit

Permalink
chore: update addon dependencies (#357)
Browse files Browse the repository at this point in the history
* chore: update addon dependencies

* update turso changes

* update dep

* update deps

* update deps

* update deps

---------

Co-authored-by: AdrianGonz97 <[email protected]>
  • Loading branch information
manuel3108 and AdrianGonz97 authored Jan 16, 2025
1 parent d873e6c commit acd7388
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 36 deletions.
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.4');
sv.devDependency('drizzle-kit', '^0.30.2');

// 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.12.0');
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.8.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
14 changes: 7 additions & 7 deletions packages/addons/eslint/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ 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/js', '^9.17.0');
sv.devDependency('eslint', '^9.18.0');
sv.devDependency('@eslint/compat', '^1.2.5');
sv.devDependency('globals', '^15.14.0');
sv.devDependency('eslint-plugin-svelte', '^2.46.1');
sv.devDependency('@eslint/js', '^9.18.0');

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

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

sv.file('package.json', (content) => {
const { data, generateCode } = parseJson(content);
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.5');

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
6 changes: 3 additions & 3 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.3');

sv.file('.prettierignore', (content) => {
if (content) return content;
Expand Down Expand Up @@ -77,7 +77,7 @@ export default defineAddon({
}

if (eslintInstalled) {
sv.devDependency('eslint-config-prettier', '^9.1.0');
sv.devDependency('eslint-config-prettier', '^10.0.1');
sv.file('eslint.config.js', addEslintConfigPrettier);
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/addons/sveltekit-adapter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ type Adapter = {
};

const adapters: Adapter[] = [
{ id: 'node', package: '@sveltejs/adapter-node', version: '^5.2.9' },
{ id: 'static', package: '@sveltejs/adapter-static', version: '^3.0.6' },
{ id: 'vercel', package: '@sveltejs/adapter-vercel', version: '^5.5.0' },
{ id: 'node', package: '@sveltejs/adapter-node', version: '^5.2.11' },
{ id: 'static', package: '@sveltejs/adapter-static', version: '^3.0.8' },
{ id: 'vercel', package: '@sveltejs/adapter-vercel', version: '^5.5.2' },
{ id: 'cloudflare-pages', package: '@sveltejs/adapter-cloudflare', version: '^4.8.0' },
{ id: 'cloudflare-workers', package: '@sveltejs/adapter-cloudflare-workers', version: '^2.6.0' },
{ id: 'cloudflare-workers', package: '@sveltejs/adapter-cloudflare-workers', version: '^2.7.0' },
{ id: 'netlify', package: '@sveltejs/adapter-netlify', version: '^4.4.0' }
];

Expand Down
8 changes: 4 additions & 4 deletions packages/addons/tailwindcss/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ const plugins: Plugin[] = [
{
id: 'typography',
package: '@tailwindcss/typography',
version: '^0.5.15',
version: '^0.5.16',
identifier: 'typography'
},
{
id: 'forms',
package: '@tailwindcss/forms',
version: '^0.5.9',
version: '^0.5.10',
identifier: 'forms'
},
{
Expand Down 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.10');

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

0 comments on commit acd7388

Please sign in to comment.