Skip to content

Commit

Permalink
v0.33.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lpil committed Dec 5, 2024
1 parent cba54bd commit d63abec
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 129 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
# Changelog

## v0.33.0 - 2024-12-03
## v0.33.0 - 2024-12-05

- The `gleam/erlang/process` module gains the `receive_forever` function.
- The `gleam/os` environment functions have been removed.

## v0.32.0 - 2024-11-28

Expand Down
2 changes: 1 addition & 1 deletion gleam.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "gleam_erlang"

version = "0.32.0"
version = "0.33.0"
licences = ["Apache-2.0"]
description = "A Gleam library for working with Erlang"

Expand Down
86 changes: 0 additions & 86 deletions src/gleam/erlang/os.gleam
Original file line number Diff line number Diff line change
@@ -1,89 +1,3 @@
//// Access to the shell's environment variables

import gleam/dict.{type Dict}

/// Returns the list of all available environment variables as a list of key,
/// tuples.
///
/// ## Examples
///
/// ```gleam
/// get_all_env()
/// // -> dict.from_list([
/// // #("SHELL", "/bin/bash"),
/// // #("PWD", "/home/j3rn"),
/// // ...
/// // ])
/// ```
///
@deprecated("Please use the envoy package instead")
@external(erlang, "gleam_erlang_ffi", "get_all_env")
pub fn get_all_env() -> Dict(String, String)

/// Returns the value associated with the given environment variable name.
///
/// ## Examples
/// ```gleam
/// get_env("SHELL")
/// // -> "/bin/bash"
/// ```
///
/// ```gleam
/// get_env(name: "PWD")
/// // -> "/home/j3rn"
/// ```
///
@deprecated("Please use the envoy package instead")
@external(erlang, "gleam_erlang_ffi", "get_env")
pub fn get_env(name name: String) -> Result(String, Nil)

/// Associates the given value with the given environment variable name.
///
/// ## Examples
///
/// ```gleam
/// set_env("MYVAR", "MYVALUE")
/// // -> Nil
/// get_env("MYVAR")
/// // -> "MYVALUE"
/// ```
///
/// ```gleam
/// set_env(value: "MYVALUE", name: "MYVAR")
/// // -> Nil
/// get_env("MYVAR")
/// // -> "MYVALUE"
/// ```
///
@deprecated("Please use the envoy package instead")
@external(erlang, "gleam_erlang_ffi", "set_env")
pub fn set_env(name name: String, value value: String) -> Nil

/// Removes the environment variable with the given name.
///
/// Returns Nil regardless of whether the variable ever existed.
///
/// ## Examples
///
/// ```gleam
/// get_env("MYVAR")
/// // -> Ok("MYVALUE")
/// unset_env("MYVAR")
/// // -> Nil
/// get_env("MYVAR")
/// // -> Error(Nil)
/// ```
///
/// ```gleam
/// unset_env(name: "MYVAR")
/// // -> Nil
/// get_env("MYVAR")
/// // -> Error(Nil)
/// ```
@deprecated("Please use the envoy package instead")
@external(erlang, "gleam_erlang_ffi", "unset_env")
pub fn unset_env(name name: String) -> Nil

/// Represents operating system kernels
pub type OsFamily {
// The family which includes modern versions of the Windows operating system.
Expand Down
41 changes: 0 additions & 41 deletions test/gleam/erlang/env_test.gleam

This file was deleted.

0 comments on commit d63abec

Please sign in to comment.