Skip to content

Commit

Permalink
Integrate Elixir 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
g-andrade committed Jan 23, 2025
1 parent f0422c8 commit 428d815
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 6 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ on:
workflow_dispatch: # enables "click to run" button

env:
ELIXIR_VERSION_ON_WHICH_TO_CHECK_STYLE: '1.17' # Should be highest in matrix
ELIXIR_VERSIONS_ON_WHICH_TO_RUN_DIALYZER: "['1.12', '1.13', '1.14', '1.15', '1.16', '1.17']"
ELIXIR_VERSION_ON_WHICH_TO_CHECK_STYLE: '1.18' # Should be highest in matrix
ELIXIR_VERSIONS_ON_WHICH_TO_RUN_DIALYZER: "['1.12', '1.13', '1.14', '1.15', '1.16', '1.17', '1.18']"

jobs:
ci:
Expand All @@ -47,7 +47,8 @@ jobs:
'1.14',
'1.15',
'1.16',
'1.17'
'1.17',
'1.18'
]
os: ['ubuntu-20.04']
steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/elixir_version_to_otp_version.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
"1.14": "26.2",
"1.15": "26.2",
"1.16": "26.2",
"1.17": "27.1"
"1.17": "27.2",
"1.18": "27.2"
}
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

### Added

- Elixir 1.18 to CI
- OTP 27.2 to CI

## [0.2.0] - 2024-10-12

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Hex downloads](https://img.shields.io/hexpm/dt/sqids.svg)](https://hex.pm/packages/sqids)
[![License](https://img.shields.io/hexpm/l/sqids.svg)](https://github.com/sqids/sqids-elixir/blob/main/LICENSE)
[![Elixir Versions](https://img.shields.io/badge/Elixir-1.7%20to%201.17-blue)](https://elixir-lang.org/)
[![Elixir Versions](https://img.shields.io/badge/Elixir-1.7%20to%201.18-blue)](https://elixir-lang.org/)
[![Erlang Versions](https://img.shields.io/badge/Erlang%2FOTP-21.3%20to%2027-blue)](https://www.erlang.org)
[![CI status](https://github.com/sqids/sqids-elixir/actions/workflows/ci.yml/badge.svg)](https://github.com/sqids/sqids-elixir/actions/workflows/ci.yml)

Expand Down
4 changes: 3 additions & 1 deletion lib/sqids/alphabet.ex
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,9 @@ defmodule Sqids.Alphabet do

@spec get_slice_chars!(t(), pos_integer) :: [byte, ...]
def get_slice_chars!(alphabet, size) when size >= 1 and size <= map_size(alphabet) do
Enum.reduce((size - 1)..0, _acc = [], fn index, acc -> [char_at!(alphabet, index) | acc] end)
(size - 1)
|> Range.new(0, -1)
|> Enum.reduce(_acc = [], fn index, acc -> [char_at!(alphabet, index) | acc] end)
end

@spec known_symbol?(t(), String.t()) :: boolean
Expand Down

2 comments on commit 428d815

@slashmili
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please release this into hex 🙏

@g-andrade
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.2.1 tagged and pushed to Hex

Please sign in to comment.