Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FormData and FormDataFromSelf #4011

Open
wants to merge 7 commits into
base: next-minor
Choose a base branch
from

Conversation

KhraksMamtsov
Copy link
Contributor

Type

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

I tried to solve this issue #3986

import { Schema } from 'effect'

const fdSchema = S.FormData(S.Struct({
    num: S.NumberFromString
}))

the interesting part was that when encoding, information about an empty array is lost - I solved this using ast-based parsing - I'm not sure if this is the right or complete solution

Related

Copy link

changeset-bot bot commented Nov 27, 2024

🦋 Changeset detected

Latest commit: edc9cdf

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

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

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

@github-actions github-actions bot changed the base branch from main to next-minor November 27, 2024 13:20
@IMax153
Copy link
Member

IMax153 commented Nov 27, 2024

cc @gcanti specifically for input here

@github-actions github-actions bot force-pushed the next-minor branch 3 times, most recently from e882714 to 7e81971 Compare November 27, 2024 22:51
"effect": minor
---

`FormData` and `FormDataFromSelf` have benn added
Copy link
Member

Choose a reason for hiding this comment

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

been

@github-actions github-actions bot force-pushed the next-minor branch 4 times, most recently from a60b469 to 396c9bd Compare November 29, 2024 23:08
fieldsTypes.arrays.forEach((arrayFieldKey) => (obj[arrayFieldKey] = []))

fd.forEach((value, key) => {
if (typeof value !== "string") return
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should also handle File / Blob instances.

@github-actions github-actions bot force-pushed the next-minor branch 2 times, most recently from 3f5cf6b to 5c39db6 Compare November 30, 2024 08:48
@effect-bot effect-bot force-pushed the next-minor branch 30 times, most recently from 8dfabca to c341aad Compare January 22, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Discussion Ongoing
Development

Successfully merging this pull request may close these issues.

5 participants