Skip to content

Commit d0896ea

Browse files
committed
Merge branch 'release/0.18.0'
2 parents f460626 + 7d0d4b2 commit d0896ea

82 files changed

Lines changed: 5210 additions & 663 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.credo.exs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ overwrite_checks = [
99
{Credo.Check.Refactor.ModuleDependencies, false},
1010
{Credo.Check.Refactor.PipeChainStart, false},
1111
{Credo.Check.Refactor.VariableRebinding, false},
12-
{Credo.Check.Warning.LazyLogging, false}
12+
{Credo.Check.Warning.LazyLogging, false},
13+
{Credo.Check.Refactor.CondInsteadOfIfElse, false}
1314
]
1415

1516
other_checks = [

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
- name: Checkout code
4040
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4141

42-
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
42+
- uses: erlef/setup-beam@9d5b75ddfda22fb979d2270283237aef8aa68d6b # v1.22.0
4343
with:
4444
otp-version: ${{ matrix.otp }}
4545
elixir-version: ${{ matrix.elixir }}
4646

4747
- name: Setup node
48-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
48+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
4949
with:
5050
node-version: 24
5151
cache: "yarn"
@@ -131,7 +131,7 @@ jobs:
131131
- name: Checkout code
132132
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
133133

134-
- uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
134+
- uses: erlef/setup-beam@9d5b75ddfda22fb979d2270283237aef8aa68d6b # v1.22.0
135135
id: beam
136136
with:
137137
version-file: .tool-versions
@@ -154,7 +154,7 @@ jobs:
154154

155155
services:
156156
postgres:
157-
image: postgres:16.11@sha256:468e1f126ca5af849799cda06ac9b03d8090aae9fa5163408b3e8da44fad0702
157+
image: postgres:16.13@sha256:2586e2a95d1c9b31cb2967feb562948f7d364854453d703039b6efa45fe48417
158158
env:
159159
POSTGRES_PASSWORD: postgres
160160
options: >-
@@ -170,14 +170,14 @@ jobs:
170170
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
171171

172172
- name: Setup beam
173-
uses: erlef/setup-beam@e6d7c94229049569db56a7ad5a540c051a010af9 # v1.20.4
173+
uses: erlef/setup-beam@9d5b75ddfda22fb979d2270283237aef8aa68d6b # v1.22.0
174174
id: beam
175175
with:
176176
version-file: .tool-versions
177177
version-type: strict
178178

179179
- name: Setup node
180-
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
180+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
181181
with:
182182
node-version: 24
183183
cache: "yarn"
@@ -335,24 +335,24 @@ jobs:
335335
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
336336

337337
- name: Set up Docker Buildx
338-
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
338+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
339339

340340
- name: Log in to the container registry
341341
if: env.PUSH_IMAGE == 'true'
342-
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
342+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
343343
with:
344344
registry: ${{ env.REGISTRY }}
345345
username: ${{ github.actor }}
346346
password: ${{ secrets.GITHUB_TOKEN }}
347347

348348
- name: Extract metadata (tags, labels) for Docker
349349
id: meta
350-
uses: docker/metadata-action@c299e40c65443455700f0fdfc63efafe5b349051 # v5.10.0
350+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
351351
with:
352352
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_RUNTIME }}
353353

354354
- name: Build container
355-
uses: docker/build-push-action@10e90e3645eae34f1e60eeb005ba3a3d33f178e8 # v6.19.2
355+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
356356
with:
357357
push: ${{ env.PUSH_IMAGE }}
358358
tags: ${{ steps.meta.outputs.tags }}

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
erlang 28.3.1
1+
erlang 28.4
22
elixir 1.19.5
33
node 24.10.0

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
# renovate: datasource=github-tags depName=elixir packageName=elixir-lang/elixir versioning=semver
66
ARG ELIXIR_VERSION=1.19.5
77
# renovate: datasource=github-tags depName=erlang packageName=erlang/otp versioning=regex:^(?<major>\d+?)\.(?<minor>\d+?)(\.(?<patch>\d+))?$ extractVersion=^OTP-(?<version>\S+)
8-
ARG OTP_VERSION=28.3.1
8+
ARG OTP_VERSION=28.4
99
# renovate: datasource=docker depName=ubuntu packageName=ubuntu versioning=ubuntu
10-
ARG UBUNTU_VERSION=noble-20260113
10+
ARG UBUNTU_VERSION=noble-20260210.1
1111

1212
ARG BUILDER_IMAGE="hexpm/elixir:${ELIXIR_VERSION}-erlang-${OTP_VERSION}-ubuntu-${UBUNTU_VERSION}"
1313
ARG RUNTIME_IMAGE="ubuntu:${UBUNTU_VERSION}"

compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ services:
2222
postgres:
2323
condition: service_healthy
2424
postgres:
25-
image: postgres:16.13@sha256:78df81b1442dcc764c1104154da7162635e40cfffe67579c42a1c1b96dfc209c
25+
image: postgres:16.13@sha256:2586e2a95d1c9b31cb2967feb562948f7d364854453d703039b6efa45fe48417
2626
environment:
2727
- POSTGRES_PASSWORD=postgres
2828
ports:

config/config.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if Mix.env() == :dev do
1010
end
1111

1212
config :esbuild,
13-
version: "0.27.3",
13+
version: "0.27.4",
1414
module: esbuild.(~w(--format=esm --sourcemap --outfile=../priv/static/js/backpex.esm.js)),
1515
main: esbuild.(~w(--format=cjs --sourcemap --outfile=../priv/static/js/backpex.cjs.js))
1616
end

demo/config/config.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ config :demo,
2424
generators: [binary_id: true]
2525

2626
config :esbuild,
27-
version: "0.27.3",
27+
version: "0.27.4",
2828
default: [
2929
args:
3030
~w(js/app.js --bundle --target=es2022 --outdir=../priv/static/assets/js --external:/fonts/* --external:/images/* --alias:@=. --alias:backpex=/opt/app),
@@ -54,7 +54,7 @@ config :sentry,
5454
root_source_code_paths: [File.cwd!()]
5555

5656
config :tailwind,
57-
version: "4.2.1",
57+
version: "4.2.2",
5858
default: [
5959
args: ~w(
6060
--input=assets/css/app.css

demo/lib/demo/release.ex

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ defmodule Demo.Release do
1313
@doc """
1414
Migrate the database.
1515
"""
16-
def migrate(direction \\ :up) do
16+
def migrate do
1717
init([:ssl])
1818

1919
for repo <- repos() do
20-
{:ok, _fun_return, _apps} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, direction, all: true))
20+
{:ok, _fun_return, _apps} = Ecto.Migrator.with_repo(repo, &Ecto.Migrator.run(&1, :up, all: true))
2121
end
2222
end
2323

@@ -26,7 +26,7 @@ defmodule Demo.Release do
2626
"""
2727
# sobelow_skip ["RCE.CodeModule"]
2828
def seed do
29-
init([:crypto, :ssl, :myxql, :ecto, :ecto_sql, :faker])
29+
init([:crypto, :ssl, :postgrex, :ecto, :ecto_sql, :faker])
3030

3131
Enum.each(repos(), & &1.start_link(pool_size: 1))
3232

@@ -36,10 +36,19 @@ defmodule Demo.Release do
3636
end
3737

3838
@doc """
39-
Reset the application.
39+
Reset the application by dropping and recreating the public schema.
4040
"""
4141
def reset do
42-
migrate(:down)
42+
init([:ssl])
43+
44+
for repo <- repos() do
45+
{:ok, _fun_return, _apps} =
46+
Ecto.Migrator.with_repo(repo, fn repo ->
47+
repo.query!("DROP SCHEMA public CASCADE")
48+
repo.query!("CREATE SCHEMA public")
49+
end)
50+
end
51+
4352
migrate()
4453
seed()
4554
end

demo/lib/demo_web/live/address_live.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ defmodule DemoWeb.AddressLive do
66
update_changeset: &Demo.Address.update_changeset/3,
77
create_changeset: &Demo.Address.create_changeset/3
88
],
9-
layout: {DemoWeb.Layouts, :admin},
109
fluid?: true
1110

11+
@impl Backpex.LiveResource
12+
def layout(_assigns), do: {DemoWeb.Layouts, :admin}
13+
1214
@impl Backpex.LiveResource
1315
def singular_name, do: "Address"
1416

demo/lib/demo_web/live/category_live.ex

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ defmodule DemoWeb.CategoryLive do
66
update_changeset: &Demo.Category.update_changeset/3,
77
create_changeset: &Demo.Category.create_changeset/3
88
],
9-
layout: {DemoWeb.Layouts, :admin},
109
init_order: %{by: :name, direction: :asc}
1110

11+
@impl Backpex.LiveResource
12+
def layout(_assigns), do: {DemoWeb.Layouts, :admin}
13+
1214
@impl Backpex.LiveResource
1315
def singular_name, do: "Category"
1416

0 commit comments

Comments
 (0)