From 8a6e314031a063d9520611e97c72e92869a548fc Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 04:55:46 -0400 Subject: [PATCH 01/88] [WIP] Verify Production Types In order to catch error #857 we need to do a production type build for verification :-) --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 3facb425a..43608b19e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,14 @@ matrix: install: npm i script: npm run lint + - node_js: 10 + env: TEST_SUITE=types + install: npm i + script: + - npm run build + - node scripts/release/cp-pkgs.js + - node scripts/release/verify-pkg-main.js + - node_js: 10 install: npm i services: From 525cfb5ef4809a716c69361e35c4eeee4b2fdf55 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:07:20 -0400 Subject: [PATCH 02/88] Create verify-types-main.js --- scripts/release/verify-types-main.js | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 scripts/release/verify-types-main.js diff --git a/scripts/release/verify-types-main.js b/scripts/release/verify-types-main.js new file mode 100644 index 000000000..8b37c80d8 --- /dev/null +++ b/scripts/release/verify-types-main.js @@ -0,0 +1,21 @@ +/* + The MIT License + Copyright (c) 2018 Google, Inc. + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. +*/ + +// TODO From a225c8be2e40775e8ab68e5f043d1c730946b3e1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:08:13 -0400 Subject: [PATCH 03/88] Update pre-release.sh --- scripts/release/pre-release.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh index d7cbb70d2..2774e5650 100644 --- a/scripts/release/pre-release.sh +++ b/scripts/release/pre-release.sh @@ -60,6 +60,10 @@ log "Verifying that all packages are correctly pointing main to dist..." node scripts/release/verify-pkg-main.js echo "" +log "Verifying that all types are correctly exported..." +node scripts/release/verify-types-main.js +echo "" + log "Pre-release steps done! Next, you should run:" \ "\$(npm bin)/lerna publish --skip-git" echo "" From a55ee4a474dea8945cd9d8d30ec46d26e308a456 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:09:04 -0400 Subject: [PATCH 04/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 43608b19e..3887d888f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - node scripts/release/verify-pkg-main.js + - node scripts/release/verify-types-main.js - node_js: 10 install: npm i From 81809b05598cd858280f24e3fff8315ed52009e9 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:09:38 -0400 Subject: [PATCH 05/88] Update pre-release.sh --- scripts/release/pre-release.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh index 2774e5650..c353533d6 100644 --- a/scripts/release/pre-release.sh +++ b/scripts/release/pre-release.sh @@ -52,6 +52,10 @@ log "Building packages..." npm run build echo "" +log "Verifying that all types are correctly exported..." +node scripts/release/verify-types-main.js +echo "" + log "Moving built assets to package directories..." node scripts/release/cp-pkgs.js echo "" @@ -60,10 +64,6 @@ log "Verifying that all packages are correctly pointing main to dist..." node scripts/release/verify-pkg-main.js echo "" -log "Verifying that all types are correctly exported..." -node scripts/release/verify-types-main.js -echo "" - log "Pre-release steps done! Next, you should run:" \ "\$(npm bin)/lerna publish --skip-git" echo "" From a53bf1c8e72cf6a87b6d6388e0fdc3a92de3f7c5 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:09:51 -0400 Subject: [PATCH 06/88] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3887d888f..6a4be6241 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,6 @@ matrix: install: npm i script: - npm run build - - node scripts/release/cp-pkgs.js - node scripts/release/verify-types-main.js - node_js: 10 From 5f0b8eb3d6f202546258659372f4f8b8617fc4f9 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 05:12:37 -0400 Subject: [PATCH 07/88] Update verify-types-main.js --- scripts/release/verify-types-main.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/release/verify-types-main.js b/scripts/release/verify-types-main.js index 8b37c80d8..3491c15dc 100644 --- a/scripts/release/verify-types-main.js +++ b/scripts/release/verify-types-main.js @@ -1,6 +1,6 @@ /* The MIT License - Copyright (c) 2018 Google, Inc. + Copyright (c) 2019 Google, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights @@ -18,4 +18,8 @@ THE SOFTWARE. */ -// TODO +const {sync: globSync} = require('glob'); + +globSync('build/types/packages/*/index.d.ts').forEach((typePath) => { + console.log('TODO: Check types on ' + typePath); +}); From 93d67a060df127bf0fa39bab3da55ed2c74a45e3 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 12:48:36 -0700 Subject: [PATCH 08/88] Update pre-release.sh --- scripts/release/pre-release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh index c353533d6..a9ef6b6b8 100644 --- a/scripts/release/pre-release.sh +++ b/scripts/release/pre-release.sh @@ -53,7 +53,7 @@ npm run build echo "" log "Verifying that all types are correctly exported..." -node scripts/release/verify-types-main.js +npx ts-node scripts/release/verify-types-main.ts echo "" log "Moving built assets to package directories..." From 26dd20f87374a6e3667007b03da905c93fa47604 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 12:48:56 -0700 Subject: [PATCH 09/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 6a4be6241..97ab10939 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,7 @@ matrix: install: npm i script: - npm run build - - node scripts/release/verify-types-main.js + - npx ts-node scripts/release/verify-types-main.ts - node_js: 10 install: npm i From 73329a1f94bcbcc00633b873acd4a9423e719ba3 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 12:50:05 -0700 Subject: [PATCH 10/88] Update and rename verify-types-main.js to verify-types-main.ts --- .../release/{verify-types-main.js => verify-types-main.ts} | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename scripts/release/{verify-types-main.js => verify-types-main.ts} (96%) diff --git a/scripts/release/verify-types-main.js b/scripts/release/verify-types-main.ts similarity index 96% rename from scripts/release/verify-types-main.js rename to scripts/release/verify-types-main.ts index 3491c15dc..40aa0d739 100644 --- a/scripts/release/verify-types-main.js +++ b/scripts/release/verify-types-main.ts @@ -18,7 +18,9 @@ THE SOFTWARE. */ -const {sync: globSync} = require('glob'); +import { + globSync, +} from 'glob'; globSync('build/types/packages/*/index.d.ts').forEach((typePath) => { console.log('TODO: Check types on ' + typePath); From b5bed968906c763346de4dc657e544c64211774e Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 12:55:34 -0700 Subject: [PATCH 11/88] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 012bf0a27..d58eedb46 100644 --- a/package.json +++ b/package.json @@ -92,6 +92,7 @@ "@types/classnames": "^2.2.6", "@types/enzyme": "^3.1.15", "@types/enzyme-adapter-react-16": "^1.0.3", + "@types/glob": "7.1.1", "@types/google-cloud__storage": "^1.7.2", "@types/mkdirp": "^0.5.2", "@types/mocha": "^5.2.5", From 0ff3d3c4da404503ccd1a7ceced257537af8c595 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 12:59:58 -0700 Subject: [PATCH 12/88] Update verify-types-main.ts --- scripts/release/verify-types-main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts index 40aa0d739..090f3427b 100644 --- a/scripts/release/verify-types-main.ts +++ b/scripts/release/verify-types-main.ts @@ -19,9 +19,9 @@ */ import { - globSync, + GlobSync, } from 'glob'; -globSync('build/types/packages/*/index.d.ts').forEach((typePath) => { +GlobSync('build/types/packages/*/index.d.ts').forEach((typePath) => { console.log('TODO: Check types on ' + typePath); }); From cb4388a15c87db5a64bc248bcfd92e641687912a Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:07:25 -0700 Subject: [PATCH 13/88] Update package.json --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d58eedb46..3e94cd7f8 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@types/classnames": "^2.2.6", "@types/enzyme": "^3.1.15", "@types/enzyme-adapter-react-16": "^1.0.3", - "@types/glob": "7.1.1", + "@types/glob": "^7.1.1", "@types/google-cloud__storage": "^1.7.2", "@types/mkdirp": "^0.5.2", "@types/mocha": "^5.2.5", @@ -133,6 +133,7 @@ "eslint-plugin-react": "^7.7.0", "eslint-plugin-typescript": "^0.14.0", "extract-text-webpack-plugin": "^3.0.2", + "glob": "^7.1.4", "gts": "^0.9.0", "husky": "^2.3.0", "istanbul": "^0.4.5", From 1fb4053812973f5b21754498ee7db72bdd372de6 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:07:46 -0700 Subject: [PATCH 14/88] Update verify-types-main.ts --- scripts/release/verify-types-main.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts index 090f3427b..04423a243 100644 --- a/scripts/release/verify-types-main.ts +++ b/scripts/release/verify-types-main.ts @@ -18,10 +18,8 @@ THE SOFTWARE. */ -import { - GlobSync, -} from 'glob'; +import glob from 'glob'; -GlobSync('build/types/packages/*/index.d.ts').forEach((typePath) => { +glob.sync('build/types/packages/*/index.d.ts').forEach((typePath) => { console.log('TODO: Check types on ' + typePath); }); From e3d49c7aec52cc9512439461db63701da828de8a Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:24:16 -0700 Subject: [PATCH 15/88] Update verify-types-main.ts --- scripts/release/verify-types-main.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts index 04423a243..433f05fb6 100644 --- a/scripts/release/verify-types-main.ts +++ b/scripts/release/verify-types-main.ts @@ -21,5 +21,11 @@ import glob from 'glob'; glob.sync('build/types/packages/*/index.d.ts').forEach((typePath) => { - console.log('TODO: Check types on ' + typePath); + try { + // @ts-ignore + require('./' + typePath); + console.log('SUCCESS: ' + typePath); + } catch (err) { + console.log('FAILURE: ' + typePath); + } }); From 49050f4ed70706e18f07b7c95a66364ff90e69ce Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:31:03 -0700 Subject: [PATCH 16/88] Update verify-types-main.ts --- scripts/release/verify-types-main.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts index 433f05fb6..833e8fffb 100644 --- a/scripts/release/verify-types-main.ts +++ b/scripts/release/verify-types-main.ts @@ -27,5 +27,6 @@ glob.sync('build/types/packages/*/index.d.ts').forEach((typePath) => { console.log('SUCCESS: ' + typePath); } catch (err) { console.log('FAILURE: ' + typePath); + console.error(err); } }); From b26a5827920b99961d9d7133360df8479bff497f Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:35:56 -0700 Subject: [PATCH 17/88] Update verify-types-main.ts --- scripts/release/verify-types-main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts index 833e8fffb..bf0c9d062 100644 --- a/scripts/release/verify-types-main.ts +++ b/scripts/release/verify-types-main.ts @@ -23,7 +23,7 @@ import glob from 'glob'; glob.sync('build/types/packages/*/index.d.ts').forEach((typePath) => { try { // @ts-ignore - require('./' + typePath); + require('../../' + typePath); console.log('SUCCESS: ' + typePath); } catch (err) { console.log('FAILURE: ' + typePath); From 14f173712bcb081c6e55aabb4d9e63538e019b73 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:44:49 -0700 Subject: [PATCH 18/88] Delete verify-types-main.ts --- scripts/release/verify-types-main.ts | 32 ---------------------------- 1 file changed, 32 deletions(-) delete mode 100644 scripts/release/verify-types-main.ts diff --git a/scripts/release/verify-types-main.ts b/scripts/release/verify-types-main.ts deleted file mode 100644 index bf0c9d062..000000000 --- a/scripts/release/verify-types-main.ts +++ /dev/null @@ -1,32 +0,0 @@ -/* - The MIT License - Copyright (c) 2019 Google, Inc. - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. -*/ - -import glob from 'glob'; - -glob.sync('build/types/packages/*/index.d.ts').forEach((typePath) => { - try { - // @ts-ignore - require('../../' + typePath); - console.log('SUCCESS: ' + typePath); - } catch (err) { - console.log('FAILURE: ' + typePath); - console.error(err); - } -}); From b7b4498545efeb37b28b2117c48e891b4358847b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:45:03 -0700 Subject: [PATCH 19/88] Update pre-release.sh --- scripts/release/pre-release.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/scripts/release/pre-release.sh b/scripts/release/pre-release.sh index a9ef6b6b8..d7cbb70d2 100644 --- a/scripts/release/pre-release.sh +++ b/scripts/release/pre-release.sh @@ -52,10 +52,6 @@ log "Building packages..." npm run build echo "" -log "Verifying that all types are correctly exported..." -npx ts-node scripts/release/verify-types-main.ts -echo "" - log "Moving built assets to package directories..." node scripts/release/cp-pkgs.js echo "" From fa0e7844cd0a171d98f0ebe6f1eca247185ec10a Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:46:03 -0700 Subject: [PATCH 20/88] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 97ab10939..c161fcf7f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,7 +27,8 @@ matrix: install: npm i script: - npm run build - - npx ts-node scripts/release/verify-types-main.ts + - node scripts/release/cp-pkgs.js + - echo 'TODO: test build against prod packages' - node_js: 10 install: npm i From 8019d7b5b68f8523b75c55d1ee5240be62e1ef24 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:46:26 -0700 Subject: [PATCH 21/88] Update package.json --- package.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/package.json b/package.json index 3e94cd7f8..012bf0a27 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,6 @@ "@types/classnames": "^2.2.6", "@types/enzyme": "^3.1.15", "@types/enzyme-adapter-react-16": "^1.0.3", - "@types/glob": "^7.1.1", "@types/google-cloud__storage": "^1.7.2", "@types/mkdirp": "^0.5.2", "@types/mocha": "^5.2.5", @@ -133,7 +132,6 @@ "eslint-plugin-react": "^7.7.0", "eslint-plugin-typescript": "^0.14.0", "extract-text-webpack-plugin": "^3.0.2", - "glob": "^7.1.4", "gts": "^0.9.0", "husky": "^2.3.0", "istanbul": "^0.4.5", From 2356cbb35069f99c7f257d278824d2a5fd3a9747 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 13:48:48 -0700 Subject: [PATCH 22/88] Create tsconfig.json --- test/types/tsconfig.json | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 test/types/tsconfig.json diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json new file mode 100644 index 000000000..ba4f14403 --- /dev/null +++ b/test/types/tsconfig.json @@ -0,0 +1,3 @@ +{ + "extends": "gts/tsconfig-google.json" +} From a9d065cbe1862733ad000a8ea4ea24d8fd10cb3b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:06:49 -0700 Subject: [PATCH 23/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c161fcf7f..5d7a8fed8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - echo 'TODO: test build against prod packages' + - tsc --config test/types/tsconfig.json - node_js: 10 install: npm i From e51eae5ed8bb2219f3ef148f3ecaf971a25a361f Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:09:31 -0700 Subject: [PATCH 24/88] Update tsconfig.json --- test/types/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index ba4f14403..ae204cc5a 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,3 +1,6 @@ { - "extends": "gts/tsconfig-google.json" + "extends": "gts/tsconfig-google.json", + "compilerOptions": { + "typeRoots" : ["./packages"] + } } From c6b7e41649963b3be9e8c3409df5fd02011b545d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:11:08 -0700 Subject: [PATCH 25/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5d7a8fed8..d853de6cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - tsc --config test/types/tsconfig.json + - tsc --project test/types - node_js: 10 install: npm i From b44631461b3675cdda15d809fac2b28fb0e07616 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:16:14 -0700 Subject: [PATCH 26/88] Update tsconfig.json --- test/types/tsconfig.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index ae204cc5a..29caaac16 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -2,5 +2,8 @@ "extends": "gts/tsconfig-google.json", "compilerOptions": { "typeRoots" : ["./packages"] - } + }, + "files": [ + "index.ts" + ] } From bc42e639828a66814faf4b013ad8d90e1196da51 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:16:28 -0700 Subject: [PATCH 27/88] Create index.ts --- test/types/index.ts | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/types/index.ts diff --git a/test/types/index.ts b/test/types/index.ts new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/types/index.ts @@ -0,0 +1 @@ + From 0134b04372f805967094631aa806a81b7373aa11 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:21:04 -0700 Subject: [PATCH 28/88] Update tsconfig.json --- test/types/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index 29caaac16..2f233fafd 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "gts/tsconfig-google.json", "compilerOptions": { - "typeRoots" : ["./packages"] + "typeRoots" : ["../../packages/*/dist/"] }, "files": [ "index.ts" From ae60f7e10c1e7443d1943bdcf714960871d8268d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:25:36 -0700 Subject: [PATCH 29/88] Update index.ts --- test/types/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/types/index.ts b/test/types/index.ts index 8b1378917..9a1ca649a 100644 --- a/test/types/index.ts +++ b/test/types/index.ts @@ -1 +1,3 @@ - +import { + withRipple, +} from '@material/react-ripple'; From 48ecf37baf788d8ee9583804fb5ad9f5c4307ec7 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:36:27 -0700 Subject: [PATCH 30/88] Update tsconfig.json --- test/types/tsconfig.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index 2f233fafd..b146df637 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,8 +1,10 @@ { "extends": "gts/tsconfig-google.json", "compilerOptions": { - "typeRoots" : ["../../packages/*/dist/"] - }, + "rootDirs": [ + "packages" + ] + } "files": [ "index.ts" ] From c25463f5ec6dde375528c2d50bbb969f4937b758 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:40:59 -0700 Subject: [PATCH 31/88] Update tsconfig.json --- test/types/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index b146df637..f38a9f3b2 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -4,7 +4,7 @@ "rootDirs": [ "packages" ] - } + }, "files": [ "index.ts" ] From 78ea59952c7aff955abc1535133155b11a49df7c Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:48:24 -0700 Subject: [PATCH 32/88] Update tsconfig.json --- test/types/tsconfig.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index f38a9f3b2..a88c53fea 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,10 +1,5 @@ { "extends": "gts/tsconfig-google.json", - "compilerOptions": { - "rootDirs": [ - "packages" - ] - }, "files": [ "index.ts" ] From 443026b35d617994d670d486f98c836537559073 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:49:46 -0700 Subject: [PATCH 33/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d853de6cb..defa7417e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,6 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js + - npx lerna bootstrap --hoist - tsc --project test/types - node_js: 10 From 6e3ac735087ed98249a35d0b7c24ff5911b9e536 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 15:58:32 -0700 Subject: [PATCH 34/88] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 012bf0a27..1c564bf0a 100644 --- a/package.json +++ b/package.json @@ -95,6 +95,7 @@ "@types/google-cloud__storage": "^1.7.2", "@types/mkdirp": "^0.5.2", "@types/mocha": "^5.2.5", + "@types/node": "^12.0.4", "@types/prop-types": "^15.5.6", "@types/puppeteer": "^1.11.1", "@types/react": "^16.4.4", From dcf45481325517b29e26c3171239312d228b7edf Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 16:04:01 -0700 Subject: [PATCH 35/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index defa7417e..a1e9cbb25 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - npx lerna bootstrap --hoist + - npx lerna link --force-local - tsc --project test/types - node_js: 10 From c73f33b0e116d92765abcc30564bceceba2027d8 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 16:04:18 -0700 Subject: [PATCH 36/88] Update package.json --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 1c564bf0a..012bf0a27 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,6 @@ "@types/google-cloud__storage": "^1.7.2", "@types/mkdirp": "^0.5.2", "@types/mocha": "^5.2.5", - "@types/node": "^12.0.4", "@types/prop-types": "^15.5.6", "@types/puppeteer": "^1.11.1", "@types/react": "^16.4.4", From 42f0fb546d4b6dfaf288ac204b6561b8ba03af6b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 16:05:07 -0700 Subject: [PATCH 37/88] Update tsconfig.json --- test/types/tsconfig.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index a88c53fea..4429072f0 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,5 +1,11 @@ { "extends": "gts/tsconfig-google.json", + "compilerOptions": { + "module": "commonjs", + "lib": ["es2015", "es2017", "dom"], + "jsx": "react", + "target": "es5", + }, "files": [ "index.ts" ] From 82b5e9becd297d312a133883d95da1337b286fd9 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 3 Jun 2019 16:13:20 -0700 Subject: [PATCH 38/88] Update package.json --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 012bf0a27..395895968 100644 --- a/package.json +++ b/package.json @@ -97,8 +97,8 @@ "@types/mocha": "^5.2.5", "@types/prop-types": "^15.5.6", "@types/puppeteer": "^1.11.1", - "@types/react": "^16.4.4", - "@types/react-dom": "^16.0.11", + "@types/react": "^16.8.8", + "@types/react-dom": "^16.8.4", "@types/react-is": "^16.7.1", "@types/react-router-dom": "^4.3.1", "@types/uuid": "^3.4.4", @@ -149,8 +149,8 @@ "postcss-loader": "^2.1.5", "prettier": "^1.17.1", "puppeteer": "^1.1.1", - "react": "^16.4.2", - "react-dom": "^16.4.2", + "react": "^16.8.6", + "react-dom": "^16.8.6", "react-router-dom": "^4.3.1", "remap-istanbul": "^0.12.0", "resemblejs": "^3.0.1", From d2b56f4cca91939a1d7ce5dee557b9f49ed3fd45 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:09:01 -0700 Subject: [PATCH 39/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a1e9cbb25..936118ad7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - npx lerna link --force-local + - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - tsc --project test/types - node_js: 10 From 6753c2e14c7286e0cb44c9779e90e7dd504ff30c Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:21:31 -0700 Subject: [PATCH 40/88] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 936118ad7..094c4a6ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,8 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} + - lerna bootstrap --hoist + - ls -d ./packages/*/ | xargs -n1 -I{} npm install --no-audit {} - tsc --project test/types - node_js: 10 From a19e87ec45dae4ef7c289cec56c875d56b6feb5b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:30:22 -0700 Subject: [PATCH 41/88] Update package.json --- package.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 395895968..012bf0a27 100644 --- a/package.json +++ b/package.json @@ -97,8 +97,8 @@ "@types/mocha": "^5.2.5", "@types/prop-types": "^15.5.6", "@types/puppeteer": "^1.11.1", - "@types/react": "^16.8.8", - "@types/react-dom": "^16.8.4", + "@types/react": "^16.4.4", + "@types/react-dom": "^16.0.11", "@types/react-is": "^16.7.1", "@types/react-router-dom": "^4.3.1", "@types/uuid": "^3.4.4", @@ -149,8 +149,8 @@ "postcss-loader": "^2.1.5", "prettier": "^1.17.1", "puppeteer": "^1.1.1", - "react": "^16.8.6", - "react-dom": "^16.8.6", + "react": "^16.4.2", + "react-dom": "^16.4.2", "react-router-dom": "^4.3.1", "remap-istanbul": "^0.12.0", "resemblejs": "^3.0.1", From 29c2714a03552f2301795b60c658e2800731b34a Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:32:12 -0700 Subject: [PATCH 42/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 094c4a6ed..9ea69ece5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - lerna bootstrap --hoist + - rm -rf node_modules - ls -d ./packages/*/ | xargs -n1 -I{} npm install --no-audit {} - tsc --project test/types From 64abf42b08b6b20850e2d36b2d461cdc6773c4b7 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:49:11 -0700 Subject: [PATCH 43/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9ea69ece5..12d5293ce 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,7 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - rm -rf node_modules + - rm -rf package-lock.json node_modules packages/*/node_modules - ls -d ./packages/*/ | xargs -n1 -I{} npm install --no-audit {} - tsc --project test/types From 4682da143940bb7a7cc5a95f60bd3d10f45db9d6 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:50:35 -0700 Subject: [PATCH 44/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 12d5293ce..4227baeb0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ matrix: - npm run build - node scripts/release/cp-pkgs.js - rm -rf package-lock.json node_modules packages/*/node_modules + - npm cache clean --force - ls -d ./packages/*/ | xargs -n1 -I{} npm install --no-audit {} - tsc --project test/types From 48aeb9040ec43ccbd9a015030e0e8612dc69f80d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 12:58:48 -0700 Subject: [PATCH 45/88] Update .travis.yml --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4227baeb0..ecf5109b9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,7 +30,8 @@ matrix: - node scripts/release/cp-pkgs.js - rm -rf package-lock.json node_modules packages/*/node_modules - npm cache clean --force - - ls -d ./packages/*/ | xargs -n1 -I{} npm install --no-audit {} + - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} + - npm install typescript -g - tsc --project test/types - node_js: 10 From 2425015917941ad6eb93f8ad6ec334d5aae721df Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:09:49 -0700 Subject: [PATCH 46/88] Update tsconfig.json --- test/types/tsconfig.json | 1 - 1 file changed, 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index 4429072f0..570ee0f52 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,5 +1,4 @@ { - "extends": "gts/tsconfig-google.json", "compilerOptions": { "module": "commonjs", "lib": ["es2015", "es2017", "dom"], From b7d37fdcf499ec623cc08da6c5ae493b641a93fa Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:10:54 -0700 Subject: [PATCH 47/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index ecf5109b9..98c80515e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,7 @@ matrix: - node scripts/release/cp-pkgs.js - rm -rf package-lock.json node_modules packages/*/node_modules - npm cache clean --force + - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - npm install typescript -g - tsc --project test/types From bb4f4cd1f195160ddd338716980c36fe070cefc6 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:16:57 -0700 Subject: [PATCH 48/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 98c80515e..06c5cb000 100644 --- a/.travis.yml +++ b/.travis.yml @@ -33,6 +33,7 @@ matrix: - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - npm install typescript -g + - npm install @types/react - tsc --project test/types - node_js: 10 From 31411009701ca04491b97f1b87de10e07d116670 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:18:03 -0700 Subject: [PATCH 49/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 06c5cb000..362284b50 100644 --- a/.travis.yml +++ b/.travis.yml @@ -34,6 +34,7 @@ matrix: - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - npm install typescript -g - npm install @types/react + - npm install react - tsc --project test/types - node_js: 10 From 6ec95a37fbe82d30c67624f1296e0c245219bb06 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:19:10 -0700 Subject: [PATCH 50/88] Update index.ts --- test/types/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/types/index.ts b/test/types/index.ts index 9a1ca649a..4a80a4567 100644 --- a/test/types/index.ts +++ b/test/types/index.ts @@ -1,3 +1,5 @@ +import * as React from "react"; + import { withRipple, } from '@material/react-ripple'; From 9f4b91e694f469aa28e72dd16c44bd97297f47f1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 13:58:19 -0700 Subject: [PATCH 51/88] Update tsconfig.json --- test/types/tsconfig.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index 570ee0f52..847bafca4 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -1,8 +1,9 @@ { "compilerOptions": { - "module": "commonjs", - "lib": ["es2015", "es2017", "dom"], + "esModuleInterop": true, "jsx": "react", + "lib": ["es2015", "es2017", "dom"], + "module": "commonjs", "target": "es5", }, "files": [ From 842770ea29ba96c69ee8e1fdc12fec63292af87e Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 4 Jun 2019 14:00:34 -0700 Subject: [PATCH 52/88] Update .travis.yml --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 362284b50..7bc80dc46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,13 +28,9 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - rm -rf package-lock.json node_modules packages/*/node_modules - - npm cache clean --force + - rm -rf packages/*/node_modules - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - - npm install typescript -g - - npm install @types/react - - npm install react - tsc --project test/types - node_js: 10 From d51fc6e0362a0859172eed5c81ea5571b5aefbf1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:09:40 -0700 Subject: [PATCH 53/88] Update tsconfig.json --- tsconfig.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tsconfig.json b/tsconfig.json index 59f75ef5a..df464c219 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,6 +14,7 @@ "compileOnSave": true, "exclude": [ "node_modules", - "build" + "build", + "test/types" ] } From b244fe321c445290c7457f21f114012473b3b4a1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:21:58 -0700 Subject: [PATCH 54/88] Update index.ts --- test/types/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/types/index.ts b/test/types/index.ts index 4a80a4567..d863fb45a 100644 --- a/test/types/index.ts +++ b/test/types/index.ts @@ -1,5 +1,3 @@ -import * as React from "react"; +import * as React from 'react'; -import { - withRipple, -} from '@material/react-ripple'; +import * as ripple from '@material/react-ripple'; From 488c2acfe64db4b85a4a8a51327f09985727bb97 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:22:22 -0700 Subject: [PATCH 55/88] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7bc80dc46..9b75aebf3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,6 @@ matrix: - npm run build - node scripts/release/cp-pkgs.js - rm -rf packages/*/node_modules - - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - tsc --project test/types From 04ebc117b77b68dd4afaa81e465eed1fbe797ad3 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:32:38 -0700 Subject: [PATCH 56/88] Update .travis.yml --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9b75aebf3..5c111d1ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,7 +28,9 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js + - node test/types/gen-index.js - rm -rf packages/*/node_modules + - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - tsc --project test/types From 22b0cfd699dba00a5b80f67ec8236dff859349e8 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:32:49 -0700 Subject: [PATCH 57/88] Create gen-index.js --- test/types/gen-index.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 test/types/gen-index.js diff --git a/test/types/gen-index.js b/test/types/gen-index.js new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/test/types/gen-index.js @@ -0,0 +1 @@ + From 9b584c12ba9a02ba1c0689fb24a5b9723f5a038d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:33:00 -0700 Subject: [PATCH 58/88] Delete index.ts --- test/types/index.ts | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 test/types/index.ts diff --git a/test/types/index.ts b/test/types/index.ts deleted file mode 100644 index d863fb45a..000000000 --- a/test/types/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -import * as React from 'react'; - -import * as ripple from '@material/react-ripple'; From 27e921658a510338e2ea83543c5d574d1a6e9a8e Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:44:50 -0700 Subject: [PATCH 59/88] Update gen-index.js --- test/types/gen-index.js | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 8b1378917..5a76112f7 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -1 +1,38 @@ +// The MIT License +// +// Copyright (c) 2018 Google, Inc. +// +// Permission is hereby granted, free of charge, to any person obtaining a copy +// of this software and associated documentation files (the "Software"), to deal +// in the Software without restriction, including without limitation the rights +// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +// copies of the Software, and to permit persons to whom the Software is +// furnished to do so, subject to the following conditions: +// +// The above copyright notice and this permission notice shall be included in +// all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +// THE SOFTWARE. +/** + * @fileoverview Generates index.ts file with imports for all repo packages. + */ + +const { join } = require('path'); +const { readdirSync, statSync, writeFileSync } = require('fs'); + +const out = "import * as React from 'react';\n"; +const dir = 'packages'; +for (const subdir of readdirSync(dir)) { + if (statSync(join(dir, subdir)).isDirectory()) { + continue; + } + out += "import * as " + subdir + " from '@material/react-" + subdir + "';\n"; +} +writeFileSync('test/types/index.ts', out, 'ascii'); From 8fa5f131f0bb241127795f57f06665682db0f313 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:45:17 -0700 Subject: [PATCH 60/88] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 5c111d1ef..b92bf386f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,6 +29,7 @@ matrix: - npm run build - node scripts/release/cp-pkgs.js - node test/types/gen-index.js + - cat test/types/index.ts - rm -rf packages/*/node_modules - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} From bc754dfb0604e71ad7987e1fab61a44caaea2411 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:45:54 -0700 Subject: [PATCH 61/88] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b92bf386f..c6c7e7b08 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,11 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - node test/types/gen-index.js - - cat test/types/index.ts - rm -rf packages/*/node_modules - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} + - node test/types/gen-index.js + - cat test/types/index.ts - tsc --project test/types - node_js: 10 From 797003dbde1cc41fd3c789662163706b2c1e5369 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:46:09 -0700 Subject: [PATCH 62/88] Update tsconfig.json --- tsconfig.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index df464c219..59f75ef5a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -14,7 +14,6 @@ "compileOnSave": true, "exclude": [ "node_modules", - "build", - "test/types" + "build" ] } From 5a7691c03757126697548fbda3f1cc5bab049bc1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:51:49 -0700 Subject: [PATCH 63/88] Update gen-index.js --- test/types/gen-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 5a76112f7..c47b37d6e 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -27,7 +27,7 @@ const { join } = require('path'); const { readdirSync, statSync, writeFileSync } = require('fs'); -const out = "import * as React from 'react';\n"; +let out = "import * as React from 'react';\n"; const dir = 'packages'; for (const subdir of readdirSync(dir)) { if (statSync(join(dir, subdir)).isDirectory()) { From 581571951009b06e62fe6d0f2fa2fd93b44d8de5 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:52:13 -0700 Subject: [PATCH 64/88] Update .travis.yml --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c6c7e7b08..b92bf386f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,11 +28,11 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js + - node test/types/gen-index.js + - cat test/types/index.ts - rm -rf packages/*/node_modules - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - - node test/types/gen-index.js - - cat test/types/index.ts - tsc --project test/types - node_js: 10 From 6fc83ddf56e61b48114d68874b28c98f4a0ea354 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 09:56:45 -0700 Subject: [PATCH 65/88] Update gen-index.js --- test/types/gen-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index c47b37d6e..08d82a5d0 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -30,7 +30,7 @@ const { readdirSync, statSync, writeFileSync } = require('fs'); let out = "import * as React from 'react';\n"; const dir = 'packages'; for (const subdir of readdirSync(dir)) { - if (statSync(join(dir, subdir)).isDirectory()) { + if (!statSync(join(dir, subdir)).isDirectory()) { continue; } out += "import * as " + subdir + " from '@material/react-" + subdir + "';\n"; From 26c30bc947396cbd99873682a94fb114852243d1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 10:00:47 -0700 Subject: [PATCH 66/88] Update .travis.yml --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b92bf386f..5c111d1ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,6 @@ matrix: - npm run build - node scripts/release/cp-pkgs.js - node test/types/gen-index.js - - cat test/types/index.ts - rm -rf packages/*/node_modules - npm install packages/ripple - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} From cc9b1192ad8d0255ab00136e4bd3b384844df5f3 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 10:13:44 -0700 Subject: [PATCH 67/88] Update gen-index.js --- test/types/gen-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 08d82a5d0..7d48c7e36 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -33,6 +33,6 @@ for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } - out += "import * as " + subdir + " from '@material/react-" + subdir + "';\n"; + out += "import * as " + subdir.replace('-', '') + " from '@material/react-" + subdir + "';\n"; } writeFileSync('test/types/index.ts', out, 'ascii'); From f7341289dae1a50dbbd6cbefde31a578676d2cb9 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 10:31:03 -0700 Subject: [PATCH 68/88] Update gen-index.js --- test/types/gen-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 7d48c7e36..711898ba4 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -33,6 +33,6 @@ for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } - out += "import * as " + subdir.replace('-', '') + " from '@material/react-" + subdir + "';\n"; + out += "import * as " + subdir.replace(/\-/g, '') + "temp from '@material/react-" + subdir + "';\n"; } writeFileSync('test/types/index.ts', out, 'ascii'); From 99dff9c1c58529d04210dfc0da510348f5a77c65 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 11:00:03 -0700 Subject: [PATCH 69/88] Update tsconfig.json --- test/types/tsconfig.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json index 847bafca4..ca8141b2c 100644 --- a/test/types/tsconfig.json +++ b/test/types/tsconfig.json @@ -4,7 +4,7 @@ "jsx": "react", "lib": ["es2015", "es2017", "dom"], "module": "commonjs", - "target": "es5", + "target": "es5" }, "files": [ "index.ts" From fdbf95eaeed28f4d7ec7789077e1f7879a5b962b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 11:04:30 -0700 Subject: [PATCH 70/88] Update .travis.yml --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5c111d1ef..e3f88d7b7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,10 +29,10 @@ matrix: - npm run build - node scripts/release/cp-pkgs.js - node test/types/gen-index.js - - rm -rf packages/*/node_modules - - npm install packages/ripple + - rm -rf packages/*/node_modules # Prevent inconsistent simlinks from being hoisted + - npm install packages/ripple # Installed first as other packages depend on it - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - - tsc --project test/types + - tsc --project test/types || true # TODO(issues/857): Fix errors so failure here can be loud - node_js: 10 install: npm i From cc4172044b179d7309b4c250ebc6610842b0d61e Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Wed, 5 Jun 2019 11:06:52 -0700 Subject: [PATCH 71/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index e3f88d7b7..3dd122228 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,10 +28,10 @@ matrix: script: - npm run build - node scripts/release/cp-pkgs.js - - node test/types/gen-index.js - rm -rf packages/*/node_modules # Prevent inconsistent simlinks from being hoisted - npm install packages/ripple # Installed first as other packages depend on it - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} + - node test/types/gen-index.js - tsc --project test/types || true # TODO(issues/857): Fix errors so failure here can be loud - node_js: 10 From 5b6175fe6d3939b42b6eab81205702d0c479ac69 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Fri, 7 Jun 2019 09:09:52 -0700 Subject: [PATCH 72/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3dd122228..a4f4d1b76 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ matrix: - npm install packages/ripple # Installed first as other packages depend on it - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - node test/types/gen-index.js - - tsc --project test/types || true # TODO(issues/857): Fix errors so failure here can be loud + - tsc --project test/types || true # TODO(issues/857): Fix existing errors before requiring this to pass - node_js: 10 install: npm i From cf1c111029f7fbfeb7a0f58d2f096668af96d482 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:36:42 -0700 Subject: [PATCH 73/88] Update gen-index.js --- test/types/gen-index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 711898ba4..651809053 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -1,6 +1,6 @@ // The MIT License // -// Copyright (c) 2018 Google, Inc. +// Copyright (c) 2019 Google, Inc. // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal From db284d88fe34a73681b45d15b196cc888ea8a09b Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:41:38 -0700 Subject: [PATCH 74/88] Update package.json --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index 012bf0a27..01b72ec7d 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc --project test/types || echo TODO(issues/857): Fix existing errors before requiring this to pass", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From 389f172192d9d510865faada02ce62041d4e7e13 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:41:42 -0700 Subject: [PATCH 75/88] Update .travis.yml --- .travis.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4f4d1b76..069c3e9b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -25,14 +25,7 @@ matrix: - node_js: 10 env: TEST_SUITE=types install: npm i - script: - - npm run build - - node scripts/release/cp-pkgs.js - - rm -rf packages/*/node_modules # Prevent inconsistent simlinks from being hoisted - - npm install packages/ripple # Installed first as other packages depend on it - - ls -d ./packages/*/ | xargs -n1 -I{} npm install {} - - node test/types/gen-index.js - - tsc --project test/types || true # TODO(issues/857): Fix existing errors before requiring this to pass + script: npm run test:types - node_js: 10 install: npm i From cc60eaf75a70bc656644f40038a7152ed0969175 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:46:15 -0700 Subject: [PATCH 76/88] Update gen-index.js --- test/types/gen-index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 651809053..9df39bece 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -24,8 +24,8 @@ * @fileoverview Generates index.ts file with imports for all repo packages. */ -const { join } = require('path'); -const { readdirSync, statSync, writeFileSync } = require('fs'); +const {join} = require('path'); +const {readdirSync, statSync, writeFileSync} = require('fs'); let out = "import * as React from 'react';\n"; const dir = 'packages'; @@ -33,6 +33,11 @@ for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } - out += "import * as " + subdir.replace(/\-/g, '') + "temp from '@material/react-" + subdir + "';\n"; + out += + "import * as " + + subdir.replace(/\-/g, '') + + "temp from '@material/react-" + + subdir + + "';\n"; } writeFileSync('test/types/index.ts', out, 'ascii'); From aa547d107d2183b5e07d3d9aae4c9361984626bb Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:48:48 -0700 Subject: [PATCH 77/88] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01b72ec7d..c9af9bfac 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", - "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc --project test/types || echo TODO(issues/857): Fix existing errors before requiring this to pass", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From b6a6cdbd8b1fbb4dd12aadd867502e34a76915b1 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 15:53:10 -0700 Subject: [PATCH 78/88] Update gen-index.js --- test/types/gen-index.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 9df39bece..84fae6e90 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -27,17 +27,17 @@ const {join} = require('path'); const {readdirSync, statSync, writeFileSync} = require('fs'); -let out = "import * as React from 'react';\n"; +let out = 'import * as React from "react";\n'; const dir = 'packages'; for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } out += - "import * as " + + 'import * as ' + subdir.replace(/\-/g, '') + - "temp from '@material/react-" + + 'temp from "@material/react-' + subdir + - "';\n"; + '";\n'; } writeFileSync('test/types/index.ts', out, 'ascii'); From 8021e78edd1805ee0162f1510b84f7998c2b016e Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 17:41:25 -0700 Subject: [PATCH 79/88] Delete tsconfig.json --- test/types/tsconfig.json | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 test/types/tsconfig.json diff --git a/test/types/tsconfig.json b/test/types/tsconfig.json deleted file mode 100644 index ca8141b2c..000000000 --- a/test/types/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "compilerOptions": { - "esModuleInterop": true, - "jsx": "react", - "lib": ["es2015", "es2017", "dom"], - "module": "commonjs", - "target": "es5" - }, - "files": [ - "index.ts" - ] -} From 59c04e2e16e0b39ded302f290fedfb3e7a19006d Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 10 Jun 2019 17:55:35 -0700 Subject: [PATCH 80/88] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9af9bfac..077a8453d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", - "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && cp tsconfig.json test/types/tsconfig.json && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From e7787eb720313a9260979bef426cf793ece329d8 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 11 Jun 2019 12:59:21 -0700 Subject: [PATCH 81/88] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 077a8453d..3d8f0d7ca 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", - "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && cp tsconfig.json test/types/tsconfig.json && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From 10d7d8e1f66e099057f0ce677c6f518c65403fc8 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 11 Jun 2019 13:14:58 -0700 Subject: [PATCH 82/88] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3d8f0d7ca..077a8453d 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", - "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && tsc || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && cp tsconfig.json test/types/tsconfig.json && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From 76154851205d107de2d2a1a14a024032c40f8d27 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 11 Jun 2019 13:37:25 -0700 Subject: [PATCH 83/88] Update gen-index.js --- test/types/gen-index.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 84fae6e90..09066af9d 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -27,16 +27,14 @@ const {join} = require('path'); const {readdirSync, statSync, writeFileSync} = require('fs'); -let out = 'import * as React from "react";\n'; +let out = 'import "react";\n'; const dir = 'packages'; for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } out += - 'import * as ' + - subdir.replace(/\-/g, '') + - 'temp from "@material/react-' + + 'import "@material/react-' + subdir + '";\n'; } From 6dfe025ea75a377099a12b8ea9fbf036c1e4ff25 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Tue, 11 Jun 2019 13:44:32 -0700 Subject: [PATCH 84/88] Update gen-index.js --- test/types/gen-index.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/test/types/gen-index.js b/test/types/gen-index.js index 09066af9d..c9920da0e 100644 --- a/test/types/gen-index.js +++ b/test/types/gen-index.js @@ -33,9 +33,6 @@ for (const subdir of readdirSync(dir)) { if (!statSync(join(dir, subdir)).isDirectory()) { continue; } - out += - 'import "@material/react-' + - subdir + - '";\n'; + out += 'import "@material/react-' + subdir + '";\n'; } writeFileSync('test/types/index.ts', out, 'ascii'); From e9240a0347fe396d0f7265bd69ac1d7979428097 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 17 Jun 2019 11:06:31 -0700 Subject: [PATCH 85/88] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c97abf8ff..6428da367 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "test:unit-ci": "karma start karma.ci.js --single-run", "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 60000 test/screenshot/diff-suite.tsx", "test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 40s; npm run test:image-diff'", - "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && cp tsconfig.json test/types/tsconfig.json && tsc --project test/types || echo 'TODO(issues/857): Fix existing errors before requiring this to pass'", + "test:types": "npm run build && node scripts/release/cp-pkgs.js && rm -rf packages/*/node_modules && npm install packages/ripple && ls -d ./packages/*/ | xargs -n1 -I{} npm install {} && node test/types/gen-index.js && cp tsconfig.json test/types/tsconfig.json && tsc --project test/types", "upload:screenshots": "node ./test/screenshot/upload-screenshots.js" }, "config": { From 008a4458aa1952ddb77628538bd03c6b12049e63 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 17 Jun 2019 11:07:40 -0700 Subject: [PATCH 86/88] Update .travis.yml --- .travis.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1b3b0b93b..1428c7149 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,10 +22,11 @@ matrix: install: npm i script: npm run lint - - node_js: 10 - env: TEST_SUITE=types - install: npm i - script: npm run test:types + #TODO(issues/857): Fix existing errors before requiring this to pass + #- node_js: 10 + # env: TEST_SUITE=types + # install: npm i + # script: npm run test:types - node_js: 10 install: npm i From f8fe48d099b21aed569a269d0e974e605496a4c6 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 17 Jun 2019 11:13:28 -0700 Subject: [PATCH 87/88] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1428c7149..ccb987775 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ matrix: install: npm i script: npm run lint - #TODO(issues/857): Fix existing errors before requiring this to pass + #TODO(issues/936): Fix existing errors before requiring this to pass #- node_js: 10 # env: TEST_SUITE=types # install: npm i From e84f57c40b3f01f09a3188769e29eeaa3112ad33 Mon Sep 17 00:00:00 2001 From: Ari Chivukula Date: Mon, 17 Jun 2019 11:21:04 -0700 Subject: [PATCH 88/88] Update running-tests.md --- docs/contributions/running-tests.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/contributions/running-tests.md b/docs/contributions/running-tests.md index 707fa32cc..16e370557 100644 --- a/docs/contributions/running-tests.md +++ b/docs/contributions/running-tests.md @@ -63,3 +63,13 @@ npm run lint ``` This will print any lines that do not follow the eslint standards, which you will need to fix before opeing a PR. + +## Type Tests + +Due to [multiple issues in production type files](https://github.com/material-components/material-components-web-react/issues/936) an easy way to [validate production type files has been added](https://github.com/material-components/material-components-web-react/pull/900): + +```bash +npm run test:types +``` + +This command will perform a full production build, install the locally built versions, [generate a file that imports them all](../../test/types/gen-index.js), and then build it to expose any issues in the locally built `.d.ts` files.