Merge changes I234d9045,I6966afe9,Ia7e3682f

* changes:
  Update typescript to v3.8.2
  Update bazel/rules_nodejs to v1.6.1
  Make .js files compatible with the typescript compiler
This commit is contained in:
Dmitrii Filippov
2020-06-02 08:00:42 +00:00
committed by Gerrit Code Review
8 changed files with 75 additions and 47 deletions

View File

@@ -60,8 +60,8 @@ http_archive(
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "d0c4bb8b902c1658f42eb5563809c70a06e46015d64057d25560b0eb4bdc9007",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.5.0/rules_nodejs-1.5.0.tar.gz"],
sha256 = "d14076339deb08e5460c221fae5c5e9605d2ef4848eee1f0c81c9ffdc1ab31c1",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/1.6.1/rules_nodejs-1.6.1.tar.gz"],
)
# File is specific to Polymer and copied from the Closure Github -- should be

View File

@@ -4,8 +4,8 @@
"description": "Gerrit Code Review",
"dependencies": {},
"devDependencies": {
"@bazel/rollup": "^1.1.0",
"@bazel/typescript": "^1.0.1",
"@bazel/rollup": "^1.6.1",
"@bazel/typescript": "^1.6.1",
"eslint": "^6.6.0",
"eslint-config-google": "^0.13.0",
"eslint-plugin-html": "^6.0.0",
@@ -15,7 +15,7 @@
"fried-twinkie": "^0.2.2",
"polymer-cli": "^1.9.11",
"prettier": "2.0.5",
"typescript": "^3.7.4",
"typescript": "3.8.2",
"web-component-tester": "^6.5.1"
},
"scripts": {

View File

@@ -14,9 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const {Element, html} = Polymer;
class MyBindSample extends Element {
// Element class exists in all browsers:
// https://developer.mozilla.org/en-US/docs/Web/API/Element
// Rename it to PolymerElement to avoid conflicts. Also,
// typescript reports the following error:
// error TS2451: Cannot redeclare block-scoped variable 'Element'.
const {html, Element: PolymerElement} = Polymer;
class MyBindSample extends PolymerElement {
static get is() { return 'my-bind-sample'; }
static get properties() {
@@ -62,4 +68,4 @@ Gerrit.install(plugin => {
// between the file list and the change log
plugin.registerCustomComponent(
'change-view-integration', 'my-bind-sample');
});
});

View File

@@ -14,9 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const {Element, html} = Polymer;
class RepoCommandLow extends Element {
// Element class exists in all browsers:
// https://developer.mozilla.org/en-US/docs/Web/API/Element
// Rename it to PolymerElement to avoid conflicts. Also,
// typescript reports the following error:
// error TS2451: Cannot redeclare block-scoped variable 'Element'.
const {html, Element: PolymerElement} = Polymer;
class RepoCommandLow extends PolymerElement {
static get is() { return 'repo-command-low'; }
static get properties() {
@@ -70,4 +76,4 @@ Gerrit.install(plugin => {
// Low-level API
plugin.registerCustomComponent(
'repo-command', 'repo-command-low');
});
});

View File

@@ -14,9 +14,15 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
const {Element, html} = Polymer;
class SomeScreenMain extends Element {
// Element class exists in all browsers:
// https://developer.mozilla.org/en-US/docs/Web/API/Element
// Rename it to PolymerElement to avoid conflicts. Also,
// typescript reports the following error:
// error TS2451: Cannot redeclare block-scoped variable 'Element'.
const {html, Element: PolymerElement} = Polymer;
class SomeScreenMain extends PolymerElement {
static get is() { return 'some-screen-main'; }
static get properties() {
@@ -64,4 +70,4 @@ Gerrit.install(plugin => {
plugin.hook('change-metadata-item').onAttached(el => {
el.innerHTML = `<a href="${mainUrl}">Plugin screen</a>`;
});
});
});

View File

@@ -3,8 +3,8 @@
"description": "Gerrit Build Tools",
"browser": false,
"dependencies": {
"@bazel/rollup": "^0.41.0",
"@bazel/typescript": "^1.0.1",
"@bazel/rollup": "^1.6.1",
"@bazel/typescript": "^1.6.1",
"@types/node": "^10.17.12",
"@types/parse5": "^4.0.0",
"@types/parse5-html-rewriting-stream": "^5.1.2",
@@ -16,7 +16,7 @@
"rollup": "^1.27.5",
"rollup-plugin-node-resolve": "^5.2.0",
"rollup-plugin-terser": "^5.1.3",
"typescript": "^3.7.4"
"typescript": "3.8.2"
},
"devDependencies": {},
"license": "Apache-2.0",

View File

@@ -492,15 +492,15 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@bazel/rollup@^0.41.0":
version "0.41.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-0.41.0.tgz#8dfaccc239f3efbae1c816b0ce2aeb6069d23582"
integrity sha512-M+ybGfcxTXnAS1QiaijLEfUznNYLA0cqeGXnYHSRrOhq2U7yesfavxbBtfLSKtg32ktmlHts5te8Zg82BS4DPQ==
"@bazel/rollup@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.6.1.tgz#7ec9d39a3fca23256fca55410339724804802616"
integrity sha512-FhblJkpd8VKl9txhAAIotSsIOHRpPd2FgJG7Op3uV7LfaCVBmUs3XDBZCgfwt5wmEpd3lwCHA1Ei+O/URS2+5w==
"@bazel/typescript@^1.0.1":
version "1.1.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.1.0.tgz#b57ac6c6d627577f394a60fb540fbbdf53bcff0d"
integrity sha512-QnTdb6rwZUR+KfUuAdyazpkA7BOvrWRe7tkPDdyIZHJdBPYdpJW+AapnFSfxvXEIP0Nwesl5KP6Saau0GPiBLg==
"@bazel/typescript@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.6.1.tgz#1bf83c20021d359bc9b532181981ac540584a30c"
integrity sha512-wQ9AASRcG1jLQOpJfNOMjZzPpwIV/9qTOxCFvp55ga6A5a2qveQr8JJ7jHHbBM0LtK+slEPixXmVmtEOwfKsIg==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"
@@ -949,11 +949,16 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.118.tgz#8014a9b1dee0b72b4d7cd142563f1af21241c3a2"
integrity sha512-N33cKXGSqhOYaPiT4xUGsYlPPDwFtQM/6QxJxuMXA/7BcySW+lkn2yigWP7vfs4daiL/7NJNU6DMCqg5N4B+xQ==
"@types/node@^10.1.0", "@types/node@^10.17.12":
"@types/node@^10.1.0":
version "10.17.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c"
integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg==
"@types/node@^10.17.12":
version "10.17.24"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.24.tgz#c57511e3a19c4b5e9692bb2995c40a3a52167944"
integrity sha512-5SCfvCxV74kzR3uWgTYiGxrd69TbT1I6+cMx1A5kEly/IVveJBimtAMlXiEyVFn5DvUFewQWxOOiJhlxeQwxgA==
"@types/node@^4.0.30":
version "4.9.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-4.9.4.tgz#75ef91733afaa856b01e12da6ecf48aa9d5e221f"
@@ -7871,10 +7876,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@^3.7.4:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
typescript@3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a"
integrity sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==
typical@^2.6.0, typical@^2.6.1:
version "2.6.1"

View File

@@ -485,15 +485,15 @@
lodash "^4.17.11"
to-fast-properties "^2.0.0"
"@bazel/rollup@^1.1.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.2.0.tgz#8b9569ed6f1c00d2a833567901f8ee4600a389fb"
integrity sha512-yrXW+AAUoqc9qN/CweD5p8OEN9bNKFjXnXPBRE4w84LxpkmaJFx+yQJ++c1F57zWMoq2o9EV4CM7y+mK8zxwUg==
"@bazel/rollup@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@bazel/rollup/-/rollup-1.6.1.tgz#7ec9d39a3fca23256fca55410339724804802616"
integrity sha512-FhblJkpd8VKl9txhAAIotSsIOHRpPd2FgJG7Op3uV7LfaCVBmUs3XDBZCgfwt5wmEpd3lwCHA1Ei+O/URS2+5w==
"@bazel/typescript@^1.0.1":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.2.0.tgz#ab2016e1d6eb7a86b44536e887f51eaf3d75f1a7"
integrity sha512-hPEG8K0psyEcs6HFRiqZNQwXL/dQ8sXKdrNFWv87+rh+YUNfd58uktoynhllympOPThcbUZcZicLWBEFQOc8nA==
"@bazel/typescript@^1.6.1":
version "1.6.1"
resolved "https://registry.yarnpkg.com/@bazel/typescript/-/typescript-1.6.1.tgz#1bf83c20021d359bc9b532181981ac540584a30c"
integrity sha512-wQ9AASRcG1jLQOpJfNOMjZzPpwIV/9qTOxCFvp55ga6A5a2qveQr8JJ7jHHbBM0LtK+slEPixXmVmtEOwfKsIg==
dependencies:
protobufjs "6.8.8"
semver "5.6.0"
@@ -907,9 +907,9 @@
integrity sha512-rp7La3m845mSESCgsJePNL/JQyhkOJA6G4vcwvVgkDAwHhGdq5GCumxmPjEk1MZf+8p5ZQAUE7tqgQRQTXN7uQ==
"@types/node@^10.1.0":
version "10.17.13"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.13.tgz#ccebcdb990bd6139cd16e84c39dc2fb1023ca90c"
integrity sha512-pMCcqU2zT4TjqYFrWtYHKal7Sl30Ims6ulZ4UFXxI4xbtQqK/qqKwkDoBFCfooRqqmRu9vY3xaJRwxSh673aYg==
version "10.17.24"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.24.tgz#c57511e3a19c4b5e9692bb2995c40a3a52167944"
integrity sha512-5SCfvCxV74kzR3uWgTYiGxrd69TbT1I6+cMx1A5kEly/IVveJBimtAMlXiEyVFn5DvUFewQWxOOiJhlxeQwxgA==
"@types/node@^4.0.30":
version "4.9.3"
@@ -8596,7 +8596,12 @@ tsickle@^0.23.4:
source-map "^0.5.6"
source-map-support "^0.4.2"
tslib@^1.8.1, tslib@^1.9.0:
tslib@^1.8.1:
version "1.13.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.13.0.tgz#c881e13cc7015894ed914862d276436fa9a47043"
integrity sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==
tslib@^1.9.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.10.0.tgz#c3c19f95973fb0a62973fb09d90d961ee43e5c8a"
integrity sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==
@@ -8657,16 +8662,16 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@3.8.2:
version "3.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.2.tgz#91d6868aaead7da74f493c553aeff76c0c0b1d5a"
integrity sha512-EgOVgL/4xfVrCMbhYKUQTdF37SQn4Iw73H5BgCrF1Abdun7Kwy/QZsE/ssAy0y4LxBbvua3PIbFsbRczWWnDdQ==
typescript@^2.4.1:
version "2.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==
typescript@^3.7.4:
version "3.7.5"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.5.tgz#0692e21f65fd4108b9330238aac11dd2e177a1ae"
integrity sha512-/P5lkRXkWHNAbcJIiHPfRoKqyd7bsyCma1hZNUGfn20qm64T6ZBlrzprymeu918H+mB/0rIg2gGK/BXkhhYgBw==
typical@^2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d"