Skip to content

Commit

Permalink
Merge branch 'release/0.10.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo0807 committed Jan 10, 2025
2 parents 009c8f3 + 9c6d7a8 commit 9197914
Show file tree
Hide file tree
Showing 58 changed files with 536 additions and 450 deletions.
45 changes: 26 additions & 19 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@
"github>pehbehbeh/renovate-config//workarounds/mixGitVersioning",
"github>pehbehbeh/renovate-config//customManagers/hexEsbuild",
"github>pehbehbeh/renovate-config//customManagers/hexTailwind",
":reviewer(krns)"
":reviewer(krns)",
"helpers:pinGitHubActionDigestsToSemver"
],
"packageRules": [
{
"description": "Group updates to the Elixir base image",
"description": "Group dependency updates to the Elixir base image",
"groupName": "Base Image",
"matchDepNames": [
"erlang",
Expand All @@ -22,27 +23,39 @@
"pinDigests": false
},
{
"description": "Disable Ubuntu major updates",
"description": "Disable ubuntu major updates and digest pinning",
"matchDatasources": [
"docker"
],
"matchDepNames": [
"ubuntu"
],
"matchUpdateTypes": [
"major"
"major",
"pinDigest"
],
"enabled": false
},
{
"description": "Disable digest pinning for Ubuntu",
"matchDepNames": [
"ubuntu"
"matchManagers": [
"mix"
],
"matchDatasources": [
"docker"
"rangeStrategy": "update-lockfile"
},
{
"matchManagers": [
"github-actions"
],
"pinDigests": false
"matchUpdateTypes": [
"minor",
"patch",
"pin",
"pinDigest"
],
"automerge": true
},
{
"description": "Label updates in demo directory",
"description": "Label dependency updates in demo directory",
"matchFileNames": [
"demo/**"
],
Expand All @@ -53,7 +66,7 @@
]
},
{
"description": "Label updates in ci.yml",
"description": "Label dependency updates in ci.yml",
"matchFileNames": [
".github/workflows/ci.yml"
],
Expand All @@ -62,16 +75,10 @@
"dependencies",
"{{categories}}"
]
},
{
"matchManagers": [
"github-actions"
],
"automerge": true
}
],
"labels": [
"dependencies",
"{{categories}}"
]
}
}
30 changes: 15 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1
- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
with:
otp-version: ${{ matrix.erlang }}
elixir-version: ${{ matrix.elixir }}

- name: Restore the deps and _build cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: restore-cache
env:
MIX_LOCK_HASH: ${{ hashFiles(format('{0}{1}', github.workspace, '/mix.lock')) }}
Expand Down Expand Up @@ -91,9 +91,9 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1
- uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
id: beam
with:
version-file: .tool-versions
Expand All @@ -116,7 +116,7 @@ jobs:

services:
postgres:
image: postgres:16.6@sha256:5620f242bbc0e17478556102327e7efcf60ab48de3607c9e0ea98800841785ec
image: postgres:16.6@sha256:c7afedc5c15994625b5be4cb4736c030271b55be0360b78a99c90ec2fbe658b6
env:
POSTGRES_PASSWORD: postgres
options: >-
Expand All @@ -129,24 +129,24 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Setup beam
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1
uses: erlef/setup-beam@5304e04ea2b355f03681464e683d92e3b2f18451 # v1.18.2
id: beam
with:
version-file: .tool-versions
version-type: strict

- name: Setup node
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: demo/yarn.lock

- name: Restore the deps and _build cache
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4.2.0
id: restore-cache
env:
OTP_VERSION: ${{ steps.beam.outputs.otp-version }}
Expand Down Expand Up @@ -232,26 +232,26 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3.8.0

- name: Log in to the container registry
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5.6.1
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_RUNTIME }}

- name: Build container
uses: docker/build-push-action@48aba3b46d1b1fec4febb7c5d0c644b249a11355 # v6
uses: docker/build-push-action@b32b51a8eda65d6793cd0494a773d4f6bcef32dc # v6.11.0
with:
push: true
tags: ${{ steps.meta.outputs.tags }}
Expand Down
2 changes: 1 addition & 1 deletion compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
postgres:
condition: service_healthy
postgres:
image: postgres:16.6@sha256:5620f242bbc0e17478556102327e7efcf60ab48de3607c9e0ea98800841785ec
image: postgres:16.6@sha256:c7afedc5c15994625b5be4cb4736c030271b55be0360b78a99c90ec2fbe658b6
environment:
- POSTGRES_PASSWORD=postgres
ports:
Expand Down
6 changes: 0 additions & 6 deletions demo/assets/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@
@import "tailwindcss/utilities";

@layer utilities {
/* LiveView specific classes */
.phx-no-feedback.invalid-feedback,
.phx-no-feedback .invalid-feedback {
display: none;
}

.phx-click-loading {
opacity: 0.5;
transition: opacity 1s ease-out;
Expand Down
1 change: 0 additions & 1 deletion demo/assets/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ module.exports = {
plugins: [
require('@tailwindcss/typography'),
require('daisyui'),
plugin(({ addVariant }) => addVariant('phx-no-feedback', ['.phx-no-feedback&', '.phx-no-feedback &'])),
plugin(({ addVariant }) => addVariant('phx-click-loading', ['.phx-click-loading&', '.phx-click-loading &'])),
plugin(({ addVariant }) => addVariant('phx-submit-loading', ['.phx-submit-loading&', '.phx-submit-loading &'])),
plugin(({ addVariant }) => addVariant('phx-change-loading', ['.phx-change-loading&', '.phx-change-loading &'])),
Expand Down
4 changes: 2 additions & 2 deletions demo/config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ config :demo, DemoWeb.Endpoint,
config :demo, Demo.Repo, migration_primary_key: [name: :id, type: :binary_id]

config :esbuild,
version: "0.24.0",
version: "0.24.2",
default: [
args:
~w(assets/js/app.js --bundle --target=es2017 --outdir=priv/static/assets --external:/fonts/* --external:/images/*),
Expand All @@ -52,7 +52,7 @@ config :esbuild,
]

config :tailwind,
version: "3.4.16",
version: "3.4.17",
default: [
args: ~w(
--config=assets/tailwind.config.js
Expand Down
4 changes: 2 additions & 2 deletions demo/lib/demo_web/components/layouts/admin.html.heex
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
</label>
</:label>
<li>
<.link navigate="/" class="flex justify-between text-error hover:bg-base-200">
<.link navigate="/" class="text-error flex justify-between hover:bg-base-200">
<p>Logout</p>
<Backpex.HTML.CoreComponents.icon name="hero-arrow-right-on-rectangle" class="h-5 w-5" />
</.link>
Expand Down Expand Up @@ -92,5 +92,5 @@
</Backpex.HTML.Layout.sidebar_section>
</:sidebar>
<Backpex.HTML.Layout.flash_messages flash={@flash} />
<%= @inner_content %>
{@inner_content}
</Backpex.HTML.Layout.app_shell>
2 changes: 1 addition & 1 deletion demo/lib/demo_web/components/layouts/app.html.heex
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<%= @inner_content %>
{@inner_content}
6 changes: 3 additions & 3 deletions demo/lib/demo_web/components/layouts/root.html.heex
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<!DOCTYPE html>
<html lang="en" class="h-full [scrollbar-gutter:stable]" data-theme={assigns[:theme] || "light"}>
<html lang="en" class="[scrollbar-gutter:stable] h-full" data-theme={assigns[:theme] || "light"}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="csrf-token" content={get_csrf_token()} />
<.sentry_meta_tag />
<.live_title suffix=" · Backpex">
<%= assigns[:page_title] || "Phoenix Admin Panel build with PETAL" %>
{assigns[:page_title] || "Phoenix Admin Panel build with PETAL"}
</.live_title>
<link phx-track-static rel="stylesheet" href={~p"/assets/app.css"} />
<script defer phx-track-static type="text/javascript" src={~p"/assets/app.js"}>
</script>
</head>
<body class="h-full">
<%= @inner_content %>
{@inner_content}
<.analytics />
</body>
</html>
2 changes: 1 addition & 1 deletion demo/lib/demo_web/live/post_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ defmodule DemoWeb.PostLive do
searchable: true,
render: fn assigns ->
~H"""
<p><%= Number.Delimit.number_to_delimited(@value, precision: 0, delimiter: ".") %></p>
<p>{Number.Delimit.number_to_delimited(@value, precision: 0, delimiter: ".")}</p>
"""
end
},
Expand Down
6 changes: 3 additions & 3 deletions demo/lib/demo_web/live/product_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ defmodule DemoWeb.ProductLive do
"""

assigns ->
~H"<p><%= Backpex.HTML.pretty_value(@value) %></p>"
~H"<p>{Backpex.HTML.pretty_value(@value)}</p>"
end,
except: [:index, :resource_action],
align: :center
Expand Down Expand Up @@ -80,7 +80,7 @@ defmodule DemoWeb.ProductLive do
end,
render: fn assigns ->
~H"""
<p><%= Number.Delimit.number_to_delimited(@value, precision: 0, delimiter: ".") %></p>
<p>{Number.Delimit.number_to_delimited(@value, precision: 0, delimiter: ".")}</p>
"""
end
},
Expand Down Expand Up @@ -183,7 +183,7 @@ defmodule DemoWeb.ProductLive do
end

defp file_name(entry) do
[ext | _] = MIME.extensions(entry.client_type)
[ext | _tail] = MIME.extensions(entry.client_type)
"#{entry.uuid}.#{ext}"
end

Expand Down
4 changes: 2 additions & 2 deletions demo/lib/demo_web/live/user_live.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ defmodule DemoWeb.UserLive do
list_existing_files: &list_existing_files/1,
render: fn
%{value: value} = assigns when value == "" or is_nil(value) ->
~H"<p><%= Backpex.HTML.pretty_value(@value) %></p>"
~H"<p>{Backpex.HTML.pretty_value(@value)}</p>"

assigns ->
~H'<img class="h-10 w-auto" src={file_url(@value)} />'
Expand Down Expand Up @@ -276,7 +276,7 @@ defmodule DemoWeb.UserLive do
end

defp file_name(entry) do
[ext | _] = MIME.extensions(entry.client_type)
[ext | _tail] = MIME.extensions(entry.client_type)
"#{entry.uuid}.#{ext}"
end

Expand Down
3 changes: 2 additions & 1 deletion demo/lib/demo_web/resource_actions/upload.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule DemoWeb.ResourceActions.Upload do
consume_upload: &consume_upload/4,
remove_uploads: &remove_uploads/3,
list_existing_files: &list_existing_files/1,
max_entries: 1,
type: :string
},
description: %{
Expand Down Expand Up @@ -105,7 +106,7 @@ defmodule DemoWeb.ResourceActions.Upload do
end

defp file_name(entry) do
[ext | _] = MIME.extensions(entry.client_type)
[ext | _tail] = MIME.extensions(entry.client_type)
"#{entry.uuid}.#{ext}"
end

Expand Down
6 changes: 3 additions & 3 deletions demo/mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule Demo.MixProject do
defp deps do
[
# development
{:ex_doc, "~> 0.35", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.36", only: [:dev, :test], runtime: false},
{:credo, "~> 1.7.5", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test]},
{:mix_audit, "~> 2.0", only: [:dev, :test], runtime: false},
Expand All @@ -47,15 +47,15 @@ defmodule Demo.MixProject do
{:telemetry_poller, "~> 1.0"},
{:telemetry_metrics, "~> 1.0"},
{:gettext, "~> 0.26"},
{:sentry, "~> 10.1"},
{:sentry, "~> 10.8"},
{:hackney, "~> 1.17", override: true},
{:circular_buffer, "~> 0.4.0"},

# phoenix
{:bandit, "~> 1.0"},
{:phoenix, "~> 1.7.6"},
{:phoenix_pubsub, "~> 2.0"},
{:phoenix_live_view, "~> 0.20.0"},
{:phoenix_live_view, "~> 1.0"},
{:phoenix_live_dashboard, "~> 0.8"},
{:phoenix_live_reload, "~> 1.2", only: :dev},

Expand Down
Loading

0 comments on commit 9197914

Please sign in to comment.