Skip to content

Commit

Permalink
upgrade to monaco-editor 0.49.0 (#458)
Browse files Browse the repository at this point in the history
Upgrade to monaco-editor 0.49.0
  • Loading branch information
morgilad authored Jun 4, 2024
1 parent 7ecae10 commit 2db6b2f
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
diff --git a/esm/vs/base/common/platform.js b/esm/vs/base/common/platform.js
index d507327daec3cdf5027bd886f898c364c5433ecd..9dc769654606b60bc71922dd40f2146db97dcbb9 100644
index bd06f6f0eb6492f32ff9a6c7319162a55670e421..da2875afe2f74560cdebec8178a39562df42cfbc 100644
--- a/esm/vs/base/common/platform.js
+++ b/esm/vs/base/common/platform.js
@@ -26,9 +26,11 @@ if (typeof $globalThis.vscode !== 'undefined' && typeof $globalThis.vscode.proce
// Native environment (sandboxed)
nodeProcess = $globalThis.vscode.process;
}
-else if (typeof process !== 'undefined') {
-else if (typeof process !== 'undefined' && typeof ((_a = process === null || process === void 0 ? void 0 : process.versions) === null || _a === void 0 ? void 0 : _a.node) === 'string') {
+// Work around bug in Parcel causing $globalThis.process !== process
+// https://github.com/parcel-bundler/parcel/issues/9549
+else if (typeof $globalThis.process !== 'undefined') {
// Native environment (non-sandboxed)
- nodeProcess = process;
+ nodeProcess = $globalThis.process;
}
const isElectronProcess = typeof ((_a = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _a === void 0 ? void 0 : _a.electron) === 'string';
const isElectronProcess = typeof ((_b = nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.versions) === null || _b === void 0 ? void 0 : _b.electron) === 'string';
const isElectronRenderer = isElectronProcess && (nodeProcess === null || nodeProcess === void 0 ? void 0 : nodeProcess.type) === 'renderer';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@
"wait-on": "^7.0.1"
},
"resolutions": {
"monaco-editor@^0.46.0": "patch:monaco-editor@npm%3A0.46.0#./.yarn/patches/monaco-editor-npm-0.46.0-fb69b10c11.patch"
"monaco-editor@^0.49.0": "patch:monaco-editor@npm%3A0.49.0#./.yarn/patches/monaco-editor-npm-0.49.0-b2e93047b5.patch"
}
}
4 changes: 2 additions & 2 deletions package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"browser-sync": "^3.0.2",
"concurrently": "^8.2.1",
"http-server": "^14.1.1",
"monaco-editor": "^0.46.0",
"monaco-editor": "^0.49.0",
"rimraf": "^5.0.1",
"rollup": "^3.29.2",
"terser": "^5.19.4",
Expand All @@ -74,6 +74,6 @@
"xregexp": "^5.1.1"
},
"peerDependencies": {
"monaco-editor": "^0.46.0"
"monaco-editor": "0.49.0"
}
}
2 changes: 1 addition & 1 deletion samples/amd-webpack-react-cross-origin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"@kusto/monaco-kusto": "workspace:*",
"express": "^4.18.2",
"monaco-editor": "^0.46.0",
"monaco-editor": "^0.49.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/amd-webpack-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"dependencies": {
"@kusto/monaco-kusto": "workspace:*",
"monaco-editor": "^0.46.0",
"monaco-editor": "^0.49.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion samples/amd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@kusto/monaco-kusto": "workspace:*",
"monaco-editor": "^0.46.0"
"monaco-editor": "^0.49.0"
},
"scripts": {
"build": "copyMonacoFilesAMD .",
Expand Down
2 changes: 1 addition & 1 deletion samples/esm-parcel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Parcel docs on shimming globals: https://parceljs.org/features/node-emulation/#s

Recent monaco versions use `typeof process` to check if it's running in a node environment. Parcel doesn't have the ability to make this check return `false` so we need to patch monaco to use `globalThis.process` instead.

The yarn patch file this repo uses can be seen at `/.yarn/patches/monaco-editor-npm-0.46.0-fb69b10c11.patch`.
The yarn patch file this repo uses can be seen at `/.yarn/patches/monaco-editor-npm-0.49.0-fb69b10c11.patch`.

Yarn docs for patching packages: https://yarnpkg.com/cli/patch

Expand Down
2 changes: 1 addition & 1 deletion samples/esm-parcel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"dependencies": {
"@kusto/monaco-kusto": "workspace:*",
"monaco-editor": "^0.46.0"
"monaco-editor": "^0.49.0"
},
"devDependencies": {
"@tsconfig/recommended": "^1.0.3",
Expand Down
2 changes: 1 addition & 1 deletion samples/esm-vite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@kusto/monaco-kusto": "^10.0.8",
"monaco-editor": "^0.46.0"
"monaco-editor": "^0.49.0"
},
"devDependencies": {
"vite": "^5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion samples/esm-webpack-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"dependencies": {
"@kusto/monaco-kusto": "workspace:*",
"monaco-editor": "^0.46.0",
"monaco-editor": "^0.49.0",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
32 changes: 16 additions & 16 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1919,7 +1919,7 @@ __metadata:
concurrently: ^8.2.1
http-server: ^14.1.1
lodash-es: ^4.17.21
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
rimraf: ^5.0.1
rollup: ^3.29.2
terser: ^5.19.4
Expand All @@ -1931,7 +1931,7 @@ __metadata:
vscode-languageserver-types: ^3.17.4
xregexp: ^5.1.1
peerDependencies:
monaco-editor: ^0.46.0
monaco-editor: 0.49.0
bin:
copyMonacoFilesAMD: copyMonacoFilesAMD.js
languageName: unknown
Expand Down Expand Up @@ -8034,17 +8034,17 @@ __metadata:
languageName: node
linkType: hard

"monaco-editor@npm:0.46.0":
version: 0.46.0
resolution: "monaco-editor@npm:0.46.0"
checksum: be7aaa2747b8d3a3537f56c9353ebe779b188eb1480f6453fa1e346d8ccdd27068cb4508c8f6f3b8cc07ac0f792a3d6df36168d54cd6e074742182525115be86
"monaco-editor@npm:0.49.0":
version: 0.49.0
resolution: "monaco-editor@npm:0.49.0"
checksum: 133b41b2b32d120ff6bc12d68a72501c90ff6de2e15e915a44c25f3f3ab29d164bd94ba501e13329e855b3000bd035319b01be122e76ab7f3fab6731cf0a323c
languageName: node
linkType: hard

"monaco-editor@patch:monaco-editor@npm%3A0.46.0#./.yarn/patches/monaco-editor-npm-0.46.0-fb69b10c11.patch::locator=monaco-kusto%40workspace%3A.":
version: 0.46.0
resolution: "monaco-editor@patch:monaco-editor@npm%3A0.46.0#./.yarn/patches/monaco-editor-npm-0.46.0-fb69b10c11.patch::version=0.46.0&hash=e0292b&locator=monaco-kusto%40workspace%3A."
checksum: 4b1f28cd5e0446cfc0b324ad0413b497132fce3b4487d3b6531a0640138d80033df37353e77650e41e5034a8691ee64d7b29bb6e1ecc8cd22fa42ea9549cea68
"monaco-editor@patch:monaco-editor@npm%3A0.49.0#./.yarn/patches/monaco-editor-npm-0.49.0-b2e93047b5.patch::locator=monaco-kusto%40workspace%3A.":
version: 0.49.0
resolution: "monaco-editor@patch:monaco-editor@npm%3A0.49.0#./.yarn/patches/monaco-editor-npm-0.49.0-b2e93047b5.patch::version=0.49.0&hash=a5d05e&locator=monaco-kusto%40workspace%3A."
checksum: 72916ef8a239c1e6b61d3caf5cb44362411b33a75d520916daea04494ade0339c71fa097ab7393694afd7e29ff6f4acadb341bdedcfd649b0b3f5dcaa10e425c
languageName: node
linkType: hard

Expand All @@ -8054,7 +8054,7 @@ __metadata:
dependencies:
"@kusto/monaco-kusto": "workspace:*"
http-server: ^14.1.1
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
languageName: unknown
linkType: soft

Expand All @@ -8075,7 +8075,7 @@ __metadata:
css-loader: ^6.8.1
express: ^4.18.2
html-webpack-plugin: ^5.5.3
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
react: ^18.2.0
react-dom: ^18.2.0
style-loader: ^3.3.2
Expand All @@ -8101,7 +8101,7 @@ __metadata:
babel-loader: ^9.1.2
css-loader: ^6.8.1
html-webpack-plugin: ^5.5.3
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
react: ^18.2.0
react-dom: ^18.2.0
style-loader: ^3.3.2
Expand All @@ -8118,7 +8118,7 @@ __metadata:
dependencies:
"@kusto/monaco-kusto": "workspace:*"
"@tsconfig/recommended": ^1.0.3
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
parcel: ^2.0.0
typescript: ^5.2.2
languageName: unknown
Expand All @@ -8129,7 +8129,7 @@ __metadata:
resolution: "monaco-kusto--esm-vite-sample@workspace:samples/esm-vite"
dependencies:
"@kusto/monaco-kusto": ^10.0.8
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
vite: ^5.0.0
vite-plugin-node-polyfills: ^0.17.0
languageName: unknown
Expand All @@ -8146,7 +8146,7 @@ __metadata:
babel-loader: ^9.1.2
css-loader: ^6.8.1
html-webpack-plugin: ^5.5.3
monaco-editor: ^0.46.0
monaco-editor: ^0.49.0
react: ^18.2.0
react-dom: ^18.2.0
style-loader: ^3.3.2
Expand Down

0 comments on commit 2db6b2f

Please sign in to comment.