From a87c701147001047fc9678c954cc57c679db1ee9 Mon Sep 17 00:00:00 2001 From: Liza K Date: Mon, 9 Mar 2020 19:53:36 +0200 Subject: [PATCH] rename docs script file --- package.json | 2 +- ...k_core_api_changes.js => check_published_api_changes.js} | 2 +- src/core/README.md | 2 +- ...re_api_changes.ts => run_check_published_api_changes.ts} | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) rename scripts/{check_core_api_changes.js => check_published_api_changes.js} (93%) rename src/dev/{run_check_core_api_changes.ts => run_check_published_api_changes.ts} (98%) diff --git a/package.json b/package.json index 9f12f04223103..9f99f928a64d5 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "uiFramework:documentComponent": "cd packages/kbn-ui-framework && yarn documentComponent", "kbn:watch": "node scripts/kibana --dev --logging.json=false", "build:types": "tsc --p tsconfig.types.json", - "core:acceptApiChanges": "node scripts/check_core_api_changes.js --accept", + "docs:acceptApiChanges": "node scripts/check_published_api_changes.js --accept", "kbn:bootstrap": "yarn build:types && node scripts/register_git_hook", "spec_to_console": "node scripts/spec_to_console", "backport-skip-ci": "backport --prDescription \"[skip-ci]\"", diff --git a/scripts/check_core_api_changes.js b/scripts/check_published_api_changes.js similarity index 93% rename from scripts/check_core_api_changes.js rename to scripts/check_published_api_changes.js index 153491e0aecda..bea07dfd63377 100644 --- a/scripts/check_core_api_changes.js +++ b/scripts/check_published_api_changes.js @@ -18,4 +18,4 @@ */ require('../src/setup_node_env'); -require('../src/dev/run_check_core_api_changes'); +require('../src/dev/run_check_published_api_changes'); diff --git a/src/core/README.md b/src/core/README.md index f4539191d448b..b30c62e21b296 100644 --- a/src/core/README.md +++ b/src/core/README.md @@ -37,7 +37,7 @@ well documented. To reduce the chance of regressions, development on the Core AP process described below. Changes to the API signature which have not been accepted will cause the build to fail. When changes to the Core API's signatures are made, the following process needs to be followed: -1. After changes have been made, run `yarn core:acceptApiChanges` which performs the following: +1. After changes have been made, run `yarn docs:acceptApiChanges` which performs the following: - Recompiles all typescript typings files - Updates the API review files `src/core/public/kibana.api.md` and `src/core/server/kibana.api.md` - Updates the Core API documentation in `docs/development/core/` diff --git a/src/dev/run_check_core_api_changes.ts b/src/dev/run_check_published_api_changes.ts similarity index 98% rename from src/dev/run_check_core_api_changes.ts rename to src/dev/run_check_published_api_changes.ts index b3212c9e579b6..b12638d9b8661 100644 --- a/src/dev/run_check_core_api_changes.ts +++ b/src/dev/run_check_published_api_changes.ts @@ -17,6 +17,8 @@ * under the License. */ +/* eslint-disable no-console */ + import { ToolingLog } from '@kbn/dev-utils'; import { Extractor, @@ -95,7 +97,6 @@ const runBuildTypes = async () => { const runApiDocumenter = async (folder: string) => { const sourceFolder = `./build/${folder}`; const targetFolder = `./docs/development/${folder}`; - // eslint-disable-next-line no-console console.log(`Generating docs from ${sourceFolder} into ${targetFolder}...`); await execa('api-documenter', ['generate', '-i', sourceFolder, '-o', targetFolder], { preferLocal: true, @@ -105,7 +106,6 @@ const runApiDocumenter = async (folder: string) => { const renameExtractedApiPackageName = async (folder: string) => { const fname = getReportFileName(folder); const jsonApiFile = `build/${folder}/${fname}.api.json`; - // eslint-disable-next-line no-console console.log(`Updating ${jsonApiFile}...`); const json = JSON.parse(fs.readFileSync(jsonApiFile).toString()); json.name = json.canonicalReference = `kibana-plugin-${folder.replace(/\//g, '-')}`; @@ -266,6 +266,6 @@ async function run( process.exitCode = 1; } })().catch(e => { - // eslint-disable-next-line no-console console.log(e); + process.exitCode = 1; });