Skip to content

Make NONE a Symbol; add unwrap/isNone#67

Merged
shgysk8zer0 merged 1 commit intomasterfrom
feature/helpers
Mar 3, 2026
Merged

Make NONE a Symbol; add unwrap/isNone#67
shgysk8zer0 merged 1 commit intomasterfrom
feature/helpers

Conversation

@shgysk8zer0
Copy link
Member

Replace NONE (previously null) with a unique Symbol so NONE is distinct from succeed(null); add utility functions isNone() and unwrap(result) and tighten ResultTuple/Success/Failure validations (prevent succeeding/failing with NONE, add toStringTag). Adjust async/sync attempt handling to avoid incorrect Promise.try usage and ensure attemptSync returns promises when needed. Update tests to expect NONE and include unwrap coverage. Also bump .nvmrc (Node 24), update CI npm install flags, update changelog and package metadata/dependencies accordingly.

Description and issue

Please add relevant sections (Added, removed, changed, fixed) to CHANGELOG.md

List of significant changes made

Replace NONE (previously null) with a unique Symbol so NONE is distinct from succeed(null); add utility functions isNone() and unwrap(result) and tighten ResultTuple/Success/Failure validations (prevent succeeding/failing with NONE, add toStringTag). Adjust async/sync attempt handling to avoid incorrect Promise.try usage and ensure attemptSync returns promises when needed. Update tests to expect NONE and include unwrap coverage. Also bump .nvmrc (Node 24), update CI npm install flags, update changelog and package metadata/dependencies accordingly.
@shgysk8zer0 shgysk8zer0 self-assigned this Mar 3, 2026
@shgysk8zer0 shgysk8zer0 added the enhancement New feature or request label Mar 3, 2026
@socket-security
Copy link

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​shgysk8zer0/​eslint-config@​1.0.5 ⏵ 1.0.7100 +27100100 +14100 +21100

View full report

@shgysk8zer0 shgysk8zer0 enabled auto-merge March 3, 2026 18:39
@shgysk8zer0 shgysk8zer0 merged commit 713c399 into master Mar 3, 2026
7 checks passed
@shgysk8zer0 shgysk8zer0 deleted the feature/helpers branch March 3, 2026 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant