Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.74k stars 246 forks source link

fix `Config.integer` & `Config.number` #3872

Closed KhraksMamtsov closed 4 weeks ago

KhraksMamtsov commented 4 weeks ago

Type

Description

right now Config.integer uses Number.parseInt to parse a string - which doesn't seem strict enough in such scenarios

Config.integer('1.2') -> 1 - defect is expected
Config.integer('1e2') -> 1 - 100 is good enough)
Config.number('123qq') -> 123, but defect is expected

Related

changeset-bot[bot] commented 4 weeks ago

🦋 Changeset detected

Latest commit: 20c06c137b358235433e47165b1b95ec1be94b70

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 34 packages | Name | Type | | ------------------------------- | ----- | | effect | Patch | | @effect/cli | Patch | | @effect/cluster-browser | Patch | | @effect/cluster-node | Patch | | @effect/cluster-workflow | Patch | | @effect/cluster | Patch | | @effect/experimental | Patch | | @effect/opentelemetry | Patch | | @effect/platform-browser | Patch | | @effect/platform-bun | Patch | | @effect/platform-node-shared | Patch | | @effect/platform-node | Patch | | @effect/platform | Patch | | @effect/printer-ansi | Patch | | @effect/printer | Patch | | @effect/rpc-http | Patch | | @effect/rpc | Patch | | @effect/sql-clickhouse | Patch | | @effect/sql-d1 | Patch | | @effect/sql-drizzle | Patch | | @effect/sql-kysely | Patch | | @effect/sql-libsql | Patch | | @effect/sql-mssql | Patch | | @effect/sql-mysql2 | Patch | | @effect/sql-pg | Patch | | @effect/sql-sqlite-bun | Patch | | @effect/sql-sqlite-node | Patch | | @effect/sql-sqlite-react-native | Patch | | @effect/sql-sqlite-wasm | Patch | | @effect/sql | Patch | | @effect/typeclass | Patch | | @effect/vitest | Patch | | @effect/ai | Patch | | @effect/ai-openai | Patch |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR