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

feat: use invariant for assertions #1387

Closed
wants to merge 1 commit into from
Closed

Conversation

43081j
Copy link
Contributor

@43081j 43081j commented Mar 1, 2024

This replaces assert with tiny-invariant in the production code (lib/) while continuing to use node's built-in assert for tests.

The result is a much leaner dependency tree (as shown in the lockfile diff).

part of on ongoing effort to reduce the footprint of various packages in the ecosystem FYI

also, i ran npm run format which has reformatted some missed formatting inconsistencies in unrelated code i haven't otherwise touched

This replaces `assert` with `tiny-invariant` in the production code
(`lib/`) while continuing to use node's built-in `assert` for tests.

The result is a much leaner dependency tree (as shown in the lockfile
diff).
@eventualbuddha
Copy link
Collaborator

Thanks @43081j! I ended up creating #1388 to make the same change but without the formatting changes. If you're still interested in making those changes you can rebase this PR or create a new one. The tiny-invariant change is published in v0.23.5.

@43081j
Copy link
Contributor Author

43081j commented Mar 1, 2024

Awesome, thanks for taking a look so soon!

I'll take a look tomorrow at repurposing this to be a formatting pr since it would still be useful for future contributors (to keep it consistent)

@43081j 43081j closed this Mar 2, 2024
@43081j 43081j deleted the invariant branch March 2, 2024 12:26
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