mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 20:52:24 -05:00
[chore] bump dependencies (#4339)
- github.com/KimMachineGun/automemlimit v0.7.4 - github.com/miekg/dns v1.1.67 - github.com/minio/minio-go/v7 v7.0.95 - github.com/spf13/pflag v1.0.7 - github.com/tdewolff/minify/v2 v2.23.9 - github.com/uptrace/bun v1.2.15 - github.com/uptrace/bun/dialect/pgdialect v1.2.15 - github.com/uptrace/bun/dialect/sqlitedialect v1.2.15 - github.com/uptrace/bun/extra/bunotel v1.2.15 - golang.org/x/image v0.29.0 - golang.org/x/net v0.42.0 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4339 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com>
This commit is contained in:
parent
eb60081985
commit
c00cad2ceb
76 changed files with 5544 additions and 886 deletions
16
vendor/github.com/uptrace/bun/CHANGELOG.md
generated
vendored
16
vendor/github.com/uptrace/bun/CHANGELOG.md
generated
vendored
|
|
@ -1,3 +1,19 @@
|
|||
## [1.2.15](https://github.com/uptrace/bun/compare/v1.2.14...v1.2.15) (2025-07-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **pgdriver:** add mandatory space before negative numbers to resolve CVE-2024-34359 ([8067a8f](https://github.com/uptrace/bun/commit/8067a8f13f8d22fb57b76d6800f7aefc12b044cd))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **db:** rename CleanQueryHook to ResetQueryHooks ([cb17679](https://github.com/uptrace/bun/commit/cb176796f5fbae8b3ea44e67875dd00ecf689425))
|
||||
* **db:** support clean query hooks ([a5f19a7](https://github.com/uptrace/bun/commit/a5f19a7c0d68fd44eaff99ebaaeb88ca089d7538)), closes [#1226](https://github.com/uptrace/bun/issues/1226)
|
||||
* **dialect:** return default on update/delete when create table ([d347b48](https://github.com/uptrace/bun/commit/d347b48c7764a23000a28ca3ad40368b8b89e298)), closes [#1212](https://github.com/uptrace/bun/issues/1212)
|
||||
|
||||
|
||||
|
||||
## [1.2.14](https://github.com/uptrace/bun/compare/v1.2.13...v1.2.14) (2025-06-16)
|
||||
|
||||
|
||||
|
|
|
|||
7
vendor/github.com/uptrace/bun/db.go
generated
vendored
7
vendor/github.com/uptrace/bun/db.go
generated
vendored
|
|
@ -235,6 +235,13 @@ func (db *DB) AddQueryHook(hook QueryHook) {
|
|||
db.queryHooks = append(db.queryHooks, hook)
|
||||
}
|
||||
|
||||
func (db *DB) ResetQueryHooks() {
|
||||
for i := range db.queryHooks {
|
||||
db.queryHooks[i] = nil
|
||||
}
|
||||
db.queryHooks = nil
|
||||
}
|
||||
|
||||
func (db *DB) Table(typ reflect.Type) *schema.Table {
|
||||
return db.dialect.Tables().Get(typ)
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/dialect/feature/feature.go
generated
vendored
2
vendor/github.com/uptrace/bun/dialect/feature/feature.go
generated
vendored
|
|
@ -41,6 +41,7 @@ const (
|
|||
DeleteOrderLimit // DELETE ... ORDER BY ... LIMIT ...
|
||||
DeleteReturning
|
||||
AlterColumnExists // ADD/DROP COLUMN IF NOT EXISTS/IF EXISTS
|
||||
FKDefaultOnAction // FK ON UPDATE/ON DELETE has default value: NO ACTION
|
||||
)
|
||||
|
||||
type NotSupportError struct {
|
||||
|
|
@ -91,4 +92,5 @@ var flag2str = map[Feature]string{
|
|||
DeleteOrderLimit: "DeleteOrderLimit",
|
||||
DeleteReturning: "DeleteReturning",
|
||||
AlterColumnExists: "AlterColumnExists",
|
||||
FKDefaultOnAction: "FKDefaultOnAction",
|
||||
}
|
||||
|
|
|
|||
1
vendor/github.com/uptrace/bun/dialect/pgdialect/dialect.go
generated
vendored
1
vendor/github.com/uptrace/bun/dialect/pgdialect/dialect.go
generated
vendored
|
|
@ -55,6 +55,7 @@ func New(opts ...DialectOption) *Dialect {
|
|||
feature.SelectExists |
|
||||
feature.GeneratedIdentity |
|
||||
feature.CompositeIn |
|
||||
feature.FKDefaultOnAction |
|
||||
feature.DeleteReturning |
|
||||
feature.AlterColumnExists
|
||||
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/dialect/pgdialect/version.go
generated
vendored
2
vendor/github.com/uptrace/bun/dialect/pgdialect/version.go
generated
vendored
|
|
@ -2,5 +2,5 @@ package pgdialect
|
|||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.14"
|
||||
return "1.2.15"
|
||||
}
|
||||
|
|
|
|||
5
vendor/github.com/uptrace/bun/dialect/sqlitedialect/dialect.go
generated
vendored
5
vendor/github.com/uptrace/bun/dialect/sqlitedialect/dialect.go
generated
vendored
|
|
@ -41,6 +41,7 @@ func New(opts ...DialectOption) *Dialect {
|
|||
feature.SelectExists |
|
||||
feature.AutoIncrement |
|
||||
feature.CompositeIn |
|
||||
feature.FKDefaultOnAction |
|
||||
feature.DeleteReturning
|
||||
|
||||
for _, opt := range opts {
|
||||
|
|
@ -102,7 +103,7 @@ func (d *Dialect) AppendBytes(b []byte, bs []byte) []byte {
|
|||
return b
|
||||
}
|
||||
|
||||
func (d *Dialect) DefaultVarcharLen() int {
|
||||
func (*Dialect) DefaultVarcharLen() int {
|
||||
return 0
|
||||
}
|
||||
|
||||
|
|
@ -132,7 +133,7 @@ func (d *Dialect) AppendSequence(b []byte, table *schema.Table, field *schema.Fi
|
|||
// DefaultSchemaName is the "schema-name" of the main database.
|
||||
// The details might differ from other dialects, but for all means and purposes
|
||||
// "main" is the default schema in an SQLite database.
|
||||
func (d *Dialect) DefaultSchema() string {
|
||||
func (*Dialect) DefaultSchema() string {
|
||||
return "main"
|
||||
}
|
||||
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go
generated
vendored
2
vendor/github.com/uptrace/bun/dialect/sqlitedialect/version.go
generated
vendored
|
|
@ -2,5 +2,5 @@ package sqlitedialect
|
|||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.14"
|
||||
return "1.2.15"
|
||||
}
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/package.json
generated
vendored
2
vendor/github.com/uptrace/bun/package.json
generated
vendored
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gobun",
|
||||
"version": "1.2.14",
|
||||
"version": "1.2.15",
|
||||
"main": "index.js",
|
||||
"repository": "git@github.com:uptrace/bun.git",
|
||||
"author": "Vladimir Mihailenco <vladimir.webdev@gmail.com>",
|
||||
|
|
|
|||
24
vendor/github.com/uptrace/bun/query_table_create.go
generated
vendored
24
vendor/github.com/uptrace/bun/query_table_create.go
generated
vendored
|
|
@ -318,15 +318,23 @@ func (q *CreateTableQuery) appendFKConstraintsRel(fmter schema.Formatter, b []by
|
|||
|
||||
for _, key := range keys {
|
||||
if rel := relations[key]; rel.References() {
|
||||
query := "(?) REFERENCES ? (?)"
|
||||
args := []any{
|
||||
Safe(appendColumns(nil, "", rel.BasePKs)),
|
||||
rel.JoinTable.SQLName,
|
||||
Safe(appendColumns(nil, "", rel.JoinPKs)),
|
||||
}
|
||||
if len(rel.OnUpdate) > 0 {
|
||||
query += " ?"
|
||||
args = append(args, Safe(rel.OnUpdate))
|
||||
}
|
||||
if len(rel.OnDelete) > 0 {
|
||||
query += " ?"
|
||||
args = append(args, Safe(rel.OnDelete))
|
||||
}
|
||||
b, err = q.appendFK(fmter, b, schema.QueryWithArgs{
|
||||
Query: "(?) REFERENCES ? (?) ? ?",
|
||||
Args: []interface{}{
|
||||
Safe(appendColumns(nil, "", rel.BasePKs)),
|
||||
rel.JoinTable.SQLName,
|
||||
Safe(appendColumns(nil, "", rel.JoinPKs)),
|
||||
Safe(rel.OnUpdate),
|
||||
Safe(rel.OnDelete),
|
||||
},
|
||||
Query: query,
|
||||
Args: args,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
|||
7
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
7
vendor/github.com/uptrace/bun/schema/table.go
generated
vendored
|
|
@ -11,6 +11,7 @@ import (
|
|||
|
||||
"github.com/jinzhu/inflection"
|
||||
|
||||
"github.com/uptrace/bun/dialect/feature"
|
||||
"github.com/uptrace/bun/internal"
|
||||
"github.com/uptrace/bun/internal/tagparser"
|
||||
)
|
||||
|
|
@ -623,7 +624,10 @@ func (t *Table) belongsToRelation(field *Field) *Relation {
|
|||
rel.Condition = field.Tag.Options["join_on"]
|
||||
}
|
||||
|
||||
rel.OnUpdate = "ON UPDATE NO ACTION"
|
||||
if t.dialect.Features().Has(feature.FKDefaultOnAction) {
|
||||
rel.OnUpdate = "ON UPDATE NO ACTION"
|
||||
rel.OnDelete = "ON DELETE NO ACTION"
|
||||
}
|
||||
if onUpdate, ok := field.Tag.Options["on_update"]; ok {
|
||||
if len(onUpdate) > 1 {
|
||||
panic(fmt.Errorf("bun: %s belongs-to %s: on_update option must be a single field", t.TypeName, field.GoName))
|
||||
|
|
@ -638,7 +642,6 @@ func (t *Table) belongsToRelation(field *Field) *Relation {
|
|||
rel.OnUpdate = s
|
||||
}
|
||||
|
||||
rel.OnDelete = "ON DELETE NO ACTION"
|
||||
if onDelete, ok := field.Tag.Options["on_delete"]; ok {
|
||||
if len(onDelete) > 1 {
|
||||
panic(fmt.Errorf("bun: %s belongs-to %s: on_delete option must be a single field", t.TypeName, field.GoName))
|
||||
|
|
|
|||
2
vendor/github.com/uptrace/bun/version.go
generated
vendored
2
vendor/github.com/uptrace/bun/version.go
generated
vendored
|
|
@ -2,5 +2,5 @@ package bun
|
|||
|
||||
// Version is the current release version.
|
||||
func Version() string {
|
||||
return "1.2.14"
|
||||
return "1.2.15"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue