⬆️ Update module github.com/pocketbase/pocketbase to v0.17.0 #238
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
v0.16.7
->v0.17.0
⚠ Dependency Lookup Warnings ⚠
Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.
Release Notes
pocketbase/pocketbase (github.com/pocketbase/pocketbase)
v0.17.0
Compare Source
New more detailed guides for using PocketBase as framework (both Go and JS).
If you find any typos or issues with the docs please report them in https://github.com/pocketbase/site.
Added new experimental JavaScript app hooks binding via goja.
They are available by default with the prebuilt executable if you create
*.pb.js
file(s) in thepb_hooks
directory.Lower your expectations because the integration comes with some limitations. For more details please check the Extend with JavaScript guide.
Optionally, you can also enable the JS app hooks as part of a custom Go build for dynamic scripting but you need to register the
jsvm
plugin manually:Added Instagram OAuth2 provider (#2534; thanks @pnmcosta).
Added VK OAuth2 provider (#2533; thanks @imperatrona).
Added Yandex OAuth2 provider (#2762; thanks @imperatrona).
Added new fields to
core.ServeEvent
:Added
record.ExpandedOne(rel)
andrecord.ExpandedAll(rel)
helpers to retrieve casted single or multiple expand relations from the already loaded "expand" Record data.Added rule and filter record
Dao
helpers:Added
Dao.WithoutHooks()
helper to create a newDao
from the current one but without the create/update/delete hooks.Use a default fetch function that will return all relations in case the
fetchFunc
argument ofDao.ExpandRecord(record, expands, fetchFunc)
andDao.ExpandRecords(records, expands, fetchFunc)
isnil
.For convenience it is now possible to call
Dao.RecordQuery(collectionModelOrIdentifier)
with just the collection id or name.In case an invalid collection id/name string is passed the query will be resolved with cancelled context error.
Refactored
apis.ApiError
validation errors serialization to allowmap[string]error
andmap[string]any
when generating the public safe formattedApiError.Data
.Added support for wrapped API errors (in case Go 1.20+ is used with multiple wrapped errors, the first
apis.ApiError
takes precedence).Added
?download=1
file query parameter to the file serving endpoint to force the browser to always download the file and not show its preview.Added new utility
github.com/pocketbase/pocketbase/tools/template
subpackage to assist with rendering HTML templates using the standard Gohtml/template
andtext/template
syntax.Added
types.JsonMap.Get(k)
andtypes.JsonMap.Set(k, v)
helpers for the cases where the type aliased direct map access is not allowed (eg. in goja).Soft-deprecated
security.NewToken()
in favor ofsecurity.NewJWT()
.Hook.Add()
andHook.PreAdd
now returns a unique string identifier that could be used to remove the registered hook handler viaHook.Remove(handlerId)
.Changed the after* hooks to be called right before writing the user response, allowing users to return response errors from the after hooks.
There is also no longer need for returning explicitly
hook.StopPropagtion
when writing custom response body in a hook because we will skip the finalizer response body write if a response was already "committed".*Options{}
toConfig{}
for consistency and replaced the unnecessary pointers with their value equivalent to keep the applied configuration defaults isolated within their function calls:subscriptions.Message.Data
fromstring
to[]byte
becauseData
usually is a json bytes slice anyway.models.RequestData
tomodels.RequestInfo
and soft-deprecatedapis.RequestData(c)
in favor ofapis.RequestInfo(c)
to avoid the stuttering with theData
field.The old
apis.RequestData()
method still works to minimize the breaking changes but it is recommended to replace it withapis.RequestInfo(c)
.Added new query parameter
?skipTotal=1
to skip theCOUNT
query performed with the list/search actions (#2965).If
?skipTotal=1
is set, the response fieldstotalItems
andtotalPages
will have-1
value (this is to avoid having different JSON responses and to differentiate from the zero default).With the latest JS SDK 0.16+ and Dart SDK v0.11+ versions
skipTotal=1
is set by default for thegetFirstListItem()
andgetFullList()
requests.The count and regular select statements also now executes concurrently, meaning that we no longer perform normalization over the
page
parameter and in case the userrequest a page that doesn't exist (eg.
?page=99999999
) we'll return emptyitems
array.Reverted the default
COUNT
column toid
as there are some common situations where it can negatively impact the query performance.Additionally, from this version we also set
PRAGMA temp_store = MEMORY
so that also helps with the temp B-TREE creation whenid
is used.There are still scenarios where
COUNT
queries withrowid
executes faster, but the majority of the time when nested relations lookups are used it seems to have the opposite effect (at least based on the benchmarks dataset).The change was necessary because I wasn't able to find an efficient way to track view changes and the previous behavior could have too many unexpected side-effects (eg. view with computed ids).
There is a system migration that will convert the existing view
relation
fields tojson
(multiple) andtext
(single) fields.This could be a breaking change if you have
relation
to view and useexpand
or some of therelation
view fields as part of a collection rule.action
argument to theDao
hooks to allow skipping the default persist behavior.In preparation for the logs generalization, the
Dao.After*Func
methods now also allow returning an error.Allowed
0
asRelationOptions.MinSelect
value to avoid the ambiguity between 0 and non-filled input value (#2817).Fixed zero-default value not being used if the field is not explicitly set when manually creating records (#2992).
Additionally,
record.Get(field)
will now always return normalized value (the same as in the json serialization) for consistency and to avoid ambiguities with what is stored in the related DB table.The schema fields columns
DEFAULT
definition was also updated for new collections to ensure thatNULL
values can't be accidentally inserted.Fixed
migrate down
not returning the correctlastAppliedMigrations()
when the stored migration applied time is in seconds.Fixed realtime delete event to be called after the record was deleted from the DB (including transactions and cascade delete operations).
Other minor fixes and improvements (typos and grammar fixes, updated dependencies, removed unnecessary 404 error check in the Admin UI, etc.).
v0.16.10
Compare Source
relation
,select
,file
) normalizations to ensure that the zero-default value of a newly created multiple field is applied for already existing data (#2930).v0.16.9
Compare Source
eagerRequestInfoCache
middleware only for the internalapi
group routes to avoid conflicts with custom route handlers (#2914).v0.16.8
Compare Source
Fixed unique validator detailed error message not being returned when camelCase field name is used (#2868).
Updated the index parser to allow no space between the table name and the columns list (#2864).
Updated go deps.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.