Skip to content

Update all AMP devDependencies to their latest versions#12472

Merged
rsimha merged 1 commit intoampproject:masterfrom
rsimha:2017-12-14-UpdateAll
Dec 21, 2017
Merged

Update all AMP devDependencies to their latest versions#12472
rsimha merged 1 commit intoampproject:masterfrom
rsimha:2017-12-14-UpdateAll

Conversation

@rsimha
Copy link
Copy Markdown
Contributor

@rsimha rsimha commented Dec 14, 2017

This PR does the following:

  1. Runs yarn upgrade --dev --exact --latest. With this, all the packages in AMP's devDependencies are at their latest versions. (The packages in dependencies remain unchanged.)
  2. Fixes all the errors and warnings that are currently seen with yarn check

Full list of packages that were updated, with new versions:

"ajv": "5.5.2",
"ajv-keywords": "2.1.1",
"ava": "0.24.0",
"babel-preset-env": "1.6.1",
"babelify": "8.0.0",
"bluebird": "3.5.1",
"body-parser": "1.18.2",
"browserify": "14.5.0",
"browserify-istanbul": "3.0.1",
"chalk": "2.3.0",
"del": "3.0.0",
"eslint": "4.13.1",
"esprima": "4.0.0",
"express": "4.16.2",
"fetch-mock": "5.13.1",
"formidable": "1.1.1",
"fs-extra": "5.0.0",
"gulp-exec": "2.1.3",
"gulp-file": "0.3.0",
"gulp-git": "2.4.2",
"gulp-if": "2.0.2",
"gulp-load-plugins": "1.5.0",
"gulp-replace": "0.6.1",
"gulp-sourcemaps": "2.6.1",
"gulp-uglify": "3.0.0",
"gulp-util": "3.0.8",
"gulp-watch": "4.3.11",
"gulp-wrap": "0.13.0",
"gzip-size": "4.1.0",
"jsdom": "11.5.1",
"markdown-link-check": "3.1.5",
"minimatch": "3.0.4",
"moment": "2.20.1",
"morgan": "1.9.0",
"nodemon": "1.14.0",
"phantomjs-prebuilt": "2.1.16",
"pretty-bytes": "4.0.2",
"react-dates": "16.0.1",
"request": "2.83.0",
"rimraf": "2.6.2",
"through2": "2.0.3",
"touch": "3.1.0",
"uglifyify": "4.0.5",

Follow up to #12179, #12450, #12476, #12486, #12499, and #12512
Partial fix for #12181
Fixes #12565

@ampprojectbot ampprojectbot added this to the Pending Triage milestone Dec 18, 2017
@rsimha rsimha self-assigned this Dec 18, 2017
@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 18, 2017

/to @choumx @erwinmombay

@rsimha rsimha requested a review from cramforce December 18, 2017 22:37
@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 18, 2017

/cc @cramforce

package.json Outdated
"dependencies": {
"babel-polyfill": "6.26.0",
"document-register-element": "1.5.0",
"document-register-element": "1.7.0",
Copy link
Copy Markdown
Member

@erwinmombay erwinmombay Dec 18, 2017

Choose a reason for hiding this comment

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

im hesitant in updating this without thorough testing (this is the only change here that is not a dev dep)

enough that this change should be in its own PR

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Noted. What does document-register-element do, and what kind of testing must we do? Also, is there any reason these four items must live in dependencies and not devDependencies?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

document-register-element is a polyfill for browsers that don't support custom elements, this is going to be mostly old iOS i believe.

yes, these items are in dependencies and not devDependencies since these are node modules that are compiled with the production runtime (meaning they are included in the code that we serve) and not a tool/development dependency

We just need to understand what changed between 1.5 -> 1.6 -> 1.7 and test on browsers that don't support custom element and ones that do

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Honestly, it might be a clean update but since it affects production code, id rather be cautious

Copy link
Copy Markdown
Contributor Author

@rsimha rsimha Dec 18, 2017

Choose a reason for hiding this comment

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

Gotcha, re: dependencies vs devDependencies.

Here's the commit log for document-register-element. About a dozen code changes between versions 1.5.0 and 1.7.0. @dvoytenko @erwinmombay, think you can look at them and see if you're worried about anything? https://github.com/WebReflection/document-register-element/commits/master

FWIW, out integration_tests shard on Travis now runs tests on 12 browsers, including old versions of iOS. (11.0, 10.0, and 9.0). See https://travis-ci.org/ampproject/amphtml/jobs/318328159

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@erwinmombay I've reverted the change to the document-register-element version. I agree that it should go in as a separate PR that's easy to revert if needed.

PTAL.

@rsimha rsimha changed the title Update all dependencies to their latest versions Update all AMP devDependencies to their latest versions Dec 18, 2017
"atob": "2.0.3",
"autoprefixer": "6.7.0",
"ava": "0.15.2",
"autoprefixer": "7.2.3",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll LGTM, but i'd like autoprefixer, cssnano, postcss, and postcss-import to be on a separate PR (these are all css processing tools that i'd like to manually test or create a golden file for)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Gotcha. I'll hold off on merging this PR, and first do those upgrades in a separate PR. I'll ping this PR after that. Thanks for the comments!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@erwinmombay Sent you #12512 with the CSS changes alone.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Update: #12512 has now been tested with the golden file that was added in #12526, and should be merged soon.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Merged and rebased. This PR no longer contains any CSS-related package changes.

@rsimha
Copy link
Copy Markdown
Contributor Author

rsimha commented Dec 20, 2017

@erwinmombay This has been rebased on all the previous changes. PTAL.

@erwinmombay
Copy link
Copy Markdown
Member

erwinmombay commented Dec 21, 2017

@rsimha-amp not sure how #12472 overlaps with this PR. can you explain?

@rsimha rsimha merged commit 8debbfd into ampproject:master Dec 21, 2017
@rsimha rsimha deleted the 2017-12-14-UpdateAll branch December 21, 2017 17:06
"react": "16.2.0",
"react-addons-shallow-compare": "15.6.2",
"react-dates": "13.0.6",
"react-dates": "16.0.1",
Copy link
Copy Markdown
Member

@erwinmombay erwinmombay Dec 21, 2017

Choose a reason for hiding this comment

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

@cvializ should this be in dependencies and not devDependencies? we bundle this with your extension correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just merged this, but I think it should be moved to dependencies. I'll move it up in a follow up PR right now and revert it to its old 13.0.6 version, and update the documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

It turns out that @cvializ added several packages to package.json in his date picker PR. I've started a new discussion / PR at #12571 to see if this is indeed a concern. It's possible that the only package that needs to move to dependencies is react-dates, since the only import from node_modules in amp-date-picker is here: https://github.com/ampproject/amphtml/blob/master/extensions/amp-date-picker/0.1/amp-date-picker.css

Let's continue this discussion in #12571.

"gzip-size": "4.1.0",
"is-running": "2.1.0",
"jison": "0.4.18",
"jsdom": "9.2.1",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this broke a few live list examples

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@erwinmombay Any chance there's a newer version that fixes the bug? If not, we can roll back and add an exception so this package is manually updated.

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.

yarn check reports multiple errors due to duplicate versions in devDependency packages

4 participants