We know figuring out the process for contributing to an open source project can be intimidating, so we created this issue as a way for you to learn the ropes. (If you feel comfortable contributing to open source projects, please leave this issue for someone else.)
amp-bind is a new AMP extension that adds custom interactivity via data-binding and expressions. The expression language is a subset of JS and includes array and object literals.
Currently, trailing commas are valid ES5 JS but are not valid in amp-bind expressions. This is standard style convention that should be supported and will enable cleaner code.
[1, 2, 3,] // Trailing comma after "3".
{a: 'a', b: 'b', c: 'c',} // Trailing comma after "c".
Update amp-bind's expression language to support trailing commas! 😃
array and object rules.gulp compile-bind-expr to recompile the Jison grammar into JS (bind-expr-impl.js).Fixes #10404. in the description and mention @choumx in the PR description.Once approved, your changes will be merged. ⚡⚡⚡Congrats on making your first contribution to the AMP Project!⚡⚡⚡ You'll be able to see it live across the web soon!
Thanks, and we hope to see more contributions from you soon.
If you have questions ask in this issue or on your Pull Request (if you've created one) or see the How to get help section of the Getting Started guide. You can also add a comment to this issue and mention me @choumx with your question.
hi @choumx, I'd very much like to work on this issue. Can I proceed?
@blueyedgeek Great! Go for it. 👍
Hi @choumx,
I'm having issues getting the tests to run locally (I haven't made any changes yet), I keep getting the error: Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
What can I do about this?
@blueyedgeek Which tests are timing out? Can you show a Gist with the command and full output? Thanks.
Sure thing. Here's a gist: https://gist.github.com/blueyedgeek/5e29b34f9b26d36f7311ab68783e91c7
Thanks. We've had some issues with local test flakiness and your errors looks related. Please ignore those for now while we investigate.
I won't be able to test if my additions to the parser generator actually work if I am unable to run tests. Is there some other way for me to manually test that if my additions work or not?
Try syncing now that #10473 is merged. You can safely ignore tests unrelated to amp-bind, e.g. run:
gulp test --files=extensions/amp-bind/0.1/test/test* --watch
Also, once you create a PR, the full test suite will be run on Travis which may be more predictable for timeout-risk tests (depending on your personal machine's configuration).
Sorry about the hassle and thanks for contributing! 🙏