-
Notifications
You must be signed in to change notification settings - Fork 6
(v1) Unify error normalization and formatting #1157
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
48 commits
Select commit
Hold shift + click to select a range
427ced6
fix: tackle issue #709
yamcodes ca7c067
fix: resolve biome formatting and sync examples issues
yamcodes df34eed
Merge branch 'dev' into 709-unify-error-normalization-and-formatting
yamcodes 94f275f
fix: address PR review comments on error formatters and sensitive key…
yamcodes 083837c
fix: resolve size-limit failures by splitting redact utilities and op…
yamcodes b2b2e85
fix: resolve exactOptionalPropertyTypes errors in parse-standard.ts
yamcodes c0a5415
Merge branch 'v1' into 709-unify-error-normalization-and-formatting
yamcodes 99c91e5
Merge branch 'v1' into 709-unify-error-normalization-and-formatting
yamcodes 2321b1c
refactor: reorder internal imports and exports for improved consistency
yamcodes 6a8da0c
fix: validate rawVal type in parse-standard and update bundle size li…
yamcodes dd03fe5
refactor: extract getProp helper and add code-review skill definition
yamcodes 160e78f
refactor: centralize error mapping and metadata extraction for ArkTyp…
yamcodes f187548
fix(review): remove test file .ts extensions, restructure changeset, …
yamcodes 2aa8a93
docs(skill): clarify that gh pr view completely omits inline code rev…
yamcodes 52ff00c
refactor: remove redundant index file references from import paths ac…
yamcodes e51c73b
docs(changeset): elaborate on breaking change error message details
yamcodes 0658e96
refactor: migrate root entrypoint imports from @/ to @ and update tsc…
yamcodes 9b4eb34
refactor: use @ instead of @/index in dynamic import in isolation test
yamcodes fe83263
refactor: resolve second round of PR comments on error formatting and…
yamcodes 40432cf
[autofix.ci] apply automated fixes
autofix-ci[bot] df87424
refactor: use imperative verb form and remove implementation details …
yamcodes e6ffea9
refactor: consolidate environment coercion logic and standardize path…
yamcodes 4539b0a
refactor: replace Record<string, unknown> with Dict<string> in enviro…
yamcodes c90f532
refactor: move coerceEnvironment to dedicated module and update error…
yamcodes ad54a52
feat: upgrade arkenv to major version and document breaking API chang…
yamcodes 53ba7dc
feat: import Dict type from repo types for shared coercion utilities
yamcodes c3fc46a
chore: add job execution logs and update package dependencies
yamcodes 979c137
docs(review): resolve PR #1157 review comments, document safeArkEnv
yamcodes 5d4e876
docs: document architectural design decisions regarding module isolat…
yamcodes aefb0d7
feat: add documentation for hiding internal comments from .d.ts files…
yamcodes 63fa480
docs: address review comments
yamcodes 101fbc9
refactor: update safeArkEnv return type to provide issues directly in…
yamcodes da4c544
refactor: replace safeArkEnv utility with a safe option in the arkenv…
yamcodes f922185
[autofix.ci] apply automated fixes
autofix-ci[bot] 16e4d27
feat: add { safe: true } configuration option to arkenv for non-throw…
yamcodes 6737534
refactor: remove engine-specific metadata from EnvIssue and deprecate…
yamcodes 5066f2a
style: fix minor whitespace inconsistencies and clean up code formatting
yamcodes de18bbc
feat: disable strict validation by setting safe: false in plugin conf…
yamcodes 43c7858
refactor: omit safe property from ArkEnvConfig in vite and bun plugin…
yamcodes 3dd42d7
docs: clarify that the safe option is unsupported in bun and vite plu…
yamcodes ceb0496
docs: document the safe option and its limitations in framework integ…
yamcodes 10a2103
refactor: enforce strict type safety for error code mappings using sa…
yamcodes befc6c9
fix: ensure type safety when accessing error maps by using the 'in' o…
yamcodes 43206f2
fix: update error code mappings to support comprehensive ArkType vali…
yamcodes 0ca680b
docs: remove safe parsing documentation from quickstart guide
yamcodes c9532d0
refactor: rename executeSafe to safeExecute for consistent naming con…
yamcodes 11999c9
feat: remove safe option from integrations and enforce safe: false in…
yamcodes df221c2
chore: ignore job_logs.txt and clear existing log entries
yamcodes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
|
yamcodes marked this conversation as resolved.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| --- | ||
| "arkenv": minor | ||
|
yamcodes marked this conversation as resolved.
Outdated
|
||
| --- | ||
|
|
||
| #### Refactor error system to use normalized `EnvIssue` and add `safeCreateEnv` API | ||
|
|
||
| **BREAKING CHANGE**: Unify validation error formatting across all validation engines (ArkType and Standard Schema). The exact text format of the `message` property on thrown `ArkEnvError` instances has changed. Check and update any test suites or CI/CD pipelines that assert on the exact error message text. | ||
|
|
||
| - Implement `EnvIssue` type and attach the full list of errors to `ArkEnvError.issues` for programmatic access. | ||
| - Add `safeCreateEnv` API to both `arkenv` and `arkenv/standard` entries for non-throwing validation in Server Actions or Next.js components. | ||
| - Standardize Standard Schema validation errors to look and act like ArkType validation errors, resolving received values and flattening paths. | ||
| - Redact credentials and sensitive environment variables by default in stringified error reports. | ||
| - Support `debugSecrets` configuration and `process.env.ARKENV_DEBUG_SECRETS=true` to temporarily bypass redaction. | ||
|
yamcodes marked this conversation as resolved.
Outdated
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.