From 6ed89111c36826e9246705ac0aa7b82aa5a5a4b2 Mon Sep 17 00:00:00 2001 From: Arjan van Wijk Date: Thu, 11 Jun 2020 22:57:02 +0200 Subject: [PATCH] Update muban-core to 2.1.2 and typescript to 3.8.3 * getElements now can return null (so requires type checking) * initComponents now never initializes a component twice * fix for waitForStyleSheetsLoaded when chrome extensions inject empty link tags --- package.json | 8 ++--- src/app/component/layout/index/Index.ts | 8 ++--- tsconfig.json | 7 +++- yarn.lock | 43 +++++++++++++++++++------ 4 files changed, 48 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 5d05f113..da948a7f 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { "name": "muban", - "version": "3.2.0", + "version": "3.3.0", "skeleton": { "name": "muban", - "version": "3.2.0" + "version": "3.3.0" }, "description": "", "scripts": { @@ -71,7 +71,7 @@ "modernizr": "^3.6.0", "modernizr-loader": "^1.0.1", "muban-convert-hbs": "^1.1.1", - "muban-core": "^1.13.1", + "muban-core": "^2.1.2", "normalize.css": "^8.0.1", "qs": "^6.6.0", "seng-device-state-tracker": "^1.1.4", @@ -175,7 +175,7 @@ "tslint-config-airbnb": "^5.11.1", "tslint-config-prettier": "1.17.0", "tslint-loader": "^3.5.4", - "typescript": "^3.5.1", + "typescript": "^3.8.3", "uglifyjs-webpack-plugin": "^2.0.1", "url-loader": "^1.1.2", "use-yarn": "^2.2.0", diff --git a/src/app/component/layout/index/Index.ts b/src/app/component/layout/index/Index.ts index e3139937..ce195ce2 100644 --- a/src/app/component/layout/index/Index.ts +++ b/src/app/component/layout/index/Index.ts @@ -18,7 +18,7 @@ export default class App extends AbstractComponent { }); }); - this.getElement('.toggle-blocks').addEventListener('click', () => { + this.getElement('.toggle-blocks')!.addEventListener('click', () => { const pages = this.getElements('.page'); if (pages.some(page => page.classList.contains('show-blocks'))) { pages.forEach(page => page.classList.remove('show-blocks')); @@ -32,11 +32,11 @@ export default class App extends AbstractComponent { } private updateBlocksButton() { - const pages = this.getElements('.page'); + const pages = this.getElements('.page')!; if (pages.some(page => page.classList.contains('show-blocks'))) { - this.getElement('.toggle-blocks').innerText = 'hide blocks'; + this.getElement('.toggle-blocks')!.innerText = 'hide blocks'; } else { - this.getElement('.toggle-blocks').innerText = 'show blocks'; + this.getElement('.toggle-blocks')!.innerText = 'show blocks'; } } diff --git a/tsconfig.json b/tsconfig.json index bd26030b..9a5b1a9d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -12,7 +12,12 @@ "DOM.Iterable", "ES2017" ], - "baseUrl": "./src/" + "baseUrl": "./src/", + "types": [ + "@types/handlebars", + "@types/core-js", + "@types/webpack-env" + ] }, "include": [ "./src/types.d.ts", diff --git a/yarn.lock b/yarn.lock index 39db4bbc..983a3d4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -159,6 +159,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== +"@babel/helper-plugin-utils@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.10.1.tgz#ec5a5cf0eec925b66c60580328b122c01230a127" + integrity sha512-fvoGeXt0bJc7VMWZGCAEBEMo/HAjW2mP8apF5eXK0wSqwLAVHAISCWRoLMBMUs2kqeaG77jltVqu4Hn8Egl3nA== + "@babel/helper-regex@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/helper-regex/-/helper-regex-7.0.0.tgz#2c1718923b57f9bbe64705ffe5640ac64d9bdb27" @@ -381,6 +386,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" +"@babel/plugin-syntax-import-meta@^7.10.1": + version "7.10.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.1.tgz#3e59120ed8b3c2ccc5abb1cfc7aaa3ea01cd36b6" + integrity sha512-ypC4jwfIVF72og0dgvEcFRdOM2V9Qm1tu7RGmdZOlhsccyK0wisXmMObGuWEOd5jQ+K9wcIgSNftCpk2vkjUfQ== + dependencies: + "@babel/helper-plugin-utils" "^7.10.1" + "@babel/plugin-syntax-json-strings@^7.0.0": version "7.0.0" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.0.0.tgz#0d259a68090e15b383ce3710e01d5b23f3770cbd" @@ -759,6 +771,13 @@ dependencies: regenerator-runtime "^0.12.0" +"@babel/runtime@^7.10.2": + version "7.10.2" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.10.2.tgz#d103f21f2602497d38348a32e008637d506db839" + integrity sha512-6sF3uQw2ivImfVIl62RZ7MXhO2tap69WeWK57vAaimT6AZbE4FbqjdEJIN1UqoD6wI6B+1n9UiagafH1sxjOtg== + dependencies: + regenerator-runtime "^0.13.4" + "@babel/template@^7.1.0", "@babel/template@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.1.2.tgz#090484a574fef5a2d2d7726a674eceda5c5b5644" @@ -8632,12 +8651,13 @@ muban-convert-hbs@^1.1.1: "@babel/runtime" "^7.0.0-beta.35" handlebars "^4.0.11" -muban-core@^1.13.1: - version "1.13.1" - resolved "https://registry.yarnpkg.com/muban-core/-/muban-core-1.13.1.tgz#be05cd716b0aa2cf0e0812542574eaae70f640c0" - integrity sha512-qyArVdguV0WHhVZy3v8/A0vgGLlUo2EHzoENnKnEiNYQxy7lLSs9Qa6tTrG9m1UvCjxsLThhUjkOQV965jaQVw== +muban-core@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/muban-core/-/muban-core-2.1.2.tgz#534527d9b239557b642b4830f2ad9ff92505419f" + integrity sha512-Acl51oh5fcsbVRohn2YPpTXzhTFWa3zsbMakHt+BNjO9oyNxlUYEsJHDwBTVs07044pERCt7gi9vg0jwh1nDcg== dependencies: - "@babel/runtime" "^7.0.0-beta.35" + "@babel/plugin-syntax-import-meta" "^7.10.1" + "@babel/runtime" "^7.10.2" loader-utils "^1.1.0" seng-disposable "^1.1.3" @@ -10601,6 +10621,11 @@ regenerator-runtime@^0.12.0: resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de" integrity sha512-odxIc1/vDlo4iZcfXqRYFj0vpXFNoGdKMAUieAlFYO6m/nl5e9KR/beGf41z4a1FI+aQgtjhuaSlDxQ0hmkrHg== +regenerator-runtime@^0.13.4: + version "0.13.5" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.5.tgz#d878a1d094b4306d10b9096484b33ebd55e26697" + integrity sha512-ZS5w8CpKFinUzOwW3c83oPeVXoNsrLsaCoLtJvAClH135j/R77RuymhiSErhm2lKcwSCIpmvIWSbDkIfAqKQlA== + regenerator-transform@^0.13.3: version "0.13.3" resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.13.3.tgz#264bd9ff38a8ce24b06e0636496b2c856b57bcbb" @@ -12656,10 +12681,10 @@ typeof-article@^0.1.1: dependencies: kind-of "^3.1.0" -typescript@^3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.5.1.tgz#ba72a6a600b2158139c5dd8850f700e231464202" - integrity sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw== +typescript@^3.8.3: + version "3.9.5" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.5.tgz#586f0dba300cde8be52dd1ac4f7e1009c1b13f36" + integrity sha512-hSAifV3k+i6lEoCJ2k6R2Z/rp/H3+8sdmcn5NrS3/3kE7+RyZXm9aqvxWqjEXHAd8b0pShatpcdMTvEdvAJltQ== uglify-js@^3.0.0, uglify-js@^3.1.4: version "3.4.9"