Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Issue 2338753003: DevTools: Make eslint mandatory and check node.js/npm modules in presubmit (Closed)

Created:
4 years, 3 months ago by chenwilliam
Modified:
4 years, 2 months ago
Reviewers:
dgozman, lushnikov
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: Make eslint mandatory and check node.js/npm modules in presubmit - Adds presubmit step to ensure users are running on node.js v4 or later and installs node_modules using 'npm install'. If 'npm install' fails (e.g. npm registry has an outage), it's a soft warning that doesn't fail the presubmit check. Most likely, the user already has node_modules installed. - Automatically installs local node.js for Linux users; Windows and Mac users have official node.js installers - Even though this runs 'npm install' with every presubmit, if it has been installed once, running 'npm install' is a quick check (<1 sec to run) - Makes eslint a mandatory presubmit step (before if it wasn't installed, it would skip the step with a soft warning). BUG=642046 Committed: https://crrev.com/6d7f23b089bcfd951446564995916395b579140d Cr-Commit-Position: refs/heads/master@{#425777}

Patch Set 1 #

Patch Set 2 : Fix copyright year #

Total comments: 4

Patch Set 3 : CL feedback #

Patch Set 4 : auto-install local node.js for linux #

Total comments: 4

Patch Set 5 : address CL feedback #

Total comments: 10

Patch Set 6 : address CL feedback #

Patch Set 7 : nit #

Total comments: 5

Patch Set 8 : address CL feedback #

Total comments: 2

Patch Set 9 : Fix node.py #

Unified diffs Side-by-side diffs Delta from patch set Stats (+134 lines, -165 lines) Patch
M third_party/WebKit/Source/devtools/.gitignore View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/PRESUBMIT.py View 1 2 3 chunks +14 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/devtools/package.json View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download
D third_party/WebKit/Source/devtools/scripts/buildbot/node.py View 1 2 3 1 chunk +0 lines, -119 lines 0 comments Download
D third_party/WebKit/Source/devtools/scripts/buildbot/npm.py View 1 2 3 1 chunk +0 lines, -14 lines 0 comments Download
A third_party/WebKit/Source/devtools/scripts/install_node_deps.py View 1 2 3 4 5 6 7 8 1 chunk +106 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/devtools/scripts/lint_javascript.py View 1 2 3 4 4 chunks +8 lines, -28 lines 0 comments Download
A + third_party/WebKit/Source/devtools/scripts/local_node/__init__.py View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/Source/devtools/scripts/local_node/node.py View 1 2 3 8 1 chunk +1 line, -1 line 0 comments Download
A + third_party/WebKit/Source/devtools/scripts/local_node/npm.py View 1 2 3 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 31 (13 generated)
chenwilliam
PTAL.
4 years, 3 months ago (2016-09-13 21:51:38 UTC) #4
chenwilliam
Fixed copyright year.
4 years, 3 months ago (2016-09-14 01:20:27 UTC) #5
dgozman
+lushnikov https://codereview.chromium.org/2338753003/diff/20001/third_party/WebKit/Source/devtools/scripts/lint_javascript.py File third_party/WebKit/Source/devtools/scripts/lint_javascript.py (right): https://codereview.chromium.org/2338753003/diff/20001/third_party/WebKit/Source/devtools/scripts/lint_javascript.py#newcode58 third_party/WebKit/Source/devtools/scripts/lint_javascript.py:58: print("!! NOTE: Javascript linting is mandatory") Replace this ...
4 years, 3 months ago (2016-09-14 16:37:42 UTC) #7
chenwilliam
PTAL. https://codereview.chromium.org/2338753003/diff/20001/third_party/WebKit/Source/devtools/scripts/lint_javascript.py File third_party/WebKit/Source/devtools/scripts/lint_javascript.py (right): https://codereview.chromium.org/2338753003/diff/20001/third_party/WebKit/Source/devtools/scripts/lint_javascript.py#newcode58 third_party/WebKit/Source/devtools/scripts/lint_javascript.py:58: print("!! NOTE: Javascript linting is mandatory") On 2016/09/14 ...
4 years, 3 months ago (2016-09-15 00:40:11 UTC) #8
chenwilliam
PTAL. Changes since previous patchset: - Automatically installs local node.js for Linux users; Windows and ...
4 years, 2 months ago (2016-09-23 22:07:36 UTC) #13
lushnikov
Summing up, we're supporting two workflows: 1. Chromium workflow. We assume there's no node.js/npm installed, ...
4 years, 2 months ago (2016-09-27 03:55:13 UTC) #14
chenwilliam
So there's two workflows but I would rephrase the assumption for chromium workflow that we ...
4 years, 2 months ago (2016-09-27 17:30:58 UTC) #15
lushnikov
Let's introduce a resolveNodePaths() function which returns a tuple of (nodePath, npmPath) which satisfies out ...
4 years, 2 months ago (2016-09-27 19:01:21 UTC) #16
chenwilliam
PTAL. I've simplified the logic for resolving node/npm path and reduced the print outputs. https://codereview.chromium.org/2338753003/diff/100001/third_party/WebKit/Source/devtools/scripts/install_node_deps.py ...
4 years, 2 months ago (2016-10-05 01:21:33 UTC) #18
lushnikov
https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py File third_party/WebKit/Source/devtools/PRESUBMIT.py (right): https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py#newcode40 third_party/WebKit/Source/devtools/PRESUBMIT.py:40: def _CheckNodeAndNPMModules(input_api, output_api): do we really need this presubmit ...
4 years, 2 months ago (2016-10-05 16:22:49 UTC) #19
chenwilliam
PTAL. https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py File third_party/WebKit/Source/devtools/PRESUBMIT.py (right): https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py#newcode40 third_party/WebKit/Source/devtools/PRESUBMIT.py:40: def _CheckNodeAndNPMModules(input_api, output_api): On 2016/10/05 16:22:49, lushnikov wrote: ...
4 years, 2 months ago (2016-10-05 17:59:19 UTC) #20
lushnikov
overall, looks good! Let's clean a few nits and it's ready to go https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py File ...
4 years, 2 months ago (2016-10-07 17:05:43 UTC) #21
chenwilliam
PTAL. https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py File third_party/WebKit/Source/devtools/PRESUBMIT.py (right): https://codereview.chromium.org/2338753003/diff/140001/third_party/WebKit/Source/devtools/PRESUBMIT.py#newcode40 third_party/WebKit/Source/devtools/PRESUBMIT.py:40: def _CheckNodeAndNPMModules(input_api, output_api): On 2016/10/07 17:05:43, lushnikov wrote: ...
4 years, 2 months ago (2016-10-10 19:36:18 UTC) #22
lushnikov
i tried it, it worked seamlessly for me on Linux lgtm % comments https://codereview.chromium.org/2338753003/diff/200001/third_party/WebKit/Source/devtools/scripts/local_node/node.py File ...
4 years, 2 months ago (2016-10-12 22:10:19 UTC) #23
chenwilliam
https://codereview.chromium.org/2338753003/diff/200001/third_party/WebKit/Source/devtools/scripts/local_node/node.py File third_party/WebKit/Source/devtools/scripts/local_node/node.py (right): https://codereview.chromium.org/2338753003/diff/200001/third_party/WebKit/Source/devtools/scripts/local_node/node.py#newcode17 third_party/WebKit/Source/devtools/scripts/local_node/node.py:17: print('Usage: {} <version>'.format(sys.argv[0])) On 2016/10/12 22:10:19, lushnikov wrote: > ...
4 years, 2 months ago (2016-10-17 19:32:27 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2338753003/220001
4 years, 2 months ago (2016-10-17 19:33:00 UTC) #27
commit-bot: I haz the power
Committed patchset #9 (id:220001)
4 years, 2 months ago (2016-10-17 21:06:03 UTC) #29
commit-bot: I haz the power
4 years, 2 months ago (2016-10-17 21:09:13 UTC) #31
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/6d7f23b089bcfd951446564995916395b579140d
Cr-Commit-Position: refs/heads/master@{#425777}

Powered by Google App Engine
This is Rietveld 408576698