From e40f2b1f54cf74815aedb52ef5612e444ae4c068 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Mon, 7 Sep 2020 22:08:12 +0800 Subject: [PATCH 01/53] remove mono repo dependency and private npm registry option --- package.json | 3 +- .../commands/create-plugin/createPlugin.ts | 50 +++++++++++++------ packages/cli/src/commands/index.ts | 3 ++ packages/cli/src/lib/tasks.ts | 7 +++ .../templates/default-plugin/package.json.hbs | 5 +- .../templates/default-plugin/tsconfig.json | 13 +++++ packages/e2e-test/src/e2e-test.ts | 6 ++- 7 files changed, 68 insertions(+), 19 deletions(-) create mode 100644 packages/cli/templates/default-plugin/tsconfig.json diff --git a/package.json b/package.json index 93f8f694a6..1ddfc8bb03 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,8 @@ "docgen": "lerna run docgen", "docker-build:app": "yarn workspace example-app build && docker build . -t spotify/backstage", "docker-build": "yarn tsc && yarn workspace example-backend build-image", - "create-plugin": "backstage-cli create-plugin", + "create-plugin": "backstage-cli create-plugin --scope internal", + "create-oss-plugin": "backstage-cli create-plugin --scope backstage", "remove-plugin": "backstage-cli remove-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push --force-publish; fi", "prettier:check": "prettier --check .", diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 5e6882a4a0..fe23acc924 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -21,6 +21,7 @@ import inquirer, { Answers, Question } from 'inquirer'; import { exec as execCb } from 'child_process'; import { resolve as resolvePath } from 'path'; import os from 'os'; +import { Command } from 'commander'; import { parseOwnerIds, addCodeownersEntry, @@ -32,12 +33,12 @@ import { version as backstageVersion } from '../../lib/version'; const exec = promisify(execCb); -async function checkExists(rootDir: string, id: string) { - await Task.forItem('checking', id, async () => { - const destination = resolvePath(rootDir, 'plugins', id); - +async function checkExists(destination: string) { + await Task.forItem('checking', destination, async () => { if (await fs.pathExists(destination)) { - const existing = chalk.cyan(destination.replace(`${rootDir}/`, '')); + const existing = chalk.cyan( + destination.replace(`${paths.targetRoot}/`, ''), + ); throw new Error( `A plugin with the same name already exists: ${existing}\nPlease try again with a different plugin ID`, ); @@ -88,8 +89,9 @@ export async function addPluginDependencyToApp( rootDir: string, pluginName: string, versionStr: string, + scopeNameWithSlash: string, ) { - const pluginPackage = `@backstage/plugin-${pluginName}`; + const pluginPackage = `${scopeNameWithSlash}plugin-${pluginName}`; const packageFilePath = 'packages/app/package.json'; const packageFile = resolvePath(rootDir, packageFilePath); @@ -116,8 +118,12 @@ export async function addPluginDependencyToApp( }); } -export async function addPluginToApp(rootDir: string, pluginName: string) { - const pluginPackage = `@backstage/plugin-${pluginName}`; +export async function addPluginToApp( + rootDir: string, + pluginName: string, + scopeNameWithSlash: string, +) { + const pluginPackage = `${scopeNameWithSlash}plugin-${pluginName}`; const pluginNameCapitalized = pluginName .split('-') .map(name => capitalize(name)) @@ -175,8 +181,12 @@ export async function movePlugin( }); } -export default async () => { +export default async (cmd: Command) => { const codeownersPath = await getCodeownersFilePath(paths.targetRoot); + const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; + const scopeNameWithSlash = cmd.scope ? `${scopeName}/` : ''; + const privatePackage = cmd.private === false ? false : true; + const registryURL = cmd.npmRegistry; const questions: Question[] = [ { @@ -225,16 +235,18 @@ export default async () => { const appPackage = paths.resolveTargetRoot('packages/app'); const templateDir = paths.resolveOwn('templates/default-plugin'); const tempDir = resolvePath(os.tmpdir(), answers.id); - const pluginDir = paths.resolveTargetRoot('plugins', answers.id); + const pluginDir = (await fs.pathExists(paths.resolveTargetRoot('plugins'))) + ? paths.resolveTargetRoot('plugins', answers.id) + : paths.resolveTargetRoot(answers.id); const ownerIds = parseOwnerIds(answers.owner); - const { version } = await fs.readJson(paths.resolveTargetRoot('lerna.json')); + const version = backstageVersion; Task.log(); Task.log('Creating the plugin...'); try { Task.section('Checking if the plugin ID is available'); - await checkExists(paths.targetRoot, answers.id); + await checkExists(pluginDir); Task.section('Creating a temporary plugin directory'); await createTemporaryPluginFolder(tempDir); @@ -244,6 +256,9 @@ export default async () => { ...answers, version, backstageVersion, + scopeName, + privatePackage, + registryURL, }); Task.section('Moving to final location'); @@ -254,10 +269,15 @@ export default async () => { if (await fs.pathExists(appPackage)) { Task.section('Adding plugin as dependency in app'); - await addPluginDependencyToApp(paths.targetRoot, answers.id, version); + await addPluginDependencyToApp( + paths.targetRoot, + answers.id, + version, + scopeNameWithSlash, + ); Task.section('Import plugin in app'); - await addPluginToApp(paths.targetRoot, answers.id); + await addPluginToApp(paths.targetRoot, answers.id, scopeNameWithSlash); } if (ownerIds && ownerIds.length) { @@ -271,7 +291,7 @@ export default async () => { Task.log(); Task.log( `🥇 Successfully created ${chalk.cyan( - `@backstage/plugin-${answers.id}`, + `${scopeNameWithSlash}plugin-${answers.id}`, )}`, ); Task.log(); diff --git a/packages/cli/src/commands/index.ts b/packages/cli/src/commands/index.ts index 4e031cdbc1..f1828cef84 100644 --- a/packages/cli/src/commands/index.ts +++ b/packages/cli/src/commands/index.ts @@ -62,6 +62,9 @@ export function registerCommands(program: CommanderStatic) { program .command('create-plugin') .description('Creates a new plugin in the current repository') + .option('--scope ', 'NPM scope') + .option('--npm-registry ', 'NPM registry URL') + .option('--no-private', 'Public NPM Package') .action( lazy(() => import('./create-plugin/createPlugin').then(m => m.default)), ); diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 0753301b78..38f2636b81 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -19,6 +19,7 @@ import fs from 'fs-extra'; import handlebars from 'handlebars'; import ora from 'ora'; import { basename, dirname } from 'path'; +import { paths } from './paths'; import recursive from 'recursive-readdir'; const TASK_NAME_MAX_LENGTH = 14; @@ -73,6 +74,10 @@ export async function templatingTask( throw new Error(`Failed to read template directory: ${error.message}`); }); + const isMonoRepo = (await fs.pathExists(paths.resolveTargetRoot('plugins'))) + ? true + : false; + for (const file of files) { const destinationFile = file.replace(templateDir, destinationDir); await fs.ensureDir(dirname(destinationFile)); @@ -92,6 +97,8 @@ export async function templatingTask( }); }); } else { + if (isMonoRepo && basename(file) === 'tsconfig.json') continue; + await Task.forItem('copying', basename(file), async () => { await fs.copyFile(file, destinationFile).catch(error => { const destination = destinationFile; diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 38d4e41b5b..ad217b0be1 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,11 +1,12 @@ { - "name": "@backstage/plugin-{{id}}", + "name": "{{#if scopeName}}{{scopeName}}/{{/if}}/plugin-{{id}}", "version": "{{version}}", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", - "private": true, + "private": {{privatePackage}}, "publishConfig": { + {{#if registryURL}}"{{scopeName}}:registry":"{{registryURL}}",{{/if}} "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json new file mode 100644 index 0000000000..d36fba9e4d --- /dev/null +++ b/packages/cli/templates/default-plugin/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "@backstage/cli/config/tsconfig.json", + "include": [ + "src", + "dev", + "migrations" + ], + "exclude": ["node_modules"], + "compilerOptions": { + "outDir": "dist-types", + "skipLibCheck": true + } +} diff --git a/packages/e2e-test/src/e2e-test.ts b/packages/e2e-test/src/e2e-test.ts index 5dfac68d6a..99ba1426d4 100644 --- a/packages/e2e-test/src/e2e-test.ts +++ b/packages/e2e-test/src/e2e-test.ts @@ -81,7 +81,11 @@ async function buildDistWorkspace(workspaceName: string, rootDir: string) { const path = paths.resolveOwnRoot(pkgJsonPath); const pkgTemplate = await fs.readFile(path, 'utf8'); const { dependencies = {}, devDependencies = {} } = JSON.parse( - handlebars.compile(pkgTemplate)({ version: '0.0.0' }), + handlebars.compile(pkgTemplate)({ + version: '0.0.0', + privatePackage: true, + scopeName: '@backstage', + }), ); Array() From adaa61e9ac43c6dc6beb1d56e8fc3b0ef5f627d1 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Tue, 8 Sep 2020 09:25:10 +0800 Subject: [PATCH 02/53] improvement --- package.json | 3 +-- packages/cli/src/lib/tasks.ts | 4 +--- packages/cli/templates/default-plugin/package.json.hbs | 2 +- packages/cli/templates/default-plugin/tsconfig.json | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 1ddfc8bb03..b25bcd3788 100644 --- a/package.json +++ b/package.json @@ -20,8 +20,7 @@ "docgen": "lerna run docgen", "docker-build:app": "yarn workspace example-app build && docker build . -t spotify/backstage", "docker-build": "yarn tsc && yarn workspace example-backend build-image", - "create-plugin": "backstage-cli create-plugin --scope internal", - "create-oss-plugin": "backstage-cli create-plugin --scope backstage", + "create-plugin": "backstage-cli create-plugin --scope backstage --no-private", "remove-plugin": "backstage-cli remove-plugin", "release": "if [ \"$(git symbolic-ref --short HEAD)\" = master ]; then echo \"don't try to release master\"; exit 1; else lerna version --no-push --force-publish; fi", "prettier:check": "prettier --check .", diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 38f2636b81..0573b8fda8 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -74,9 +74,7 @@ export async function templatingTask( throw new Error(`Failed to read template directory: ${error.message}`); }); - const isMonoRepo = (await fs.pathExists(paths.resolveTargetRoot('plugins'))) - ? true - : false; + const isMonoRepo = paths.resolveTargetRoot('lerna.json'); for (const file of files) { const destinationFile = file.replace(templateDir, destinationDir); diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index ad217b0be1..1180d67ea8 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,5 +1,5 @@ { - "name": "{{#if scopeName}}{{scopeName}}/{{/if}}/plugin-{{id}}", + "name": "{{#if scopeName}}{{scopeName}}/{{/if}}plugin-{{id}}", "version": "{{version}}", "main": "src/index.ts", "types": "src/index.ts", diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json index d36fba9e4d..40e967d267 100644 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ b/packages/cli/templates/default-plugin/tsconfig.json @@ -5,9 +5,8 @@ "dev", "migrations" ], - "exclude": ["node_modules"], "compilerOptions": { "outDir": "dist-types", - "skipLibCheck": true + "rootDir": "." } } From 11cddc25aa6c51af574ca87a99aba4b0cd285d6c Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Thu, 10 Sep 2020 13:14:32 +0800 Subject: [PATCH 03/53] rename packageName --- .../commands/create-plugin/createPlugin.ts | 34 +++++++------------ .../templates/default-plugin/package.json.hbs | 4 +-- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index fe23acc924..001a86ba6f 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -87,11 +87,9 @@ export const addExportStatement = async ( export async function addPluginDependencyToApp( rootDir: string, - pluginName: string, versionStr: string, - scopeNameWithSlash: string, + pluginPackage: string, ) { - const pluginPackage = `${scopeNameWithSlash}plugin-${pluginName}`; const packageFilePath = 'packages/app/package.json'; const packageFile = resolvePath(rootDir, packageFilePath); @@ -121,9 +119,8 @@ export async function addPluginDependencyToApp( export async function addPluginToApp( rootDir: string, pluginName: string, - scopeNameWithSlash: string, + pluginPackage: string, ) { - const pluginPackage = `${scopeNameWithSlash}plugin-${pluginName}`; const pluginNameCapitalized = pluginName .split('-') .map(name => capitalize(name)) @@ -183,10 +180,6 @@ export async function movePlugin( export default async (cmd: Command) => { const codeownersPath = await getCodeownersFilePath(paths.targetRoot); - const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; - const scopeNameWithSlash = cmd.scope ? `${scopeName}/` : ''; - const privatePackage = cmd.private === false ? false : true; - const registryURL = cmd.npmRegistry; const questions: Question[] = [ { @@ -231,6 +224,13 @@ export default async (cmd: Command) => { } const answers: Answers = await inquirer.prompt(questions); + const packageName = cmd.scope + ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` + : `plugin-${answers.id}`; + const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; + const registryURL = (cmd.npmRegistry && + cmd.scope)`"${scopeName}:registry": "${cmd.npmRegistry}",`; + const privatePackage = cmd.private === false ? false : true; const appPackage = paths.resolveTargetRoot('packages/app'); const templateDir = paths.resolveOwn('templates/default-plugin'); @@ -257,6 +257,7 @@ export default async (cmd: Command) => { version, backstageVersion, scopeName, + packageName, privatePackage, registryURL, }); @@ -269,15 +270,10 @@ export default async (cmd: Command) => { if (await fs.pathExists(appPackage)) { Task.section('Adding plugin as dependency in app'); - await addPluginDependencyToApp( - paths.targetRoot, - answers.id, - version, - scopeNameWithSlash, - ); + await addPluginDependencyToApp(paths.targetRoot, version, packageName); Task.section('Import plugin in app'); - await addPluginToApp(paths.targetRoot, answers.id, scopeNameWithSlash); + await addPluginToApp(paths.targetRoot, answers.id, packageName); } if (ownerIds && ownerIds.length) { @@ -289,11 +285,7 @@ export default async (cmd: Command) => { } Task.log(); - Task.log( - `🥇 Successfully created ${chalk.cyan( - `${scopeNameWithSlash}plugin-${answers.id}`, - )}`, - ); + Task.log(`🥇 Successfully created ${chalk.cyan(`${packageName}`)}`); Task.log(); Task.exit(); } catch (error) { diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 1180d67ea8..e6f9209997 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,12 +1,12 @@ { - "name": "{{#if scopeName}}{{scopeName}}/{{/if}}plugin-{{id}}", + "name": "{{packageName}}", "version": "{{version}}", "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", "private": {{privatePackage}}, "publishConfig": { - {{#if registryURL}}"{{scopeName}}:registry":"{{registryURL}}",{{/if}} + {{registryURL}} "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" From 816f158623a86cac23da8387aebc31cff8e1b3cc Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Thu, 10 Sep 2020 14:02:26 +0800 Subject: [PATCH 04/53] fix registryURL --- packages/cli/src/commands/create-plugin/createPlugin.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 001a86ba6f..561fa36f11 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -228,8 +228,10 @@ export default async (cmd: Command) => { ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` : `plugin-${answers.id}`; const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; - const registryURL = (cmd.npmRegistry && - cmd.scope)`"${scopeName}:registry": "${cmd.npmRegistry}",`; + const registryURL = + cmd.npmRegistry && cmd.scope + ? `"${scopeName}:registry": "${cmd.npmRegistry}",` + : null; const privatePackage = cmd.private === false ? false : true; const appPackage = paths.resolveTargetRoot('packages/app'); From 9cb2cfe2eec407af162b7abc674bf00230c0ddba Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Thu, 10 Sep 2020 17:23:00 +0800 Subject: [PATCH 05/53] detect monorepo --- packages/cli/src/commands/create-plugin/createPlugin.ts | 4 +++- packages/cli/src/lib/tasks.ts | 2 +- packages/create-app/templates/default-app/package.json.hbs | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 561fa36f11..48bc9025d9 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -237,9 +237,11 @@ export default async (cmd: Command) => { const appPackage = paths.resolveTargetRoot('packages/app'); const templateDir = paths.resolveOwn('templates/default-plugin'); const tempDir = resolvePath(os.tmpdir(), answers.id); - const pluginDir = (await fs.pathExists(paths.resolveTargetRoot('plugins'))) + const pluginDir = (await fs.pathExists(paths.resolveTargetRoot('lerna.json'))) ? paths.resolveTargetRoot('plugins', answers.id) : paths.resolveTargetRoot(answers.id); + console.log(await paths.resolveTargetRoot('lerna.json')); + console.log(await pluginDir); const ownerIds = parseOwnerIds(answers.owner); const version = backstageVersion; diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 0573b8fda8..34f796165b 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -74,7 +74,7 @@ export async function templatingTask( throw new Error(`Failed to read template directory: ${error.message}`); }); - const isMonoRepo = paths.resolveTargetRoot('lerna.json'); + const isMonoRepo = await fs.pathExists(paths.resolveTargetRoot('lerna.json')); for (const file of files) { const destinationFile = file.replace(templateDir, destinationDir); diff --git a/packages/create-app/templates/default-app/package.json.hbs b/packages/create-app/templates/default-app/package.json.hbs index b95b5bbc5b..19e3891551 100644 --- a/packages/create-app/templates/default-app/package.json.hbs +++ b/packages/create-app/templates/default-app/package.json.hbs @@ -16,7 +16,7 @@ "test:all": "lerna run test -- --coverage", "lint": "lerna run lint --since origin/master --", "lint:all": "lerna run lint --", - "create-plugin": "backstage-cli create-plugin", + "create-plugin": "backstage-cli create-plugin --scope backstage --no-private", "remove-plugin": "backstage-cli remove-plugin" }, "workspaces": { From 1db225a02f630ecd3d6ee3a9131247fcfff386b5 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Thu, 10 Sep 2020 18:09:09 +0800 Subject: [PATCH 06/53] keep addPluginDependencyToApp argument consistent --- packages/cli/src/commands/create-plugin/createPlugin.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 48bc9025d9..398009ca8f 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -87,8 +87,8 @@ export const addExportStatement = async ( export async function addPluginDependencyToApp( rootDir: string, - versionStr: string, pluginPackage: string, + versionStr: string, ) { const packageFilePath = 'packages/app/package.json'; const packageFile = resolvePath(rootDir, packageFilePath); @@ -274,7 +274,7 @@ export default async (cmd: Command) => { if (await fs.pathExists(appPackage)) { Task.section('Adding plugin as dependency in app'); - await addPluginDependencyToApp(paths.targetRoot, version, packageName); + await addPluginDependencyToApp(paths.targetRoot, packageName, version); Task.section('Import plugin in app'); await addPluginToApp(paths.targetRoot, answers.id, packageName); From 247e7b347177c12775eadf9aad06c40b6d481124 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sat, 12 Sep 2020 06:49:29 -0400 Subject: [PATCH 07/53] Add @changesets/cli as a dependency & init changesets --- .changeset/README.md | 8 + .changeset/config.json | 10 + package.json | 3 + yarn.lock | 514 ++++++++++++++++++++++++++++++++++++++++- 4 files changed, 527 insertions(+), 8 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000000..4f3b76b096 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..4066833db6 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,10 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "linked": [], + "access": "restricted", + "baseBranch": "master", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/package.json b/package.json index c64b7f6951..0a41add8c6 100644 --- a/package.json +++ b/package.json @@ -66,5 +66,8 @@ "transformModules": [ "@kyma-project/asyncapi-react" ] + }, + "dependencies": { + "@changesets/cli": "2.10.2" } } diff --git a/yarn.lock b/yarn.lock index 11bb8a3fd8..dc4766cd31 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1103,7 +1103,7 @@ core-js-pure "^3.0.0" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.1.2", "@babel/runtime@^7.10.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.10.3", "@babel/runtime@^7.10.4", "@babel/runtime@^7.10.5", "@babel/runtime@^7.11.2", "@babel/runtime@^7.3.1", "@babel/runtime@^7.3.4", "@babel/runtime@^7.4.4", "@babel/runtime@^7.4.5", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.4", "@babel/runtime@^7.5.5", "@babel/runtime@^7.6.0", "@babel/runtime@^7.6.2", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.11.2" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.11.2.tgz#f549c13c754cc40b87644b9fa9f09a6a95fe0736" integrity sha512-TeWkU52so0mPtDcaCTxNBI/IHiz0pZgr8VEFqXFtZWpYD08ZB6FaSwVAS8MKRQAP3bYKiVjwysOJgMFY28o6Tw== @@ -1153,6 +1153,188 @@ resolved "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-4.1.1.tgz#671b3cfdbcc40d1449036ce586e882ab6150828e" integrity sha512-epVksusKVEpwBs2vRg3SWssxn9KXs9CxEYNOcgeSRLRjq070ABj5bLPxkmtQpVeSPCHj8kfAE9J6z2WsLr4wZg== +"@changesets/apply-release-plan@^4.0.0": + version "4.0.0" + resolved "https://registry.npmjs.org/@changesets/apply-release-plan/-/apply-release-plan-4.0.0.tgz#e78efb56a4e459a8dab814ba43045f2ace0f27c9" + integrity sha512-MrcUd8wIlQ4S/PznzqJVsmnEpUGfPEkCGF54iqt8G05GEqi/zuxpoTfebcScpj5zeiDyxFIcA9RbeZ3pvJJxoA== + dependencies: + "@babel/runtime" "^7.4.4" + "@changesets/config" "^1.2.0" + "@changesets/get-version-range-type" "^0.3.2" + "@changesets/git" "^1.0.5" + "@changesets/types" "^3.1.0" + "@manypkg/get-packages" "^1.0.1" + fs-extra "^7.0.1" + lodash.startcase "^4.4.0" + outdent "^0.5.0" + prettier "^1.18.2" + resolve-from "^5.0.0" + semver "^5.4.1" + +"@changesets/assemble-release-plan@^3.0.0", "@changesets/assemble-release-plan@^3.0.1": + version "3.0.1" + resolved "https://registry.npmjs.org/@changesets/assemble-release-plan/-/assemble-release-plan-3.0.1.tgz#cd501d0c57d435a594fc7bb630fa589d5b75c2a0" + integrity sha512-PChmYuibH8RPiebMIzuYZ/DFS8ehf7yq+X5X0rJklg2njP3zYWJX7nlctpnBhZ0zpgvP2IgrtUigoVGNkv5m/Q== + dependencies: + "@babel/runtime" "^7.10.4" + "@changesets/errors" "^0.1.4" + "@changesets/get-dependents-graph" "^1.1.3" + "@changesets/types" "^3.1.0" + "@manypkg/get-packages" "^1.0.1" + semver "^5.4.1" + +"@changesets/cli@2.10.2": + version "2.10.2" + resolved "https://registry.npmjs.org/@changesets/cli/-/cli-2.10.2.tgz#85a7a8d8aca2ef682c671f352645bc75c72f9b85" + integrity sha512-m4YwTmT0ElOuBD3GCbbT75EWmdU4uCFARE4X+Ml1/knc4Z/MEzOjV0bi0/9eHACcQIMNg7rdB6f4vXtHiQU6bA== + dependencies: + "@babel/runtime" "^7.10.4" + "@changesets/apply-release-plan" "^4.0.0" + "@changesets/assemble-release-plan" "^3.0.1" + "@changesets/config" "^1.3.0" + "@changesets/errors" "^0.1.4" + "@changesets/get-dependents-graph" "^1.1.3" + "@changesets/get-release-plan" "^2.0.0" + "@changesets/git" "^1.0.6" + "@changesets/logger" "^0.0.5" + "@changesets/pre" "^1.0.4" + "@changesets/read" "^0.4.6" + "@changesets/types" "^3.1.1" + "@changesets/write" "^0.1.3" + "@manypkg/get-packages" "^1.0.1" + "@types/semver" "^6.0.0" + boxen "^1.3.0" + chalk "^2.1.0" + enquirer "^2.3.0" + external-editor "^3.1.0" + fs-extra "^7.0.1" + human-id "^1.0.2" + is-ci "^2.0.0" + meow "^5.0.0" + outdent "^0.5.0" + p-limit "^2.2.0" + preferred-pm "^3.0.0" + semver "^5.4.1" + spawndamnit "^2.0.0" + term-size "^2.1.0" + tty-table "^2.7.0" + +"@changesets/config@^1.2.0", "@changesets/config@^1.3.0": + version "1.3.0" + resolved "https://registry.npmjs.org/@changesets/config/-/config-1.3.0.tgz#82fcbf572b00ba16636be9ea45167983f1fc203b" + integrity sha512-IeAHmN5kI7OywBUNJXsk/v4vcXDDscwgTe/K5D3FSng5QTvzbgiMAe5K1iwBxBvuT4u/33n89kxSJdg4TTTFfA== + dependencies: + "@changesets/errors" "^0.1.4" + "@changesets/get-dependents-graph" "^1.1.3" + "@changesets/logger" "^0.0.5" + "@changesets/types" "^3.1.0" + "@manypkg/get-packages" "^1.0.1" + fs-extra "^7.0.1" + +"@changesets/errors@^0.1.4": + version "0.1.4" + resolved "https://registry.npmjs.org/@changesets/errors/-/errors-0.1.4.tgz#f79851746c43679a66b383fdff4c012f480f480d" + integrity sha512-HAcqPF7snsUJ/QzkWoKfRfXushHTu+K5KZLJWPb34s4eCZShIf8BFO3fwq6KU8+G7L5KdtN2BzQAXOSXEyiY9Q== + dependencies: + extendable-error "^0.1.5" + +"@changesets/get-dependents-graph@^1.1.3": + version "1.1.3" + resolved "https://registry.npmjs.org/@changesets/get-dependents-graph/-/get-dependents-graph-1.1.3.tgz#da959c43ce98f3a990a6b8d9c1f894bcc1b629c7" + integrity sha512-cTbySXwSv9yWp4Pp5R/b5Qv23wJgFaFCqUbsI3IJ2pyPl0vMaODAZS8NI1nNK2XSxGIg1tw+dWNSR4PlrKBSVQ== + dependencies: + "@changesets/types" "^3.0.0" + "@manypkg/get-packages" "^1.0.1" + chalk "^2.1.0" + fs-extra "^7.0.1" + semver "^5.4.1" + +"@changesets/get-release-plan@^2.0.0": + version "2.0.0" + resolved "https://registry.npmjs.org/@changesets/get-release-plan/-/get-release-plan-2.0.0.tgz#570dbd0abcdd4169a73e8332ec139a01130f3b72" + integrity sha512-MHbgXMhkfWhXH1zUefrdtQ8IR+H46lAcKthKjptV28k0qGEcDk7KriYLukJ6BNkWiZkkZ/aycaivbNDclF9zaw== + dependencies: + "@babel/runtime" "^7.4.4" + "@changesets/assemble-release-plan" "^3.0.0" + "@changesets/config" "^1.2.0" + "@changesets/pre" "^1.0.4" + "@changesets/read" "^0.4.6" + "@changesets/types" "^3.1.0" + "@manypkg/get-packages" "^1.0.1" + +"@changesets/get-version-range-type@^0.3.2": + version "0.3.2" + resolved "https://registry.npmjs.org/@changesets/get-version-range-type/-/get-version-range-type-0.3.2.tgz#8131a99035edd11aa7a44c341cbb05e668618c67" + integrity sha512-SVqwYs5pULYjYT4op21F2pVbcrca4qA/bAA3FmFXKMN7Y+HcO8sbZUTx3TAy2VXulP2FACd1aC7f2nTuqSPbqg== + +"@changesets/git@^1.0.5", "@changesets/git@^1.0.6": + version "1.0.6" + resolved "https://registry.npmjs.org/@changesets/git/-/git-1.0.6.tgz#057e627e5d3fcb74bf6c18d7284e130ba5a7632e" + integrity sha512-e0M06XuME3W5lGhz+CO0vLc60u+hLk/pYjOx/6GXEWuQrwtGgeycFIfRgRt8qTs664o1oKtVHBbd7ItpoWgFfA== + dependencies: + "@babel/runtime" "^7.10.4" + "@changesets/errors" "^0.1.4" + "@changesets/types" "^3.1.1" + "@manypkg/get-packages" "^1.0.1" + is-subdir "^1.1.1" + spawndamnit "^2.0.0" + +"@changesets/logger@^0.0.5": + version "0.0.5" + resolved "https://registry.npmjs.org/@changesets/logger/-/logger-0.0.5.tgz#68305dd5a643e336be16a2369cb17cdd8ed37d4c" + integrity sha512-gJyZHomu8nASHpaANzc6bkQMO9gU/ib20lqew1rVx753FOxffnCrJlGIeQVxNWCqM+o6OOleCo/ivL8UAO5iFw== + dependencies: + chalk "^2.1.0" + +"@changesets/parse@^0.3.6": + version "0.3.6" + resolved "https://registry.npmjs.org/@changesets/parse/-/parse-0.3.6.tgz#8c2c8480fc07d2db2c37469d4a8df10906a989c6" + integrity sha512-0XPd/es9CfogI7XIqDr7I2mWzm++xX2s9GZsij3GajPYd7ouEsgJyNatPooxNtqj6ZepkiD6uqlqbeBUyj/A0Q== + dependencies: + "@changesets/types" "^3.0.0" + js-yaml "^3.13.1" + +"@changesets/pre@^1.0.4": + version "1.0.5" + resolved "https://registry.npmjs.org/@changesets/pre/-/pre-1.0.5.tgz#91e5e3b31b4a85ce37de72f6511a786f62f29b51" + integrity sha512-p43aAQY3aijhDnBLCriPao5YArlRjD4mSHRJq9PsBhljVLWqQQXcn6seSd77d+bD1tATLhB8tQ2eYoxMtMydXQ== + dependencies: + "@babel/runtime" "^7.4.4" + "@changesets/errors" "^0.1.4" + "@changesets/types" "^3.0.0" + "@manypkg/get-packages" "^1.0.1" + fs-extra "^7.0.1" + +"@changesets/read@^0.4.6": + version "0.4.6" + resolved "https://registry.npmjs.org/@changesets/read/-/read-0.4.6.tgz#1c03e709a870a070fc95490ffa696297d23458f7" + integrity sha512-rOd8dsF/Lgyy2SYlDalb3Ts/meDI2AcKPXYhSXIW3k6+ZLlj6Pt+nmgV5Ut8euyH7loibklNTDemfvMffF4xig== + dependencies: + "@babel/runtime" "^7.4.4" + "@changesets/git" "^1.0.5" + "@changesets/logger" "^0.0.5" + "@changesets/parse" "^0.3.6" + "@changesets/types" "^3.0.0" + chalk "^2.1.0" + fs-extra "^7.0.1" + p-filter "^2.1.0" + +"@changesets/types@^3.0.0", "@changesets/types@^3.1.0", "@changesets/types@^3.1.1": + version "3.1.1" + resolved "https://registry.npmjs.org/@changesets/types/-/types-3.1.1.tgz#447481380c42044a8788e46c0dbdf592b338b62f" + integrity sha512-XWGEGWXhM92zvBWiQt2sOwhjTt8eCQbrsRbqkv4WYwW3Zsl4qPpvhHsNt845S42dJXrxgjWvId+jxFQocCayNQ== + +"@changesets/write@^0.1.3": + version "0.1.3" + resolved "https://registry.npmjs.org/@changesets/write/-/write-0.1.3.tgz#00ae575af50274773d7493e77fb96838a08ad8ad" + integrity sha512-q79rbwlVmTNKP9O6XxcMDj81CEOn/kQHbTFdRleW0tFUv98S1EyEAE9vLPPzO6WnQipHnaozxB1zMhHy0aQn8Q== + dependencies: + "@babel/runtime" "^7.4.4" + "@changesets/types" "^3.0.0" + fs-extra "^7.0.1" + human-id "^1.0.2" + prettier "^1.18.2" + "@cnakazawa/watch@^1.0.3": version "1.0.4" resolved "https://registry.npmjs.org/@cnakazawa/watch/-/watch-1.0.4.tgz#f864ae85004d0fcab6f50be9141c4da368d1656a" @@ -2473,6 +2655,27 @@ npmlog "^4.1.2" write-file-atomic "^2.3.0" +"@manypkg/find-root@^1.1.0": + version "1.1.0" + resolved "https://registry.npmjs.org/@manypkg/find-root/-/find-root-1.1.0.tgz#a62d8ed1cd7e7d4c11d9d52a8397460b5d4ad29f" + integrity sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA== + dependencies: + "@babel/runtime" "^7.5.5" + "@types/node" "^12.7.1" + find-up "^4.1.0" + fs-extra "^8.1.0" + +"@manypkg/get-packages@^1.0.1": + version "1.1.1" + resolved "https://registry.npmjs.org/@manypkg/get-packages/-/get-packages-1.1.1.tgz#7c7e72d0061ab2e61d2ce4da58ce91290a60ac8d" + integrity sha512-J6VClfQSVgR6958eIDTGjfdCrELy1eT+SHeoSMomnvRQVktZMnEA5edIr5ovRFNw5y+Bk/jyoevPzGYod96mhw== + dependencies: + "@babel/runtime" "^7.5.5" + "@manypkg/find-root" "^1.1.0" + fs-extra "^8.1.0" + globby "^11.0.0" + read-yaml-file "^1.1.0" + "@material-icons/font@^1.0.2": version "1.0.3" resolved "https://registry.npmjs.org/@material-icons/font/-/font-1.0.3.tgz#f722e5a69a03f20ef47d015cb69420bebeeaabe5" @@ -4417,6 +4620,11 @@ resolved "https://registry.npmjs.org/@types/node/-/node-12.12.53.tgz#be0d375933c3d15ef2380dafb3b0350ea7021129" integrity sha512-51MYTDTyCziHb70wtGNFRwB4l+5JNvdqzFSkbDvpbftEgVUBEE+T5f7pROhWMp/fxp07oNIEQZd5bbfAH22ohQ== +"@types/node@^12.7.1": + version "12.12.58" + resolved "https://registry.npmjs.org/@types/node/-/node-12.12.58.tgz#46dae9b2b9ee5992818c8f7cee01ff4ce03ab44c" + integrity sha512-Be46CNIHWAagEfINOjmriSxuv7IVcqbGe+sDSg2SYCEz/0CRBy7LRASGfRbD8KZkqoePU73Wsx3UvOSFcq/9hA== + "@types/node@^13.7.2": version "13.13.15" resolved "https://registry.npmjs.org/@types/node/-/node-13.13.15.tgz#fe1cc3aa465a3ea6858b793fd380b66c39919766" @@ -4686,6 +4894,11 @@ "@types/node" "*" rollup "^0.63.4" +"@types/semver@^6.0.0": + version "6.2.1" + resolved "https://registry.npmjs.org/@types/semver/-/semver-6.2.1.tgz#a236185670a7860f1597cf73bea2e16d001461ba" + integrity sha512-+beqKQOh9PYxuHvijhVl+tIHvT6tuwOrE9m14zd+MT2A38KoKZhh7pYJ0SNleLtwDsiIxHDsIk9bv01oOxvSvA== + "@types/serve-handler@^6.1.0": version "6.1.0" resolved "https://registry.npmjs.org/@types/serve-handler/-/serve-handler-6.1.0.tgz#6952aaf864e542297ce8a2480b3e0d9ea59de7f6" @@ -5339,6 +5552,13 @@ alphanum-sort@^1.0.0: resolved "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" integrity sha1-l6ERlkmyEa0zaR2fn0hqjsn74KM= +ansi-align@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f" + integrity sha1-w2rsy6VjuJzrVW82kPCx2eNUf38= + dependencies: + string-width "^2.0.0" + ansi-align@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/ansi-align/-/ansi-align-3.0.0.tgz#b536b371cf687caaef236c18d3e21fe3797467cb" @@ -5351,6 +5571,11 @@ ansi-colors@^3.0.0, ansi-colors@^3.2.1: resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.4.tgz#e3a3da4bfbae6c86a9c285625de124a234026fbf" integrity sha512-hHUXGagefjN2iRrID63xckIvotOXOojhQKWIPUZ4mNUZ9nLZW+7FMNoE1lOkEhNWYsx/7ysGIuJYCiMAA9FnrA== +ansi-colors@^4.1.1: + version "4.1.1" + resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" + integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== + ansi-escapes@^3.0.0, ansi-escapes@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" @@ -6385,6 +6610,13 @@ better-opn@^2.0.0: dependencies: open "^7.0.3" +better-path-resolve@1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/better-path-resolve/-/better-path-resolve-1.0.0.tgz#13a35a1104cdd48a7b74bf8758f96a1ee613f99d" + integrity sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g== + dependencies: + is-windows "^1.0.0" + bfj@^7.0.2: version "7.0.2" resolved "https://registry.npmjs.org/bfj/-/bfj-7.0.2.tgz#1988ce76f3add9ac2913fd8ba47aad9e651bfbb2" @@ -6487,6 +6719,19 @@ bowser@^1.7.3: resolved "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a" integrity sha512-9IdMmj2KjigRq6oWhmwv1W36pDuA4STQZ8q6YO9um+x07xgYNCD3Oou+WP/3L1HNz7iqythGet3/p4wvc8AAwQ== +boxen@^1.3.0: + version "1.3.0" + resolved "https://registry.npmjs.org/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b" + integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw== + dependencies: + ansi-align "^2.0.0" + camelcase "^4.0.0" + chalk "^2.0.1" + cli-boxes "^1.0.0" + string-width "^2.0.0" + term-size "^1.2.0" + widest-line "^2.0.0" + boxen@^4.1.0, boxen@^4.2.0: version "4.2.0" resolved "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz#e411b62357d6d6d36587c8ac3d5d974daa070e64" @@ -6532,6 +6777,13 @@ braces@^3.0.1, braces@~3.0.2: dependencies: fill-range "^7.0.1" +breakword@^1.0.5: + version "1.0.5" + resolved "https://registry.npmjs.org/breakword/-/breakword-1.0.5.tgz#fd420a417f55016736b5b615161cae1c8f819810" + integrity sha512-ex5W9DoOQ/LUEU3PMdLs9ua/CYZl1678NUkKOdUSi8Aw5F1idieaiRURCBFJCwVcrD1J8Iy3vfWSloaMwO2qFg== + dependencies: + wcwidth "^1.0.1" + brorand@^1.0.1: version "1.1.0" resolved "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" @@ -6928,7 +7180,7 @@ camelcase@^3.0.0: resolved "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= -camelcase@^4.1.0: +camelcase@^4.0.0, camelcase@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= @@ -7163,6 +7415,11 @@ clean-stack@^2.0.0: resolved "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz#ee8472dbb129e727b31e8a10a427dee9dfe4008b" integrity sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A== +cli-boxes@^1.0.0: + version "1.0.0" + resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143" + integrity sha1-T6kXw+WclKAEzWH47lCdplFocUM= + cli-boxes@^2.2.0: version "2.2.0" resolved "https://registry.npmjs.org/cli-boxes/-/cli-boxes-2.2.0.tgz#538ecae8f9c6ca508e3c3c95b453fe93cb4c168d" @@ -7937,6 +8194,15 @@ cross-spawn@7.0.1: shebang-command "^2.0.0" which "^2.0.1" +cross-spawn@^5.0.1, cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + integrity sha1-6L0O/uWPz/b4+UUQoKVUu/ojVEk= + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cross-spawn@^6.0.0: version "6.0.5" resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" @@ -8249,6 +8515,31 @@ csstype@^2.2.0, csstype@^2.5.2, csstype@^2.5.5, csstype@^2.5.7, csstype@^2.6.5, resolved "https://registry.npmjs.org/csstype/-/csstype-2.6.9.tgz#05141d0cd557a56b8891394c1911c40c8a98d098" integrity sha512-xz39Sb4+OaTsULgUERcCk+TJj8ylkL4aSVDQiX/ksxbELSqwkgt4d4RD7fovIdgJGSuNYqwZEiVjYY5l0ask+Q== +csv-generate@^3.2.4: + version "3.2.4" + resolved "https://registry.npmjs.org/csv-generate/-/csv-generate-3.2.4.tgz#440dab9177339ee0676c9e5c16f50e2b3463c019" + integrity sha512-qNM9eqlxd53TWJeGtY1IQPj90b563Zx49eZs8e0uMyEvPgvNVmX1uZDtdzAcflB3PniuH9creAzcFOdyJ9YGvA== + +csv-parse@^4.8.8: + version "4.12.0" + resolved "https://registry.npmjs.org/csv-parse/-/csv-parse-4.12.0.tgz#fd42d6291bbaadd51d3009f6cadbb3e53b4ce026" + integrity sha512-wPQl3H79vWLPI8cgKFcQXl0NBgYYEqVnT1i6/So7OjMpsI540oD7p93r3w6fDSyPvwkTepG05F69/7AViX2lXg== + +csv-stringify@^5.3.6: + version "5.5.1" + resolved "https://registry.npmjs.org/csv-stringify/-/csv-stringify-5.5.1.tgz#f42cdd379b0f7f142933a11f674b1a91ebd0fcd0" + integrity sha512-HM0/86Ks8OwFbaYLd495tqTs1NhscZL52dC4ieKYumy8+nawQYC0xZ63w1NqLf0M148T2YLYqowoImc1giPn0g== + +csv@^5.3.1: + version "5.3.2" + resolved "https://registry.npmjs.org/csv/-/csv-5.3.2.tgz#50b344e25dfbb8c62684a1bcec18c22468b2161e" + integrity sha512-odDyucr9OgJTdGM2wrMbJXbOkJx3nnUX3Pt8SFOwlAMOpsUQlz1dywvLMXJWX/4Ib0rjfOsaawuuwfI5ucqBGQ== + dependencies: + csv-generate "^3.2.4" + csv-parse "^4.8.8" + csv-stringify "^5.3.6" + stream-transform "^2.0.1" + currently-unhandled@^0.4.1: version "0.4.1" resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz#988df33feab191ef799a61369dd76c17adf957ea" @@ -9156,6 +9447,13 @@ enhanced-resolve@^4.0.0, enhanced-resolve@^4.3.0: memory-fs "^0.5.0" tapable "^1.0.0" +enquirer@^2.3.0: + version "2.3.6" + resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" + integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== + dependencies: + ansi-colors "^4.1.1" + enquirer@^2.3.5: version "2.3.5" resolved "https://registry.npmjs.org/enquirer/-/enquirer-2.3.5.tgz#3ab2b838df0a9d8ab9e7dff235b0e8712ef92381" @@ -9712,6 +10010,19 @@ execa@3.4.0: signal-exit "^3.0.2" strip-final-newline "^2.0.0" +execa@^0.7.0: + version "0.7.0" + resolved "https://registry.npmjs.org/execa/-/execa-0.7.0.tgz#944becd34cc41ee32a63a9faf27ad5a65fc59777" + integrity sha1-lEvs00zEHuMqY6n68nrVpl/Fl3c= + dependencies: + cross-spawn "^5.0.1" + get-stream "^3.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + execa@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" @@ -9869,7 +10180,12 @@ extend@3.0.2, extend@^3.0.0, extend@~3.0.2: resolved "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== -external-editor@^3.0.3: +extendable-error@^0.1.5: + version "0.1.7" + resolved "https://registry.npmjs.org/extendable-error/-/extendable-error-0.1.7.tgz#60b9adf206264ac920058a7395685ae4670c2b96" + integrity sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg== + +external-editor@^3.0.3, external-editor@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz#cb03f740befae03ea4d283caed2741a83f335495" integrity sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew== @@ -10212,6 +10528,14 @@ find-up@^3.0.0: dependencies: locate-path "^3.0.0" +find-up@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" + integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== + dependencies: + locate-path "^6.0.0" + path-exists "^4.0.0" + find-versions@^3.2.0: version "3.2.0" resolved "https://registry.npmjs.org/find-versions/-/find-versions-3.2.0.tgz#10297f98030a786829681690545ef659ed1d254e" @@ -10219,6 +10543,14 @@ find-versions@^3.2.0: dependencies: semver-regex "^2.0.0" +find-yarn-workspace-root2@1.2.16: + version "1.2.16" + resolved "https://registry.npmjs.org/find-yarn-workspace-root2/-/find-yarn-workspace-root2-1.2.16.tgz#60287009dd2f324f59646bdb4b7610a6b301c2a9" + integrity sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA== + dependencies: + micromatch "^4.0.2" + pkg-dir "^4.2.0" + findup-sync@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz#17b108f9ee512dfb7a5c7f3c8b27ea9e1a9c08d1" @@ -10452,7 +10784,7 @@ fs-extra@^0.30.0: path-is-absolute "^1.0.0" rimraf "^2.2.8" -fs-extra@^7.0.0: +fs-extra@^7.0.0, fs-extra@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== @@ -10622,6 +10954,11 @@ get-stdin@^6.0.0: resolved "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz#9e09bf712b360ab9225e812048f71fde9c89657b" integrity sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g== +get-stream@^3.0.0: + version "3.0.0" + resolved "https://registry.npmjs.org/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" + integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= + get-stream@^4.0.0, get-stream@^4.1.0: version "4.1.0" resolved "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" @@ -10978,7 +11315,7 @@ got@^9.6.0: to-readable-stream "^1.0.0" url-parse-lax "^3.0.0" -graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: +graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.5, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@^4.2.0, graceful-fs@^4.2.2, graceful-fs@^4.2.4: version "4.2.4" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb" integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw== @@ -11596,6 +11933,11 @@ https-proxy-agent@^2.2.3: agent-base "^4.3.0" debug "^3.1.0" +human-id@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz#e654d4b2b0d8b07e45da9f6020d8af17ec0a5df3" + integrity sha512-UNopramDEhHJD+VR+ehk8rOslwSfByxPIZyJRfV739NDhN5LF1fa1MqnzKm2lGTQRjNrjK19Q5fhkgIfjlVUKw== + human-signals@^1.1.1: version "1.1.1" resolved "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" @@ -12386,6 +12728,13 @@ is-string@^1.0.4, is-string@^1.0.5: resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz#40493ed198ef3ff477b8c7f92f644ec82a5cd3a6" integrity sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ== +is-subdir@^1.1.1: + version "1.1.1" + resolved "https://registry.npmjs.org/is-subdir/-/is-subdir-1.1.1.tgz#423e66902f9c5f159b9cc4826c820df083059538" + integrity sha512-VYpq0S7gPBVkkmfwkvGnx1EL9UVIo87NQyNcgMiNUdQCws3CJm5wj2nB+XPL7zigvjxhuZgp3bl2yBcKkSIj1w== + dependencies: + better-path-resolve "1.0.0" + is-svg@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/is-svg/-/is-svg-3.0.0.tgz#9321dbd29c212e5ca99c4fa9794c714bcafa2f75" @@ -13036,7 +13385,7 @@ js-tokens@^3.0.2: resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.8.3: +js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.14.0, js-yaml@^3.6.1, js-yaml@^3.8.3: version "3.14.0" resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz#a7a34170f26a21bb162424d8adacb4113a69e482" integrity sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A== @@ -13731,6 +14080,16 @@ load-json-file@^5.3.0: strip-bom "^3.0.0" type-fest "^0.3.0" +load-yaml-file@^0.2.0: + version "0.2.0" + resolved "https://registry.npmjs.org/load-yaml-file/-/load-yaml-file-0.2.0.tgz#af854edaf2bea89346c07549122753c07372f64d" + integrity sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw== + dependencies: + graceful-fs "^4.1.5" + js-yaml "^3.13.0" + pify "^4.0.1" + strip-bom "^3.0.0" + loader-runner@^2.4.0: version "2.4.0" resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-2.4.0.tgz#ed47066bfe534d7e84c4c7b9998c2a75607d9357" @@ -13786,6 +14145,13 @@ locate-path@^5.0.0: dependencies: p-locate "^4.1.0" +locate-path@^6.0.0: + version "6.0.0" + resolved "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" + integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== + dependencies: + p-locate "^5.0.0" + lodash-es@^4.17.11: version "4.17.15" resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz#21bd96839354412f23d7a10340e5eac6ee455d78" @@ -13856,6 +14222,11 @@ lodash.sortby@^4.7.0: resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438" integrity sha1-7dFMgk4sycHgsKG0K7UhBRakJDg= +lodash.startcase@^4.4.0: + version "4.4.0" + resolved "https://registry.npmjs.org/lodash.startcase/-/lodash.startcase-4.4.0.tgz#9436e34ed26093ed7ffae1936144350915d9add8" + integrity sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg= + lodash.template@^4.0.2, lodash.template@^4.5.0: version "4.5.0" resolved "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" @@ -14010,6 +14381,14 @@ lowlight@^1.14.0: fault "^1.0.0" highlight.js "~10.1.0" +lru-cache@^4.0.1: + version "4.1.5" + resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-4.1.5.tgz#8bbe50ea85bed59bc9e33dcab8235ee9bcf443cd" + integrity sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g== + dependencies: + pseudomap "^1.0.2" + yallist "^2.1.2" + lru-cache@^5.0.0, lru-cache@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" @@ -14606,6 +14985,11 @@ mixin-object@^2.0.1: for-in "^0.1.3" is-extendable "^0.1.1" +mixme@^0.3.1: + version "0.3.5" + resolved "https://registry.npmjs.org/mixme/-/mixme-0.3.5.tgz#304652cdaf24a3df0487205e61ac6162c6906ddd" + integrity sha512-SyV9uPETRig5ZmYev0ANfiGeB+g6N2EnqqEfBbCGmmJ6MgZ3E4qv5aPbnHVdZ60KAHHXV+T3sXopdrnIXQdmjQ== + mkdirp-classic@^0.5.2: version "0.5.2" resolved "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.2.tgz#54c441ce4c96cd7790e10b41a87aa51068ecab2b" @@ -15575,6 +15959,11 @@ ospath@^1.2.2: resolved "https://registry.npmjs.org/ospath/-/ospath-1.2.2.tgz#1276639774a3f8ef2572f7fe4280e0ea4550c07b" integrity sha1-EnZjl3Sj+O8lcvf+QoDg6kVQwHs= +outdent@^0.5.0: + version "0.5.0" + resolved "https://registry.npmjs.org/outdent/-/outdent-0.5.0.tgz#9e10982fdc41492bb473ad13840d22f9655be2ff" + integrity sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q== + overlayscrollbars@^1.10.2: version "1.13.0" resolved "https://registry.npmjs.org/overlayscrollbars/-/overlayscrollbars-1.13.0.tgz#1edb436328133b94877b558f77966d5497ca36a7" @@ -15602,6 +15991,13 @@ p-event@^4.0.0: dependencies: p-timeout "^3.1.0" +p-filter@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/p-filter/-/p-filter-2.1.0.tgz#1b1472562ae7a0f742f0f3d3d3718ea66ff9c09c" + integrity sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw== + dependencies: + p-map "^2.0.0" + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" @@ -15654,6 +16050,13 @@ p-locate@^4.1.0: dependencies: p-limit "^2.2.0" +p-locate@^5.0.0: + version "5.0.0" + resolved "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" + integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== + dependencies: + p-limit "^3.0.2" + p-map-series@^1.0.0: version "1.0.0" resolved "https://registry.npmjs.org/p-map-series/-/p-map-series-1.0.0.tgz#bf98fe575705658a9e1351befb85ae4c1f07bdca" @@ -16831,6 +17234,16 @@ postgres-interval@^1.1.0: dependencies: xtend "^4.0.0" +preferred-pm@^3.0.0: + version "3.0.2" + resolved "https://registry.npmjs.org/preferred-pm/-/preferred-pm-3.0.2.tgz#bbdbef1014e34a7490349bf70d6d244b8d57a5e1" + integrity sha512-yGIxyBkK/OWOppgCXfOeOXOeNrddyK1DzqS6XpOokRZb2ogXTpHRhKDTO7d0pjF/2p2sV9pEkKL4e0tNZI1y2A== + dependencies: + find-up "^5.0.0" + find-yarn-workspace-root2 "1.2.16" + path-exists "^4.0.0" + which-pm "2.0.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -16851,6 +17264,11 @@ prepend-http@^2.0.0: resolved "https://registry.npmjs.org/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= +prettier@^1.18.2: + version "1.19.1" + resolved "https://registry.npmjs.org/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb" + integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== + prettier@^2.0.5, prettier@~2.0.5: version "2.0.5" resolved "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4" @@ -17070,6 +17488,11 @@ ps-tree@1.2.0: dependencies: event-stream "=3.3.4" +pseudomap@^1.0.2: + version "1.0.2" + resolved "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" + integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= + psl@^1.1.28: version "1.8.0" resolved "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" @@ -17944,6 +18367,16 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" +read-yaml-file@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/read-yaml-file/-/read-yaml-file-1.1.0.tgz#9362bbcbdc77007cc8ea4519fe1c0b821a7ce0d8" + integrity sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA== + dependencies: + graceful-fs "^4.1.5" + js-yaml "^3.6.1" + pify "^4.0.1" + strip-bom "^3.0.0" + read@1, read@~1.0.1: version "1.0.7" resolved "https://registry.npmjs.org/read/-/read-1.0.7.tgz#b3da19bd052431a97671d44a42634adf710b40c4" @@ -19104,6 +19537,17 @@ smart-buffer@^4.1.0: resolved "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.1.0.tgz#91605c25d91652f4661ea69ccf45f1b331ca21ba" integrity sha512-iVICrxOzCynf/SNaBQCw34eM9jROU/s5rzIhpOvzhzuYHfJR/DhZfDkXiZSgKXfgv26HT3Yni3AV/DGw0cGnnw== +smartwrap@^1.2.3: + version "1.2.5" + resolved "https://registry.npmjs.org/smartwrap/-/smartwrap-1.2.5.tgz#45ee3e09ac234e5f7f17c16e916f511834f3cd23" + integrity sha512-bzWRwHwu0RnWjwU7dFy7tF68pDAx/zMSu3g7xr9Nx5J0iSImYInglwEVExyHLxXljy6PWMjkSAbwF7t2mPnRmg== + dependencies: + breakword "^1.0.5" + grapheme-splitter "^1.0.4" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + yargs "^15.1.0" + snapdragon-node@^2.0.1: version "2.1.1" resolved "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" @@ -19249,6 +19693,14 @@ spawn-command@^0.0.2-1: resolved "https://registry.npmjs.org/spawn-command/-/spawn-command-0.0.2-1.tgz#62f5e9466981c1b796dc5929937e11c9c6921bd0" integrity sha1-YvXpRmmBwbeW3Fkpk34RycaSG9A= +spawndamnit@^2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/spawndamnit/-/spawndamnit-2.0.0.tgz#9f762ac5c3476abb994b42ad592b5ad22bb4b0ad" + integrity sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA== + dependencies: + cross-spawn "^5.1.0" + signal-exit "^3.0.2" + spdx-correct@^3.0.0: version "3.1.0" resolved "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz#fb83e504445268f154b074e218c87c003cd31df4" @@ -19553,6 +20005,13 @@ stream-shift@^1.0.0: resolved "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== +stream-transform@^2.0.1: + version "2.0.2" + resolved "https://registry.npmjs.org/stream-transform/-/stream-transform-2.0.2.tgz#3cb7a14c802eb39bc40caaab0535e584f3a65caf" + integrity sha512-J+D5jWPF/1oX+r9ZaZvEXFbu7znjxSkbNAHJ9L44bt/tCVuOEWZlDqU9qJk7N2xBU1S+K2DPpSKeR/MucmCA1Q== + dependencies: + mixme "^0.3.1" + stream@^0.0.2: version "0.0.2" resolved "https://registry.npmjs.org/stream/-/stream-0.0.2.tgz#7f5363f057f6592c5595f00bc80a27f5cec1f0ef" @@ -19602,7 +20061,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -"string-width@^1.0.2 || 2", string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== @@ -20165,6 +20624,13 @@ temp-write@^3.4.0: temp-dir "^1.0.0" uuid "^3.0.1" +term-size@^1.2.0: + version "1.2.0" + resolved "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69" + integrity sha1-RYuDiH8oj8Vtb/+/rSYuJmOO+mk= + dependencies: + execa "^0.7.0" + term-size@^2.1.0: version "2.2.0" resolved "https://registry.npmjs.org/term-size/-/term-size-2.2.0.tgz#1f16adedfe9bdc18800e1776821734086fcc6753" @@ -20663,6 +21129,18 @@ tty-browserify@0.0.0: resolved "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz#a157ba402da24e9bf957f9aa69d524eed42901a6" integrity sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY= +tty-table@^2.7.0: + version "2.8.13" + resolved "https://registry.npmjs.org/tty-table/-/tty-table-2.8.13.tgz#d484a416381973eaebbdf19c79136b390e5c6d70" + integrity sha512-eVV/+kB6fIIdx+iUImhXrO22gl7f6VmmYh0Zbu6C196fe1elcHXd7U6LcLXu0YoVPc2kNesWiukYcdK8ZmJ6aQ== + dependencies: + chalk "^3.0.0" + csv "^5.3.1" + smartwrap "^1.2.3" + strip-ansi "^6.0.0" + wcwidth "^1.0.1" + yargs "^15.1.0" + tunnel-agent@^0.6.0: version "0.6.0" resolved "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" @@ -21605,6 +22083,14 @@ which-pm-runs@^1.0.0: resolved "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= +which-pm@2.0.0: + version "2.0.0" + resolved "https://registry.npmjs.org/which-pm/-/which-pm-2.0.0.tgz#8245609ecfe64bf751d0eef2f376d83bf1ddb7ae" + integrity sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w== + dependencies: + load-yaml-file "^0.2.0" + path-exists "^4.0.0" + which@1, which@^1.2.14, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -21626,6 +22112,13 @@ wide-align@^1.1.0: dependencies: string-width "^1.0.2 || 2" +widest-line@^2.0.0: + version "2.0.1" + resolved "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz#7438764730ec7ef4381ce4df82fb98a53142a3fc" + integrity sha512-Ba5m9/Fa4Xt9eb2ELXt77JxVDV8w7qQrH0zS/TWSJdLyAwQjWoOzpzj5lwVftDz6n/EOu3tNACS84v509qwnJA== + dependencies: + string-width "^2.1.1" + widest-line@^3.1.0: version "3.1.0" resolved "https://registry.npmjs.org/widest-line/-/widest-line-3.1.0.tgz#8292333bbf66cb45ff0de1603b136b7ae1496eca" @@ -21921,6 +22414,11 @@ yaeti@^0.0.6: resolved "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= +yallist@^2.1.2: + version "2.1.2" + resolved "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz#1c11f9218f076089a47dd512f93c6699a6a81d52" + integrity sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI= + yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: version "3.1.1" resolved "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" @@ -22013,7 +22511,7 @@ yargs@^14.2.2: y18n "^4.0.0" yargs-parser "^15.0.1" -yargs@^15.3.1, yargs@^15.4.1: +yargs@^15.1.0, yargs@^15.3.1, yargs@^15.4.1: version "15.4.1" resolved "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz#0d87a16de01aee9d8bec2bfbf74f67851730f4f8" integrity sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A== From cee29bbd2bdcae1df5bf6d7211f88d4de4eb9639 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sat, 12 Sep 2020 07:08:22 -0400 Subject: [PATCH 08/53] Linking all of the packages so they're released together --- .changeset/config.json | 53 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/.changeset/config.json b/.changeset/config.json index 4066833db6..02236339b9 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -2,8 +2,57 @@ "$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json", "changelog": "@changesets/cli/changelog", "commit": false, - "linked": [], - "access": "restricted", + "linked": [ + [ + "example-app", + "@backstage/backend-common", + "example-backend", + "@backstage/catalog-model", + "@backstage/cli-common", + "@backstage/cli", + "@backstage/config-loader", + "@backstage/config", + "@backstage/core-api", + "@backstage/core", + "@backstage/create-app", + "@backstage/dev-utils", + "docgen", + "e2e-test", + "storybook", + "@techdocs/cli", + "@backstage/test-utils-core", + "@backstage/test-utils", + "@backstage/theme", + "@backstage/plugin-api-docs", + "@backstage/plugin-app-backend", + "@backstage/plugin-auth-backend", + "@backstage/plugin-catalog-backend", + "@backstage/plugin-catalog", + "@backstage/plugin-circleci", + "@backstage/plugin-gcp-projects", + "@backstage/plugin-github-actions", + "@backstage/plugin-gitops-profiles", + "@backstage/plugin-graphiql", + "@backstage/plugin-graphql-backend", + "@backstage/plugin-identity-backend", + "@backstage/plugin-jenkins", + "@backstage/plugin-lighthouse", + "@backstage/plugin-newrelic", + "@backstage/plugin-proxy-backend", + "@backstage/plugin-register-component", + "@backstage/plugin-rollbar-backend", + "@backstage/plugin-rollbar", + "@backstage/plugin-scaffolder-backend", + "@backstage/plugin-scaffolder", + "@backstage/plugin-sentry-backend", + "@backstage/plugin-sentry", + "@backstage/plugin-tech-radar", + "@backstage/plugin-techdocs-backend", + "@backstage/plugin-techdocs", + "@backstage/plugin-welcome" + ] + ], + "access": "public", "baseBranch": "master", "updateInternalDependencies": "patch", "ignore": [] From 5b5928a52e4b8297650a7e3a84b9a5502bccaa9d Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sat, 12 Sep 2020 07:27:18 -0400 Subject: [PATCH 09/53] Add changeset workflow --- .github/workflows/changeset.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/changeset.yml diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml new file mode 100644 index 0000000000..c6a004b3e8 --- /dev/null +++ b/.github/workflows/changeset.yml @@ -0,0 +1,19 @@ +name: Changeset + +on: + push: + branches: + - master + +jobs: + create-release-pr: + name: Create Changeset PR + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Install Dependencies + run: yarn + - name: Create Release Pull Request + uses: changesets/action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 10eafce72aab0588cd057e35d8ac9a4902eb6bf5 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sun, 13 Sep 2020 09:57:53 -0400 Subject: [PATCH 10/53] Add --frozen-lockfile on yarn install --- .github/workflows/changeset.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index c6a004b3e8..5f12776beb 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: actions/checkout@v1 - name: Install Dependencies - run: yarn + run: yarn --frozen-lockfile - name: Create Release Pull Request uses: changesets/action@master env: From 2617d8e36cb10a2ff47584d5681d8e67427363b8 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sun, 13 Sep 2020 10:00:52 -0400 Subject: [PATCH 11/53] @changeset/cli to dev dependencies --- package.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 0a41add8c6..17c3ee83b8 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ }, "version": "1.0.0", "devDependencies": { + "@changesets/cli": "2.10.2", "@spotify/eslint-config-oss": "^1.0.1", "@spotify/prettier-config": "^8.0.0", "concurrently": "^5.2.0", @@ -66,8 +67,5 @@ "transformModules": [ "@kyma-project/asyncapi-react" ] - }, - "dependencies": { - "@changesets/cli": "2.10.2" } } From cdb5510b2fe2c2689da0509b137246d07bd172d4 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Sun, 13 Sep 2020 10:05:59 -0400 Subject: [PATCH 12/53] Fix formatting of changeset workflow --- .github/workflows/changeset.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/changeset.yml b/.github/workflows/changeset.yml index 5f12776beb..ac7872ea93 100644 --- a/.github/workflows/changeset.yml +++ b/.github/workflows/changeset.yml @@ -10,10 +10,10 @@ jobs: name: Create Changeset PR runs-on: ubuntu-latest steps: - - uses: actions/checkout@v1 - - name: Install Dependencies - run: yarn --frozen-lockfile - - name: Create Release Pull Request - uses: changesets/action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v1 + - name: Install Dependencies + run: yarn --frozen-lockfile + - name: Create Release Pull Request + uses: changesets/action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 7f8f8f75726e0b864e423862d3ca96a92a8d860a Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Mon, 14 Sep 2020 14:40:02 +0800 Subject: [PATCH 13/53] un-escape var --- packages/cli/templates/default-plugin/package.json.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 120563c38a..251521e0c7 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -6,7 +6,7 @@ "license": "Apache-2.0", "private": {{privatePackage}}, "publishConfig": { - {{registryURL}} + {{{registryURL}}} "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" From f90d645461bf82f5745c262e042671c6b04cb362 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Mon, 14 Sep 2020 15:50:18 +0800 Subject: [PATCH 14/53] fix plugin:diff --- .../cli/src/commands/create-plugin/createPlugin.ts | 10 +++++----- packages/cli/src/commands/plugin/diff.ts | 2 ++ packages/cli/templates/default-plugin/package.json.hbs | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 398009ca8f..f022f4fe9e 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -224,7 +224,7 @@ export default async (cmd: Command) => { } const answers: Answers = await inquirer.prompt(questions); - const packageName = cmd.scope + const name = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` : `plugin-${answers.id}`; const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; @@ -261,7 +261,7 @@ export default async (cmd: Command) => { version, backstageVersion, scopeName, - packageName, + name, privatePackage, registryURL, }); @@ -274,10 +274,10 @@ export default async (cmd: Command) => { if (await fs.pathExists(appPackage)) { Task.section('Adding plugin as dependency in app'); - await addPluginDependencyToApp(paths.targetRoot, packageName, version); + await addPluginDependencyToApp(paths.targetRoot, name, version); Task.section('Import plugin in app'); - await addPluginToApp(paths.targetRoot, answers.id, packageName); + await addPluginToApp(paths.targetRoot, answers.id, name); } if (ownerIds && ownerIds.length) { @@ -289,7 +289,7 @@ export default async (cmd: Command) => { } Task.log(); - Task.log(`🥇 Successfully created ${chalk.cyan(`${packageName}`)}`); + Task.log(`🥇 Successfully created ${chalk.cyan(`${name}`)}`); Task.log(); Task.exit(); } catch (error) { diff --git a/packages/cli/src/commands/plugin/diff.ts b/packages/cli/src/commands/plugin/diff.ts index 99af093f2c..064c72c448 100644 --- a/packages/cli/src/commands/plugin/diff.ts +++ b/packages/cli/src/commands/plugin/diff.ts @@ -65,9 +65,11 @@ export default async (cmd: Command) => { const { version } = await fs.readJson(paths.resolveTargetRoot('lerna.json')); const data = await readPluginData(); + const privatePackage = false; const templateFiles = await diffTemplateFiles('default-plugin', { version, backstageVersion, + privatePackage, ...data, }); await handleAllFiles(fileHandlers, templateFiles, promptFunc); diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 251521e0c7..ed1a56d605 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -1,5 +1,5 @@ { - "name": "{{packageName}}", + "name": "{{name}}", "version": "{{version}}", "main": "src/index.ts", "types": "src/index.ts", From 6cc089abaebec7b64a74a1966fab3d6b7785c0d4 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Mon, 14 Sep 2020 15:56:52 +0800 Subject: [PATCH 15/53] remove console.log --- packages/cli/src/commands/create-plugin/createPlugin.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index f022f4fe9e..8c2a9eeb98 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -240,8 +240,6 @@ export default async (cmd: Command) => { const pluginDir = (await fs.pathExists(paths.resolveTargetRoot('lerna.json'))) ? paths.resolveTargetRoot('plugins', answers.id) : paths.resolveTargetRoot(answers.id); - console.log(await paths.resolveTargetRoot('lerna.json')); - console.log(await pluginDir); const ownerIds = parseOwnerIds(answers.owner); const version = backstageVersion; From 111fbb9e0fcea84532e63838a9d09232478c357d Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Tue, 15 Sep 2020 13:30:18 +0800 Subject: [PATCH 16/53] fix plugin:diff --- .../commands/create-plugin/createPlugin.ts | 8 ++++---- packages/cli/src/commands/plugin/diff.ts | 20 +++++++++++++------ .../templates/default-plugin/package.json.hbs | 3 ++- 3 files changed, 20 insertions(+), 11 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 8c2a9eeb98..8241f68b8c 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -228,10 +228,10 @@ export default async (cmd: Command) => { ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` : `plugin-${answers.id}`; const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; - const registryURL = + const npmRegistry = cmd.npmRegistry && cmd.scope - ? `"${scopeName}:registry": "${cmd.npmRegistry}",` - : null; + ? `"${scopeName}:registry": "${cmd.npmRegistry}"` + : ''; const privatePackage = cmd.private === false ? false : true; const appPackage = paths.resolveTargetRoot('packages/app'); @@ -261,7 +261,7 @@ export default async (cmd: Command) => { scopeName, name, privatePackage, - registryURL, + npmRegistry, }); Task.section('Moving to final location'); diff --git a/packages/cli/src/commands/plugin/diff.ts b/packages/cli/src/commands/plugin/diff.ts index 064c72c448..f5dfa670b7 100644 --- a/packages/cli/src/commands/plugin/diff.ts +++ b/packages/cli/src/commands/plugin/diff.ts @@ -30,6 +30,9 @@ import { version as backstageVersion } from '../../lib/version'; export type PluginData = { id: string; name: string; + privatePackage: string; + version: string; + npmRegistry: string; }; const fileHandlers = [ @@ -62,14 +65,9 @@ export default async (cmd: Command) => { promptFunc = yesPromptFunc; } - const { version } = await fs.readJson(paths.resolveTargetRoot('lerna.json')); - const data = await readPluginData(); - const privatePackage = false; const templateFiles = await diffTemplateFiles('default-plugin', { - version, backstageVersion, - privatePackage, ...data, }); await handleAllFiles(fileHandlers, templateFiles, promptFunc); @@ -79,9 +77,19 @@ export default async (cmd: Command) => { // Reads templating data from the existing plugin async function readPluginData(): Promise { let name: string; + let privatePackage: string; + let version: string; + let npmRegistry: string; try { const pkg = require(paths.resolveTarget('package.json')); name = pkg.name; + privatePackage = pkg.private; + version = pkg.version; + const scope = name.split('/')[0]; + if (`${scope}:registry` in pkg.publishConfig) { + const registryURL = pkg.publishConfig[`${scope}:registry`]; + npmRegistry = `"${scope}:registry" : "${registryURL}"`; + } else npmRegistry = ''; } catch (error) { throw new Error(`Failed to read target package, ${error}`); } @@ -98,5 +106,5 @@ async function readPluginData(): Promise { const id = pluginIdMatch[1]; - return { id, name }; + return { id, name, privatePackage, version, npmRegistry }; } diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index ed1a56d605..1a969f9712 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -6,7 +6,8 @@ "license": "Apache-2.0", "private": {{privatePackage}}, "publishConfig": { - {{{registryURL}}} +{{#if npmRegistry}} {{{npmRegistry}}}, +{{/if}} "access": "public", "main": "dist/index.esm.js", "types": "dist/index.d.ts" From 903c9d9c63694a1ba178774b77f05094953a9aee Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Wed, 16 Sep 2020 14:06:14 +0800 Subject: [PATCH 17/53] fix plugin template verification --- .../cli/src/commands/create-plugin/createPlugin.ts | 4 ++-- packages/cli/src/lib/tasks.ts | 14 -------------- .../cli/templates/default-plugin/package.json.hbs | 3 ++- .../cli/templates/default-plugin/tsconfig.json | 12 ------------ 4 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 packages/cli/templates/default-plugin/tsconfig.json diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 8241f68b8c..9b97746c0e 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -233,11 +233,11 @@ export default async (cmd: Command) => { ? `"${scopeName}:registry": "${cmd.npmRegistry}"` : ''; const privatePackage = cmd.private === false ? false : true; - + const isMonoRepo = await fs.pathExists(paths.resolveTargetRoot('lerna.json')); const appPackage = paths.resolveTargetRoot('packages/app'); const templateDir = paths.resolveOwn('templates/default-plugin'); const tempDir = resolvePath(os.tmpdir(), answers.id); - const pluginDir = (await fs.pathExists(paths.resolveTargetRoot('lerna.json'))) + const pluginDir = isMonoRepo ? paths.resolveTargetRoot('plugins', answers.id) : paths.resolveTargetRoot(answers.id); const ownerIds = parseOwnerIds(answers.owner); diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 34f796165b..75794a1ba6 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -19,7 +19,6 @@ import fs from 'fs-extra'; import handlebars from 'handlebars'; import ora from 'ora'; import { basename, dirname } from 'path'; -import { paths } from './paths'; import recursive from 'recursive-readdir'; const TASK_NAME_MAX_LENGTH = 14; @@ -74,8 +73,6 @@ export async function templatingTask( throw new Error(`Failed to read template directory: ${error.message}`); }); - const isMonoRepo = await fs.pathExists(paths.resolveTargetRoot('lerna.json')); - for (const file of files) { const destinationFile = file.replace(templateDir, destinationDir); await fs.ensureDir(dirname(destinationFile)); @@ -94,17 +91,6 @@ export async function templatingTask( ); }); }); - } else { - if (isMonoRepo && basename(file) === 'tsconfig.json') continue; - - await Task.forItem('copying', basename(file), async () => { - await fs.copyFile(file, destinationFile).catch(error => { - const destination = destinationFile; - throw new Error( - `Failed to copy file to ${destination} : ${error.message}`, - ); - }); - }); } } } diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 1a969f9712..5e59b6fa0d 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -4,7 +4,8 @@ "main": "src/index.ts", "types": "src/index.ts", "license": "Apache-2.0", - "private": {{privatePackage}}, +{{#if privatePackage}} "private": {{privatePackage}}, +{{/if}} "publishConfig": { {{#if npmRegistry}} {{{npmRegistry}}}, {{/if}} diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json deleted file mode 100644 index 40e967d267..0000000000 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "@backstage/cli/config/tsconfig.json", - "include": [ - "src", - "dev", - "migrations" - ], - "compilerOptions": { - "outDir": "dist-types", - "rootDir": "." - } -} From 21aa93ad46a49b49175a27c6c9bc39dcf3de6231 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Wed, 16 Sep 2020 14:56:28 +0800 Subject: [PATCH 18/53] update templatingTask test --- packages/cli/src/commands/create-plugin/createPlugin.ts | 5 +---- packages/cli/src/lib/tasks.test.ts | 5 +++++ packages/cli/templates/default-plugin/package.json.hbs | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 9b97746c0e..00539a4b33 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -228,10 +228,7 @@ export default async (cmd: Command) => { ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` : `plugin-${answers.id}`; const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; - const npmRegistry = - cmd.npmRegistry && cmd.scope - ? `"${scopeName}:registry": "${cmd.npmRegistry}"` - : ''; + const npmRegistry = cmd.npmRegistry && cmd.scope ? cmd.npmRegistry : ''; const privatePackage = cmd.private === false ? false : true; const isMonoRepo = await fs.pathExists(paths.resolveTargetRoot('lerna.json')); const appPackage = paths.resolveTargetRoot('packages/app'); diff --git a/packages/cli/src/lib/tasks.test.ts b/packages/cli/src/lib/tasks.test.ts index 871d5a4d37..2a2f111d4b 100644 --- a/packages/cli/src/lib/tasks.test.ts +++ b/packages/cli/src/lib/tasks.test.ts @@ -37,6 +37,11 @@ describe('templatingTask', () => { try { await templatingTask(tmplDir, destDir, { version: '0.0.0', + backstageVersiona: '0.0.0', + scopeName: '@backstage', + name: '@backstage/plugin-test', + privatePackage: true, + npmRegistry: 'https://registry.npmjs.org/', }); await expect( diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 5e59b6fa0d..043e54b914 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -7,7 +7,7 @@ {{#if privatePackage}} "private": {{privatePackage}}, {{/if}} "publishConfig": { -{{#if npmRegistry}} {{{npmRegistry}}}, +{{#if npmRegistry}} "{{scopeName}}:registry": "{{npmRegistry}}", {{/if}} "access": "public", "main": "dist/index.esm.js", From 820304af3cd4fc74e3963159d070cc573725a109 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Wed, 16 Sep 2020 15:01:12 +0800 Subject: [PATCH 19/53] revert templatingTask test --- packages/cli/src/lib/tasks.test.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/cli/src/lib/tasks.test.ts b/packages/cli/src/lib/tasks.test.ts index 2a2f111d4b..871d5a4d37 100644 --- a/packages/cli/src/lib/tasks.test.ts +++ b/packages/cli/src/lib/tasks.test.ts @@ -37,11 +37,6 @@ describe('templatingTask', () => { try { await templatingTask(tmplDir, destDir, { version: '0.0.0', - backstageVersiona: '0.0.0', - scopeName: '@backstage', - name: '@backstage/plugin-test', - privatePackage: true, - npmRegistry: 'https://registry.npmjs.org/', }); await expect( From d0104e2052da08111c8fc386693c5714d675287e Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Wed, 16 Sep 2020 15:19:20 +0800 Subject: [PATCH 20/53] revert templatingTask --- packages/cli/src/lib/tasks.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/cli/src/lib/tasks.ts b/packages/cli/src/lib/tasks.ts index 75794a1ba6..0753301b78 100644 --- a/packages/cli/src/lib/tasks.ts +++ b/packages/cli/src/lib/tasks.ts @@ -91,6 +91,15 @@ export async function templatingTask( ); }); }); + } else { + await Task.forItem('copying', basename(file), async () => { + await fs.copyFile(file, destinationFile).catch(error => { + const destination = destinationFile; + throw new Error( + `Failed to copy file to ${destination} : ${error.message}`, + ); + }); + }); } } } From b22320e6c77d21a246ba11ebe32a3d2ba0626d02 Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Wed, 16 Sep 2020 15:54:06 -0400 Subject: [PATCH 21/53] Add changeset instructions to CONTRIBUTING.md --- CONTRIBUTING.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0d6a8db50c..2edfe1015e 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -72,6 +72,21 @@ If you're contributing to the backend or CLI tooling, be mindful of cross-platfo Also be sure to skim through our [ADRs](https://github.com/spotify/backstage/tree/master/docs/architecture-decisions) to see if they cover what you're working on. In particular [ADR006: Avoid React.FC and React.SFC](https://github.com/spotify/backstage/blob/master/docs/architecture-decisions/adr006-avoid-react-fc.md) is one to look out for. +# Creating Changesets + +We use [changesets](https://github.com/atlassian/changesets) to help us prepare releases. It helps us make sure that every package effected by a change gets a proper version number and an entry in it's CHANGELOG.md. To make the process of generating releases easy it helps when contributors include changesets with their pull requests. + +## To create a changeset + +1. Run `yarn changeset` +2. Select which packages you want to include a changeset for +3. Select impact of change that you're introducing (minor, major or patch) +4. Add generated changset to Git +5. Push the commit with your changeset to the branch associated with your PR +6. Accept our gratitude for making the release process easier on the maintainer + +For more information, checkout [adding a changeset](https://github.com/atlassian/changesets/blob/master/docs/adding-a-changeset.md) documentation in changesets repository. + # Code of Conduct This project adheres to the [Spotify FOSS Code of Conduct][code-of-conduct]. By participating, you are expected to honor this code. From 8ae216a29e603463e5c2ea4e5ca447ca283ba49f Mon Sep 17 00:00:00 2001 From: Taras Mankovski Date: Wed, 16 Sep 2020 18:15:03 -0400 Subject: [PATCH 22/53] Update CONTRIBUTING.md Co-authored-by: Himanshu Mishra --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2edfe1015e..a6f7e5e5e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,7 +74,7 @@ Also be sure to skim through our [ADRs](https://github.com/spotify/backstage/tre # Creating Changesets -We use [changesets](https://github.com/atlassian/changesets) to help us prepare releases. It helps us make sure that every package effected by a change gets a proper version number and an entry in it's CHANGELOG.md. To make the process of generating releases easy it helps when contributors include changesets with their pull requests. +We use [changesets](https://github.com/atlassian/changesets) to help us prepare releases. It helps us make sure that every package affected by a change gets a proper version number and an entry in its `CHANGELOG.md`. To make the process of generating releases easy. it helps when contributors include changesets with their pull requests. ## To create a changeset From 5603f1430dcc8254f05715116fe0a7d14075d7c9 Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Thu, 17 Sep 2020 16:52:34 +0800 Subject: [PATCH 23/53] remove scope from registry --- packages/cli/src/commands/create-plugin/createPlugin.ts | 2 -- packages/cli/templates/default-plugin/package.json.hbs | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 00539a4b33..9b96dbc79d 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -227,7 +227,6 @@ export default async (cmd: Command) => { const name = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}/plugin-${answers.id}` : `plugin-${answers.id}`; - const scopeName = cmd.scope ? `@${cmd.scope.replace(/^@/, '')}` : ''; const npmRegistry = cmd.npmRegistry && cmd.scope ? cmd.npmRegistry : ''; const privatePackage = cmd.private === false ? false : true; const isMonoRepo = await fs.pathExists(paths.resolveTargetRoot('lerna.json')); @@ -255,7 +254,6 @@ export default async (cmd: Command) => { ...answers, version, backstageVersion, - scopeName, name, privatePackage, npmRegistry, diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index 043e54b914..52cffeb621 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -7,7 +7,7 @@ {{#if privatePackage}} "private": {{privatePackage}}, {{/if}} "publishConfig": { -{{#if npmRegistry}} "{{scopeName}}:registry": "{{npmRegistry}}", +{{#if npmRegistry}} "registry": "{{npmRegistry}}", {{/if}} "access": "public", "main": "dist/index.esm.js", From 885e9a63f6e7603d5fb9ca6f818c9aa5b3e31e1d Mon Sep 17 00:00:00 2001 From: Fabian Chong Date: Fri, 18 Sep 2020 13:10:50 +0800 Subject: [PATCH 24/53] use version from lerna.json or fallback to 0.1.0 --- packages/cli/src/commands/create-plugin/createPlugin.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli/src/commands/create-plugin/createPlugin.ts b/packages/cli/src/commands/create-plugin/createPlugin.ts index 9b96dbc79d..247812b6fd 100644 --- a/packages/cli/src/commands/create-plugin/createPlugin.ts +++ b/packages/cli/src/commands/create-plugin/createPlugin.ts @@ -237,7 +237,9 @@ export default async (cmd: Command) => { ? paths.resolveTargetRoot('plugins', answers.id) : paths.resolveTargetRoot(answers.id); const ownerIds = parseOwnerIds(answers.owner); - const version = backstageVersion; + const { version } = isMonoRepo + ? await fs.readJson(paths.resolveTargetRoot('lerna.json')) + : { version: '0.1.0' }; Task.log(); Task.log('Creating the plugin...'); From 6a60d609e8f4f05e4f56d5be788c078f2ba3bba6 Mon Sep 17 00:00:00 2001 From: Oliver Sand Date: Thu, 17 Sep 2020 15:31:05 +0200 Subject: [PATCH 25/53] feat: move add example components to a more visible space and change behavior Previously the button was displayed every time the table was empty. This event happend during filtering, causing the layout to switch around. Now we check if the catalog is completly empty instead. In addition the button is now at the top of the page and not part of the table. If no example locations are configured, it is completly hidden. --- .../src/components/CatalogPage/CatalogPage.tsx | 18 +++++++++++++++++- .../CatalogTable/CatalogTable.test.tsx | 2 -- .../components/CatalogTable/CatalogTable.tsx | 12 +----------- .../src/filter/EntityFilterGroupsProvider.tsx | 3 +++ plugins/catalog/src/filter/context.ts | 1 + .../catalog/src/filter/useFilteredEntities.ts | 1 + 6 files changed, 23 insertions(+), 14 deletions(-) diff --git a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx index db490cf542..ea99753c14 100644 --- a/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx +++ b/plugins/catalog/src/components/CatalogPage/CatalogPage.tsx @@ -46,6 +46,9 @@ const useStyles = makeStyles(theme => ({ gridTemplateColumns: '250px 1fr', gridColumnGap: theme.spacing(2), }, + buttonSpacing: { + marginLeft: theme.spacing(2), + }, })); const CatalogPageContents = () => { @@ -56,6 +59,7 @@ const CatalogPageContents = () => { reload, matchingEntities, availableTags, + isCatalogEmpty, } = useFilteredEntities(); const configApi = useApi(configApiRef); const catalogApi = useApi(catalogApiRef); @@ -141,6 +145,9 @@ const CatalogPageContents = () => { [isStarredEntity, userId, orgName], ); + const showAddExampleEntities = + configApi.has('catalog.exampleEntityLocations') && isCatalogEmpty; + return ( { > Create Component + {showAddExampleEntities && ( + + )} All your software catalog entities
@@ -174,7 +191,6 @@ const CatalogPageContents = () => { entities={matchingEntities} loading={loading} error={error} - onAddMockData={addMockData} />
diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx index d1eef2a005..46d6010f2f 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.test.tsx @@ -46,7 +46,6 @@ describe('CatalogTable component', () => { entities={[]} loading={false} error={{ code: 'error' }} - onAddMockData={() => {}} />, ), ); @@ -63,7 +62,6 @@ describe('CatalogTable component', () => { titlePreamble="Owned" entities={entities} loading={false} - onAddMockData={() => {}} />, ), ); diff --git a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx index cd4df13775..f5885145b3 100644 --- a/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx +++ b/plugins/catalog/src/components/CatalogTable/CatalogTable.tsx @@ -16,11 +16,10 @@ import { Entity, LocationSpec } from '@backstage/catalog-model'; import { Table, TableColumn, TableProps } from '@backstage/core'; import { Chip, Link } from '@material-ui/core'; -import Add from '@material-ui/icons/Add'; import Edit from '@material-ui/icons/Edit'; import GitHub from '@material-ui/icons/GitHub'; import { Alert } from '@material-ui/lab'; -import React, { Dispatch } from 'react'; +import React from 'react'; import { generatePath, Link as RouterLink } from 'react-router-dom'; import { findLocationForEntityMeta } from '../../data/utils'; import { useStarredEntities } from '../../hooks/useStarredEntites'; @@ -87,7 +86,6 @@ type CatalogTableProps = { titlePreamble: string; loading: boolean; error?: any; - onAddMockData: Dispatch; }; export const CatalogTable = ({ @@ -95,7 +93,6 @@ export const CatalogTable = ({ loading, error, titlePreamble, - onAddMockData, }: CatalogTableProps) => { const { isStarredEntity, toggleStarredEntity } = useStarredEntities(); @@ -151,13 +148,6 @@ export const CatalogTable = ({ onClick: () => toggleStarredEntity(rowData), }; }, - { - icon: () => , - tooltip: 'Add example components', - isFreeAction: true, - onClick: onAddMockData, - hidden: !(entities && entities.length === 0), - }, ]; return ( diff --git a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx index 94bc428a45..5c3a67d9d0 100644 --- a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx +++ b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx @@ -62,6 +62,7 @@ function useProvideEntityFilters(): FilterGroupsContext { }>({}); const [matchingEntities, setMatchingEntities] = useState([]); const [availableTags, setAvailableTags] = useState([]); + const [isCatalogEmpty, setCatalogEmpty] = useState(false); useEffect(() => { doReload(); @@ -86,6 +87,7 @@ function useProvideEntityFilters(): FilterGroupsContext { ), ); setAvailableTags(collectTags(entities)); + setCatalogEmpty(entities !== undefined && entities.length === 0); }, [entities, error]); const register = useCallback( @@ -143,6 +145,7 @@ function useProvideEntityFilters(): FilterGroupsContext { filterGroupStates, matchingEntities, availableTags, + isCatalogEmpty, }; } diff --git a/plugins/catalog/src/filter/context.ts b/plugins/catalog/src/filter/context.ts index 838ec8d532..c025480fa6 100644 --- a/plugins/catalog/src/filter/context.ts +++ b/plugins/catalog/src/filter/context.ts @@ -33,6 +33,7 @@ export type FilterGroupsContext = { filterGroupStates: { [filterGroupId: string]: FilterGroupStates }; matchingEntities: Entity[]; availableTags: string[]; + isCatalogEmpty: boolean; }; /** diff --git a/plugins/catalog/src/filter/useFilteredEntities.ts b/plugins/catalog/src/filter/useFilteredEntities.ts index 138a7547c0..2d7dcfd89d 100644 --- a/plugins/catalog/src/filter/useFilteredEntities.ts +++ b/plugins/catalog/src/filter/useFilteredEntities.ts @@ -31,6 +31,7 @@ export function useFilteredEntities() { error: context.error, matchingEntities: context.matchingEntities, availableTags: context.availableTags, + isCatalogEmpty: context.isCatalogEmpty, reload: context.reload, }; } From e55156766b4c5aaab8fee32e3765e33a1433768f Mon Sep 17 00:00:00 2001 From: Omer Farooq <17722640+o-farooq@users.noreply.github.com> Date: Sat, 19 Sep 2020 16:42:48 +1200 Subject: [PATCH 26/53] create-app: fix missing .gitignore file when scaffolded --- .../templates/default-app/{.gitignore => .gitignore.hbs} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename packages/create-app/templates/default-app/{.gitignore => .gitignore.hbs} (96%) diff --git a/packages/create-app/templates/default-app/.gitignore b/packages/create-app/templates/default-app/.gitignore.hbs similarity index 96% rename from packages/create-app/templates/default-app/.gitignore rename to packages/create-app/templates/default-app/.gitignore.hbs index 4f9065c60b..5f5cc739f4 100644 --- a/packages/create-app/templates/default-app/.gitignore +++ b/packages/create-app/templates/default-app/.gitignore.hbs @@ -1,4 +1,3 @@ - # Logs logs *.log @@ -31,4 +30,4 @@ dist-types site # Local configuration files -*.local.yaml +*.local.yaml \ No newline at end of file From c742a38ddbf66d84f575f9175fa4f018d5230b25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Mon, 21 Sep 2020 08:43:51 +0200 Subject: [PATCH 27/53] fix(gcp-projects): some postponed cleanup of the plugin code (#2523) --- plugins/gcp-projects/src/api/GCPClient.ts | 124 ------------------ .../src/api/{GCPApi.ts => GcpApi.ts} | 18 ++- plugins/gcp-projects/src/api/GcpClient.ts | 98 ++++++++++++++ plugins/gcp-projects/src/api/index.ts | 4 +- .../NewProjectPage/NewProjectPage.tsx | 17 ++- .../ProjectDetailsPage/ProjectDetailsPage.tsx | 49 +++---- .../ProjectListPage/ProjectListPage.tsx | 42 +++--- plugins/gcp-projects/src/plugin.ts | 27 ++-- 8 files changed, 171 insertions(+), 208 deletions(-) delete mode 100644 plugins/gcp-projects/src/api/GCPClient.ts rename plugins/gcp-projects/src/api/{GCPApi.ts => GcpApi.ts} (69%) create mode 100644 plugins/gcp-projects/src/api/GcpClient.ts diff --git a/plugins/gcp-projects/src/api/GCPClient.ts b/plugins/gcp-projects/src/api/GCPClient.ts deleted file mode 100644 index dc4fe21132..0000000000 --- a/plugins/gcp-projects/src/api/GCPClient.ts +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2020 Spotify AB - * - * 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. - */ - -import { GCPApi } from './GCPApi'; -import { Project, Operation, Status } from './types'; - -const BaseURL = - 'https://content-cloudresourcemanager.googleapis.com/v1/projects'; - -export class GCPClient implements GCPApi { - async listProjects({ token }: { token: string }): Promise { - const response = await fetch(BaseURL, { - headers: new Headers({ - Accept: '*/*', - Authorization: `Bearer ${token}`, - }), - }); - - if (!response.ok) { - return [ - { - name: 'Error', - projectNumber: 'Response status is not OK', - projectId: 'Error', - lifecycleState: 'error', - createTime: 'Error', - }, - ]; - } - - const data = await response.json(); - - return data.projects; - } - - // eslint-disable-next-line @typescript-eslint/no-unused-vars - async getProject( - projectId: string, - token: Promise, - ): Promise { - const url = `${BaseURL}/${projectId}`; - const response = await fetch(url, { - headers: new Headers({ - Authorization: `Bearer ${await token}`, - }), - }); - - const dataBlank: Project = { - name: 'Error', - projectNumber: `Response status is ${response.status}`, - projectId: 'Error', - lifecycleState: 'error', - createTime: 'Error', - }; - - if (!response.ok) { - return dataBlank; - } - - const data = await response.json(); - - const newData: Project = data; - - return newData; - } - - async createProject( - projectName: string, - projectId: string, - token: string, - ): Promise { - const status: Status = { - code: 0, - message: '', - details: [], - }; - - const op: Operation = { - name: '', - metadata: '', - done: true, - error: status, - response: '', - }; - - const newProject: Project = { - name: projectName, - projectId: projectId, - }; - - const body = JSON.stringify(newProject); - - const response = await fetch(BaseURL, { - headers: new Headers({ - Accept: '*/*', - Authorization: `Bearer ${token}`, - }), - body: body, - method: 'POST', - }); - - if (!response.ok) { - status.code = response.status; - return op; - } - - const data = await response.json(); - - return data; - } -} diff --git a/plugins/gcp-projects/src/api/GCPApi.ts b/plugins/gcp-projects/src/api/GcpApi.ts similarity index 69% rename from plugins/gcp-projects/src/api/GCPApi.ts rename to plugins/gcp-projects/src/api/GcpApi.ts index 95b686815e..24ad1a93cc 100644 --- a/plugins/gcp-projects/src/api/GCPApi.ts +++ b/plugins/gcp-projects/src/api/GcpApi.ts @@ -17,18 +17,16 @@ import { createApiRef } from '@backstage/core'; import { Project, Operation } from './types'; -export const GCPApiRef = createApiRef({ +export const gcpApiRef = createApiRef({ id: 'plugin.gcpprojects.service', description: 'Used by the GCP Projects plugin to make requests', }); -export type GCPApi = { - listProjects: ({ token }: { token: string }) => Promise; - getProject: (projectId: string, token: Promise) => Promise; - createProject: ( - projectName: string, - projectId: string, - owner: string, - token: string, - ) => Promise; +export type GcpApi = { + listProjects(): Promise; + getProject(projectId: string): Promise; + createProject(options: { + projectId: string; + projectName: string; + }): Promise; }; diff --git a/plugins/gcp-projects/src/api/GcpClient.ts b/plugins/gcp-projects/src/api/GcpClient.ts new file mode 100644 index 0000000000..00bb859219 --- /dev/null +++ b/plugins/gcp-projects/src/api/GcpClient.ts @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Spotify AB + * + * 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. + */ + +import { OAuthApi } from '@backstage/core'; +import { GcpApi } from './GcpApi'; +import { Operation, Project } from './types'; + +const BASE_URL = + 'https://content-cloudresourcemanager.googleapis.com/v1/projects'; + +export class GcpClient implements GcpApi { + constructor(private readonly googleAuthApi: OAuthApi) {} + + async listProjects(): Promise { + const response = await fetch(BASE_URL, { + headers: { + Accept: '*/*', + Authorization: `Bearer ${await this.getToken()}`, + }, + }); + + if (!response.ok) { + throw new Error( + `List request failed to ${BASE_URL} with ${response.status} ${response.statusText}`, + ); + } + + const { projects } = await response.json(); + return projects; + } + + async getProject(projectId: string): Promise { + const url = `${BASE_URL}/${projectId}`; + const response = await fetch(url, { + headers: { + Authorization: `Bearer ${await this.getToken()}`, + }, + }); + + if (!response.ok) { + throw new Error( + `Get request failed to ${url} with ${response.status} ${response.statusText}`, + ); + } + + return await response.json(); + } + + async createProject(options: { + projectId: string; + projectName: string; + }): Promise { + const newProject: Project = { + name: options.projectName, + projectId: options.projectId, + }; + + const response = await fetch(BASE_URL, { + method: 'POST', + headers: { + Accept: '*/*', + Authorization: `Bearer ${await this.getToken()}`, + }, + body: JSON.stringify(newProject), + }); + + if (!response.ok) { + throw new Error( + `Create request failed to ${BASE_URL} with ${response.status} ${response.statusText}`, + ); + } + + return await response.json(); + } + + async getToken(): Promise { + // NOTE(freben): There's a .read-only variant of this scope that we could + // use for readonly operations, but that means we would ask the user for a + // second auth during creation and I decided to keep the wider scope for + // all ops for now + return this.googleAuthApi.getAccessToken( + 'https://www.googleapis.com/auth/cloud-platform', + ); + } +} diff --git a/plugins/gcp-projects/src/api/index.ts b/plugins/gcp-projects/src/api/index.ts index 51f617f19c..8e842c8e55 100644 --- a/plugins/gcp-projects/src/api/index.ts +++ b/plugins/gcp-projects/src/api/index.ts @@ -14,6 +14,6 @@ * limitations under the License. */ -export * from './GCPApi'; -export * from './GCPClient'; +export * from './GcpApi'; +export * from './GcpClient'; export * from './types'; diff --git a/plugins/gcp-projects/src/components/NewProjectPage/NewProjectPage.tsx b/plugins/gcp-projects/src/components/NewProjectPage/NewProjectPage.tsx index 0149f8ac92..f03149bc1a 100644 --- a/plugins/gcp-projects/src/components/NewProjectPage/NewProjectPage.tsx +++ b/plugins/gcp-projects/src/components/NewProjectPage/NewProjectPage.tsx @@ -14,24 +14,23 @@ * limitations under the License. */ -import React, { FC, useState } from 'react'; -import { Grid, Button, TextField } from '@material-ui/core'; - import { - InfoCard, Content, ContentHeader, + Header, + HeaderLabel, + InfoCard, + Page, + pageTheme, SimpleStepper, SimpleStepperStep, StructuredMetadataTable, - HeaderLabel, - Page, - Header, - pageTheme, SupportButton, } from '@backstage/core'; +import { Button, Grid, TextField } from '@material-ui/core'; +import React, { useState } from 'react'; -export const Project: FC<{}> = () => { +export const Project = () => { const [projectName, setProjectName] = useState(''); const [projectId, setProjectId] = useState(''); const [disabled, setDisabled] = useState(true); diff --git a/plugins/gcp-projects/src/components/ProjectDetailsPage/ProjectDetailsPage.tsx b/plugins/gcp-projects/src/components/ProjectDetailsPage/ProjectDetailsPage.tsx index 41d0b11019..3dfb4e886b 100644 --- a/plugins/gcp-projects/src/components/ProjectDetailsPage/ProjectDetailsPage.tsx +++ b/plugins/gcp-projects/src/components/ProjectDetailsPage/ProjectDetailsPage.tsx @@ -14,6 +14,17 @@ * limitations under the License. */ +import { + Content, + ContentHeader, + Header, + HeaderLabel, + Page, + pageTheme, + SupportButton, + useApi, + WarningPanel, +} from '@backstage/core'; import { Button, ButtonGroup, @@ -27,20 +38,9 @@ import { Theme, Typography, } from '@material-ui/core'; -import { - useApi, - googleAuthApiRef, - HeaderLabel, - Page, - Header, - pageTheme, - SupportButton, - Content, - ContentHeader, -} from '@backstage/core'; import React from 'react'; import { useAsync } from 'react-use'; -import { GCPApiRef } from '../../api'; +import { gcpApiRef } from '../../api'; const useStyles = makeStyles(theme => ({ root: { @@ -56,34 +56,27 @@ const useStyles = makeStyles(theme => ({ })); const DetailsPage = () => { - const api = useApi(GCPApiRef); - const googleApi = useApi(googleAuthApiRef); - const token = googleApi.getAccessToken( - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ); - + const api = useApi(gcpApiRef); const classes = useStyles(); - const status = useAsync( - () => + + const { loading, error, value: details } = useAsync( + async () => api.getProject( decodeURIComponent(location.search.split('projectId=')[1]), - token, ), [location.search], ); - if (status.loading) { + if (loading) { return ; - } else if (status.error) { + } else if (error) { return ( - - Failed to load build, {status.error.message} - + + {error.toString()} + ); } - const details = status.value; - return (
diff --git a/plugins/gcp-projects/src/components/ProjectListPage/ProjectListPage.tsx b/plugins/gcp-projects/src/components/ProjectListPage/ProjectListPage.tsx index 7e09a307c9..542d03d5fd 100644 --- a/plugins/gcp-projects/src/components/ProjectListPage/ProjectListPage.tsx +++ b/plugins/gcp-projects/src/components/ProjectListPage/ProjectListPage.tsx @@ -17,18 +17,19 @@ // NEEDS WORK import { - Link, - useApi, - googleAuthApiRef, - HeaderLabel, - Page, - Header, - pageTheme, - SupportButton, Content, ContentHeader, + Header, + HeaderLabel, + Link, + Page, + pageTheme, + SupportButton, + useApi, + WarningPanel, } from '@backstage/core'; import { + Button, LinearProgress, Paper, Table, @@ -38,11 +39,10 @@ import { TableRow, Tooltip, Typography, - Button, } from '@material-ui/core'; import React from 'react'; import { useAsync } from 'react-use'; -import { GCPApiRef, Project } from '../../api'; +import { gcpApiRef, Project } from '../../api'; const LongText = ({ text, max }: { text: string; max: number }) => { if (text.length < max) { @@ -63,27 +63,17 @@ const labels = ( ); const PageContents = () => { - const api = useApi(GCPApiRef); - const googleApi = useApi(googleAuthApiRef); + const api = useApi(gcpApiRef); - const { loading, error, value } = useAsync(async () => { - const token = await googleApi.getAccessToken( - 'https://www.googleapis.com/auth/cloud-platform.read-only', - ); - - const projects = api.listProjects({ token }); - return projects; - }); + const { loading, error, value } = useAsync(() => api.listProjects()); if (loading) { return ; - } - - if (error) { + } else if (error) { return ( - - {error.message}{' '} - + + {error.toString()} + ); } diff --git a/plugins/gcp-projects/src/plugin.ts b/plugins/gcp-projects/src/plugin.ts index 41aacde597..2baf3bce7d 100644 --- a/plugins/gcp-projects/src/plugin.ts +++ b/plugins/gcp-projects/src/plugin.ts @@ -15,34 +15,43 @@ */ import { + createApiFactory, createPlugin, createRouteRef, - createApiFactory, + googleAuthApiRef, } from '@backstage/core'; -import { ProjectListPage } from './components/ProjectListPage'; -import { ProjectDetailsPage } from './components/ProjectDetailsPage'; +import { gcpApiRef, GcpClient } from './api'; import { NewProjectPage } from './components/NewProjectPage'; -import { GCPApiRef, GCPClient } from './api'; +import { ProjectDetailsPage } from './components/ProjectDetailsPage'; +import { ProjectListPage } from './components/ProjectListPage'; export const rootRouteRef = createRouteRef({ path: '/gcp-projects', title: 'GCP Projects', }); -export const ProjectRouteRef = createRouteRef({ +export const projectRouteRef = createRouteRef({ path: '/gcp-projects/project', title: 'GCP Project Page', }); -export const NewProjectRouteRef = createRouteRef({ +export const newProjectRouteRef = createRouteRef({ path: '/gcp-projects/new', title: 'GCP Project Page', }); export const plugin = createPlugin({ id: 'gcp-projects', - apis: [createApiFactory(GCPApiRef, new GCPClient())], + apis: [ + createApiFactory({ + api: gcpApiRef, + deps: { googleAuthApi: googleAuthApiRef }, + factory({ googleAuthApi }) { + return new GcpClient(googleAuthApi); + }, + }), + ], register({ router }) { router.addRoute(rootRouteRef, ProjectListPage); - router.addRoute(ProjectRouteRef, ProjectDetailsPage); - router.addRoute(NewProjectRouteRef, NewProjectPage); + router.addRoute(projectRouteRef, ProjectDetailsPage); + router.addRoute(newProjectRouteRef, NewProjectPage); }, }); From 4d791599c3abc6bf4099704c6b7d6a0b2aaefe3b Mon Sep 17 00:00:00 2001 From: Ivan Shmidt Date: Mon, 21 Sep 2020 09:13:16 +0200 Subject: [PATCH 28/53] feat(catalog): show only components --- plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx index 94bc428a45..94f1fe3b70 100644 --- a/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx +++ b/plugins/catalog/src/filter/EntityFilterGroupsProvider.tsx @@ -47,7 +47,7 @@ export const EntityFilterGroupsProvider = ({ function useProvideEntityFilters(): FilterGroupsContext { const catalogApi = useApi(catalogApiRef); const [{ value: entities, error }, doReload] = useAsyncFn(() => - catalogApi.getEntities(), + catalogApi.getEntities({ kind: 'Component' }), ); const filterGroups = useRef<{ From 60e9799075deb7fc6b8f5ea604211c8e70b5d483 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Mon, 21 Sep 2020 10:41:27 +0200 Subject: [PATCH 29/53] [microsite] tweaking CNCF logo styling (#2529) --- microsite/pages/en/index.js | 2 +- microsite/static/css/custom.css | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/microsite/pages/en/index.js b/microsite/pages/en/index.js index 37298ae8e2..6e649aa574 100644 --- a/microsite/pages/en/index.js +++ b/microsite/pages/en/index.js @@ -471,8 +471,8 @@ class Index extends React.Component { Cloud Native Computing Foundation {' '} sandbox project +
-
diff --git a/microsite/static/css/custom.css b/microsite/static/css/custom.css index 00a102ba00..79b8fd9de4 100644 --- a/microsite/static/css/custom.css +++ b/microsite/static/css/custom.css @@ -1072,6 +1072,7 @@ code { } .cncf-block { + padding-top: 40px; text-align: center; } @@ -1080,4 +1081,5 @@ code { width: 100%; height: 100px; margin-bottom: 40px; + margin-top: 20px; } From 2af1b2b5a7f1d8dfc2fab6fdfb65c97a4ae992ac Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 21 Sep 2020 12:45:26 +0200 Subject: [PATCH 30/53] core/package.json: pin core-api to same version as core `@backstage/core-api` is an internal package that should never be depended on directly. The version of `@backstage/core` should be what determines the version of `@backstage/core`, not the lockfile. --- packages/core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/package.json b/packages/core/package.json index 3ed730e0f3..440f9f05b0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -30,7 +30,7 @@ }, "dependencies": { "@backstage/config": "^0.1.1-alpha.22", - "@backstage/core-api": "^0.1.1-alpha.22", + "@backstage/core-api": "0.1.1-alpha.22", "@backstage/theme": "^0.1.1-alpha.22", "@material-ui/core": "^4.11.0", "@material-ui/icons": "^4.9.1", From 525aabeb4769fb34c639eccb2bfdf036067e49ae Mon Sep 17 00:00:00 2001 From: Sebastian Qvarfordt Date: Mon, 21 Sep 2020 15:33:53 +0200 Subject: [PATCH 31/53] Added toggled option for allowing longpath in windows through nodegit --- plugins/techdocs-backend/src/helpers.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/techdocs-backend/src/helpers.ts b/plugins/techdocs-backend/src/helpers.ts index 14f4d490ba..670c9f0970 100644 --- a/plugins/techdocs-backend/src/helpers.ts +++ b/plugins/techdocs-backend/src/helpers.ts @@ -17,7 +17,7 @@ import os from 'os'; import path from 'path'; import parseGitUrl from 'git-url-parse'; -import { Clone, Repository } from 'nodegit'; +import NodeGit, { Clone, Repository } from 'nodegit'; import fs from 'fs-extra'; // @ts-ignore import defaultBranch from 'default-branch'; @@ -26,6 +26,9 @@ import { InputError } from '@backstage/backend-common'; import { RemoteProtocol } from './techdocs/stages/prepare/types'; import { Logger } from 'winston'; +// @ts-ignore +NodeGit.Libgit2.opts(28, 1); + export type ParsedLocationAnnotation = { type: RemoteProtocol; target: string; From b80a8333239a02cd708123c44e39348537374d5c Mon Sep 17 00:00:00 2001 From: Sebastian Qvarfordt Date: Mon, 21 Sep 2020 16:51:46 +0200 Subject: [PATCH 32/53] comment to explain option --- plugins/techdocs-backend/src/helpers.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/techdocs-backend/src/helpers.ts b/plugins/techdocs-backend/src/helpers.ts index 670c9f0970..8acd836cad 100644 --- a/plugins/techdocs-backend/src/helpers.ts +++ b/plugins/techdocs-backend/src/helpers.ts @@ -26,6 +26,7 @@ import { InputError } from '@backstage/backend-common'; import { RemoteProtocol } from './techdocs/stages/prepare/types'; import { Logger } from 'winston'; +// Enables core.longpaths on windows to prevent crashing when checking out repos with long foldernames and/or deep nesting // @ts-ignore NodeGit.Libgit2.opts(28, 1); From 959e2e9866c356b73d19a9ff5083b5a66b42c1e5 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Mon, 21 Sep 2020 18:03:13 +0200 Subject: [PATCH 33/53] TechDocs: adjust mkdocs extensions (#2516) * fix(techdocs-core): adjust mkdocs extensions * fix(techdocs-core): formatting * fix(techdocs-core): bump version) * move highlight configs to extension * delete extension from mkdocs yaml * formatting * fix(docs): add links to plugins and extensions in docs * prettier * fix(techdocs-core): use pymdownx extensions v.7.1 to allow legacy_tab_classes config * fix(techdocs-core): delete unused import * update changelog * added superfences to list of extensions * prettier --- .../mock-docs/docs/index.md | 40 +++++++++++- .../techdocs-core/README.md | 64 +++++++++++++++++++ .../techdocs-core/requirements.txt | 2 +- .../techdocs-container/techdocs-core/setup.py | 54 ++++++++-------- .../techdocs-core/src/core.py | 30 ++++----- 5 files changed, 142 insertions(+), 48 deletions(-) diff --git a/packages/techdocs-container/mock-docs/docs/index.md b/packages/techdocs-container/mock-docs/docs/index.md index 2586b86cfb..3c323d6fc1 100644 --- a/packages/techdocs-container/mock-docs/docs/index.md +++ b/packages/techdocs-container/mock-docs/docs/index.md @@ -3,10 +3,9 @@ !!! test Testing somethin +Abbreviations: Some text about MOCDOC -\*[MOCDOC]: Mock Documentation - This is a paragraph. {: #test_id .test_class } @@ -61,3 +60,40 @@ digraph G { ``` :bulb: + +=== "JavaScript" + + ```javascript + import { test } from 'something'; + + const addThingToThing = (a, b) a + b; + ``` + +=== "Java" + + ```java + public void function() { + test(); + } + ``` + +```java tab="java" + public void function() { + test(); + } +``` + +```java tab="java 2" + public void function() { + test(); + } +``` + +```javascript +import { test } from 'something'; + +const addThingToThing = (a, b) a + b; +``` + + +*[MOCDOC]: Mock Documentation diff --git a/packages/techdocs-container/techdocs-core/README.md b/packages/techdocs-container/techdocs-core/README.md index 36f1437a54..49b9fce4e4 100644 --- a/packages/techdocs-container/techdocs-core/README.md +++ b/packages/techdocs-container/techdocs-core/README.md @@ -48,8 +48,72 @@ python -m black src/ **Note:** This will write to all Python files in `src/` with the formatted code. If you would like to only check to see if it passes, simply append the `--check` flag. +## MkDocs plugins and extensions + +The TechDocs Core MkDocs plugin comes with a set of extensions and plugins that mkdocs supports. Below you can find a list of all extensions and plugins that are included in the +TechDocs Core plugin: + +Plugins: + +- [search](https://www.mkdocs.org/user-guide/configuration/#search) +- [mkdocs-monorepo-plugin](https://github.com/spotify/mkdocs-monorepo-plugin) + +Extensions: + +- [admonition](https://squidfunk.github.io/mkdocs-material/reference/admonitions/#admonitions) +- [toc](https://python-markdown.github.io/extensions/toc/) +- [pymdown](https://facelessuser.github.io/pymdown-extensions/) + - caret + - critic + - details + - emoji + - superfences + - inlinehilite + - magiclink + - mark + - smartsymobls + - highlight + - extra + - tabbed + - tasklist + - tilde +- [markdown_inline_graphviz](https://pypi.org/project/markdown-inline-graphviz/) +- [plantuml_markdown](https://pypi.org/project/plantuml-markdown/) + ## Changelog +### 0.0.8 + +- Superfences and Codehilite doesn't work very well together (squidfunk/mkdocs-material#1604) so therefore the codehilite extension is replaced by pymdownx.highlight + +* Uses pymdownx extensions v.7.1 instead of 8.0.0 to allow legacy_tab_classes config. This makes the techdocs core plugin compatible with the usage of tabs for grouping markdown with the following syntax: + +```` + ```java tab="java 2" + public void function() { + .... + } + ``` +```` + +as well as the new + +```` + === "Java" + + ```java + public void function() { + .... + } + ``` +```` + +The pymdownx extension will be bumped too 8.0.0 in the near future. + +- pymdownx.tabbed is added to support tabs to group markdown content, such as codeblocks. + +- "PyMdown Extensions includes three extensions that are meant to replace their counterpart in the default Python Markdown extensions." Therefore some extensions has been taken away in this version that comes by default from pymdownx.extra which is added now (https://facelessuser.github.io/pymdown-extensions/usage_notes/#incompatible-extensions) + ### 0.0.7 - Fix an issue with configuration of emoji support diff --git a/packages/techdocs-container/techdocs-core/requirements.txt b/packages/techdocs-container/techdocs-core/requirements.txt index 36daaab4d7..75546fa992 100644 --- a/packages/techdocs-container/techdocs-core/requirements.txt +++ b/packages/techdocs-container/techdocs-core/requirements.txt @@ -7,7 +7,7 @@ mkdocs-monorepo-plugin==0.4.5 plantuml-markdown==3.1.2 markdown_inline_graphviz_extension==1.1 pygments==2.6.1 -pymdown-extensions==8.0.0 +pymdown-extensions==7.1 # The linter using for Python # Note: This requires Python 3.6+ to run, but can format Python 2 code too. diff --git a/packages/techdocs-container/techdocs-core/setup.py b/packages/techdocs-container/techdocs-core/setup.py index 3e3fa47caa..e5a8206150 100644 --- a/packages/techdocs-container/techdocs-core/setup.py +++ b/packages/techdocs-container/techdocs-core/setup.py @@ -17,38 +17,34 @@ from setuptools import setup, find_packages setup( - name='mkdocs-techdocs-core', - version='0.0.7', - description='A Mkdocs package that contains TechDocs defaults', - long_description='', - keywords='mkdocs', - url='https://github.com/spotify/backstage', - author='TechDocs Core', - author_email='pulp-fiction@spotify.com', - license='Apache-2.0', - python_requires='>=3.7', + name="mkdocs-techdocs-core", + version="0.0.8", + description="A Mkdocs package that contains TechDocs defaults", + long_description="", + keywords="mkdocs", + url="https://github.com/spotify/backstage", + author="TechDocs Core", + author_email="pulp-fiction@spotify.com", + license="Apache-2.0", + python_requires=">=3.7", install_requires=[ - 'mkdocs>=1.1.2', - 'mkdocs-material==5.3.2', - 'mkdocs-monorepo-plugin==0.4.5', - 'plantuml-markdown==3.1.2', - 'markdown_inline_graphviz_extension==1.1', - 'pygments==2.6.1', - 'pymdown-extensions==8.0.0' + "mkdocs>=1.1.2", + "mkdocs-material==5.3.2", + "mkdocs-monorepo-plugin==0.4.5", + "plantuml-markdown==3.1.2", + "markdown_inline_graphviz_extension==1.1", + "pygments==2.6.1", + "pymdown-extensions==7.1", ], classifiers=[ - 'Development Status :: 1 - Planning', - 'Intended Audience :: Developers', - 'Intended Audience :: Information Technology', - 'License :: OSI Approved :: Apache Software License', - 'Programming Language :: Python', - 'Programming Language :: Python :: 3 :: Only', - 'Programming Language :: Python :: 3.7' + "Development Status :: 1 - Planning", + "Intended Audience :: Developers", + "Intended Audience :: Information Technology", + "License :: OSI Approved :: Apache Software License", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", ], packages=find_packages(), - entry_points={ - 'mkdocs.plugins': [ - 'techdocs-core = src.core:TechDocsCore' - ] - } + entry_points={"mkdocs.plugins": ["techdocs-core = src.core:TechDocsCore"]}, ) diff --git a/packages/techdocs-container/techdocs-core/src/core.py b/packages/techdocs-container/techdocs-core/src/core.py index 69e39d401b..ed1eb7c6f6 100644 --- a/packages/techdocs-container/techdocs-core/src/core.py +++ b/packages/techdocs-container/techdocs-core/src/core.py @@ -14,7 +14,7 @@ * limitations under the License. """ -from mkdocs.plugins import BasePlugin, PluginCollection +from mkdocs.plugins import BasePlugin from mkdocs.theme import Theme from mkdocs.contrib.search import SearchPlugin from mkdocs_monorepo_plugin.plugin import MonorepoPlugin @@ -54,25 +54,11 @@ class TechDocsCore(BasePlugin): # Markdown Extensions config["markdown_extensions"].append("admonition") - config["markdown_extensions"].append("abbr") - config["markdown_extensions"].append("attr_list") - config["markdown_extensions"].append("def_list") - config["markdown_extensions"].append("codehilite") - config["mdx_configs"]["codehilite"] = { - "linenums": True, - "guess_lang": False, - "pygments_style": "friendly", - } config["markdown_extensions"].append("toc") config["mdx_configs"]["toc"] = { "permalink": True, } - config["markdown_extensions"].append("footnotes") - config["markdown_extensions"].append("markdown.extensions.tables") - config["markdown_extensions"].append("pymdownx.betterem") - config["mdx_configs"]["pymdownx.betterem"] = { - "smart_enable": "all", - } + config["markdown_extensions"].append("pymdownx.caret") config["markdown_extensions"].append("pymdownx.critic") config["markdown_extensions"].append("pymdownx.details") @@ -83,6 +69,18 @@ class TechDocsCore(BasePlugin): config["markdown_extensions"].append("pymdownx.mark") config["markdown_extensions"].append("pymdownx.smartsymbols") config["markdown_extensions"].append("pymdownx.superfences") + config["mdx_configs"]["pymdownx.superfences"] = { + "legacy_tab_classes": True, + } + config["markdown_extensions"].append("pymdownx.highlight") + config["mdx_configs"]["pymdownx.highlight"] = { + "linenums": True, + } + config["markdown_extensions"].append("pymdownx.extra") + config["mdx_configs"]["pymdownx.betterem"] = { + "smart_enable": "all", + } + config["markdown_extensions"].append("pymdownx.tabbed") config["markdown_extensions"].append("pymdownx.tasklist") config["mdx_configs"]["pymdownx.tasklist"] = { "custom_checkbox": True, From 646407fcf4d8b1d307a90e0b52d284c3e4076db0 Mon Sep 17 00:00:00 2001 From: Emma Indal Date: Mon, 21 Sep 2020 18:21:41 +0200 Subject: [PATCH 34/53] Bump version of techdocs-core plugin in techdocs-container (#2539) --- packages/techdocs-container/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/techdocs-container/Dockerfile b/packages/techdocs-container/Dockerfile index e910935baf..b34fcbd861 100644 --- a/packages/techdocs-container/Dockerfile +++ b/packages/techdocs-container/Dockerfile @@ -18,7 +18,7 @@ FROM python:3.8-alpine RUN apk update && apk --no-cache add gcc musl-dev openjdk11-jdk curl graphviz ttf-dejavu fontconfig RUN curl -L http://sourceforge.net/projects/plantuml/files/plantuml.1.2020.16.jar/download > /opt/plantuml.jar -RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.7 +RUN pip install --upgrade pip && pip install mkdocs-techdocs-core==0.0.8 # Create script to call plantuml.jar from a location in path From 10910841a25832cec620a780f1b222d241cd21be Mon Sep 17 00:00:00 2001 From: Tim Date: Mon, 21 Sep 2020 10:25:43 -0600 Subject: [PATCH 35/53] Fix identity typo --- .../src/components/CatalogFilter/CatalogFilter.test.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx b/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx index a98eec0875..bc23d61d9c 100644 --- a/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx +++ b/plugins/catalog/src/components/CatalogFilter/CatalogFilter.test.tsx @@ -58,7 +58,7 @@ describe('Catalog Filter', () => { ] as Entity[]), }; - const indentityApi: Partial = { + const identityApi: Partial = { getUserId: () => 'tools@example.com', }; @@ -68,7 +68,7 @@ describe('Catalog Filter', () => { From b746ef2f3735f3e69ac787d1c469f23ed60b0d25 Mon Sep 17 00:00:00 2001 From: Adam Shurson Date: Mon, 21 Sep 2020 13:34:42 -0500 Subject: [PATCH 36/53] feature(component-registration): allow SCM specification --- .../RegisterComponentForm.tsx | 31 +++++++++++++++++-- .../RegisterComponentPage.tsx | 8 +++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/plugins/register-component/src/components/RegisterComponentForm/RegisterComponentForm.tsx b/plugins/register-component/src/components/RegisterComponentForm/RegisterComponentForm.tsx index 4090b2af9c..f98ff22a15 100644 --- a/plugins/register-component/src/components/RegisterComponentForm/RegisterComponentForm.tsx +++ b/plugins/register-component/src/components/RegisterComponentForm/RegisterComponentForm.tsx @@ -21,10 +21,13 @@ import { FormHelperText, LinearProgress, TextField, + Select, + MenuItem, + InputLabel, } from '@material-ui/core'; import { makeStyles } from '@material-ui/core/styles'; import React, { FC } from 'react'; -import { useForm } from 'react-hook-form'; +import { useForm, Controller } from 'react-hook-form'; import { ComponentIdValidators } from '../../util/validate'; const useStyles = makeStyles(theme => ({ @@ -44,7 +47,7 @@ export type Props = { }; const RegisterComponentForm: FC = ({ onSubmit, submitting }) => { - const { register, handleSubmit, errors, formState } = useForm({ + const { control, register, handleSubmit, errors, formState } = useForm({ mode: 'onChange', }); const classes = useStyles(); @@ -84,6 +87,30 @@ const RegisterComponentForm: FC = ({ onSubmit, submitting }) => { )} + + + SCM Detection + ( + + )} + /> +