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.
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
compile using babel for compatibility with older versions #96
compile using babel for compatibility with older versions #96
Changes from 14 commits
296103f
af6a94a
23bad05
148149f
440dd1a
12c769c
bf2688c
8cbc7d5
08420b1
b78e027
6334c8c
83cee96
900c8d1
1f093f3
3700c83
132ce56
0b8640b
8c1ec34
d8b0377
60c33c8
a038165
e6bb4e6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
How are we running the tests without building (
npm run build
) on this platform?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.
Oh I see now. By not running the build step, we're testing against the old parser and will fail when we go to add a new feature.
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 don't recall if the build routine works or not (I can try for parity if you like), but it is not needed because the tests are able to run using
@babel/register
testing against the source instead ofdist
files.(I only needed to switch to testing the
dist
files in the branch where I manually confirmed the old Node builds were still working. But that branch had to undo ESM in the test files and fixtures, avoid other ES6 features, as well as revert to the vulnerable Mocha 3.)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 don't understand. Why would we be able to run "against the source" using
@babel/register
but not compile? Isn't@babel/register
just compiling on the fly and running that?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.
On the much older Node versions,
@babel/register
doesn't work (I switched those to avoid using babel register in favor of just testing againstdist
), andbabel-register
doesn't seem to be able to understand the import statements as @babel/register does.As far as Node 6 that is failing on Travis, yes,
@babel/register
is compiling on the fly so the babel component should be doable, but it appears that the current@rollup/pluginutils
(used by the current versions of@rollup/plugin-commonjs
and@rollup/plugin-node-resolve
needed in the Rollup config file) is using object spread properties which weren't supported in Node 6. Note that it wouldn't be enough to go back just to an older version here either, as these were previously not in the@rollup
scope but were their own packages. But if we go too far back in our toolchain, then certain other features might not have been supported then. And even if we can use the older Rollup deps. across machines, then it may mean adding a version with vulnerabilities.Is it really critical that the build scripts are confirmed to work on Node 6? These aren't available to work in the npm releases anyways (since the rollup config is not in
package.json
files
and Rollup, etc. are devDeps).This should really only be needed for those compiling from source on the repo who would presumably have access to more up to date machines. Seems it may be some unnecessary work for little benefit (not to mention adding to the travis build time).
But I can try to see if we can get it to work for Node 6 if it is important.