Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename kbn-monaco to osd-monaco (#37) #51

Merged
merged 1 commit into from
Mar 5, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions packages/kbn-monaco/README.md

This file was deleted.

5 changes: 5 additions & 0 deletions packages/osd-monaco/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# @osd/monaco
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this new file and not considered as rename ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure. Same thing happened in some of your PRs as well


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.
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, '../');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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')],
},
},
},
Expand Down
File renamed without changes.