From bf85650b7caea6c8a32e8f3443913f436abd825b Mon Sep 17 00:00:00 2001 From: Feiyang1 Date: Wed, 6 May 2020 15:06:50 -0700 Subject: [PATCH 1/3] point to the internal typing file --- packages-exp/app-exp/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages-exp/app-exp/package.json b/packages-exp/app-exp/package.json index 380e156ec62..b5d2583648c 100644 --- a/packages-exp/app-exp/package.json +++ b/packages-exp/app-exp/package.json @@ -52,7 +52,7 @@ "bugs": { "url": "https://github.com/firebase/firebase-js-sdk/issues" }, - "typings": "./dist/app-exp-public.d.ts", + "typings": "./dist/app-exp.d.ts", "nyc": { "extension": [ ".ts" From a22ae204a80ba3b5ea232895c56fec3c771f6992 Mon Sep 17 00:00:00 2001 From: Feiyang1 Date: Wed, 6 May 2020 15:20:02 -0700 Subject: [PATCH 2/3] Remove api report from prepush --- tools/gitHooks/api-report.js | 68 ------------------------------------ tools/gitHooks/prepush.js | 3 -- 2 files changed, 71 deletions(-) delete mode 100644 tools/gitHooks/api-report.js diff --git a/tools/gitHooks/api-report.js b/tools/gitHooks/api-report.js deleted file mode 100644 index f5f598fd5c4..00000000000 --- a/tools/gitHooks/api-report.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * generate API reports in changed packages - */ - -const { - getChangedPackages, - getPackageInfo, - projectRoot -} = require('../../scripts/utils'); -const { execSync } = require('child_process'); -const ora = require('ora'); -const simpleGit = require('simple-git/promise'); - -const git = simpleGit(projectRoot); - -async function doApiReportsCommit() { - const changedPackages = await getChangedPackages(); - const packageInfo = await getPackageInfo(); - const packageLocations = []; - for (const packageName of changedPackages) { - const packageDesc = packageInfo.find(info => info.name === packageName); - if (packageDesc) { - const packageJson = require(`${packageDesc.location}/package.json`); - - if (packageJson && packageJson.scripts['api-report']) { - const apiReportSpinner = ora( - ` Creating API report for ${packageName}` - ).start(); - packageLocations.push(packageDesc.location); - execSync(`yarn api-report`, { cwd: packageDesc.location }); - apiReportSpinner.stopAndPersist({ - symbol: '✅' - }); - } - } - } - - const hasDiff = await git.diff(); - - if (!hasDiff) return; - - const gitSpinner = ora(' Creating automated API reports commit').start(); - await git.add('.'); - - await git.commit('[AUTOMATED]: API Reports'); - gitSpinner.stopAndPersist({ - symbol: '✅' - }); -} - -exports.doApiReportsCommit = doApiReportsCommit; diff --git a/tools/gitHooks/prepush.js b/tools/gitHooks/prepush.js index 8ff853564e3..d02ef0e404b 100644 --- a/tools/gitHooks/prepush.js +++ b/tools/gitHooks/prepush.js @@ -58,9 +58,6 @@ $ git stash pop // Validate License headers exist await doLicenseCommit(changedFiles); - // Generate API reports - await doApiReportsCommit(); - console.log(chalk` Pre-Push Validation Succeeded From acd4cf1c003412bbaf0a08d49a50c5e79455a9fe Mon Sep 17 00:00:00 2001 From: Feiyang1 Date: Wed, 6 May 2020 15:20:39 -0700 Subject: [PATCH 3/3] remove stale code --- tools/gitHooks/prepush.js | 1 - 1 file changed, 1 deletion(-) diff --git a/tools/gitHooks/prepush.js b/tools/gitHooks/prepush.js index d02ef0e404b..b52a41cf9cb 100644 --- a/tools/gitHooks/prepush.js +++ b/tools/gitHooks/prepush.js @@ -17,7 +17,6 @@ const { doPrettierCommit } = require('./prettier'); const { doLicenseCommit } = require('./license'); -const { doApiReportsCommit } = require('./api-report'); const { resolve } = require('path'); const simpleGit = require('simple-git/promise'); const chalk = require('chalk');