Skip to content

remove top level await#7

Merged
vijithassar merged 4 commits intomasterfrom
top-level-await
Nov 27, 2018
Merged

remove top level await#7
vijithassar merged 4 commits intomasterfrom
top-level-await

Conversation

@vijithassar
Copy link
Collaborator

Removes the top-level async function wrapper, which causes a number of problems; consequently, top-level use of the await keyword is no longer allowed.

Removes the top level async function that had previously been wrapped around the transformed code. This ensures consistent behavior between node and lit-node, which became an issue after pull request #5 made it possible to load lit-node as a module instead of using it as a drop-in replacement for the node interpreter. This means top-level use of the await keyword is no longer allowed. Fixes #6.
The test checking whether error locations are properly located in stack traces is part of a larger set of tests which are all contained in test.md, and it tests against its own location within that file, which means it is possible for the test to fail when other tests are edited if those edits result in changes to the line number of the stack trace test within the test.md file. This would be best handled be moving it into a discrete file which is unlikely to be edited at all, but so long as the tests are lumped together in a single monolithic test suite, it is at least useful to move the position of the stack trace up so edits to the other tests are less likely to affect its line number within the file.
ensure tests pass before publishing to npm
@vijithassar vijithassar merged commit 1934339 into master Nov 27, 2018
@vijithassar vijithassar deleted the top-level-await branch November 27, 2018 19:44
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.

1 participant