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

Use global transform for babelify #22927

Merged
merged 6 commits into from Jun 20, 2019

Conversation

dreamofabear
Copy link

Simplifies some code paths.

#22848 (comment)

@dreamofabear dreamofabear requested a review from rsimha June 19, 2019 19:59
@@ -404,6 +404,17 @@ function finishBundle(srcFilename, destDir, destFilename, options) {
}
}

/**
* Returns array of relative paths to "dependencies" defined in package.json.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should this comment say "devDependencies"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, thanks.

{
// Transform "node_modules/", but ignore devDependencies (on Travis).
'global': isTravisBuild(),
'ignore': devDependencies(),
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a performance optimization.

@dreamofabear dreamofabear merged commit 6093a86 into ampproject:master Jun 20, 2019
@dreamofabear dreamofabear deleted the use-babel-global branch June 20, 2019 16:03
[
'babelify',
{
'global': isTravisBuild(),
Copy link
Contributor

@rsimha rsimha Jun 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@choumx I just ran some unit tests locally, and I think this is now necessary for local runs too. Changing this line to true, plus wiping the Travis cache might fix things. (I think!)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, I actually didn't change this line.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, what I meant was now that you're relying on this to transform node_modules, it's necessary to enable global: true for local testing and on Travis.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think https://travis-ci.org/ampproject/amphtml/jobs/548325896 is failing because of this too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link you posted confirms my suspicion. The failing runs are all coverage runs, which uses a different babelify config. I've sent out a fix in #22951, which I believe should handle this.

dreamofabear pushed a commit that referenced this pull request Jun 20, 2019
thekorn pushed a commit to edelight/amphtml that referenced this pull request Sep 11, 2019
* Attempt to use babelify.global.

* Oops, no ES6 in build-system/.

* Simplify some code.

* Set ignore for babelify in karma.conf.js.

* Add comment.

* Fix comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants