-
Notifications
You must be signed in to change notification settings - Fork 774
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: support for raw "unsafe bindings" #411
Merged
threepointone
merged 2 commits into
cloudflare:main
from
ObsidianMinor:feat/unsafe-bindings
Feb 10, 2022
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
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
There are no files selected for viewing
This file contains 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,10 @@ | ||
--- | ||
"wrangler": patch | ||
--- | ||
|
||
feat: unsafe-bindings | ||
|
||
Adds support for "unsafe bindings", that is, bindings that aren't supported by wrangler, but are | ||
desired when uploading a Worker to Cloudflare. This allows you to use beta features before | ||
official support is added to wrangler, while also letting you migrate to proper support for the | ||
feature when desired. Note: these bindings may not work everywhere, and may break at any time. |
This file contains 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.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have it configured to trim trailing whitespace on save on VS Code (which makes sense for most projects I work on). But in this project from what I can tell trailing whitespace is necessary for tests that test console output (since they make empty lines).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would really like to have all trailing whitespace removed in this project.
Which tests were failing when trimmed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any test with a snapshot with an empty line. It makes an inline snapshot like this
Which if you have trim whitespace on save enabled will immediately remove the spaces that are actually needed for the snapshot. An alternative solution to this is moving the snapshots to their own files instead and just not editing them manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I follow, does it trim whitespace inside the snapshot string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, there's significant whitespace on this "empty" line
Remove trailing whitespace would delete all the whitespace on the line, including the significant whitespace required for the test.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ugh!!! That's really horrible.
We should fix the
std.out
to remove such blank lines, since we are already do other processing on this output for testing.Either way, we should not allow trailing whitespace in our code.