From 1fc301ae5a4e93fc13c530d964a575be7ec24ed2 Mon Sep 17 00:00:00 2001 From: Bishoy Boktor <65934617+boktorbb-amzn@users.noreply.github.com> Date: Fri, 5 Mar 2021 10:59:08 -0800 Subject: [PATCH] Rename kbn-monaco to osd-monaco (#37) (#51) Signed-off-by: Bishoy Boktor --- packages/kbn-monaco/README.md | 5 ----- packages/osd-monaco/README.md | 5 +++++ packages/{kbn-monaco => osd-monaco}/package.json | 8 ++++---- packages/{kbn-monaco => osd-monaco}/scripts/build.js | 2 +- packages/{kbn-monaco => osd-monaco}/src/index.ts | 2 +- packages/{kbn-monaco => osd-monaco}/src/monaco.ts | 2 +- packages/{kbn-monaco => osd-monaco}/src/xjson/README.md | 0 .../{kbn-monaco => osd-monaco}/src/xjson/constants.ts | 0 packages/{kbn-monaco => osd-monaco}/src/xjson/grammar.ts | 0 packages/{kbn-monaco => osd-monaco}/src/xjson/index.ts | 0 packages/{kbn-monaco => osd-monaco}/src/xjson/language.ts | 2 +- .../src/xjson/lexer_rules/esql.ts | 0 .../src/xjson/lexer_rules/index.ts | 2 +- .../src/xjson/lexer_rules/painless.ts | 0 .../src/xjson/lexer_rules/shared.ts | 0 .../src/xjson/lexer_rules/xjson.ts | 0 .../{kbn-monaco => osd-monaco}/src/xjson/worker/index.ts | 0 .../src/xjson/worker/xjson.worker.ts | 2 +- .../src/xjson/worker/xjson_worker.ts | 2 +- .../src/xjson/worker_proxy_service.ts | 0 packages/{kbn-monaco => osd-monaco}/tsconfig.json | 0 packages/{kbn-monaco => osd-monaco}/webpack.config.js | 2 +- packages/{kbn-monaco => osd-monaco}/yarn.lock | 0 23 files changed, 17 insertions(+), 17 deletions(-) delete mode 100644 packages/kbn-monaco/README.md create mode 100644 packages/osd-monaco/README.md rename packages/{kbn-monaco => osd-monaco}/package.json (79%) rename packages/{kbn-monaco => osd-monaco}/scripts/build.js (97%) rename packages/{kbn-monaco => osd-monaco}/src/index.ts (94%) rename packages/{kbn-monaco => osd-monaco}/src/monaco.ts (96%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/README.md (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/constants.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/grammar.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/index.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/language.ts (97%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/lexer_rules/esql.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/lexer_rules/index.ts (95%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/lexer_rules/painless.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/lexer_rules/shared.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/lexer_rules/xjson.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/worker/index.ts (100%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/worker/xjson.worker.ts (95%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/worker/xjson_worker.ts (95%) rename packages/{kbn-monaco => osd-monaco}/src/xjson/worker_proxy_service.ts (100%) rename packages/{kbn-monaco => osd-monaco}/tsconfig.json (100%) rename packages/{kbn-monaco => osd-monaco}/webpack.config.js (95%) rename packages/{kbn-monaco => osd-monaco}/yarn.lock (100%) diff --git a/packages/kbn-monaco/README.md b/packages/kbn-monaco/README.md deleted file mode 100644 index c5d7dd7dbfed..000000000000 --- a/packages/kbn-monaco/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# @kbn/monaco - -A customized version of monaco that is automatically configured the way we want it to be when imported as `@kbn/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@kbn/ui-shared-deps`. - -Includes custom xjson language support. The `es_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless. \ No newline at end of file diff --git a/packages/osd-monaco/README.md b/packages/osd-monaco/README.md new file mode 100644 index 000000000000..c9bdbae030cc --- /dev/null +++ b/packages/osd-monaco/README.md @@ -0,0 +1,5 @@ +# @osd/monaco + +A customized version of monaco that is automatically configured the way we want it to be when imported as `@osd/monaco`. Additionally, imports to this package are automatically shared with all plugins using `@osd/ui-shared-deps`. + +Includes custom xjson language support. The `opensearch_ui_shared` plugin has an example of how to use it, in the future we will likely expose helpers from this package to make using it everywhere a little more seamless. \ No newline at end of file diff --git a/packages/kbn-monaco/package.json b/packages/osd-monaco/package.json similarity index 79% rename from packages/kbn-monaco/package.json rename to packages/osd-monaco/package.json index fcea80c9b711..efdc58849e76 100644 --- a/packages/kbn-monaco/package.json +++ b/packages/osd-monaco/package.json @@ -1,20 +1,20 @@ { - "name": "@kbn/monaco", + "name": "@osd/monaco", "version": "1.0.0", "private": true, "main": "./target/index.js", "license": "Apache-2.0", "scripts": { "build": "node ./scripts/build.js", - "kbn:bootstrap": "yarn build --dev" + "osd:bootstrap": "yarn build --dev" }, "dependencies": { "regenerator-runtime": "^0.13.3", "monaco-editor": "~0.17.0" }, "devDependencies": { - "@kbn/babel-preset": "1.0.0", - "@kbn/dev-utils": "1.0.0", + "@osd/babel-preset": "1.0.0", + "@osd/dev-utils": "1.0.0", "babel-loader": "^8.0.6", "css-loader": "^3.4.2", "del": "^5.1.0", diff --git a/packages/kbn-monaco/scripts/build.js b/packages/osd-monaco/scripts/build.js similarity index 97% rename from packages/kbn-monaco/scripts/build.js rename to packages/osd-monaco/scripts/build.js index c5540e3c956c..4489260cb898 100644 --- a/packages/kbn-monaco/scripts/build.js +++ b/packages/osd-monaco/scripts/build.js @@ -20,7 +20,7 @@ const path = require('path'); const del = require('del'); const supportsColor = require('supports-color'); -const { run } = require('@kbn/dev-utils'); +const { run } = require('@osd/dev-utils'); const TARGET_BUILD_DIR = path.resolve(__dirname, '../target'); const ROOT_DIR = path.resolve(__dirname, '../'); diff --git a/packages/kbn-monaco/src/index.ts b/packages/osd-monaco/src/index.ts similarity index 94% rename from packages/kbn-monaco/src/index.ts rename to packages/osd-monaco/src/index.ts index 9213a1bfe132..68837d8cee01 100644 --- a/packages/kbn-monaco/src/index.ts +++ b/packages/osd-monaco/src/index.ts @@ -20,6 +20,6 @@ export { monaco } from './monaco'; export { XJsonLang } from './xjson'; -/* eslint-disable-next-line @kbn/eslint/module_migration */ +/* eslint-disable-next-line @osd/eslint/module_migration */ import * as BarePluginApi from 'monaco-editor/esm/vs/editor/editor.api'; export { BarePluginApi }; diff --git a/packages/kbn-monaco/src/monaco.ts b/packages/osd-monaco/src/monaco.ts similarity index 96% rename from packages/kbn-monaco/src/monaco.ts rename to packages/osd-monaco/src/monaco.ts index a40b2212ef0e..2ca62c32204e 100644 --- a/packages/kbn-monaco/src/monaco.ts +++ b/packages/osd-monaco/src/monaco.ts @@ -17,7 +17,7 @@ * under the License. */ -/* eslint-disable @kbn/eslint/module_migration */ +/* eslint-disable @osd/eslint/module_migration */ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; diff --git a/packages/kbn-monaco/src/xjson/README.md b/packages/osd-monaco/src/xjson/README.md similarity index 100% rename from packages/kbn-monaco/src/xjson/README.md rename to packages/osd-monaco/src/xjson/README.md diff --git a/packages/kbn-monaco/src/xjson/constants.ts b/packages/osd-monaco/src/xjson/constants.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/constants.ts rename to packages/osd-monaco/src/xjson/constants.ts diff --git a/packages/kbn-monaco/src/xjson/grammar.ts b/packages/osd-monaco/src/xjson/grammar.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/grammar.ts rename to packages/osd-monaco/src/xjson/grammar.ts diff --git a/packages/kbn-monaco/src/xjson/index.ts b/packages/osd-monaco/src/xjson/index.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/index.ts rename to packages/osd-monaco/src/xjson/index.ts diff --git a/packages/kbn-monaco/src/xjson/language.ts b/packages/osd-monaco/src/xjson/language.ts similarity index 97% rename from packages/kbn-monaco/src/xjson/language.ts rename to packages/osd-monaco/src/xjson/language.ts index 4ae7f2402ed2..20ee31835e8a 100644 --- a/packages/kbn-monaco/src/xjson/language.ts +++ b/packages/osd-monaco/src/xjson/language.ts @@ -38,7 +38,7 @@ registerLexerRules(monaco); window.MonacoEnvironment = { getWorker: (module: string, languageId: string) => { if (languageId === ID) { - // In kibana we will probably build this once and then load with raw-loader + // In OpenSearch Dashboards we will probably build this once and then load with raw-loader const blob = new Blob([workerSrc], { type: 'application/javascript' }); return new Worker(URL.createObjectURL(blob)); } diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/esql.ts b/packages/osd-monaco/src/xjson/lexer_rules/esql.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/esql.ts rename to packages/osd-monaco/src/xjson/lexer_rules/esql.ts diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/index.ts b/packages/osd-monaco/src/xjson/lexer_rules/index.ts similarity index 95% rename from packages/kbn-monaco/src/xjson/lexer_rules/index.ts rename to packages/osd-monaco/src/xjson/lexer_rules/index.ts index 515de09510a6..4b4d5b5152a7 100644 --- a/packages/kbn-monaco/src/xjson/lexer_rules/index.ts +++ b/packages/osd-monaco/src/xjson/lexer_rules/index.ts @@ -17,7 +17,7 @@ * under the License. */ -/* eslint-disable-next-line @kbn/eslint/module_migration */ +/* eslint-disable-next-line @osd/eslint/module_migration */ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; import * as xJson from './xjson'; import * as esql from './esql'; diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/painless.ts b/packages/osd-monaco/src/xjson/lexer_rules/painless.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/painless.ts rename to packages/osd-monaco/src/xjson/lexer_rules/painless.ts diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/shared.ts b/packages/osd-monaco/src/xjson/lexer_rules/shared.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/shared.ts rename to packages/osd-monaco/src/xjson/lexer_rules/shared.ts diff --git a/packages/kbn-monaco/src/xjson/lexer_rules/xjson.ts b/packages/osd-monaco/src/xjson/lexer_rules/xjson.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/lexer_rules/xjson.ts rename to packages/osd-monaco/src/xjson/lexer_rules/xjson.ts diff --git a/packages/kbn-monaco/src/xjson/worker/index.ts b/packages/osd-monaco/src/xjson/worker/index.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/worker/index.ts rename to packages/osd-monaco/src/xjson/worker/index.ts diff --git a/packages/kbn-monaco/src/xjson/worker/xjson.worker.ts b/packages/osd-monaco/src/xjson/worker/xjson.worker.ts similarity index 95% rename from packages/kbn-monaco/src/xjson/worker/xjson.worker.ts rename to packages/osd-monaco/src/xjson/worker/xjson.worker.ts index 608e6446f4a2..912bbe4c5a56 100644 --- a/packages/kbn-monaco/src/xjson/worker/xjson.worker.ts +++ b/packages/osd-monaco/src/xjson/worker/xjson.worker.ts @@ -18,7 +18,7 @@ */ // Please note: this module is intended to be run inside of a webworker. -/* eslint-disable @kbn/eslint/module_migration */ +/* eslint-disable @osd/eslint/module_migration */ import 'regenerator-runtime/runtime'; // @ts-ignore diff --git a/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts b/packages/osd-monaco/src/xjson/worker/xjson_worker.ts similarity index 95% rename from packages/kbn-monaco/src/xjson/worker/xjson_worker.ts rename to packages/osd-monaco/src/xjson/worker/xjson_worker.ts index c99f033d793a..7002301c0aef 100644 --- a/packages/kbn-monaco/src/xjson/worker/xjson_worker.ts +++ b/packages/osd-monaco/src/xjson/worker/xjson_worker.ts @@ -17,7 +17,7 @@ * under the License. */ -/* eslint-disable-next-line @kbn/eslint/module_migration */ +/* eslint-disable-next-line @osd/eslint/module_migration */ import * as monaco from 'monaco-editor/esm/vs/editor/editor.api'; import { createParser, Parser, ParseResult } from '../grammar'; diff --git a/packages/kbn-monaco/src/xjson/worker_proxy_service.ts b/packages/osd-monaco/src/xjson/worker_proxy_service.ts similarity index 100% rename from packages/kbn-monaco/src/xjson/worker_proxy_service.ts rename to packages/osd-monaco/src/xjson/worker_proxy_service.ts diff --git a/packages/kbn-monaco/tsconfig.json b/packages/osd-monaco/tsconfig.json similarity index 100% rename from packages/kbn-monaco/tsconfig.json rename to packages/osd-monaco/tsconfig.json diff --git a/packages/kbn-monaco/webpack.config.js b/packages/osd-monaco/webpack.config.js similarity index 95% rename from packages/kbn-monaco/webpack.config.js rename to packages/osd-monaco/webpack.config.js index 1a7d8c031670..e31e4b01d610 100644 --- a/packages/kbn-monaco/webpack.config.js +++ b/packages/osd-monaco/webpack.config.js @@ -40,7 +40,7 @@ const createLangWorkerConfig = (lang) => ({ loader: 'babel-loader', options: { babelrc: false, - presets: [require.resolve('@kbn/babel-preset/webpack_preset')], + presets: [require.resolve('@osd/babel-preset/webpack_preset')], }, }, }, diff --git a/packages/kbn-monaco/yarn.lock b/packages/osd-monaco/yarn.lock similarity index 100% rename from packages/kbn-monaco/yarn.lock rename to packages/osd-monaco/yarn.lock