From 7474a67738ca3c16b31e44fac5f330a9f980625f Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 8 May 2020 12:12:32 +0200 Subject: [PATCH 01/19] build(deps): bump ora from 4.0.3 to 4.0.4 (#745) Bumps [ora](https://github.com/sindresorhus/ora) from 4.0.3 to 4.0.4. - [Release notes](https://github.com/sindresorhus/ora/releases) - [Commits](https://github.com/sindresorhus/ora/compare/v4.0.3...v4.0.4) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6ba0fb24d3..72980b61af 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15388,9 +15388,9 @@ optionator@^0.8.1, optionator@^0.8.3: word-wrap "~1.2.3" ora@*, ora@^4.0.3: - version "4.0.3" - resolved "https://registry.npmjs.org/ora/-/ora-4.0.3.tgz#752a1b7b4be4825546a7a3d59256fa523b6b6d05" - integrity sha512-fnDebVFyz309A73cqCipVL1fBZewq4vwgSHfxh43vVy31mbyoQ8sCH3Oeaog/owYOs/lLlGVPCISQonTneg6Pg== + version "4.0.4" + resolved "https://registry.npmjs.org/ora/-/ora-4.0.4.tgz#e8da697cc5b6a47266655bf68e0fb588d29a545d" + integrity sha512-77iGeVU1cIdRhgFzCK8aw1fbtT1B/iZAvWjS+l/o1x0RShMgxHUZaD2yDpWsNCPwXg9z1ZA78Kbdvr8kBmG/Ww== dependencies: chalk "^3.0.0" cli-cursor "^3.1.0" From d568edb87663c825aad5594d7f9a241c03caafa4 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 13:02:29 +0200 Subject: [PATCH 02/19] packages/cli: make plugin:diff --check output all errors --- .../cli/src/commands/plugin/diff/index.ts | 29 +++++++++++++++---- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/packages/cli/src/commands/plugin/diff/index.ts b/packages/cli/src/commands/plugin/diff/index.ts index 116ba9e633..5338594a3b 100644 --- a/packages/cli/src/commands/plugin/diff/index.ts +++ b/packages/cli/src/commands/plugin/diff/index.ts @@ -41,7 +41,7 @@ const fileHandlers = [ }, ]; -const inquirerPromptFunc: PromptFunc = async msg => { +const inquirerPromptFunc: PromptFunc = async (msg) => { const { result } = await inquirer.prompt({ type: 'confirm', name: 'result', @@ -50,23 +50,42 @@ const inquirerPromptFunc: PromptFunc = async msg => { return result; }; -const checkPromptFunc: PromptFunc = async msg => { - throw new Error(`Check failed, the following change was needed: ${msg}`); +const makeCheck = () => { + let failed = false; + + const promptFunc: PromptFunc = async (msg) => { + failed = true; + console.log(chalk.red(`[Check Failed] ${msg}`)); + return false; + }; + + const finalize = () => { + if (failed) { + throw new Error( + 'Check failed, the plugin is not in sync with the latest template', + ); + } + }; + + return [promptFunc, finalize] as const; }; -const yesPromptFunc: PromptFunc = async msg => { + +const yesPromptFunc: PromptFunc = async (msg) => { console.log(`Accepting: "${msg}"`); return true; }; export default async (cmd: Command) => { let promptFunc = inquirerPromptFunc; + let finalize = () => {}; if (cmd.check) { - promptFunc = checkPromptFunc; + [promptFunc, finalize] = makeCheck(); } else if (cmd.yes) { promptFunc = yesPromptFunc; } const templateFiles = await readTemplateFiles('default-plugin'); await handleAllFiles(fileHandlers, templateFiles, promptFunc); + await finalize(); }; From dbf6b462bc8978da491bea3d1f56645584f8e3a3 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Fri, 8 May 2020 13:06:36 +0200 Subject: [PATCH 03/19] build(deps): bump webpack from 4.42.0 to 4.43.0 (#744) Bumps [webpack](https://github.com/webpack/webpack) from 4.42.0 to 4.43.0. - [Release notes](https://github.com/webpack/webpack/releases) - [Commits](https://github.com/webpack/webpack/compare/v4.42.0...v4.43.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 211 +++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 184 insertions(+), 27 deletions(-) diff --git a/yarn.lock b/yarn.lock index 72980b61af..0962bedb66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4653,21 +4653,45 @@ "@webassemblyjs/helper-wasm-bytecode" "1.8.5" "@webassemblyjs/wast-parser" "1.8.5" +"@webassemblyjs/ast@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz#bd850604b4042459a5a41cd7d338cbed695ed964" + integrity sha512-C6wW5L+b7ogSDVqymbkkvuW9kruN//YisMED04xzeBBqjHa2FYnmvOlS6Xj68xWQRgWvI9cIglsjFowH/RJyEA== + dependencies: + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@webassemblyjs/floating-point-hex-parser@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.8.5.tgz#1ba926a2923613edce496fd5b02e8ce8a5f49721" integrity sha512-9p+79WHru1oqBh9ewP9zW95E3XAo+90oth7S5Re3eQnECGq59ly1Ri5tsIipKGpiStHsUYmY3zMLqtk3gTcOtQ== +"@webassemblyjs/floating-point-hex-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.9.0.tgz#3c3d3b271bddfc84deb00f71344438311d52ffb4" + integrity sha512-TG5qcFsS8QB4g4MhrxK5TqfdNe7Ey/7YL/xN+36rRjl/BlGE/NcBvJcqsRgCP6Z92mRE+7N50pRIi8SmKUbcQA== + "@webassemblyjs/helper-api-error@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.8.5.tgz#c49dad22f645227c5edb610bdb9697f1aab721f7" integrity sha512-Za/tnzsvnqdaSPOUXHyKJ2XI7PDX64kWtURyGiJJZKVEdFOsdKUCPTNEVFZq3zJ2R0G5wc2PZ5gvdTRFgm81zA== +"@webassemblyjs/helper-api-error@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.9.0.tgz#203f676e333b96c9da2eeab3ccef33c45928b6a2" + integrity sha512-NcMLjoFMXpsASZFxJ5h2HZRcEhDkvnNFOAKneP5RbKRzaWJN36NC4jqQHKwStIhGXu5mUWlUUk7ygdtrO8lbmw== + "@webassemblyjs/helper-buffer@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.8.5.tgz#fea93e429863dd5e4338555f42292385a653f204" integrity sha512-Ri2R8nOS0U6G49Q86goFIPNgjyl6+oE1abW1pS84BuhP1Qcr5JqMwRFT3Ah3ADDDYGEgGs1iyb1DGX+kAi/c/Q== +"@webassemblyjs/helper-buffer@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.9.0.tgz#a1442d269c5feb23fcbc9ef759dac3547f29de00" + integrity sha512-qZol43oqhq6yBPx7YM3m9Bv7WMV9Eevj6kMi6InKOuZxhw+q9hOkvq5e/PpKSiLfyetpaBnogSbNCfBwyB00CA== + "@webassemblyjs/helper-code-frame@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.8.5.tgz#9a740ff48e3faa3022b1dff54423df9aa293c25e" @@ -4675,11 +4699,23 @@ dependencies: "@webassemblyjs/wast-printer" "1.8.5" +"@webassemblyjs/helper-code-frame@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-code-frame/-/helper-code-frame-1.9.0.tgz#647f8892cd2043a82ac0c8c5e75c36f1d9159f27" + integrity sha512-ERCYdJBkD9Vu4vtjUYe8LZruWuNIToYq/ME22igL+2vj2dQ2OOujIZr3MEFvfEaqKoVqpsFKAGsRdBSBjrIvZA== + dependencies: + "@webassemblyjs/wast-printer" "1.9.0" + "@webassemblyjs/helper-fsm@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.8.5.tgz#ba0b7d3b3f7e4733da6059c9332275d860702452" integrity sha512-kRuX/saORcg8se/ft6Q2UbRpZwP4y7YrWsLXPbbmtepKr22i8Z4O3V5QE9DbZK908dh5Xya4Un57SDIKwB9eow== +"@webassemblyjs/helper-fsm@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-fsm/-/helper-fsm-1.9.0.tgz#c05256b71244214671f4b08ec108ad63b70eddb8" + integrity sha512-OPRowhGbshCb5PxJ8LocpdX9Kl0uB4XsAjl6jH/dWKlk/mzsANvhwbiULsaiqT5GZGT9qinTICdj6PLuM5gslw== + "@webassemblyjs/helper-module-context@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.8.5.tgz#def4b9927b0101dc8cbbd8d1edb5b7b9c82eb245" @@ -4688,11 +4724,23 @@ "@webassemblyjs/ast" "1.8.5" mamacro "^0.0.3" +"@webassemblyjs/helper-module-context@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-module-context/-/helper-module-context-1.9.0.tgz#25d8884b76839871a08a6c6f806c3979ef712f07" + integrity sha512-MJCW8iGC08tMk2enck1aPW+BE5Cw8/7ph/VGZxwyvGbJwjktKkDK7vy7gAmMDx88D7mhDTCNKAW5tED+gZ0W8g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.8.5.tgz#537a750eddf5c1e932f3744206551c91c1b93e61" integrity sha512-Cu4YMYG3Ddl72CbmpjU/wbP6SACcOPVbHN1dI4VJNJVgFwaKf1ppeFJrwydOG3NDHxVGuCfPlLZNyEdIYlQ6QQ== +"@webassemblyjs/helper-wasm-bytecode@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.9.0.tgz#4fed8beac9b8c14f8c58b70d124d549dd1fe5790" + integrity sha512-R7FStIzyNcd7xKxCZH5lE0Bqy+hGTwS3LJjuv1ZVxd9O7eHCedSdrId/hMOd20I+v8wDXEn+bjfKDLzTepoaUw== + "@webassemblyjs/helper-wasm-section@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.8.5.tgz#74ca6a6bcbe19e50a3b6b462847e69503e6bfcbf" @@ -4703,6 +4751,16 @@ "@webassemblyjs/helper-wasm-bytecode" "1.8.5" "@webassemblyjs/wasm-gen" "1.8.5" +"@webassemblyjs/helper-wasm-section@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.9.0.tgz#5a4138d5a6292ba18b04c5ae49717e4167965346" + integrity sha512-XnMB8l3ek4tvrKUUku+IVaXNHz2YsJyOOmz+MMkZvh8h1uSJpSen6vYnw3IoQ7WwEuAhL8Efjms1ZWjqh2agvw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/ieee754@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.8.5.tgz#712329dbef240f36bf57bd2f7b8fb9bf4154421e" @@ -4710,6 +4768,13 @@ dependencies: "@xtuc/ieee754" "^1.2.0" +"@webassemblyjs/ieee754@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.9.0.tgz#15c7a0fbaae83fb26143bbacf6d6df1702ad39e4" + integrity sha512-dcX8JuYU/gvymzIHc9DgxTzUUTLexWwt8uCTWP3otys596io0L5aW02Gb1RjYpx2+0Jus1h4ZFqjla7umFniTg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + "@webassemblyjs/leb128@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.8.5.tgz#044edeb34ea679f3e04cd4fd9824d5e35767ae10" @@ -4717,11 +4782,23 @@ dependencies: "@xtuc/long" "4.2.2" +"@webassemblyjs/leb128@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.9.0.tgz#f19ca0b76a6dc55623a09cffa769e838fa1e1c95" + integrity sha512-ENVzM5VwV1ojs9jam6vPys97B/S65YQtv/aanqnU7D8aSoHFX8GyhGg0CMfyKNIHBuAVjy3tlzd5QMMINa7wpw== + dependencies: + "@xtuc/long" "4.2.2" + "@webassemblyjs/utf8@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.8.5.tgz#a8bf3b5d8ffe986c7c1e373ccbdc2a0915f0cedc" integrity sha512-U7zgftmQriw37tfD934UNInokz6yTmn29inT2cAetAsaU9YeVCveWEwhKL1Mg4yS7q//NGdzy79nlXh3bT8Kjw== +"@webassemblyjs/utf8@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.9.0.tgz#04d33b636f78e6a6813227e82402f7637b6229ab" + integrity sha512-GZbQlWtopBTP0u7cHrEx+73yZKrQoBMpwkGEIqlacljhXCkVM1kMQge/Mf+csMJAjEdSwhOyLAS0AoR3AG5P8w== + "@webassemblyjs/wasm-edit@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.8.5.tgz#962da12aa5acc1c131c81c4232991c82ce56e01a" @@ -4736,6 +4813,20 @@ "@webassemblyjs/wasm-parser" "1.8.5" "@webassemblyjs/wast-printer" "1.8.5" +"@webassemblyjs/wasm-edit@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.9.0.tgz#3fe6d79d3f0f922183aa86002c42dd256cfee9cf" + integrity sha512-FgHzBm80uwz5M8WKnMTn6j/sVbqilPdQXTWraSjBwFXSYGirpkSWE2R9Qvz9tNiTKQvoKILpCuTjBKzOIm0nxw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/helper-wasm-section" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-opt" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wast-printer" "1.9.0" + "@webassemblyjs/wasm-gen@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.8.5.tgz#54840766c2c1002eb64ed1abe720aded714f98bc" @@ -4747,6 +4838,17 @@ "@webassemblyjs/leb128" "1.8.5" "@webassemblyjs/utf8" "1.8.5" +"@webassemblyjs/wasm-gen@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.9.0.tgz#50bc70ec68ded8e2763b01a1418bf43491a7a49c" + integrity sha512-cPE3o44YzOOHvlsb4+E9qSqjc9Qf9Na1OO/BHFy4OI91XDE14MjFN4lTMezzaIWdPqHnsTodGGNP+iRSYfGkjA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + "@webassemblyjs/wasm-opt@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.8.5.tgz#b24d9f6ba50394af1349f510afa8ffcb8a63d264" @@ -4757,6 +4859,16 @@ "@webassemblyjs/wasm-gen" "1.8.5" "@webassemblyjs/wasm-parser" "1.8.5" +"@webassemblyjs/wasm-opt@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.9.0.tgz#2211181e5b31326443cc8112eb9f0b9028721a61" + integrity sha512-Qkjgm6Anhm+OMbIL0iokO7meajkzQD71ioelnfPEj6r4eOFuqm4YC3VBPqXjFyyNwowzbMD+hizmprP/Fwkl2A== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-buffer" "1.9.0" + "@webassemblyjs/wasm-gen" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + "@webassemblyjs/wasm-parser@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.8.5.tgz#21576f0ec88b91427357b8536383668ef7c66b8d" @@ -4769,6 +4881,18 @@ "@webassemblyjs/leb128" "1.8.5" "@webassemblyjs/utf8" "1.8.5" +"@webassemblyjs/wasm-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.9.0.tgz#9d48e44826df4a6598294aa6c87469d642fff65e" + integrity sha512-9+wkMowR2AmdSWQzsPEjFU7njh8HTO5MqO8vjwEHuM+AMHioNqSBONRdr0NQQ3dVQrzp0s8lTcYqzUdb7YgELA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-wasm-bytecode" "1.9.0" + "@webassemblyjs/ieee754" "1.9.0" + "@webassemblyjs/leb128" "1.9.0" + "@webassemblyjs/utf8" "1.9.0" + "@webassemblyjs/wast-parser@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.8.5.tgz#e10eecd542d0e7bd394f6827c49f3df6d4eefb8c" @@ -4781,6 +4905,18 @@ "@webassemblyjs/helper-fsm" "1.8.5" "@xtuc/long" "4.2.2" +"@webassemblyjs/wast-parser@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wast-parser/-/wast-parser-1.9.0.tgz#3031115d79ac5bd261556cecc3fa90a3ef451914" + integrity sha512-qsqSAP3QQ3LyZjNC/0jBJ/ToSxfYJ8kYyuiGvtn/8MK89VrNEfwj7BPQzJVHi0jGTRK2dGdJ5PRqhtjzoww+bw== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/floating-point-hex-parser" "1.9.0" + "@webassemblyjs/helper-api-error" "1.9.0" + "@webassemblyjs/helper-code-frame" "1.9.0" + "@webassemblyjs/helper-fsm" "1.9.0" + "@xtuc/long" "4.2.2" + "@webassemblyjs/wast-printer@1.8.5": version "1.8.5" resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.8.5.tgz#114bbc481fd10ca0e23b3560fa812748b0bae5bc" @@ -4790,6 +4926,15 @@ "@webassemblyjs/wast-parser" "1.8.5" "@xtuc/long" "4.2.2" +"@webassemblyjs/wast-printer@1.9.0": + version "1.9.0" + resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.9.0.tgz#4935d54c85fef637b00ce9f52377451d00d47899" + integrity sha512-2J0nE95rHXHyQ24cWjMKJ1tqB/ds8z/cyeOZxJhcb+rW+SQASVjuznUSmdz5GpVJTzU8JkhYut0D3siFDD6wsA== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/wast-parser" "1.9.0" + "@xtuc/long" "4.2.2" + "@xobotyi/scrollbar-width@1.9.4": version "1.9.4" resolved "https://registry.npmjs.org/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.4.tgz#a7dce20b7465bcad29cd6bbb557695e4ea7863cb" @@ -4868,7 +5013,7 @@ acorn@^5.5.3: resolved "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz#3e8d8a9947d0599a1796d10225d7432f4a4acf5e" integrity sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg== -acorn@^6.0.1, acorn@^6.0.4, acorn@^6.2.1: +acorn@^6.0.1, acorn@^6.0.4, acorn@^6.2.1, acorn@^6.4.1: version "6.4.1" resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz#531e58ba3f51b9dacb9a6646ca4debf5b14ca474" integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA== @@ -4963,17 +5108,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0: - version "6.12.0" - resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.0.tgz#06d60b96d87b8454a5adaba86e7854da629db4b7" - integrity sha512-D6gFiFA0RRLyUbvijN74DWAjXSFxWKaWP7mldxkVhyhAV3+SWA9HEJPHQ2c9soIeTFJqcSdFDGFgdqs1iUU2Hw== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ajv@^6.5.5: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5: version "6.12.2" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz#c629c5eced17baf314437918d2da88c99d5958cd" integrity sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ== @@ -6535,7 +6670,7 @@ check-more-types@2.24.0: resolved "https://registry.npmjs.org/check-more-types/-/check-more-types-2.24.0.tgz#1420ffb10fd444dcfc79b43891bbfffd32a84600" integrity sha1-FCD/sQ/URNz8ebQ4kbv//TKoRgA= -chokidar@^2.0.2, chokidar@^2.0.4, chokidar@^2.1.8: +chokidar@^2.0.4, chokidar@^2.1.8: version "2.1.8" resolved "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917" integrity sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg== @@ -14504,14 +14639,7 @@ mkdirp@*, mkdirp@^1.0.3: resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.3.tgz#4cf2e30ad45959dddea53ad97d518b6c8205e1ea" integrity sha512-6uCP4Qc0sWsgMLy1EOqqS/3rjDHOEnsStVr/4vtAIK2Y5i2kA7lFFejYrpIyiN9w0pYf4ckeCYT9f1r1P9KX5g== -mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.0, mkdirp@~0.5.1: - version "0.5.3" - resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.3.tgz#5a514b7179259287952881e94410ec5465659f8c" - integrity sha512-P+2gwrFqx8lhew375MQHHeTlY8AuOJSrGf0R5ddkEndUkmwpgUob/vQuBD1V22/Cw1/lJr4x+EjllSezBThzBg== - dependencies: - minimist "^1.2.5" - -mkdirp@^0.5.4: +mkdirp@0.x, mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.4, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.5" resolved "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== @@ -21015,12 +21143,12 @@ warning@^4.0.2, warning@^4.0.3: dependencies: loose-envify "^1.0.0" -watchpack@^1.6.0: - version "1.6.0" - resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" - integrity sha512-i6dHe3EyLjMmDlU1/bGQpEw25XSjkJULPuAVKCbNRefQVq48yXKUpwg538F7AZTf9kyr57zj++pQFltUa5H7yA== +watchpack@^1.6.0, watchpack@^1.6.1: + version "1.6.1" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.6.1.tgz#280da0a8718592174010c078c7585a74cd8cd0e2" + integrity sha512-+IF9hfUFOrYOOaKyfaI7h7dquUIOgyEMoQMLA7OP5FxegKA2+XdXThAZ9TU2kucfhDH7rfMHs1oPYziVGWRnZA== dependencies: - chokidar "^2.0.2" + chokidar "^2.1.8" graceful-fs "^4.1.2" neo-async "^2.5.0" @@ -21136,7 +21264,7 @@ webpack-virtual-modules@^0.2.0: dependencies: debug "^3.0.0" -webpack@4.42.0, webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.6: +webpack@4.42.0: version "4.42.0" resolved "https://registry.npmjs.org/webpack/-/webpack-4.42.0.tgz#b901635dd6179391d90740a63c93f76f39883eb8" integrity sha512-EzJRHvwQyBiYrYqhyjW9AqM90dE4+s1/XtCfn7uWg6cS72zH+2VPFAlsnW0+W0cDi0XRjNKUMoJtpSi50+Ph6w== @@ -21165,6 +21293,35 @@ webpack@4.42.0, webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.6: watchpack "^1.6.0" webpack-sources "^1.4.1" +webpack@^4.33.0, webpack@^4.38.0, webpack@^4.41.6: + version "4.43.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-4.43.0.tgz#c48547b11d563224c561dad1172c8aa0b8a678e6" + integrity sha512-GW1LjnPipFW2Y78OOab8NJlCflB7EFskMih2AHdvjbpKMeDJqEgSx24cXXXiPS65+WSwVyxtDsJH6jGX2czy+g== + dependencies: + "@webassemblyjs/ast" "1.9.0" + "@webassemblyjs/helper-module-context" "1.9.0" + "@webassemblyjs/wasm-edit" "1.9.0" + "@webassemblyjs/wasm-parser" "1.9.0" + acorn "^6.4.1" + ajv "^6.10.2" + ajv-keywords "^3.4.1" + chrome-trace-event "^1.0.2" + enhanced-resolve "^4.1.0" + eslint-scope "^4.0.3" + json-parse-better-errors "^1.0.2" + loader-runner "^2.4.0" + loader-utils "^1.2.3" + memory-fs "^0.4.1" + micromatch "^3.1.10" + mkdirp "^0.5.3" + neo-async "^2.6.1" + node-libs-browser "^2.2.1" + schema-utils "^1.0.0" + tapable "^1.1.3" + terser-webpack-plugin "^1.4.3" + watchpack "^1.6.1" + webpack-sources "^1.4.1" + websocket-driver@>=0.5.1: version "0.7.3" resolved "https://registry.npmjs.org/websocket-driver/-/websocket-driver-0.7.3.tgz#a2d4e0d4f4f116f1e6297eba58b05d430100e9f9" From 8b6d05abbfc24455c8fccf4b60012a8b6f015761 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20=C3=85lund?= Date: Fri, 8 May 2020 13:07:36 +0200 Subject: [PATCH 04/19] Adjust header label spacing (#756) --- packages/core/src/layout/Header/Header.tsx | 2 +- plugins/explore/src/components/ExplorePluginPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/layout/Header/Header.tsx b/packages/core/src/layout/Header/Header.tsx index d8e7540349..ab3d0080e4 100644 --- a/packages/core/src/layout/Header/Header.tsx +++ b/packages/core/src/layout/Header/Header.tsx @@ -47,7 +47,7 @@ const useStyles = makeStyles((theme) => ({ flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', - marginRight: theme.spacing(6), + marginRight: theme.spacing(1), }, title: { color: theme.palette.bursts.fontColor, diff --git a/plugins/explore/src/components/ExplorePluginPage.tsx b/plugins/explore/src/components/ExplorePluginPage.tsx index 48a0f90c32..1dd2f135a4 100644 --- a/plugins/explore/src/components/ExplorePluginPage.tsx +++ b/plugins/explore/src/components/ExplorePluginPage.tsx @@ -59,7 +59,7 @@ const toolsCards = [ title: 'GraphiQL', description: 'Integrates GraphiQL as a tool to browse GraphiQL endpoints inside Backstage.', - url: 'graphiql', + url: '/graphiql', image: 'https://camo.githubusercontent.com/517398c3fbe0687d3d4dcbe05da82970b882e75a/68747470733a2f2f64337676366c703535716a6171632e636c6f756466726f6e742e6e65742f6974656d732f33413061324e314c3346324f304c3377326e316a2f477261706869514c382e706e673f582d436c6f75644170702d56697369746f722d49643d3433363432', tags: ['graphql', 'dev'], From 1afd6c7d925e4ad90872163c00d4be233f8debfc Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 13:09:31 +0200 Subject: [PATCH 05/19] packages/cli: update templates dependencies --- .../templates/default-app/packages/app/package.json.hbs | 5 +++-- .../default-app/plugins/welcome/package.json.hbs | 8 +++++--- packages/cli/templates/default-plugin/package.json.hbs | 8 ++++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/cli/templates/default-app/packages/app/package.json.hbs b/packages/cli/templates/default-app/packages/app/package.json.hbs index 2e607d6086..6956134a3c 100644 --- a/packages/cli/templates/default-app/packages/app/package.json.hbs +++ b/packages/cli/templates/default-app/packages/app/package.json.hbs @@ -10,8 +10,8 @@ "@backstage/core": "^{{version}}", "@backstage/theme": "^{{version}}", "plugin-welcome": "0.0.0", - "react": "^16.12.0", - "react-dom": "^16.12.0", + "react": "^16.13.1", + "react-dom": "^16.13.1", "react-router-dom": "^5.1.2", "react-use": "^13.24.0" }, @@ -22,6 +22,7 @@ "@types/jest": "^24.0.0", "@types/node": "^12.0.0", "@types/react-router-dom": "^5.1.3", + "@types/testing-library__jest-dom": "^5.0.4", "cross-env": "^7.0.0", "cypress": "^4.2.0", "eslint-plugin-cypress": "^2.10.3", diff --git a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs index aa454f68e7..26782bc576 100644 --- a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs +++ b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs @@ -14,15 +14,17 @@ "@backstage/theme": "^{{version}}", "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", - "react": "16.13.1", - "react-dom": "16.13.1", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0", "react-router-dom": "5.1.2" }, "devDependencies": { "@backstage/cli": "^{{version}}", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", - "@types/testing-library__jest-dom": "5.0.2" + "@types/testing-library__jest-dom": "^5.0.4", + "jest-fetch-mock": "^3.0.3" }, "files": [ "dist" diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index efa07e61d3..e0875f8fbf 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -17,9 +17,9 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^{{version}}", @@ -28,7 +28,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.2", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" }, "files": [ From 7f060084962fc86d722303ab8e0f6cf9e9e86400 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 13:24:46 +0200 Subject: [PATCH 06/19] plugins: almost fully sync plugins with templates --- plugins/explore/package.json | 8 ++++---- plugins/graphiql/package.json | 8 ++++---- plugins/home-page/package.json | 10 ++++++---- plugins/inventory/package.json | 8 ++++---- plugins/lighthouse/package.json | 2 +- plugins/lighthouse/tsconfig.json | 5 +---- plugins/scaffolder/package.json | 8 ++++---- plugins/tech-radar/package.json | 13 ++++++++----- plugins/welcome/package.json | 10 ++++++---- 9 files changed, 38 insertions(+), 34 deletions(-) diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 731aa6e4ed..8cdd01196d 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -18,9 +18,9 @@ "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", "classnames": "^2.2.6", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -30,7 +30,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" }, "files": [ diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 092aa2deea..efd3b01f66 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -33,9 +33,9 @@ "@material-ui/lab": "4.0.0-alpha.45", "graphiql": "^1.0.0-alpha.8", "graphql": "15.0.0", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -46,7 +46,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3", "react-router-dom": "^5.1.2" }, diff --git a/plugins/home-page/package.json b/plugins/home-page/package.json index a1f29388a1..bdff908517 100644 --- a/plugins/home-page/package.json +++ b/plugins/home-page/package.json @@ -18,8 +18,9 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "react": "16.13.1", - "react-dom": "16.13.1" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -29,8 +30,9 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", - "react-router-dom": "^5.1.2" + "@types/testing-library__jest-dom": "^5.0.4", + "react-router-dom": "^5.1.2", + "jest-fetch-mock": "^3.0.3" }, "files": [ "dist" diff --git a/plugins/inventory/package.json b/plugins/inventory/package.json index c3b33d0c12..8af62431fc 100644 --- a/plugins/inventory/package.json +++ b/plugins/inventory/package.json @@ -18,9 +18,9 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -29,7 +29,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" }, "files": [ diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 529a4b0374..07bc5bfc53 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -32,7 +32,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" }, "files": [ diff --git a/plugins/lighthouse/tsconfig.json b/plugins/lighthouse/tsconfig.json index 96725645da..5a3931ffce 100644 --- a/plugins/lighthouse/tsconfig.json +++ b/plugins/lighthouse/tsconfig.json @@ -1,8 +1,5 @@ { "extends": "../../tsconfig.json", "include": ["src"], - "compilerOptions": { - "resolveJsonModule": true, - "esModuleInterop": true - } + "compilerOptions": {} } diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 2b185bc9c3..ec56ae2b64 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -18,9 +18,9 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -29,7 +29,7 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" }, "files": [ diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index df0b9780f0..02cf78a92a 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -21,9 +21,9 @@ "color": "^3.1.2", "d3-force": "^2.0.1", "prop-types": "^15.7.2", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-use": "^13.0.0" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -34,7 +34,10 @@ "@types/d3-force": "^1.2.1", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4", + "@types/testing-library__jest-dom": "^5.0.4", "jest-fetch-mock": "^3.0.3" - } + }, + "files": [ + "dist" + ] } diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 631305218d..65ac08f292 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -17,9 +17,10 @@ "@material-ui/core": "^4.9.1", "@material-ui/icons": "^4.9.1", "@material-ui/lab": "4.0.0-alpha.45", - "react": "16.13.1", - "react-dom": "16.13.1", - "react-router-dom": "5.1.2" + "react": "^16.13.1", + "react-dom": "^16.13.1", + "react-router-dom": "5.1.2", + "react-use": "^13.24.0" }, "devDependencies": { "@backstage/cli": "^0.1.1-alpha.4", @@ -28,7 +29,8 @@ "@testing-library/user-event": "^7.1.2", "@types/jest": "^24.0.0", "@types/node": "^12.0.0", - "@types/testing-library__jest-dom": "5.0.4" + "@types/testing-library__jest-dom": "^5.0.4", + "jest-fetch-mock": "^3.0.3" }, "files": [ "dist" From 8fa65fc5196698baafa3e2c3c2ebb974d3442918 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 13:19:09 +0200 Subject: [PATCH 07/19] plugins: added diff command to all plugins and templates --- .../templates/default-app/plugins/welcome/package.json.hbs | 4 +++- packages/cli/templates/default-plugin/package.json.hbs | 1 + plugins/explore/package.json | 1 + plugins/graphiql/package.json | 1 + plugins/home-page/package.json | 1 + plugins/inventory/package.json | 1 + plugins/lighthouse/package.json | 2 +- plugins/scaffolder/package.json | 1 + plugins/tech-radar/package.json | 1 + plugins/welcome/package.json | 1 + 10 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs index aa454f68e7..73977201c6 100644 --- a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs +++ b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs @@ -7,7 +7,9 @@ "scripts": { "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", - "test": "backstage-cli test" + "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", + "clean": "backstage-cli clean" }, "dependencies": { "@backstage/core": "^{{version}}", diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index efa07e61d3..d1fb04eadd 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -9,6 +9,7 @@ "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/explore/package.json b/plugins/explore/package.json index 731aa6e4ed..3434c8ba75 100644 --- a/plugins/explore/package.json +++ b/plugins/explore/package.json @@ -9,6 +9,7 @@ "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/graphiql/package.json b/plugins/graphiql/package.json index 092aa2deea..5d78611034 100644 --- a/plugins/graphiql/package.json +++ b/plugins/graphiql/package.json @@ -23,6 +23,7 @@ "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/home-page/package.json b/plugins/home-page/package.json index a1f29388a1..95c9c21612 100644 --- a/plugins/home-page/package.json +++ b/plugins/home-page/package.json @@ -10,6 +10,7 @@ "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/inventory/package.json b/plugins/inventory/package.json index c3b33d0c12..0434447ed3 100644 --- a/plugins/inventory/package.json +++ b/plugins/inventory/package.json @@ -10,6 +10,7 @@ "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/lighthouse/package.json b/plugins/lighthouse/package.json index 529a4b0374..98ecd9eb9d 100644 --- a/plugins/lighthouse/package.json +++ b/plugins/lighthouse/package.json @@ -6,10 +6,10 @@ "license": "Apache-2.0", "private": true, "scripts": { - "build:watch": "backstage-cli plugin:build --watch", "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/scaffolder/package.json b/plugins/scaffolder/package.json index 2b185bc9c3..427711327a 100644 --- a/plugins/scaffolder/package.json +++ b/plugins/scaffolder/package.json @@ -10,6 +10,7 @@ "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/tech-radar/package.json b/plugins/tech-radar/package.json index df0b9780f0..8f0637e599 100644 --- a/plugins/tech-radar/package.json +++ b/plugins/tech-radar/package.json @@ -9,6 +9,7 @@ "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { diff --git a/plugins/welcome/package.json b/plugins/welcome/package.json index 631305218d..b98639e7f9 100644 --- a/plugins/welcome/package.json +++ b/plugins/welcome/package.json @@ -9,6 +9,7 @@ "build": "backstage-cli plugin:build", "lint": "backstage-cli lint", "test": "backstage-cli test", + "diff": "backstage-cli plugin:diff", "clean": "backstage-cli clean" }, "dependencies": { From c615ba09c45b04e5d9d398a356346130bb7c11ec Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 13:39:06 +0200 Subject: [PATCH 08/19] packages/cli: update templates to include plugin:serve setup --- .../default-app/plugins/welcome/dev/index.tsx | 4 ++++ .../plugins/welcome/package.json.hbs | 2 ++ .../templates/default-plugin/dev/index.tsx | 20 +++++++++++++++++++ .../templates/default-plugin/package.json.hbs | 2 ++ .../templates/default-plugin/tsconfig.json | 2 +- 5 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 packages/cli/templates/default-app/plugins/welcome/dev/index.tsx create mode 100644 packages/cli/templates/default-plugin/dev/index.tsx diff --git a/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx new file mode 100644 index 0000000000..6fce113093 --- /dev/null +++ b/packages/cli/templates/default-app/plugins/welcome/dev/index.tsx @@ -0,0 +1,4 @@ +import { createDevApp } from '@backstage/dev-utils'; +import { plugin } from '../src/plugin'; + +createDevApp().registerPlugin(plugin).render(); diff --git a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs index aa454f68e7..ad927b407d 100644 --- a/packages/cli/templates/default-app/plugins/welcome/package.json.hbs +++ b/packages/cli/templates/default-app/plugins/welcome/package.json.hbs @@ -6,6 +6,7 @@ "private": true, "scripts": { "build": "backstage-cli plugin:build", + "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test" }, @@ -20,6 +21,7 @@ }, "devDependencies": { "@backstage/cli": "^{{version}}", + "@backstage/dev-utils": "^{{version}}", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@types/testing-library__jest-dom": "5.0.2" diff --git a/packages/cli/templates/default-plugin/dev/index.tsx b/packages/cli/templates/default-plugin/dev/index.tsx new file mode 100644 index 0000000000..812a5585d4 --- /dev/null +++ b/packages/cli/templates/default-plugin/dev/index.tsx @@ -0,0 +1,20 @@ +/* + * 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 { createDevApp } from '@backstage/dev-utils'; +import { plugin } from '../src/plugin'; + +createDevApp().registerPlugin(plugin).render(); diff --git a/packages/cli/templates/default-plugin/package.json.hbs b/packages/cli/templates/default-plugin/package.json.hbs index efa07e61d3..b7a04ade03 100644 --- a/packages/cli/templates/default-plugin/package.json.hbs +++ b/packages/cli/templates/default-plugin/package.json.hbs @@ -7,6 +7,7 @@ "private": true, "scripts": { "build": "backstage-cli plugin:build", + "start": "backstage-cli plugin:serve", "lint": "backstage-cli lint", "test": "backstage-cli test", "clean": "backstage-cli clean" @@ -23,6 +24,7 @@ }, "devDependencies": { "@backstage/cli": "^{{version}}", + "@backstage/dev-utils": "^{{version}}", "@testing-library/jest-dom": "^4.2.4", "@testing-library/react": "^9.3.2", "@testing-library/user-event": "^7.1.2", diff --git a/packages/cli/templates/default-plugin/tsconfig.json b/packages/cli/templates/default-plugin/tsconfig.json index 5a3931ffce..b663b01fa2 100644 --- a/packages/cli/templates/default-plugin/tsconfig.json +++ b/packages/cli/templates/default-plugin/tsconfig.json @@ -1,5 +1,5 @@ { "extends": "../../tsconfig.json", - "include": ["src"], + "include": ["src", "dev"], "compilerOptions": {} } From 53b9c0766deb5305cb20ad54f1d70d4a42fa451e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20Adel=C3=B6w?= Date: Thu, 7 May 2020 16:10:05 +0200 Subject: [PATCH 09/19] Move the plugin init into their own files to keep index clean --- packages/backend/package.json | 3 +- packages/backend/src/index.ts | 34 +++++--------------- packages/backend/src/plugins/inventory.ts | 36 ++++++++++++++++++++++ packages/backend/src/plugins/scaffolder.ts | 29 +++++++++++++++++ packages/backend/src/types.ts | 21 +++++++++++++ 5 files changed, 96 insertions(+), 27 deletions(-) create mode 100644 packages/backend/src/plugins/inventory.ts create mode 100644 packages/backend/src/plugins/scaffolder.ts create mode 100644 packages/backend/src/types.ts diff --git a/packages/backend/package.json b/packages/backend/package.json index 32be276ef2..5e398a89d5 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -32,7 +32,8 @@ "@types/helmet": "^0.0.45", "jest": "^25.1.0", "tsc-watch": "^4.2.3", - "typescript": "^3.8.3" + "typescript": "^3.8.3", + "winston": "^3.2.1" }, "nodemonConfig": { "watch": "./dist" diff --git a/packages/backend/src/index.ts b/packages/backend/src/index.ts index a22befd794..31b53f6d30 100644 --- a/packages/backend/src/index.ts +++ b/packages/backend/src/index.ts @@ -28,39 +28,21 @@ import { notFoundHandler, requestLoggingHandler, } from '@backstage/backend-common'; -import { - AggregatorInventory, - createRouter as inventoryRouter, - StaticInventory, -} from '@backstage/plugin-inventory-backend'; -import { - createRouter as scaffolderRouter, - DiskStorage, - CookieCutter, -} from '@backstage/plugin-scaffolder-backend'; +import inventory from './plugins/inventory'; +import scaffolder from './plugins/scaffolder'; import compression from 'compression'; import cors from 'cors'; import express from 'express'; import helmet from 'helmet'; +import { PluginEnvironment } from './types'; const DEFAULT_PORT = 7000; const PORT = parseInt(process.env.PORT ?? '', 10) || DEFAULT_PORT; -const logger = getRootLogger().child({ type: 'plugin' }); +const pluginEnvironment: PluginEnvironment = { + logger: getRootLogger().child({ type: 'plugin' }), +}; async function main() { - const inventory = new AggregatorInventory(); - inventory.enlist( - new StaticInventory([ - { id: 'component1' }, - { id: 'component2' }, - { id: 'component3' }, - { id: 'component4' }, - ]), - ); - - const storage = new DiskStorage({ logger }); - const templater = new CookieCutter(); - const app = express(); app.use(helmet()); @@ -68,8 +50,8 @@ async function main() { app.use(compression()); app.use(express.json()); app.use(requestLoggingHandler()); - app.use('/inventory', await inventoryRouter({ inventory, logger })); - app.use('/scaffolder', await scaffolderRouter({ storage, templater, logger })); + app.use('/inventory', await inventory(pluginEnvironment)); + app.use('/scaffolder', await scaffolder(pluginEnvironment)); app.use(notFoundHandler()); app.use(errorHandler()); diff --git a/packages/backend/src/plugins/inventory.ts b/packages/backend/src/plugins/inventory.ts new file mode 100644 index 0000000000..d48a62b5fe --- /dev/null +++ b/packages/backend/src/plugins/inventory.ts @@ -0,0 +1,36 @@ +/* + * 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 { + AggregatorInventory, + createRouter, + StaticInventory, +} from '@backstage/plugin-inventory-backend'; +import type { PluginEnvironment } from '../types'; + +export default async function ({ logger }: PluginEnvironment) { + const inventory = new AggregatorInventory(); + inventory.enlist( + new StaticInventory([ + { id: 'component1' }, + { id: 'component2' }, + { id: 'component3' }, + { id: 'component4' }, + ]), + ); + + return await createRouter({ inventory, logger }); +} diff --git a/packages/backend/src/plugins/scaffolder.ts b/packages/backend/src/plugins/scaffolder.ts new file mode 100644 index 0000000000..311c9197aa --- /dev/null +++ b/packages/backend/src/plugins/scaffolder.ts @@ -0,0 +1,29 @@ +/* + * 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 { + CookieCutter, + createRouter, + DiskStorage, +} from '@backstage/plugin-scaffolder-backend'; +import type { PluginEnvironment } from '../types'; + +export default async function ({ logger }: PluginEnvironment) { + const storage = new DiskStorage({ logger }); + const templater = new CookieCutter(); + + return await createRouter({ storage, templater, logger }); +} diff --git a/packages/backend/src/types.ts b/packages/backend/src/types.ts new file mode 100644 index 0000000000..196337aec7 --- /dev/null +++ b/packages/backend/src/types.ts @@ -0,0 +1,21 @@ +/* + * 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 type { Logger } from 'winston'; + +export type PluginEnvironment = { + logger: Logger; +}; From fca8b3211ef5067b6ce6eaef273dfa078b0e8a5f Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 14:08:15 +0200 Subject: [PATCH 10/19] packages/cli: update plugin template README to explain next steps and plugin:serve --- packages/cli/templates/default-plugin/README.md.hbs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/cli/templates/default-plugin/README.md.hbs b/packages/cli/templates/default-plugin/README.md.hbs index 850537d542..d6f2d65134 100644 --- a/packages/cli/templates/default-plugin/README.md.hbs +++ b/packages/cli/templates/default-plugin/README.md.hbs @@ -1,6 +1,13 @@ -# Title +# {{id}} + Welcome to the {{id}} plugin! -## Sub-section 1 +_This plugin was created through the Backstage CLI_ -## Sub-section 2 +## Getting started + +Your plugin has been added to the example app in this repository, meaning you'll be able to access it by running `yarn start` in the root directory, and then navigating to [/{{id}}](http://localhost:3000/{{id}}). + +You can also serve the plugin in isolation by running `yarn start` in the plugin directory. +This method of serving the plugin provides quicker iteration speed and a faster startup and hot reloads. +It is only meant for local development, and the setup for it can be found inside the [/dev](/dev) directory. From 36b0dc849c35237e7a22128deebe516181ecf506 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 14:59:58 +0200 Subject: [PATCH 11/19] packages/cli: avoid removing empty lines in remove-plugin --- .../cli/src/commands/remove-plugin/removePlugin.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/cli/src/commands/remove-plugin/removePlugin.ts b/packages/cli/src/commands/remove-plugin/removePlugin.ts index cf4cc73f20..b9bf1c4af3 100644 --- a/packages/cli/src/commands/remove-plugin/removePlugin.ts +++ b/packages/cli/src/commands/remove-plugin/removePlugin.ts @@ -84,16 +84,11 @@ const removeAllStatementsContainingID = async (file: string, ID: string) => { const originalContent = await fse.readFile(file, 'utf8'); const contentAfterRemoval = originalContent .split('\n') - .filter(Boolean) // get rid of empty lines - .filter((statement) => { - return !statement.includes(`${ID}`); - }) // get rid of lines with pluginName - .concat(['']) // newline at end of line + .filter((statement) => !statement.includes(`${ID}`)) // get rid of lines with pluginName .join('\n'); - await fse.writeFile(file, contentAfterRemoval, 'utf8'); - const finalContent = await fse.readFile(file, 'utf8'); - if (finalContent === originalContent) - throw new Error(`File was not modified.`); + if (originalContent !== contentAfterRemoval) { + await fse.writeFile(file, contentAfterRemoval, 'utf8'); + } }; const capitalize = (str: string): string => From c723fc33e5c2ea88ba7ee2ab96a0e5e06b49f5ec Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 17:04:31 +0200 Subject: [PATCH 12/19] packages/core: fix src-relative import --- packages/core/src/api/app/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/api/app/types.ts b/packages/core/src/api/app/types.ts index cc54cef606..4a6efe66fb 100644 --- a/packages/core/src/api/app/types.ts +++ b/packages/core/src/api/app/types.ts @@ -15,7 +15,7 @@ */ import { ComponentType } from 'react'; -import { IconComponent, SystemIconKey } from 'icons'; +import { IconComponent, SystemIconKey } from '../../icons'; export type App = { getSystemIcon(key: SystemIconKey): IconComponent; From 657834e485e6cbc5f2d1ff4d1c84863a759e0d45 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 17:04:47 +0200 Subject: [PATCH 13/19] packages/core: remove bonus file --- .../BasicStepper/BasicVerticalStep.tsx | 86 ------------------- 1 file changed, 86 deletions(-) delete mode 100644 packages/core/src/components/BasicStepper/BasicVerticalStep.tsx diff --git a/packages/core/src/components/BasicStepper/BasicVerticalStep.tsx b/packages/core/src/components/BasicStepper/BasicVerticalStep.tsx deleted file mode 100644 index 21fbb11cf2..0000000000 --- a/packages/core/src/components/BasicStepper/BasicVerticalStep.tsx +++ /dev/null @@ -1,86 +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 React, { FC } from 'react'; -import { - Step as MuiStep, - StepContent, - StepLabel, - Typography, - makeStyles, -} from '@material-ui/core'; -import SimpleStepperFooter from './SimpleStepperFooter'; - -const useStyles = makeStyles((theme) => ({ - end: { - padding: theme.spacing(3), - }, -})); - -export type StepActions = { - showNext?: boolean; - canNext?: () => boolean; - onNext?: () => void; - nextStep?: (current: number, last: number) => number; - nextText?: string; - - showBack?: boolean; - backText?: string; - onBack?: () => void; - - showRestart?: boolean; - canRestart?: () => boolean; - onRestart?: () => void; - restartText?: string; -}; - -export type StepProps = { - title: string; - children: React.ReactElement; - end?: boolean; - actions?: StepActions; -}; - -const Step: FC = ({ - title, - children, - end, - actions, - ...muiProps -}) => { - const classes = useStyles(); - - // The end step is not a part of the stepper - // It simply is the final screen with an option to have buttons such as reset or back - return end ? ( -
- {title} - {children} - -
- ) : ( - - - {title} - - - {children} - - - - ); -}; - -export default Step; From 77d0e9a10f20ed9ea8845fb8f52009247c927f84 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 18:55:28 +0200 Subject: [PATCH 14/19] package/cli: remove src-relative imports from plugin:serve --- packages/cli/src/commands/plugin/serve/config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/cli/src/commands/plugin/serve/config.ts b/packages/cli/src/commands/plugin/serve/config.ts index 7381165b5d..47d7918270 100644 --- a/packages/cli/src/commands/plugin/serve/config.ts +++ b/packages/cli/src/commands/plugin/serve/config.ts @@ -39,7 +39,6 @@ export function createConfig(paths: Paths): webpack.Configuration { ], resolve: { extensions: ['.ts', '.tsx', '.mjs', '.js', '.jsx'], - modules: ['node_modules', paths.targetSrc], plugins: [ new ModuleScopePlugin( [paths.targetSrc, paths.targetDev], From 0fc188d8a4f0597b16040eda01a9eea5c99c10f5 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Fri, 8 May 2020 18:52:10 +0200 Subject: [PATCH 15/19] packages/dev-utils: fix for default api factories being omitted --- packages/dev-utils/src/devApp/render.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/dev-utils/src/devApp/render.tsx b/packages/dev-utils/src/devApp/render.tsx index 9c9a72094c..6649f1055d 100644 --- a/packages/dev-utils/src/devApp/render.tsx +++ b/packages/dev-utils/src/devApp/render.tsx @@ -146,13 +146,13 @@ class DevAppBuilder { providedFactories: ApiFactory[], ): ApiHolder { const providedApis = new Set( - providedFactories.map(factory => factory.implements), + providedFactories.map((factory) => factory.implements), ); // Exlude any default API factory that we receive a factory for in the config - const defaultFactories = Object.values( - defaultApiFactories, - ).filter(factory => providedApis.has(factory.implements)); + const defaultFactories = Object.values(defaultApiFactories).filter( + (factory) => !providedApis.has(factory.implements), + ); const allFactories = [...defaultFactories, ...providedFactories]; // Use a test registry with dependency injection so that the consumer From 25987dc467f74516dc0e40de0338d092695260b8 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sat, 9 May 2020 00:01:07 +0200 Subject: [PATCH 16/19] build(deps): bump @rollup/plugin-node-resolve from 7.1.1 to 7.1.3 (#738) Bumps [@rollup/plugin-node-resolve](https://github.com/rollup/plugins) from 7.1.1 to 7.1.3. - [Release notes](https://github.com/rollup/plugins/releases) - [Commits](https://github.com/rollup/plugins/compare/node-resolve-v7.1.1...node-resolve-v7.1.3) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 0962bedb66..49ebe9575a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2752,22 +2752,24 @@ "@rollup/pluginutils" "^3.0.4" "@rollup/plugin-node-resolve@^7.1.1": - version "7.1.1" - resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.1.tgz#8c6e59c4b28baf9d223028d0e450e06a485bb2b7" - integrity sha512-14ddhD7TnemeHE97a4rLOhobfYvUVcaYuqTnL8Ti7Jxi9V9Jr5LY7Gko4HZ5k4h4vqQM0gBQt6tsp9xXW94WPA== + version "7.1.3" + resolved "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-7.1.3.tgz#80de384edfbd7bfc9101164910f86078151a3eca" + integrity sha512-RxtSL3XmdTAE2byxekYLnx+98kEUOrPHF/KRVjLH+DEIHy6kjIw7YINQzn+NXiH/NTrQLAwYs0GWB+csWygA9Q== dependencies: - "@rollup/pluginutils" "^3.0.6" + "@rollup/pluginutils" "^3.0.8" "@types/resolve" "0.0.8" builtin-modules "^3.1.0" is-module "^1.0.0" resolve "^1.14.2" -"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.6": - version "3.0.8" - resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.8.tgz#4e94d128d94b90699e517ef045422960d18c8fde" - integrity sha512-rYGeAc4sxcZ+kPG/Tw4/fwJODC3IXHYDH4qusdN/b6aLw5LPUbzpecYbEJh4sVQGPFJxd2dBU4kc1H3oy9/bnw== +"@rollup/pluginutils@^3.0.0", "@rollup/pluginutils@^3.0.4", "@rollup/pluginutils@^3.0.8": + version "3.0.10" + resolved "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.0.10.tgz#a659b9025920378494cd8f8c59fbf9b3a50d5f12" + integrity sha512-d44M7t+PjmMrASHbhgpSbVgtL6EFyX7J4mYxwQ/c5eoaE6N2VgCgEcWVzNnwycIloti+/MpwFr8qfw+nRw00sw== dependencies: + "@types/estree" "0.0.39" estree-walker "^1.0.1" + picomatch "^2.2.2" "@samverschueren/stream-to-observable@^0.3.0": version "0.3.0" @@ -16059,7 +16061,7 @@ performance-now@^2.1.0: resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== From 6f0cb5de5d2820d1b336a3e7bc356d8228781e64 Mon Sep 17 00:00:00 2001 From: Adil Alimbetov Date: Sun, 10 May 2020 12:04:01 +0600 Subject: [PATCH 17/19] Updated colors for table in dark mode (#802) * Updated colors for dark mode * Updated type on useTheme * Fixed code style * Revert "Fixed code style" This reverts commit 1969fce9a511e7f1b7390948b7b31ff13d4d9165. * Changed hook position --- packages/core/src/components/Table/Table.tsx | 30 +++++++++++--------- packages/theme/src/themes.ts | 4 +-- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/packages/core/src/components/Table/Table.tsx b/packages/core/src/components/Table/Table.tsx index a9a55ae763..3f3f879657 100644 --- a/packages/core/src/components/Table/Table.tsx +++ b/packages/core/src/components/Table/Table.tsx @@ -24,7 +24,7 @@ import MTable, { Column, } from 'material-table'; import { BackstageTheme } from '@backstage/theme'; -import { makeStyles } from '@material-ui/core'; +import { makeStyles, useTheme } from '@material-ui/core'; // Material-table is not using the standard icons available in in material-ui. https://github.com/mbrn/material-table/issues/51 import { @@ -99,7 +99,7 @@ const tableIcons = { )), }; -const useCellStyles = makeStyles(theme => ({ +const useCellStyles = makeStyles((theme) => ({ root: { color: theme.palette.grey[500], padding: theme.spacing(0, 2, 0, 2.5), @@ -107,18 +107,18 @@ const useCellStyles = makeStyles(theme => ({ }, })); -const useHeaderStyles = makeStyles(theme => ({ +const useHeaderStyles = makeStyles((theme) => ({ header: { padding: theme.spacing(1, 2, 1, 2.5), borderTop: `1px solid ${theme.palette.grey.A100}`, borderBottom: `1px solid ${theme.palette.grey.A100}`, color: theme.palette.textSubtle, - fontWeight: 'bold', + fontWeight: theme.typography.fontWeightBold, position: 'static', }, })); -const useToolbarStyles = makeStyles(theme => ({ +const useToolbarStyles = makeStyles((theme) => ({ root: { padding: theme.spacing(3, 0, 2.5, 2.5), }, @@ -129,14 +129,17 @@ const useToolbarStyles = makeStyles(theme => ({ }, })); -const convertColumns = (columns: TableColumn[]): TableColumn[] => { - return columns.map(column => { +const convertColumns = ( + columns: TableColumn[], + theme: BackstageTheme, +): TableColumn[] => { + return columns.map((column) => { const headerStyle: React.CSSProperties = {}; const cellStyle: React.CSSProperties = {}; if (column.highlight) { - headerStyle.color = '#000000'; - cellStyle.fontWeight = 'bold'; + headerStyle.color = theme.palette.textContrast; + cellStyle.fontWeight = theme.typography.fontWeightBold; } return { @@ -159,8 +162,9 @@ const Table: FC = ({ columns, options, ...props }) => { const cellClasses = useCellStyles(); const headerClasses = useHeaderStyles(); const toolbarClasses = useToolbarStyles(); + const theme = useTheme(); - const MTColumns = convertColumns(columns); + const MTColumns = convertColumns(columns, theme); const defaultOptions: Options = { headerStyle: { @@ -171,13 +175,13 @@ const Table: FC = ({ columns, options, ...props }) => { return ( ( + Cell: (cellProps) => ( ), - Header: headerProps => ( + Header: (headerProps) => ( ), - Toolbar: toolbarProps => ( + Toolbar: (toolbarProps) => ( ), }} diff --git a/packages/theme/src/themes.ts b/packages/theme/src/themes.ts index 559b402369..f2c26e6e4a 100644 --- a/packages/theme/src/themes.ts +++ b/packages/theme/src/themes.ts @@ -60,7 +60,7 @@ export const lightTheme = createTheme({ export const darkTheme = createTheme({ type: 'dark', background: { - default: '#282828', + default: '#333333', }, status: { ok: '#1db855', @@ -83,7 +83,7 @@ export const darkTheme = createTheme({ border: '#E6E6E6', textContrast: '#FFFFFF', textVerySubtle: '#DDD', - textSubtle: '#6E6E6E', + textSubtle: '#EEEEEE', highlight: '#FFFBCC', errorBackground: '#FFEBEE', warningBackground: '#F59B23', From d07101cffe157ee2fb18fd055ea48036e600e19a Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Sun, 10 May 2020 18:01:28 +0200 Subject: [PATCH 18/19] build(deps): bump chokidar from 3.3.1 to 3.4.0 (#739) Bumps [chokidar](https://github.com/paulmillr/chokidar) from 3.3.1 to 3.4.0. - [Release notes](https://github.com/paulmillr/chokidar/releases) - [Commits](https://github.com/paulmillr/chokidar/compare/3.3.1...3.4.0) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 50 +++++++++++++------------------------------------- 1 file changed, 13 insertions(+), 37 deletions(-) diff --git a/yarn.lock b/yarn.lock index 49ebe9575a..cd4b0a3cb4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4512,7 +4512,7 @@ dependencies: pretty-format "^25.1.0" -"@types/testing-library__jest-dom@5.0.4": +"@types/testing-library__jest-dom@^5.0.4": version "5.0.4" resolved "https://registry.npmjs.org/@types/testing-library__jest-dom/-/testing-library__jest-dom-5.0.4.tgz#c7bfbafb920cd1ce40506474e70ee73637f33701" integrity sha512-Ns69aaNvlxvXkPxIwsqeaWH5vJpwa/pdBIlf8LGkRnbV3tiqUgifs13moLXg1NQ2AM23qRR5CtHarNshvRyEdA== @@ -4942,11 +4942,6 @@ resolved "https://registry.npmjs.org/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.4.tgz#a7dce20b7465bcad29cd6bbb557695e4ea7863cb" integrity sha512-o12FCQt/X5n3pgKEWGpt0f/7Eg4mfv3uRwPUrctiOT8ZuxbH3cNLGWfH/8y6KxVJg4L2885ucuXQ6XECZzUiJA== -"@xobotyi/scrollbar-width@1.9.5": - version "1.9.5" - resolved "https://registry.npmjs.org/@xobotyi/scrollbar-width/-/scrollbar-width-1.9.5.tgz#80224a6919272f405b87913ca13b92929bdf3c4d" - integrity sha512-N8tkAACJx2ww8vFMneJmaAgmjAG1tnVBZJRLRcx061tmsLRZHSEZSLuGWnwPtunsSLvSqXQ2wfp7Mgqg1I+2dQ== - "@xtuc/ieee754@^1.2.0": version "1.2.0" resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz#eef014a3145ae477a1cbc00cd1e552336dceb790" @@ -6692,9 +6687,9 @@ chokidar@^2.0.4, chokidar@^2.1.8: fsevents "^1.2.7" chokidar@^3.2.2, chokidar@^3.3.0, chokidar@^3.3.1: - version "3.3.1" - resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.3.1.tgz#c84e5b3d18d9a4d77558fef466b1bf16bbeb3450" - integrity sha512-4QYCEWOcK3OJrxwvyyAOxFuhpvOVCYkr33LPfFNBjAD/w3sEzWsp2BUOkI4l9bHvWioAd0rc6NlHUOEaWkTeqg== + version "3.4.0" + resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.4.0.tgz#b30611423ce376357c765b9b8f904b9fba3c0be8" + integrity sha512-aXAaho2VJtisB/1fg1+3nlLJqGOuewTzQpd/Tz0yTg2R0e4IGtshYvtjowyEumcBv2z+y4+kc75Mz7j5xJskcQ== dependencies: anymatch "~3.1.1" braces "~3.0.2" @@ -6702,7 +6697,7 @@ chokidar@^3.2.2, chokidar@^3.3.0, chokidar@^3.3.1: is-binary-path "~2.1.0" is-glob "~4.0.1" normalize-path "~3.0.0" - readdirp "~3.3.0" + readdirp "~3.4.0" optionalDependencies: fsevents "~2.1.2" @@ -16061,7 +16056,7 @@ performance-now@^2.1.0: resolved "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= -picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.0.7, picomatch@^2.2.1, picomatch@^2.2.2: +picomatch@^2.0.4, picomatch@^2.0.5, picomatch@^2.2.1, picomatch@^2.2.2: version "2.2.2" resolved "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz#21f333e9b6b8eaff02468f5146ea406d345f4dad" integrity sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg== @@ -17470,7 +17465,7 @@ react-docgen@^5.0.0: node-dir "^0.1.10" strip-indent "^3.0.0" -react-dom@16.13.1, react-dom@^16.12.0, react-dom@^16.13.1, react-dom@^16.8.3: +react-dom@^16.12.0, react-dom@^16.13.1, react-dom@^16.8.3: version "16.13.1" resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f" integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag== @@ -17750,25 +17745,6 @@ react-transition-group@^4.0.0, react-transition-group@^4.3.0: loose-envify "^1.4.0" prop-types "^15.6.2" -react-use@^13.0.0: - version "13.27.1" - resolved "https://registry.npmjs.org/react-use/-/react-use-13.27.1.tgz#e2ae2b708dafc7893c4772628801589aab9de370" - integrity sha512-bAwdqDMXs5lovEanXnL1izledfrPEUUv1afoTVB59eUiYcDyKul+M/dT/2WcgHjoY/R6QlrTcZoW4R7ifwvBfw== - dependencies: - "@types/js-cookie" "2.2.5" - "@xobotyi/scrollbar-width" "1.9.5" - copy-to-clipboard "^3.2.0" - fast-deep-equal "^3.1.1" - fast-shallow-equal "^1.0.0" - js-cookie "^2.2.1" - nano-css "^5.2.1" - resize-observer-polyfill "^1.5.1" - screenfull "^5.0.0" - set-harmonic-interval "^1.0.1" - throttle-debounce "^2.1.0" - ts-easing "^0.2.0" - tslib "^1.10.0" - react-use@^13.24.0: version "13.27.0" resolved "https://registry.npmjs.org/react-use/-/react-use-13.27.0.tgz#53a619dc9213e2cbe65d6262e8b0e76641ade4aa" @@ -17788,7 +17764,7 @@ react-use@^13.24.0: ts-easing "^0.2.0" tslib "^1.10.0" -react@16.13.1, react@^16.0.0, react@^16.12.0, react@^16.13.1, react@^16.8.3: +react@^16.0.0, react@^16.12.0, react@^16.13.1, react@^16.8.3: version "16.13.1" resolved "https://registry.npmjs.org/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e" integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w== @@ -17975,12 +17951,12 @@ readdirp@^2.2.1: micromatch "^3.1.10" readable-stream "^2.0.2" -readdirp@~3.3.0: - version "3.3.0" - resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.3.0.tgz#984458d13a1e42e2e9f5841b129e162f369aff17" - integrity sha512-zz0pAkSPOXXm1viEwygWIPSPkcBYjW1xU5j/JBh5t9bGCJwa6f9+BJa6VaB2g+b55yVrmXzqkyLf4xaWYM0IkQ== +readdirp@~3.4.0: + version "3.4.0" + resolved "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz#9fdccdf9e9155805449221ac645e8303ab5b9ada" + integrity sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ== dependencies: - picomatch "^2.0.7" + picomatch "^2.2.1" realpath-native@^1.1.0: version "1.1.0" From 24928cf2837442fb8b9931b907f1d425438a2565 Mon Sep 17 00:00:00 2001 From: "dependabot-preview[bot]" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Mon, 11 May 2020 08:25:06 +0200 Subject: [PATCH 19/19] build(deps): bump rc-progress from 2.5.2 to 2.5.3 (#806) Bumps [rc-progress](https://github.com/react-component/progress) from 2.5.2 to 2.5.3. - [Release notes](https://github.com/react-component/progress/releases) - [Changelog](https://github.com/react-component/progress/blob/master/HISTORY.md) - [Commits](https://github.com/react-component/progress/compare/2.5.2...2.5.3) Signed-off-by: dependabot-preview[bot] Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index cd4b0a3cb4..481e447150 100644 --- a/yarn.lock +++ b/yarn.lock @@ -17335,9 +17335,9 @@ raw-loader@^3.1.0: schema-utils "^2.0.1" rc-progress@^2.5.2: - version "2.5.2" - resolved "https://registry.npmjs.org/rc-progress/-/rc-progress-2.5.2.tgz#ab01ba4e5d2fa36fc9f6f058b10b720e7315560c" - integrity sha512-ajI+MJkbBz9zYDuE9GQsY5gsyqPF7HFioZEDZ9Fmc+ebNZoiSeSJsTJImPFCg0dW/5WiRGUy2F69SX1aPtSJgA== + version "2.5.3" + resolved "https://registry.npmjs.org/rc-progress/-/rc-progress-2.5.3.tgz#00f01b95bdbe1856d3a5f82242051902e8b7a8e7" + integrity sha512-K2fa4CnqGehLZoMrdmBeZ86ONSTVcdk5FlqetbwJ3R/+42XfqhwQVOjWp2MH4P7XSQOMAGcNOy1SFfCP3415sg== dependencies: babel-runtime "6.x" prop-types "^15.5.8"