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

Update backend #15

Closed
wants to merge 1 commit into from
Closed

Update backend #15

wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 14, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence Type Update
@eslint/js (source) 9.10.0 -> 9.17.0 age adoption passing confidence devDependencies minor
@hono/node-server 1.12.2 -> 1.13.7 age adoption passing confidence dependencies minor
@types/node (source) 20.16.5 -> 20.17.10 age adoption passing confidence devDependencies minor
dotenv 16.4.5 -> 16.4.7 age adoption passing confidence dependencies patch
drizzle-kit (source) 0.24.2 -> 0.30.1 age adoption passing confidence devDependencies minor
drizzle-orm (source) 0.33.0 -> 0.38.2 age adoption passing confidence dependencies minor
eslint (source) 9.9.1 -> 9.17.0 age adoption passing confidence devDependencies minor
globals 15.9.0 -> 15.13.0 age adoption passing confidence devDependencies minor
hono (source) 4.5.11 -> 4.6.14 age adoption passing confidence dependencies minor
node 22.8.0-slim -> 22.12.0-slim age adoption passing confidence final minor
pnpm (source) 9.9.0 -> 9.15.0 age adoption passing confidence packageManager minor
postgres 3.4.4 -> 3.4.5 age adoption passing confidence dependencies patch
tsx (source) 4.19.0 -> 4.19.2 age adoption passing confidence devDependencies patch
typescript-eslint (source) 8.4.0 -> 8.18.1 age adoption passing confidence devDependencies minor

Release Notes

eslint/eslint (@​eslint/js)

v9.17.0

Compare Source

Features

Bug Fixes

  • 67d683d fix: fix crash when message.fix is nullish (#​19168) (ntnyq)
  • c618707 fix: ignore vars with non-identifier references in no-useless-assignment (#​19200) (YeonJuan)

Documentation

  • 3c22d2a docs: update yoda to Yoda in yoda.md for consistency (#​19230) (루밀LuMir)
  • e0a2203 docs: add missing backticks to no-sequences (#​19233) (루밀LuMir)
  • 4cc4881 docs: Update README (GitHub Actions Bot)
  • 3db6fdf docs: [no-await-in-loop] expand on benefits and inapplicability (#​19211) (Kirk Waiblinger)
  • bf2a4f6 docs: add missing backticks to func-style (#​19227) (루밀LuMir)
  • ba098bd docs: add missing header to prefer-spread (#​19224) (루밀LuMir)
  • b607ae6 docs: update description of no-param-reassign (#​19220) (루밀LuMir)
  • 1eb424d docs: add missing backticks to prefer-destructuring (#​19223) (루밀LuMir)
  • 85998d1 docs: add missing backticks to no-unneeded-ternary (#​19222) (루밀LuMir)
  • b75b32c docs: add missing backticks to no-new-func (#​19219) (루밀LuMir)
  • a7700bc docs: add missing backticks to id-length (#​19217) (루밀LuMir)
  • e2bb429 docs: add missing backticks to complexity.md (#​19214) (루밀LuMir)
  • 045d716 docs: add missing ) to id-denylist (#​19213) (루밀LuMir)
  • 7fe4114 docs: Update README (GitHub Actions Bot)
  • c743ba6 docs: add CSS language to no-restricted-syntax (#​19208) (Milos Djermanovic)
  • 1416d70 docs: add missing backticks to eqeqeq (#​19207) (루밀LuMir)
  • b950c1b docs: add missing backticks to prefer-object-spread (#​19206) (루밀LuMir)
  • 8a941cb docs: update docs and description of require-unicode-regexp (#​19205) (루밀LuMir)
  • cbab228 docs: Update README (GitHub Actions Bot)
  • f2257ce docs: update comments and description of no-script-url (#​19203) (루밀LuMir)
  • 365f0f4 docs: add missing backtick to default-case-last (#​19202) (루밀LuMir)
  • e6b84f5 docs: add missing punctuation in document (#​19161) (루밀LuMir)
  • c88708e docs: replace quote with backtick in description of for-direction (#​19199) (루밀LuMir)
  • a76f233 docs: use higher contrast color tokens for code comments (#​19187) (Josh Goldberg ✨)
  • db19502 docs: Update README (GitHub Actions Bot)

Chores

v9.16.0

Compare Source

v9.15.0

Compare Source

v9.14.0

Compare Source

v9.13.0

Compare Source

Features

Bug Fixes

Documentation

  • abdbfa8 docs: mark LintMessage#nodeType as deprecated (#​19019) (Nitin Kumar)
  • 19e68d3 docs: update deprecated rules type definitions (#​19018) (Nitin Kumar)
  • 7dd402d docs: Update examples of passing multiple values to a CLI option (#​19006) (Milos Djermanovic)
  • 5dcbc51 docs: Add example with side-effect imports to no-restricted-imports (#​18997) (Milos Djermanovic)
  • 1ee87ca docs: Update README (GitHub Actions Bot)
  • 2c3dbdc docs: Use prerendered sponsors for README (#​18988) (Milos Djermanovic)

Chores

v9.12.0

Compare Source

Features

Bug Fixes

Documentation

  • ecbd522 docs: Mention code explorer (#​18978) (Nicholas C. Zakas)
  • 7ea4ecc docs: Clarifying the Use of Meta Objects (#​18697) (Amaresh S M)
  • d3e4b2e docs: Clarify how to exclude .js files (#​18976) (Milos Djermanovic)
  • 57232ff docs: Mention plugin-kit in language docs (#​18973) (Nicholas C. Zakas)
  • b80ed00 docs: Update README (GitHub Actions Bot)
  • cb69ab3 docs: Update README (GitHub Actions Bot)
  • 7fb0d95 docs: Update README (GitHub Actions Bot)
  • 493348a docs: Update README (GitHub Actions Bot)
  • 87a582c docs: fix typo in id-match rule (#​18944) (Jay)

Chores

v9.11.1

Compare Source

Bug Fixes

  • 20fd916 fix: add @eslint/core, @types/estree, & @types/json-schema deps (#​18938) (Nitin Kumar)
  • 2738322 fix: add missing types for require-atomic-updates rule (#​18937) (Kristóf Poduszló)
  • d71ff30 fix: add missing types for object-shorthand rule (#​18935) (Kristóf Poduszló)
  • 561cadc fix: add missing types for no-unsafe-negation rule (#​18932) (Kristóf Poduszló)
  • 8843656 fix: add missing types for no-underscore-dangle rule (#​18931) (Kristóf Poduszló)
  • 92cde5c fix: add missing types for no-shadow rule (#​18930) (Kristóf Poduszló)
  • b3cbe11 fix: add missing types for no-sequences rule (#​18929) (Kristóf Poduszló)
  • 976f77f fix: add missing types for no-unused-expressions rule (#​18933) (Kristóf Poduszló)

Documentation

  • 3eff709 docs: replace deprecated Linter.FlatConfig type with Linter.Config (#​18941) (Carlos Meira)

Chores

v9.11.0

Compare Source

honojs/node-server (@​hono/node-server)

v1.13.7

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/node-server@v1.13.6...v1.13.7

v1.13.6

Compare Source

What's Changed

Full Changelog: honojs/node-server@v1.13.5...v1.13.6

v1.13.5

Compare Source

What's Changed

Full Changelog: honojs/node-server@v1.13.4...v1.13.5

v1.13.4

Compare Source

What's Changed
New Contributors

Full Changelog: honojs/node-server@v1.13.3...v1.13.4

v1.13.3

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/node-server@v1.13.2...v1.13.3

v1.13.2

Compare Source

What's Changed

New Contributors

Full Changelog: honojs/node-server@v1.13.1...v1.13.2

v1.13.1

Compare Source

What's Changed

Full Changelog: honojs/node-server@v1.13.0...v1.13.1

v1.13.0

Compare Source

What's Changed

Full Changelog: honojs/node-server@v1.12.2...v1.13.0

motdotla/dotenv (dotenv)

v16.4.7

Compare Source

Changed
  • Ignore .tap folder when publishing. (oops, sorry about that everyone. - @​motdotla) #​848

v16.4.6

Compare Source

Changed
  • Clean up stale dev dependencies #​847
  • Various README updates clarifying usage and alternative solutions using dotenvx
drizzle-team/drizzle-orm (drizzle-kit)

v0.30.1

Compare Source

New Features

drizzle-kit export

To make drizzle-kit integration with other migration tools, like Atlas much easier, we've prepared a new command called export. It will translate your drizzle schema in SQL representation(DDL) statements and outputs to the console

// schema.ts
import { pgTable, serial, text } from 'drizzle-orm/pg-core'

export const users = pgTable('users', {
	id: serial('id').primaryKey(),
	email: text('email').notNull(),
	name: text('name')
});

Running

npx drizzle-kit export

will output this string to console

CREATE TABLE "users" (
        "id" serial PRIMARY KEY NOT NULL,
        "email" text NOT NULL,
        "name" text
);

By default, the only option for now is --sql, so the output format will be SQL DDL statements. In the future, we will support additional output formats to accommodate more migration tools

npx drizzle-kit export --sql

v0.30.0

Compare Source

Starting from this update, the PostgreSQL dialect will align with the behavior of all other dialects. It will no longer include IF NOT EXISTS, $DO, or similar statements, which could cause incorrect DDL statements to not fail when an object already exists in the database and should actually fail.

This change marks our first step toward several major upgrades we are preparing:

  • An updated and improved migration workflow featuring commutative migrations, a revised folder structure, and enhanced collaboration capabilities for migrations.
  • Better support for Xata migrations.
  • Compatibility with CockroachDB (achieving full compatibility will only require removing serial fields from the migration folder).

v0.29.1

Compare Source

Fixes
New Features/Helpers
🎉 Detailed JSDoc for all query builders in all dialects - thanks @​realmikesolo

You can now access more information, hints, documentation links, etc. while developing and using JSDoc right in your IDE. Previously, we had them only for filter expressions, but now you can see them for all parts of the Drizzle query builder

🎉 New helpers for aggregate functions in SQL - thanks @​L-Mario564

Remember, aggregation functions are often used with the GROUP BY clause of the SELECT statement. So if you are selecting using aggregating functions and other columns in one query,
be sure to use the .groupBy clause

Here is a list of functions and equivalent using sql template

count

await db.select({ value: count() }).from(users);
await db.select({ value: count(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`count('*'))`.mapWith(Number) 
}).from(users);
await db.select({ 
  value: sql`count(${users.id})`.mapWith(Number) 
}).from(users);

countDistinct

await db.select({ value: countDistinct(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`count(${users.id})`.mapWith(Number) 
}).from(users);

avg

await db.select({ value: avg(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`avg(${users.id})`.mapWith(String) 
}).from(users);

avgDistinct

await db.select({ value: avgDistinct(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`avg(distinct ${users.id})`.mapWith(String) 
}).from(users);

sum

await db.select({ value: sum(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`sum(${users.id})`.mapWith(String) 
}).from(users);

sumDistinct

await db.select({ value: sumDistinct(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`sum(distinct ${users.id})`.mapWith(String) 
}).from(users);

max

await db.select({ value: max(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`max(${expression})`.mapWith(users.id) 
}).from(users);

min

await db.select({ value: min(users.id) }).from(users);

// It's equivalent to writing
await db.select({ 
  value: sql`min(${users.id})`.mapWith(users.id) 
}).from(users);
New Packages
🎉 ESLint Drizzle Plugin

For cases where it's impossible to perform type checks for specific scenarios, or where it's possible but error messages would be challenging to understand, we've decided to create an ESLint package with recommended rules. This package aims to assist developers in handling crucial scenarios during development

Big thanks to @​Angelelz for initiating the development of this package and transferring it to the Drizzle Team's npm

Install
[ npm | yarn | pnpm | bun ] install eslint eslint-plugin-drizzle

You can install those packages for typescript support in your IDE

[ npm | yarn | pnpm | bun ] install @​typescript-eslint/eslint-plugin @​typescript-eslint/parser
Usage

Create a .eslintrc.yml file, add drizzle to the plugins, and specify the rules you want to use. You can find a list of all existing rules below

root: true
parser: '@​typescript-eslint/parser'
parserOptions:
  project: './tsconfig.json'
plugins:
  - drizzle
rules:
  'drizzle/enforce-delete-with-where': "error"
  'drizzle/enforce-update-with-where': "error"
All config

This plugin exports an all config that makes use of all rules (except for deprecated ones).

root: true
extends:
  - "plugin:drizzle/all"
parser: '@​typescript-eslint/parser'
parserOptions:
  project: './tsconfig.json'
plugins:
  - drizzle

At the moment, all is equivalent to recommended

root: true
extends:
  - "plugin:drizzle/recommended"
parser: '@​typescript-eslint/parser'
parserOptions:
  project: './tsconfig.json'
plugins:
  - drizzle
Rules

enforce-delete-with-where: Enforce using delete with the.where() clause in the .delete() statement. Most of the time, you don't need to delete all rows in the table and require some kind of WHERE statements.

Error Message:

Without `.where(...)` you will delete all the rows in a table. If you didn't want to do it, please use `db.delete(...).where(...)` instead. Otherwise you can ignore this rule here

Optionally, you can define a drizzleObjectName in the plugin options that accept a string or string[]. This is useful when you have objects or classes with a delete method that's not from Drizzle. Such a delete method will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete method comes from this object:

Example, config 1:

"rules": {
  "drizzle/enforce-delete-with-where": ["error"]
}
class MyClass {
  public delete() {
    return {}
  }
}

const myClassObj = new MyClass();

// ---> Will be triggered by ESLint Rule
myClassObj.delete()

const db = drizzle(...)
// ---> Will be triggered by ESLint Rule
db.delete()

Example, config 2:

"rules": {
  "drizzle/enforce-delete-with-where": ["error", { "drizzleObjectName": ["db"] }],
}
class MyClass {
  public delete() {
    return {}
  }
}

const myClassObj = new MyClass();

// ---> Will NOT be triggered by ESLint Rule
myClassObj.delete()

const db = drizzle(...)
// ---> Will be triggered by ESLint Rule
db.delete()

enforce-update-with-where: Enforce using update with the.where() clause in the .update() statement. Most of the time, you don't need to update all rows in the table and require some kind of WHERE statements.

Error Message:

Without `.where(...)` you will update all the rows in a table. If you didn't want to do it, please use `db.update(...).set(...).where(...)` instead. Otherwise you can ignore this rule here

Optionally, you can define a drizzleObjectName in the plugin options that accept a string or string[]. This is useful when you have objects or classes with a delete method that's not from Drizzle. Such as update method will trigger the ESLint rule. To avoid that, you can define the name of the Drizzle object that you use in your codebase (like db) so that the rule would only trigger if the delete method comes from this object:

Example, config 1:

"rules": {
  "drizzle/enforce-update-with-where": ["error"]
}
class MyClass {
  public update() {
    return {}
  }
}

const myClassObj = new MyClass();

// ---> Will be triggered by ESLint Rule
myClassObj.update()

const db = drizzle(...)
// ---> Will be triggered by ESLint Rule
db.update()

Example, config 2:

"rules": {
  "drizzle/enforce-update-with-where": ["error", { "drizzleObjectName": ["db"] }],
}
class MyClass {
  public update() {
    return {}
  }
}

const myClassObj = new MyClass();

// ---> Will NOT be triggered by ESLint Rule
myClassObj.update()

const db = drizzle(...)
// ---> Will be triggered by ESLint Rule
db.update()

v0.29.0

Compare Source

New Dialects

🎉 SingleStore dialect is now available in Drizzle

Thanks to the SingleStore team for creating a PR with all the necessary changes to support the MySQL-compatible part of SingleStore. You can already start using it with Drizzle. The SingleStore team will also help us iterate through updates and make more SingleStore-specific features available in Drizzle

import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';

export default defineConfig({
  dialect: 'singlestore',
  out: './drizzle',
  schema: './src/db/schema.ts',
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
});

You can check out our Getting started guides to try SingleStore!

New Drivers

🎉 SQLite Durable Objects driver is now available in Drizzle

You can now query SQLite Durable Objects in Drizzle!

For the full example, please check our Get Started Section

import 'dotenv/config';
import { defineConfig } from 'drizzle-kit';
export default defineConfig({
  out: './drizzle',
  schema: './src/db/schema.ts',
  dialect: 'sqlite',
  driver: 'durable-sqlite',
});

v0.28.1

Compare Source

Bug fixes

v0.28.0

Compare Source

Improvements

Bug Fixes

v0.27.2

Compare Source

v0.27.1

Compare Source

import { neon, neonConfig } from '@​neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-http';

neonConfig.fetchConnectionCache = true;

const sql = neon(process.env.DRIZZLE_DATABASE_URL!);
const db = drizzle(sql);

db.select(...)

v0.27.0

Compare Source

Correct behavior when installed in a monorepo (multiple Drizzle instances)

Replacing all instanceof statements with a custom is() function allowed us to handle multiple Drizzle packages interacting properly.

It also fixes one of our biggest Discord tickets: maximum call stack exceeded 🎉

You should now use is() instead of instanceof to check if specific objects are instances of specific Drizzle types. It might be useful if you are building something on top of the Drizzle API.

import { is, Column } from 'drizzle-orm'

if (is(value, Column)) {
  // value's type is narrowed to Column
}

distinct clause support

await db.selectDistinct().from(usersDistinctTable).orderBy(
  usersDistinctTable.id,
  usersDistin

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

 **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://redirect.github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/AlexDaniel-Projects/crylendar).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOC43NC4xIiwidXBkYXRlZEluVmVyIjoiMzkuNjkuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOltdfQ==-->

@renovate renovate bot force-pushed the renovate/backend branch 8 times, most recently from b64e2b5 to 1b0995e Compare September 21, 2024 09:52
@renovate renovate bot force-pushed the renovate/backend branch 7 times, most recently from 509f9b4 to 3a34a52 Compare September 27, 2024 18:27
@renovate renovate bot force-pushed the renovate/backend branch 6 times, most recently from 9ce94c1 to 250262a Compare October 7, 2024 15:47
@renovate renovate bot force-pushed the renovate/backend branch 6 times, most recently from ca303ea to 926f1f4 Compare October 14, 2024 19:26
@renovate renovate bot force-pushed the renovate/backend branch 3 times, most recently from 918bf14 to ed64389 Compare October 15, 2024 21:46
@renovate renovate bot force-pushed the renovate/backend branch 8 times, most recently from 99ca796 to b5c5af4 Compare November 29, 2024 11:32
@renovate renovate bot force-pushed the renovate/backend branch 10 times, most recently from 4e5c66a to 7946435 Compare December 6, 2024 16:16
@renovate renovate bot force-pushed the renovate/backend branch 9 times, most recently from d98a62a to 1f79ffc Compare December 14, 2024 15:56
@renovate renovate bot force-pushed the renovate/backend branch from 1f79ffc to a744ff5 Compare December 16, 2024 18:16
@AlexDaniel AlexDaniel closed this Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant