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

Rename from environment to context #152

Merged
merged 5 commits into from
Jun 19, 2024
Merged

Conversation

gustavoguichard
Copy link
Collaborator

Environment has always been a word which required some "context" (🥁) to be understood while context is arguably easier.

This change won't be breaking because we are deprecating EnvironmentError and isEnvironmentError and it can be easily replaced by ContextError and isContextError.

src/errors.ts Outdated Show resolved Hide resolved
Comment on lines +24 to +25
assertEquals(isContextError(new ContextError('Yes')), true)
assertEquals(isContextError(new EnvironmentError('Yes')), true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

These are important in this change

assertEquals(isEnvironmentError(new Error('No')), false)
assertEquals(isEnvironmentError(new InputError('No')), false)
assertEquals(isEnvironmentError(new ContextError('Yes')), true)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So are these 2 tests

Copy link
Contributor

@diogob diogob left a comment

Choose a reason for hiding this comment

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

LGTM

@gustavoguichard gustavoguichard merged commit 0c30eb0 into main Jun 19, 2024
1 check passed
@gustavoguichard gustavoguichard deleted the rename-env-to-context branch June 19, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants