diff --git a/tools/turbolizer/package-lock.json b/tools/turbolizer/package-lock.json index 166fdd2b38..05a5daf031 100644 --- a/tools/turbolizer/package-lock.json +++ b/tools/turbolizer/package-lock.json @@ -4,42 +4,51 @@ "lockfileVersion": 1, "requires": true, "dependencies": { + "@types/commander": { + "version": "2.12.2", + "resolved": "https://registry.npmjs.org/@types/commander/-/commander-2.12.2.tgz", + "integrity": "sha512-0QEFiR8ljcHp9bAbWxecjVRuAMr16ivPiGOw6KFQBVrVd0RQIcM3xKdRisH2EDWgVWujiYtHwhSkSUoAAGzH7Q==", + "dev": true, + "requires": { + "commander": "*" + } + }, "@types/d3": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@types/d3/-/d3-5.0.0.tgz", "integrity": "sha512-BVfPw7ha+UgsG24v6ymerMY4+pJgQ/6p+hJA4loCeaaqV9snGS/G6ReVaQEn8Himn67dWn/Je9WhRbnDO7MzLw==", "requires": { - "@types/d3-array": "1.2.1", - "@types/d3-axis": "1.0.10", - "@types/d3-brush": "1.0.8", - "@types/d3-chord": "1.0.7", - "@types/d3-collection": "1.0.7", - "@types/d3-color": "1.2.1", - "@types/d3-contour": "1.2.1", - "@types/d3-dispatch": "1.0.6", - "@types/d3-drag": "1.2.1", - "@types/d3-dsv": "1.0.33", - "@types/d3-ease": "1.0.7", - "@types/d3-fetch": "1.1.2", - "@types/d3-force": "1.1.1", - "@types/d3-format": "1.3.0", - "@types/d3-geo": "1.10.3", - "@types/d3-hierarchy": "1.1.2", - "@types/d3-interpolate": "1.2.0", - "@types/d3-path": "1.0.7", - "@types/d3-polygon": "1.0.6", - "@types/d3-quadtree": "1.0.5", - "@types/d3-random": "1.1.1", - "@types/d3-scale": "2.0.1", - "@types/d3-scale-chromatic": "1.2.0", - "@types/d3-selection": "1.3.1", - "@types/d3-shape": "1.2.3", - "@types/d3-time": "1.0.8", - "@types/d3-time-format": "2.1.0", - "@types/d3-timer": "1.0.7", - "@types/d3-transition": "1.1.1", - "@types/d3-voronoi": "1.1.7", - "@types/d3-zoom": "1.7.1" + "@types/d3-array": "*", + "@types/d3-axis": "*", + "@types/d3-brush": "*", + "@types/d3-chord": "*", + "@types/d3-collection": "*", + "@types/d3-color": "*", + "@types/d3-contour": "*", + "@types/d3-dispatch": "*", + "@types/d3-drag": "*", + "@types/d3-dsv": "*", + "@types/d3-ease": "*", + "@types/d3-fetch": "*", + "@types/d3-force": "*", + "@types/d3-format": "*", + "@types/d3-geo": "*", + "@types/d3-hierarchy": "*", + "@types/d3-interpolate": "*", + "@types/d3-path": "*", + "@types/d3-polygon": "*", + "@types/d3-quadtree": "*", + "@types/d3-random": "*", + "@types/d3-scale": "*", + "@types/d3-scale-chromatic": "*", + "@types/d3-selection": "*", + "@types/d3-shape": "*", + "@types/d3-time": "*", + "@types/d3-time-format": "*", + "@types/d3-timer": "*", + "@types/d3-transition": "*", + "@types/d3-voronoi": "*", + "@types/d3-zoom": "*" } }, "@types/d3-array": { @@ -52,7 +61,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-axis/-/d3-axis-1.0.10.tgz", "integrity": "sha512-5YF0wfdQMPKw01VAAupLIlg/T4pn5M3/vL9u0KZjiemnVnnKBEWE24na4X1iW+TfZiYJ8j+BgK2KFYnAAT54Ug==", "requires": { - "@types/d3-selection": "1.3.1" + "@types/d3-selection": "*" } }, "@types/d3-brush": { @@ -60,7 +69,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-brush/-/d3-brush-1.0.8.tgz", "integrity": "sha512-9Thv09jvolu9T1BE3fHmIeYSgbwSpdxtF6/A5HZEDjSTfgtA0mtaXRk5AiWOo0KjuLsI+/7ggD3ZGN5Ye8KXPQ==", "requires": { - "@types/d3-selection": "1.3.1" + "@types/d3-selection": "*" } }, "@types/d3-chord": { @@ -83,8 +92,8 @@ "resolved": "https://registry.npmjs.org/@types/d3-contour/-/d3-contour-1.2.1.tgz", "integrity": "sha512-p8iC4KeVFyT3qRTGQRj0Jf5QDdPsDUevBEnma7gEsY1yDolVSLanG2eFAiLV+xj8/5DK7oU7Ey8z0drs3pbsug==", "requires": { - "@types/d3-array": "1.2.1", - "@types/geojson": "7946.0.3" + "@types/d3-array": "*", + "@types/geojson": "*" } }, "@types/d3-dispatch": { @@ -97,7 +106,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-drag/-/d3-drag-1.2.1.tgz", "integrity": "sha512-J9liJ4NNeV0oN40MzPiqwWjqNi3YHCRtHNfNMZ1d3uL9yh1+vDuo346LBEr8yyBm30WHvrHssAkExVZrGCswtA==", "requires": { - "@types/d3-selection": "1.3.1" + "@types/d3-selection": "*" } }, "@types/d3-dsv": { @@ -115,7 +124,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-fetch/-/d3-fetch-1.1.2.tgz", "integrity": "sha512-w6ANZv/mUh+6IV3drT22zgPWMRobzuGXhzOZC8JPD+ygce0/Vx6vTci3m3dizkocnQQCOwNbrWWWPYqpWiKzRQ==", "requires": { - "@types/d3-dsv": "1.0.33" + "@types/d3-dsv": "*" } }, "@types/d3-force": { @@ -133,7 +142,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-geo/-/d3-geo-1.10.3.tgz", "integrity": "sha512-hfdaxM2L0wA9mDZrrSf2o+DyhEpnJYCiAN+lHFtpfZOVCQrYBA5g33sGRpUbAvjSMyO5jkHbftMWPEhuCMChSg==", "requires": { - "@types/geojson": "7946.0.3" + "@types/geojson": "*" } }, "@types/d3-hierarchy": { @@ -146,7 +155,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-interpolate/-/d3-interpolate-1.2.0.tgz", "integrity": "sha512-qM9KlUrqbwIhBRtw9OtAEbkis1AxsOJEun2uxaX/vEsBp3vyNBmhPz9boXXEqic9ZRi7fCpUNRwyZvxa0PioIw==", "requires": { - "@types/d3-color": "1.2.1" + "@types/d3-color": "*" } }, "@types/d3-path": { @@ -174,7 +183,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-scale/-/d3-scale-2.0.1.tgz", "integrity": "sha512-D5ZWv8ToLvqacE7XkdMNHMiiVDULdDxT7FMMGU0YJC3/nVzBmApjyTyxracUWOQyY3KK7YhZ05on8pOcNi0dfQ==", "requires": { - "@types/d3-time": "1.0.8" + "@types/d3-time": "*" } }, "@types/d3-scale-chromatic": { @@ -192,7 +201,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-shape/-/d3-shape-1.2.3.tgz", "integrity": "sha512-iP9TcX0EVi+LlX+jK9ceS+yhEz5abTitF+JaO2ugpRE/J+bccaYLe/0/3LETMmdaEkYarIyboZW8OF67Mpnj1w==", "requires": { - "@types/d3-path": "1.0.7" + "@types/d3-path": "*" } }, "@types/d3-time": { @@ -215,7 +224,7 @@ "resolved": "https://registry.npmjs.org/@types/d3-transition/-/d3-transition-1.1.1.tgz", "integrity": "sha512-GHTghl0YYB8gGgbyKxVLHyAp9Na0HqsX2U7M0u0lGw4IdfEaslooykweZ8fDHW13T+KZeZAuzhbmqBZVFO+6kg==", "requires": { - "@types/d3-selection": "1.3.1" + "@types/d3-selection": "*" } }, "@types/d3-voronoi": { @@ -228,8 +237,8 @@ "resolved": "https://registry.npmjs.org/@types/d3-zoom/-/d3-zoom-1.7.1.tgz", "integrity": "sha512-Ofjwz6Pt53tRef9TAwwayN+JThNVYC/vFOepa/H4KtwjhsqkmEseHvc2jpJM7vye5PQ5XHtTSOpdY4Y/6xZWEg==", "requires": { - "@types/d3-interpolate": "1.2.0", - "@types/d3-selection": "1.3.1" + "@types/d3-interpolate": "*", + "@types/d3-selection": "*" } }, "@types/geojson": { @@ -237,47 +246,59 @@ "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.3.tgz", "integrity": "sha512-BYHiG1vQJ7T93uswzuXZ0OBPWqj5tsAPtaMDQADV8sn2InllXarwg9llr6uaW22q1QCwBZ81gVajOpYWzjesug==" }, + "@types/semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-41qEJgBH/TWgo5NFSvBCJ1qkoi3Q6ONSF2avrHq1LVEZfYpdHmj0y9SuTK+u9ZhG1sYQKBL1AWXKyLWP4RaUoQ==", + "dev": true + }, "commander": { "version": "2.15.1", "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==" }, + "commandpost": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/commandpost/-/commandpost-1.3.0.tgz", + "integrity": "sha512-T62tyrmYTkaRDbV2z1k2yXTyxk0cFptXYwo1cUbnfHtp7ThLgQ9/90jG1Ym5WLZgFhvOTaHA5VSARWJ9URpLDw==", + "dev": true + }, "d3": { "version": "5.4.0", "resolved": "https://registry.npmjs.org/d3/-/d3-5.4.0.tgz", "integrity": "sha1-CQGZqFadHeI9BKP/B/4TYJX+p04=", "requires": { - "d3-array": "1.2.1", - "d3-axis": "1.0.8", - "d3-brush": "1.0.4", - "d3-chord": "1.0.4", - "d3-collection": "1.0.4", - "d3-color": "1.2.0", - "d3-contour": "1.2.0", - "d3-dispatch": "1.0.3", - "d3-drag": "1.2.1", - "d3-dsv": "1.0.8", - "d3-ease": "1.0.3", - "d3-fetch": "1.1.0", - "d3-force": "1.1.0", - "d3-format": "1.3.0", - "d3-geo": "1.10.0", - "d3-hierarchy": "1.1.6", - "d3-interpolate": "1.2.0", - "d3-path": "1.0.5", - "d3-polygon": "1.0.3", - "d3-quadtree": "1.0.3", - "d3-random": "1.1.0", - "d3-scale": "2.0.0", - "d3-scale-chromatic": "1.3.0", - "d3-selection": "1.3.0", - "d3-shape": "1.2.0", - "d3-time": "1.0.8", - "d3-time-format": "2.1.1", - "d3-timer": "1.0.7", - "d3-transition": "1.1.1", - "d3-voronoi": "1.1.2", - "d3-zoom": "1.7.1" + "d3-array": "1", + "d3-axis": "1", + "d3-brush": "1", + "d3-chord": "1", + "d3-collection": "1", + "d3-color": "1", + "d3-contour": "1", + "d3-dispatch": "1", + "d3-drag": "1", + "d3-dsv": "1", + "d3-ease": "1", + "d3-fetch": "1", + "d3-force": "1", + "d3-format": "1", + "d3-geo": "1", + "d3-hierarchy": "1", + "d3-interpolate": "1", + "d3-path": "1", + "d3-polygon": "1", + "d3-quadtree": "1", + "d3-random": "1", + "d3-scale": "2", + "d3-scale-chromatic": "1", + "d3-selection": "1", + "d3-shape": "1", + "d3-time": "1", + "d3-time-format": "2", + "d3-timer": "1", + "d3-transition": "1", + "d3-voronoi": "1", + "d3-zoom": "1" } }, "d3-array": { @@ -295,11 +316,11 @@ "resolved": "https://registry.npmjs.org/d3-brush/-/d3-brush-1.0.4.tgz", "integrity": "sha1-AMLyOAGfJPbAoZSibUGhUw/+e8Q=", "requires": { - "d3-dispatch": "1.0.3", - "d3-drag": "1.2.1", - "d3-interpolate": "1.2.0", - "d3-selection": "1.3.0", - "d3-transition": "1.1.1" + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" } }, "d3-chord": { @@ -307,8 +328,8 @@ "resolved": "https://registry.npmjs.org/d3-chord/-/d3-chord-1.0.4.tgz", "integrity": "sha1-fexPC6iG9xP+ERxF92NBT290yiw=", "requires": { - "d3-array": "1.2.1", - "d3-path": "1.0.5" + "d3-array": "1", + "d3-path": "1" } }, "d3-collection": { @@ -326,7 +347,7 @@ "resolved": "https://registry.npmjs.org/d3-contour/-/d3-contour-1.2.0.tgz", "integrity": "sha512-nDzZ2KDnrgTrhMjV8TH0RNrljk6uPNAGkG/v/1SKNVvJa2JU8szjh7o2ZYTX8yufA2oCI5HyeMqbzwiB+oDoIA==", "requires": { - "d3-array": "1.2.1" + "d3-array": "^1.1.1" } }, "d3-dispatch": { @@ -339,8 +360,8 @@ "resolved": "https://registry.npmjs.org/d3-drag/-/d3-drag-1.2.1.tgz", "integrity": "sha512-Cg8/K2rTtzxzrb0fmnYOUeZHvwa4PHzwXOLZZPwtEs2SKLLKLXeYwZKBB+DlOxUvFmarOnmt//cU4+3US2lyyQ==", "requires": { - "d3-dispatch": "1.0.3", - "d3-selection": "1.3.0" + "d3-dispatch": "1", + "d3-selection": "1" } }, "d3-dsv": { @@ -348,9 +369,9 @@ "resolved": "https://registry.npmjs.org/d3-dsv/-/d3-dsv-1.0.8.tgz", "integrity": "sha512-IVCJpQ+YGe3qu6odkPQI0KPqfxkhbP/oM1XhhE/DFiYmcXKfCRub4KXyiuehV1d4drjWVXHUWx4gHqhdZb6n/A==", "requires": { - "commander": "2.15.1", - "iconv-lite": "0.4.23", - "rw": "1.3.3" + "commander": "2", + "iconv-lite": "0.4", + "rw": "1" } }, "d3-ease": { @@ -363,7 +384,7 @@ "resolved": "https://registry.npmjs.org/d3-fetch/-/d3-fetch-1.1.0.tgz", "integrity": "sha512-j+V4vtT6dceQbcKYLtpTueB8Zvc+wb9I93WaFtEQIYNADXl0c1ZJMN3qQo0CssiTsAqK8pePwc7f4qiW+b0WOg==", "requires": { - "d3-dsv": "1.0.8" + "d3-dsv": "1" } }, "d3-force": { @@ -371,10 +392,10 @@ "resolved": "https://registry.npmjs.org/d3-force/-/d3-force-1.1.0.tgz", "integrity": "sha512-2HVQz3/VCQs0QeRNZTYb7GxoUCeb6bOzMp/cGcLa87awY9ZsPvXOGeZm0iaGBjXic6I1ysKwMn+g+5jSAdzwcg==", "requires": { - "d3-collection": "1.0.4", - "d3-dispatch": "1.0.3", - "d3-quadtree": "1.0.3", - "d3-timer": "1.0.7" + "d3-collection": "1", + "d3-dispatch": "1", + "d3-quadtree": "1", + "d3-timer": "1" } }, "d3-format": { @@ -387,7 +408,7 @@ "resolved": "https://registry.npmjs.org/d3-geo/-/d3-geo-1.10.0.tgz", "integrity": "sha512-VK/buVGgexthTTqGRNXQ/LSo3EbOFu4p2Pjud5drSIaEnOaF2moc8A3P7WEljEO1JEBEwbpAJjFWMuJiUtoBcw==", "requires": { - "d3-array": "1.2.1" + "d3-array": "1" } }, "d3-hierarchy": { @@ -400,7 +421,7 @@ "resolved": "https://registry.npmjs.org/d3-interpolate/-/d3-interpolate-1.2.0.tgz", "integrity": "sha512-zLvTk8CREPFfc/2XglPQriAsXkzoRDAyBzndtKJWrZmHw7kmOWHNS11e40kPTd/oGk8P5mFJW5uBbcFQ+ybxyA==", "requires": { - "d3-color": "1.2.0" + "d3-color": "1" } }, "d3-path": { @@ -428,12 +449,12 @@ "resolved": "https://registry.npmjs.org/d3-scale/-/d3-scale-2.0.0.tgz", "integrity": "sha512-Sa2Ny6CoJT7x6dozxPnvUQT61epGWsgppFvnNl8eJEzfJBG0iDBBTJAtz2JKem7Mb+NevnaZiDiIDHsuWkv6vg==", "requires": { - "d3-array": "1.2.1", - "d3-collection": "1.0.4", - "d3-format": "1.3.0", - "d3-interpolate": "1.2.0", - "d3-time": "1.0.8", - "d3-time-format": "2.1.1" + "d3-array": "^1.2.0", + "d3-collection": "1", + "d3-format": "1", + "d3-interpolate": "1", + "d3-time": "1", + "d3-time-format": "2" } }, "d3-scale-chromatic": { @@ -441,8 +462,8 @@ "resolved": "https://registry.npmjs.org/d3-scale-chromatic/-/d3-scale-chromatic-1.3.0.tgz", "integrity": "sha512-YwMbiaW2bStWvQFByK8hA6hk7ToWflspIo2TRukCqERd8isiafEMBXmwfh8c7/0Z94mVvIzIveRLVC6RAjhgeA==", "requires": { - "d3-color": "1.2.0", - "d3-interpolate": "1.2.0" + "d3-color": "1", + "d3-interpolate": "1" } }, "d3-selection": { @@ -455,7 +476,7 @@ "resolved": "https://registry.npmjs.org/d3-shape/-/d3-shape-1.2.0.tgz", "integrity": "sha1-RdAVOPBkuv0F6j1tLLdI/YxB93c=", "requires": { - "d3-path": "1.0.5" + "d3-path": "1" } }, "d3-time": { @@ -468,7 +489,7 @@ "resolved": "https://registry.npmjs.org/d3-time-format/-/d3-time-format-2.1.1.tgz", "integrity": "sha512-8kAkymq2WMfzW7e+s/IUNAtN/y3gZXGRrdGfo6R8NKPAA85UBTxZg5E61bR6nLwjPjj4d3zywSQe1CkYLPFyrw==", "requires": { - "d3-time": "1.0.8" + "d3-time": "1" } }, "d3-timer": { @@ -481,12 +502,12 @@ "resolved": "https://registry.npmjs.org/d3-transition/-/d3-transition-1.1.1.tgz", "integrity": "sha512-xeg8oggyQ+y5eb4J13iDgKIjUcEfIOZs2BqV/eEmXm2twx80wTzJ4tB4vaZ5BKfz7XsI/DFmQL5me6O27/5ykQ==", "requires": { - "d3-color": "1.2.0", - "d3-dispatch": "1.0.3", - "d3-ease": "1.0.3", - "d3-interpolate": "1.2.0", - "d3-selection": "1.3.0", - "d3-timer": "1.0.7" + "d3-color": "1", + "d3-dispatch": "1", + "d3-ease": "1", + "d3-interpolate": "1", + "d3-selection": "^1.1.0", + "d3-timer": "1" } }, "d3-voronoi": { @@ -499,11 +520,25 @@ "resolved": "https://registry.npmjs.org/d3-zoom/-/d3-zoom-1.7.1.tgz", "integrity": "sha512-sZHQ55DGq5BZBFGnRshUT8tm2sfhPHFnOlmPbbwTkAoPeVdRTkB4Xsf9GCY0TSHrTD8PeJPZGmP/TpGicwJDJQ==", "requires": { - "d3-dispatch": "1.0.3", - "d3-drag": "1.2.1", - "d3-interpolate": "1.2.0", - "d3-selection": "1.3.0", - "d3-transition": "1.1.1" + "d3-dispatch": "1", + "d3-drag": "1", + "d3-interpolate": "1", + "d3-selection": "1", + "d3-transition": "1" + } + }, + "editorconfig": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-0.15.0.tgz", + "integrity": "sha512-j7JBoj/bpNzvoTQylfRZSc85MlLNKWQiq5y6gwKhmqD2h1eZ+tH4AXbkhEJD468gjDna/XMx2YtSkCxBRX9OGg==", + "dev": true, + "requires": { + "@types/commander": "^2.11.0", + "@types/semver": "^5.4.0", + "commander": "^2.11.0", + "lru-cache": "^4.1.1", + "semver": "^5.4.1", + "sigmund": "^1.0.1" } }, "iconv-lite": { @@ -511,9 +546,25 @@ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", "requires": { - "safer-buffer": "2.1.2" + "safer-buffer": ">= 2.1.2 < 3" } }, + "lru-cache": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.3.tgz", + "integrity": "sha512-fFEhvcgzuIoJVUF8fYr5KR0YqxD238zgObTps31YdADwPPAp82a4M8TrckkWyx7ekNlf9aBcVn81cFwwXngrJA==", + "dev": true, + "requires": { + "pseudomap": "^1.0.2", + "yallist": "^2.1.2" + } + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", + "dev": true + }, "rw": { "version": "1.3.3", "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", @@ -524,11 +575,39 @@ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" }, + "semver": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.5.0.tgz", + "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", + "dev": true + }, + "sigmund": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", + "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", + "dev": true + }, "typescript": { "version": "2.9.1", "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.1.tgz", "integrity": "sha512-h6pM2f/GDchCFlldnriOhs1QHuwbnmj6/v7499eMHqPeW4V2G0elua2eIc2nu8v2NdHV0Gm+tzX83Hr6nUFjQA==", "dev": true + }, + "typescript-formatter": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/typescript-formatter/-/typescript-formatter-7.2.2.tgz", + "integrity": "sha512-V7vfI9XArVhriOTYHPzMU2WUnm5IMdu9X/CPxs8mIMGxmTBFpDABlbkBka64PZJ9/xgQeRpK8KzzAG4MPzxBDQ==", + "dev": true, + "requires": { + "commandpost": "^1.0.0", + "editorconfig": "^0.15.0" + } + }, + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=", + "dev": true } } } diff --git a/tools/turbolizer/package.json b/tools/turbolizer/package.json index 14cf9606f7..5c77b30313 100644 --- a/tools/turbolizer/package.json +++ b/tools/turbolizer/package.json @@ -6,7 +6,8 @@ "scripts": { "build": "tsc", "watch": "tsc --watch", - "deploy": "./deploy.sh" + "deploy": "./deploy.sh", + "format": "tsfmt -r" }, "author": "The V8 team", "license": "MIT", @@ -19,6 +20,7 @@ "url": "https://github.com/v8/v8.git" }, "devDependencies": { - "typescript": "^2.9.1" + "typescript": "^2.9.1", + "typescript-formatter": "^7.2.2" } } diff --git a/tools/turbolizer/src/code-view.ts b/tools/turbolizer/src/code-view.ts index de393be6fd..9188043c1c 100644 --- a/tools/turbolizer/src/code-view.ts +++ b/tools/turbolizer/src/code-view.ts @@ -86,7 +86,7 @@ class CodeView extends View { return this.sourcePositionToHtmlElement.get(key); } - updateSelection(scrollIntoView: boolean = false) : void { + updateSelection(scrollIntoView: boolean = false): void { const mkVisible = new ViewElements(this.divNode.parentNode as HTMLElement); for (const [sp, el] of this.sourcePositionToHtmlElement.entries()) { const isSelected = this.selection.isKeySelected(sp); @@ -112,12 +112,12 @@ class CodeView extends View { return ordereList.childNodes as NodeListOf; } - onSelectLine(lineNumber:number, doClear:boolean) { + onSelectLine(lineNumber: number, doClear: boolean) { const key = anyToString(lineNumber); if (doClear) { this.selectionHandler.clear(); } - const positions = this.sourceResolver.linetoSourcePositions(lineNumber - 1); + const positions = this.sourceResolver.linetoSourcePositions(lineNumber - 1); if (positions !== undefined) { this.selectionHandler.select(positions, undefined); } @@ -182,7 +182,7 @@ class CodeView extends View { view.selectionHandler.clear(); } - const base:number = source.startPosition; + const base: number = source.startPosition; let current = 0; const lineListDiv = this.getHtmlCodeLines(); let newlineAdjust = 0; diff --git a/tools/turbolizer/src/constants.ts b/tools/turbolizer/src/constants.ts index dab608d792..369c97749f 100644 --- a/tools/turbolizer/src/constants.ts +++ b/tools/turbolizer/src/constants.ts @@ -21,9 +21,9 @@ const COLLAPSE_PANE_BUTTON_VISIBLE = 'button-input'; const COLLAPSE_PANE_BUTTON_INVISIBLE = 'button-input-invisible'; const UNICODE_BLOCK = '▋'; const PROF_COLS = [ - { perc: 0, col: { r: 255, g: 255, b: 255 } }, + { perc: 0, col: { r: 255, g: 255, b: 255 } }, { perc: 0.5, col: { r: 255, g: 255, b: 128 } }, - { perc: 5, col: { r: 255, g: 128, b: 0 } }, - { perc: 15, col: { r: 255, g: 0, b: 0 } }, - { perc: 100, col: { r: 0, g: 0, b: 0 } } + { perc: 5, col: { r: 255, g: 128, b: 0 } }, + { perc: 15, col: { r: 255, g: 0, b: 0 } }, + { perc: 100, col: { r: 0, g: 0, b: 0 } } ]; diff --git a/tools/turbolizer/src/edge.ts b/tools/turbolizer/src/edge.ts index d6d3beed89..a7c65df59c 100644 --- a/tools/turbolizer/src/edge.ts +++ b/tools/turbolizer/src/edge.ts @@ -89,4 +89,4 @@ class Edge { } -const edgeToStr = (e:Edge) => e.stringID(); +const edgeToStr = (e: Edge) => e.stringID(); diff --git a/tools/turbolizer/src/graph-layout.ts b/tools/turbolizer/src/graph-layout.ts index 7155136348..14915409f1 100644 --- a/tools/turbolizer/src/graph-layout.ts +++ b/tools/turbolizer/src/graph-layout.ts @@ -6,7 +6,7 @@ var DEFAULT_NODE_ROW_SEPARATION = 130 var traceLayout = false; -function newGraphOccupation(graph){ +function newGraphOccupation(graph) { var isSlotFilled = []; var maxSlot = 0; var minSlot = 0; @@ -42,7 +42,7 @@ function newGraphOccupation(graph){ function findSpace(pos, width, direction) { var widthSlots = Math.floor((width + NODE_INPUT_WIDTH - 1) / - NODE_INPUT_WIDTH); + NODE_INPUT_WIDTH); var currentSlot = positionToSlot(pos + width / 2); var currentScanSlot = currentSlot; var widthSlotsRemainingLeft = widthSlots; @@ -53,14 +53,14 @@ function newGraphOccupation(graph){ currentScanSlot = currentSlot + (mod ? -1 : 1) * (slotsChecked >> 1); if (!isSlotFilled[slotToIndex(currentScanSlot)]) { if (mod) { - if (direction <= 0) --widthSlotsRemainingLeft + if (direction <= 0)--widthSlotsRemainingLeft } else { - if (direction >= 0) --widthSlotsRemainingRight + if (direction >= 0)--widthSlotsRemainingRight } if (widthSlotsRemainingLeft == 0 || - widthSlotsRemainingRight == 0 || - (widthSlotsRemainingLeft + widthSlotsRemainingRight) == widthSlots && - (widthSlots == slotsChecked)) { + widthSlotsRemainingRight == 0 || + (widthSlotsRemainingLeft + widthSlotsRemainingRight) == widthSlots && + (widthSlots == slotsChecked)) { if (mod) { return [currentScanSlot, widthSlots]; } else { @@ -79,7 +79,7 @@ function newGraphOccupation(graph){ function setIndexRange(from, to, value) { if (to < from) { - throw("illegal slot range"); + throw ("illegal slot range"); } while (from <= to) { if (from > maxSlot) { @@ -127,7 +127,7 @@ function newGraphOccupation(graph){ } var occupation = { - occupyNodeInputs: function(node) { + occupyNodeInputs: function (node) { for (var i = 0; i < node.inputs.length; ++i) { if (node.inputs[i].isVisible()) { var edge = node.inputs[i]; @@ -138,14 +138,14 @@ function newGraphOccupation(graph){ console.log("Occupying input " + i + " of " + node.id + " at " + horizontalPos); } occupyPositionRangeWithMargin(horizontalPos, - horizontalPos, - NODE_INPUT_WIDTH / 2); + horizontalPos, + NODE_INPUT_WIDTH / 2); } } } }, - occupyNode: function(node) { - var getPlacementHint = function(n) { + occupyNode: function (node) { + var getPlacementHint = function (n) { var pos = 0; var direction = -1; var outputEdges = 0; @@ -201,28 +201,28 @@ function newGraphOccupation(graph){ return slotToLeftPosition(firstSlot + slotWidth / 2) - (width / 2); } }, - clearOccupiedNodes: function() { - nodeOccupation.forEach(function(o) { + clearOccupiedNodes: function () { + nodeOccupation.forEach(function (o) { clearSlotRange(o[0], o[1]); }); nodeOccupation = []; }, - clearNodeOutputs: function(source) { - source.outputs.forEach(function(edge) { + clearNodeOutputs: function (source) { + source.outputs.forEach(function (edge) { if (edge.isVisible()) { var target = edge.target; for (var i = 0; i < target.inputs.length; ++i) { if (target.inputs[i].source === source) { var horizontalPos = edge.getInputHorizontalPosition(graph); clearPositionRangeWithMargin(horizontalPos, - horizontalPos, - NODE_INPUT_WIDTH / 2); + horizontalPos, + NODE_INPUT_WIDTH / 2); } } } }); }, - print: function() { + print: function () { var s = ""; for (var currentSlot = -40; currentSlot < 40; ++currentSlot) { if (currentSlot != 0) { @@ -251,11 +251,11 @@ function layoutNodeGraph(graph) { // basis for bottom-up DFS to determine rank and node placement. var endNodesHasNoOutputs = []; var startNodesHasNoInputs = []; - graph.nodes.forEach(function(n, i){ + graph.nodes.forEach(function (n, i) { endNodesHasNoOutputs[n.id] = true; startNodesHasNoInputs[n.id] = true; }); - graph.edges.forEach(function(e, i){ + graph.edges.forEach(function (e, i) { endNodesHasNoOutputs[e.source.id] = false; startNodesHasNoInputs[e.target.id] = false; }); @@ -265,7 +265,7 @@ function layoutNodeGraph(graph) { var startNodes = []; var visited = []; var rank = []; - graph.nodes.forEach(function(n, i){ + graph.nodes.forEach(function (n, i) { if (endNodesHasNoOutputs[n.id]) { endNodes.push(n); } @@ -323,7 +323,7 @@ function layoutNodeGraph(graph) { } } - visited = []; + visited = []; function dfsFindRankLate(n) { if (visited[n.id]) return; visited[n.id] = true; @@ -335,7 +335,7 @@ function layoutNodeGraph(graph) { dfsFindRankLate(output); var outputRank = output.rank; if (output.visible && (firstInput || outputRank <= newRank) && - (outputRank > originalRank)) { + (outputRank > originalRank)) { newRank = outputRank - 1; } firstInput = false; @@ -364,15 +364,15 @@ function layoutNodeGraph(graph) { } startNodes.forEach(dfsRankOrder); - endNodes.forEach(function(n) { + endNodes.forEach(function (n) { n.rank = maxRank + 1; }); var rankSets = []; // Collect sets for each rank. - graph.nodes.forEach(function(n, i){ + graph.nodes.forEach(function (n, i) { n.y = n.rank * (DEFAULT_NODE_ROW_SEPARATION + graph.getNodeHeight(n) + - 2 * DEFAULT_NODE_BUBBLE_RADIUS); + 2 * DEFAULT_NODE_BUBBLE_RADIUS); if (n.visible) { if (rankSets[n.rank] === undefined) { rankSets[n.rank] = [n]; @@ -388,7 +388,7 @@ function layoutNodeGraph(graph) { var occupation = newGraphOccupation(graph); var rankCount = 0; - rankSets.reverse().forEach(function(rankSet) { + rankSets.reverse().forEach(function (rankSet) { for (var i = 0; i < rankSet.length; ++i) { occupation.clearNodeOutputs(rankSet[i]); @@ -400,7 +400,7 @@ function layoutNodeGraph(graph) { } var placedCount = 0; - rankSet = rankSet.sort(function(a,b) { + rankSet = rankSet.sort(function (a, b) { return a.visitOrderWithinRank < b.visitOrderWithinRank; }); for (var i = 0; i < rankSet.length; ++i) { @@ -495,8 +495,8 @@ function redetermineGraphBoundingBox(graph) { graph.height = height; const extent = [ - [graph.minGraphX-width/2, graph.minGraphY-height/2], - [graph.maxGraphX+width/2, graph.maxGraphY+height/2] + [graph.minGraphX - width / 2, graph.minGraphY - height / 2], + [graph.maxGraphX + width / 2, graph.maxGraphY + height / 2] ]; graph.panZoom.translateExtent(extent); graph.minScale(); diff --git a/tools/turbolizer/src/graph-view.ts b/tools/turbolizer/src/graph-view.ts index 44c3745338..0dc033e0a7 100644 --- a/tools/turbolizer/src/graph-view.ts +++ b/tools/turbolizer/src/graph-view.ts @@ -92,7 +92,7 @@ class GraphView extends View implements PhaseView { locations.push(node.sourcePosition); } if (node.origin && node.origin.bytecodePosition) { - locations.push({bytecodePosition: node.origin.bytecodePosition}); + locations.push({ bytecodePosition: node.origin.bytecodePosition }); } } graph.state.selection.select(nodes, selected); diff --git a/tools/turbolizer/src/graphmultiview.ts b/tools/turbolizer/src/graphmultiview.ts index b5d8cd1b65..226fc38e03 100644 --- a/tools/turbolizer/src/graphmultiview.ts +++ b/tools/turbolizer/src/graphmultiview.ts @@ -43,7 +43,7 @@ class GraphMultiView extends View { optionElement.text = phase.name; view.selectMenu.add(optionElement); }); - this.selectMenu.onchange = function (this:HTMLSelectElement) { + this.selectMenu.onchange = function (this: HTMLSelectElement) { window.sessionStorage.setItem("lastSelectedPhase", this.selectedIndex.toString()); view.displayPhase(view.sourceResolver.getPhase(this.selectedIndex)); } @@ -58,7 +58,7 @@ class GraphMultiView extends View { this.displayPhase(this.sourceResolver.getPhase(initialPhaseIndex)); } - initializeContent() {} + initializeContent() { } displayPhase(phase) { if (phase.type == 'graph') { diff --git a/tools/turbolizer/src/lang-disassembly.ts b/tools/turbolizer/src/lang-disassembly.ts index 590f9fd804..9312627abd 100644 --- a/tools/turbolizer/src/lang-disassembly.ts +++ b/tools/turbolizer/src/lang-disassembly.ts @@ -3,12 +3,12 @@ // found in the LICENSE file. PR.registerLangHandler( - PR.createSimpleLexer( - [ - [PR.PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/, null, '\''], - [PR.PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0'] - ], - [ // fallthroughStylePatterns - [PR.PR_COMMENT, /;; debug: position \d+/, null], - ]), - ['disassembly']); + PR.createSimpleLexer( + [ + [PR.PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$))/, null, '\''], + [PR.PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0'] + ], + [ // fallthroughStylePatterns + [PR.PR_COMMENT, /;; debug: position \d+/, null], + ]), + ['disassembly']); diff --git a/tools/turbolizer/src/node.ts b/tools/turbolizer/src/node.ts index 8d5783f126..533c51763b 100644 --- a/tools/turbolizer/src/node.ts +++ b/tools/turbolizer/src/node.ts @@ -41,7 +41,7 @@ class GNode { visible: boolean; rank: number; opinfo: string; - labelbbox: {width: number, height: number}; + labelbbox: { width: number, height: number }; isControl() { return this.control; @@ -177,4 +177,4 @@ class GNode { } }; -const nodeToStr = (n:GNode) => "N" + n.id; +const nodeToStr = (n: GNode) => "N" + n.id; diff --git a/tools/turbolizer/src/schedule-view.ts b/tools/turbolizer/src/schedule-view.ts index a7dd7ea046..5f3e852ec0 100644 --- a/tools/turbolizer/src/schedule-view.ts +++ b/tools/turbolizer/src/schedule-view.ts @@ -11,7 +11,7 @@ class ScheduleView extends TextView implements PhaseView { const pane = document.createElement('div'); pane.setAttribute('id', "schedule"); pane.innerHTML = - `
+      `
        
`; @@ -42,7 +42,7 @@ class ScheduleView extends TextView implements PhaseView { elementForBlock(block) { const view = this; - function createElement(tag:string, cls: string|Array, content?:string) { + function createElement(tag: string, cls: string | Array, content?: string) { const el = document.createElement(tag); if (isIterable(cls)) { for (const c of cls) el.classList.add(c); @@ -162,5 +162,5 @@ class ScheduleView extends TextView implements PhaseView { this.selectionHandler.select(select, true); } - onresize() {} + onresize() { } } diff --git a/tools/turbolizer/src/selection-handler.ts b/tools/turbolizer/src/selection-handler.ts index a6fa5c863d..bf0719c8a6 100644 --- a/tools/turbolizer/src/selection-handler.ts +++ b/tools/turbolizer/src/selection-handler.ts @@ -3,22 +3,22 @@ // found in the LICENSE file. interface SelectionHandler { - clear() : void; - select(nodeIds:any, selected:any) : void; - brokeredClear(): void; - brokeredSourcePositionSelect(sourcePositions:any, selected:any): void; + clear(): void; + select(nodeIds: any, selected: any): void; + brokeredClear(): void; + brokeredSourcePositionSelect(sourcePositions: any, selected: any): void; }; interface NodeSelectionHandler { - clear() : void; - select(nodeIds:any, selected:any) : void; - brokeredClear(): void; - brokeredNodeSelect(nodeIds:any, selected:any): void; + clear(): void; + select(nodeIds: any, selected: any): void; + brokeredClear(): void; + brokeredNodeSelect(nodeIds: any, selected: any): void; }; interface BlockSelectionHandler { - clear() : void; - select(nodeIds:any, selected:any) : void; - brokeredClear(): void; - brokeredBlockSelect(blockIds:any, selected:any): void; + clear(): void; + select(nodeIds: any, selected: any): void; + brokeredClear(): void; + brokeredBlockSelect(blockIds: any, selected: any): void; }; diff --git a/tools/turbolizer/src/selection.ts b/tools/turbolizer/src/selection.ts index 06fe482fad..54b685e9d6 100644 --- a/tools/turbolizer/src/selection.ts +++ b/tools/turbolizer/src/selection.ts @@ -4,18 +4,18 @@ class MySelection { selection: any; - stringKey: (o:any) => string; + stringKey: (o: any) => string; constructor(stringKeyFnc) { this.selection = new Map(); this.stringKey = stringKeyFnc; } - isEmpty() : boolean { + isEmpty(): boolean { return this.selection.size == 0; } - clear() : void { + clear(): void { this.selection = new Map(); } @@ -38,7 +38,7 @@ class MySelection { return this.selection.has(this.stringKey(i)); } - isKeySelected(key:string): boolean { + isKeySelected(key: string): boolean { return this.selection.has(key); } diff --git a/tools/turbolizer/src/source-resolver.ts b/tools/turbolizer/src/source-resolver.ts index 8286f88a14..2376fe0645 100644 --- a/tools/turbolizer/src/source-resolver.ts +++ b/tools/turbolizer/src/source-resolver.ts @@ -25,7 +25,7 @@ function sourcePositionToStringKey(sourcePosition): string { function sourcePositionValid(l) { return (typeof l.scriptOffset !== undefined - && typeof l.inliningId !== undefined) || typeof l.bytecodePosition != undefined; + && typeof l.inliningId !== undefined) || typeof l.bytecodePosition != undefined; } interface SourcePosition { @@ -285,8 +285,8 @@ class SourceResolver { if (phase.type != "graph") return; for (const node of phase.data.nodes) { if (node.origin != undefined && - node.origin.bytecodePosition != undefined) { - const position = {bytecodePosition: node.origin.bytecodePosition}; + node.origin.bytecodePosition != undefined) { + const position = { bytecodePosition: node.origin.bytecodePosition }; this.nodePositionMap[node.id] = position; let key = sourcePositionToStringKey(position); if (!this.positionToNodes.has(key)) { @@ -329,7 +329,7 @@ class SourceResolver { this.phases.forEach(f); } - addAnyPositionToLine(lineNumber:number|String, sourcePosition:AnyPosition) { + addAnyPositionToLine(lineNumber: number | String, sourcePosition: AnyPosition) { const lineNumberString = anyToString(lineNumber); if (!this.lineToSourcePositions.has(lineNumberString)) { this.lineToSourcePositions.set(lineNumberString, []); @@ -338,14 +338,14 @@ class SourceResolver { if (!A.includes(sourcePosition)) A.push(sourcePosition); } - setSourceLineToBytecodePosition(sourceLineToBytecodePosition:Array|undefined) { + setSourceLineToBytecodePosition(sourceLineToBytecodePosition: Array | undefined) { if (!sourceLineToBytecodePosition) return; sourceLineToBytecodePosition.forEach((pos, i) => { - this.addAnyPositionToLine(i, {bytecodePosition: pos}); + this.addAnyPositionToLine(i, { bytecodePosition: pos }); }); } - linetoSourcePositions(lineNumber:number|String) { + linetoSourcePositions(lineNumber: number | String) { const positions = this.lineToSourcePositions.get(anyToString(lineNumber)); if (positions === undefined) return []; return positions; @@ -359,11 +359,13 @@ class SourceResolver { const nodeIdStrings = nodeIdsString.split(','); inputs = nodeIdStrings.map((n) => Number.parseInt(n, 10)); } - const node = {id: Number.parseInt(match.groups.id, 10), - label: match.groups.label, - inputs: inputs}; + const node = { + id: Number.parseInt(match.groups.id, 10), + label: match.groups.label, + inputs: inputs + }; if (match.groups.blocks) { - const nodeIdsString = match.groups.blocks.replace(/\s/g, '').replace(/B/g,''); + const nodeIdsString = match.groups.blocks.replace(/\s/g, '').replace(/B/g, ''); const nodeIdStrings = nodeIdsString.split(','); const successors = nodeIdStrings.map((n) => Number.parseInt(n, 10)); state.currentBlock.succ = successors; @@ -378,11 +380,13 @@ class SourceResolver { const blockIdStrings = blockIdsString.split(','); predecessors = blockIdStrings.map((n) => Number.parseInt(n, 10)); } - const block = {id: Number.parseInt(match.groups.id, 10), - isDeferred: match.groups.deferred != undefined, - pred: predecessors.sort(), - succ: [], - nodes: []}; + const block = { + id: Number.parseInt(match.groups.id, 10), + isDeferred: match.groups.deferred != undefined, + pred: predecessors.sort(), + succ: [], + nodes: [] + }; state.blocks[block.id] = block; state.currentBlock = block; } @@ -392,7 +396,7 @@ class SourceResolver { const rules = [ { lineRegexps: - [ /^\s*(?\d+):\ (?