From 05fe9f5cb9694686f99609992682724eaf5b5482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Aug 2022 18:52:46 +0200 Subject: [PATCH 1/6] fix: trigger check build on PR only --- .github/workflows/check_build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check_build.yml b/.github/workflows/check_build.yml index 1b0c0ae..51f2ada 100644 --- a/.github/workflows/check_build.yml +++ b/.github/workflows/check_build.yml @@ -1,7 +1,7 @@ name: Check build on: - push: - branches-ignore: + pull_request: + branches: - main jobs: From 562f1b3d382d414373249b52c8b5b4c550f30fbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Aug 2022 18:54:09 +0200 Subject: [PATCH 2/6] lib!: update everything including monaco-editor-wrapper --- package-lock.json | 458 ++++++++++++++++++++++++++++++++-------------- package.json | 8 +- 2 files changed, 326 insertions(+), 140 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9ad82c5..7f5ccca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,7 +8,7 @@ "name": "@codingame/monaco-editor-react", "version": "0.0.0-semantic-release", "dependencies": { - "@codingame/monaco-editor-wrapper": "^2.2.0", + "@codingame/monaco-editor-wrapper": "^3.0.0", "deep-equal": "^2.0.5", "lodash.debounce": "^4.0.8" }, @@ -19,10 +19,10 @@ "@types/deep-equal": "^1.0.1", "@types/lodash.debounce": "^4.0.7", "@types/react": "17.0.40", - "@typescript-eslint/eslint-plugin": "5.30.7", - "@typescript-eslint/parser": "5.30.7", + "@typescript-eslint/eslint-plugin": "5.33.1", + "@typescript-eslint/parser": "5.33.1", "conventional-changelog-conventionalcommits": "^5.0.0", - "eslint": "8.20.0", + "eslint": "8.22.0", "eslint-config-standard": "17.0.0", "eslint-config-standard-jsx": "11.0.0", "eslint-plugin-import": "2.26.0", @@ -63,12 +63,12 @@ } }, "node_modules/@codingame/monaco-editor-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-editor-wrapper/-/monaco-editor-wrapper-2.2.0.tgz", - "integrity": "sha512-A/pDPRH3rLPUv+W9z2SkLPQOsFZbDFMZ5ze8RLl/hrCxnrEWSxiVwQAdOIibVkv4+wZ101OvF/oaVmGVtGUrUw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@codingame/monaco-editor-wrapper/-/monaco-editor-wrapper-3.0.0.tgz", + "integrity": "sha512-bBMrB5z79FFvpV8YFJ1/tFaBr+HXfFfmOHJ9xKoPjjprJecFt7olQLD8VI/Ixmlxl5VdqfRBRnr5WnLpcbhnCA==", "dependencies": { - "monaco-editor": "npm:@codingame/monaco-editor@^0.33.6", - "vscode": "npm:@codingame/monaco-vscode-api@~1.67.19", + "monaco-editor": "npm:@codingame/monaco-editor@^0.34.0", + "vscode": "npm:@codingame/monaco-vscode-api@~1.69.2", "vscode-oniguruma": "^1.6.2" } }, @@ -99,9 +99,9 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -112,6 +112,16 @@ "node": ">=10.10.0" } }, + "node_modules/@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, "node_modules/@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -210,14 +220,14 @@ "dev": true }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -243,14 +253,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" }, "engines": { @@ -270,13 +280,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -287,12 +297,12 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "dependencies": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" }, @@ -313,9 +323,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -326,13 +336,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -353,15 +363,15 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" }, @@ -377,12 +387,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" }, "engines": { @@ -394,9 +404,9 @@ } }, "node_modules/acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -874,13 +884,14 @@ } }, "node_modules/eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "dependencies": { "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -890,14 +901,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -1426,18 +1440,91 @@ "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, + "node_modules/eslint/node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint/node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "dependencies": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" }, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" } }, "node_modules/esquery": { @@ -1734,6 +1821,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2295,9 +2388,9 @@ }, "node_modules/monaco-editor": { "name": "@codingame/monaco-editor", - "version": "0.33.7", - "resolved": "https://registry.npmjs.org/@codingame/monaco-editor/-/monaco-editor-0.33.7.tgz", - "integrity": "sha512-4nsW5GVTuqPD042sJNWzwJnlHtvxjmvs80GiGZtA+133pvABWRgQn9VP1pqnCbRxuY2DwqIBgYpRkuMoEdjVaQ==" + "version": "0.34.0", + "resolved": "https://registry.npmjs.org/@codingame/monaco-editor/-/monaco-editor-0.34.0.tgz", + "integrity": "sha512-2wJ6feW2WQNTOghAVv4ll819pXQu42OXabELxVz90Op8KLLv7YwMUF+EPwkbtAoEmG1HzFiUjqJ13Y1Ew1SYng==" }, "node_modules/ms": { "version": "2.1.2", @@ -3012,11 +3105,15 @@ }, "node_modules/vscode": { "name": "@codingame/monaco-vscode-api", - "version": "1.67.19", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.67.19.tgz", - "integrity": "sha512-yxX47tUTlX/Vu+jKYQWqJtR0VTGeHgpUE8l/n38/YRfMQi+ggMbXVLHO72O67zG5q0R4HybYfiKiSE1l3VHYhA==", + "version": "1.69.2", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.69.2.tgz", + "integrity": "sha512-9vpLBDOFDzagKFnu5YoL6hG/xynwTjGSKOx0fPSqexvbGWOopZ9hIqMsD7kxsSGWudDYwiHgtqIKbFWTds7z9w==", "dependencies": { - "monaco-editor": "^0.33.0" + "monaco-editor": "^0.34.0" + }, + "peerDependencies": { + "vscode-oniguruma": "^1.6.2", + "vscode-textmate": "^7.0.1" } }, "node_modules/vscode-oniguruma": { @@ -3024,6 +3121,12 @@ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==" }, + "node_modules/vscode-textmate": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.1.tgz", + "integrity": "sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw==", + "peer": true + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -3107,6 +3210,18 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } } }, "dependencies": { @@ -3125,12 +3240,12 @@ "requires": {} }, "@codingame/monaco-editor-wrapper": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@codingame/monaco-editor-wrapper/-/monaco-editor-wrapper-2.2.0.tgz", - "integrity": "sha512-A/pDPRH3rLPUv+W9z2SkLPQOsFZbDFMZ5ze8RLl/hrCxnrEWSxiVwQAdOIibVkv4+wZ101OvF/oaVmGVtGUrUw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@codingame/monaco-editor-wrapper/-/monaco-editor-wrapper-3.0.0.tgz", + "integrity": "sha512-bBMrB5z79FFvpV8YFJ1/tFaBr+HXfFfmOHJ9xKoPjjprJecFt7olQLD8VI/Ixmlxl5VdqfRBRnr5WnLpcbhnCA==", "requires": { - "monaco-editor": "npm:@codingame/monaco-editor@^0.33.6", - "vscode": "npm:@codingame/monaco-vscode-api@~1.67.19", + "monaco-editor": "npm:@codingame/monaco-editor@^0.34.0", + "vscode": "npm:@codingame/monaco-vscode-api@~1.69.2", "vscode-oniguruma": "^1.6.2" } }, @@ -3158,9 +3273,9 @@ } }, "@humanwhocodes/config-array": { - "version": "0.9.3", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.9.3.tgz", - "integrity": "sha512-3xSMlXHh03hCcCmFc0rbKp3Ivt2PFEJnQUJDDMTJQ2wkECZWdq4GePs2ctc5H8zV+cHPaq8k2vU8mrQjA6iHdQ==", + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.10.4.tgz", + "integrity": "sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==", "dev": true, "requires": { "@humanwhocodes/object-schema": "^1.2.1", @@ -3168,6 +3283,12 @@ "minimatch": "^3.0.4" } }, + "@humanwhocodes/gitignore-to-minimatch": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/gitignore-to-minimatch/-/gitignore-to-minimatch-1.0.2.tgz", + "integrity": "sha512-rSqmMJDdLFUsyxR6FMtD00nfQKKLFb1kv+qBbOVKqErvloEIJLo5bDTJTQNTYgeyp78JsA7u/NPi5jT1GR/MuA==", + "dev": true + }, "@humanwhocodes/object-schema": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", @@ -3257,14 +3378,14 @@ "dev": true }, "@typescript-eslint/eslint-plugin": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.30.7.tgz", - "integrity": "sha512-l4L6Do+tfeM2OK0GJsU7TUcM/1oN/N25xHm3Jb4z3OiDU4Lj8dIuxX9LpVMS9riSXQs42D1ieX7b85/r16H9Fw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.33.1.tgz", + "integrity": "sha512-S1iZIxrTvKkU3+m63YUOxYPKaP+yWDQrdhxTglVDVEVBf+aCSw85+BmJnyUaQQsk5TXFG/LpBu9fa+LrAQ91fQ==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/type-utils": "5.30.7", - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/type-utils": "5.33.1", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "functional-red-black-tree": "^1.0.1", "ignore": "^5.2.0", @@ -3274,52 +3395,52 @@ } }, "@typescript-eslint/parser": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.30.7.tgz", - "integrity": "sha512-Rg5xwznHWWSy7v2o0cdho6n+xLhK2gntImp0rJroVVFkcYFYQ8C8UJTSuTw/3CnExBmPjycjmUJkxVmjXsld6A==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.33.1.tgz", + "integrity": "sha512-IgLLtW7FOzoDlmaMoXdxG8HOCByTBXrB1V2ZQYSEV1ggMmJfAkMWTwUjjzagS6OkfpySyhKFkBw7A9jYmcHpZA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "debug": "^4.3.4" } }, "@typescript-eslint/scope-manager": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.30.7.tgz", - "integrity": "sha512-7BM1bwvdF1UUvt+b9smhqdc/eniOnCKxQT/kj3oXtj3LqnTWCAM0qHRHfyzCzhEfWX0zrW7KqXXeE4DlchZBKw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.33.1.tgz", + "integrity": "sha512-8ibcZSqy4c5m69QpzJn8XQq9NnqAToC8OdH/W6IXPXv83vRyEDPYLdjAlUx8h/rbusq6MkW4YdQzURGOqsn3CA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7" + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1" } }, "@typescript-eslint/type-utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.30.7.tgz", - "integrity": "sha512-nD5qAE2aJX/YLyKMvOU5jvJyku4QN5XBVsoTynFrjQZaDgDV6i7QHFiYCx10wvn7hFvfuqIRNBtsgaLe0DbWhw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.33.1.tgz", + "integrity": "sha512-X3pGsJsD8OiqhNa5fim41YtlnyiWMF/eKsEZGsHID2HcDqeSC5yr/uLOeph8rNF2/utwuI0IQoAK3fpoxcLl2g==", "dev": true, "requires": { - "@typescript-eslint/utils": "5.30.7", + "@typescript-eslint/utils": "5.33.1", "debug": "^4.3.4", "tsutils": "^3.21.0" } }, "@typescript-eslint/types": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.30.7.tgz", - "integrity": "sha512-ocVkETUs82+U+HowkovV6uxf1AnVRKCmDRNUBUUo46/5SQv1owC/EBFkiu4MOHeZqhKz2ktZ3kvJJ1uFqQ8QPg==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.33.1.tgz", + "integrity": "sha512-7K6MoQPQh6WVEkMrMW5QOA5FO+BOwzHSNd0j3+BlBwd6vtzfZceJ8xJ7Um2XDi/O3umS8/qDX6jdy2i7CijkwQ==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.30.7.tgz", - "integrity": "sha512-tNslqXI1ZdmXXrHER83TJ8OTYl4epUzJC0aj2i4DMDT4iU+UqLT3EJeGQvJ17BMbm31x5scSwo3hPM0nqQ1AEA==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.33.1.tgz", + "integrity": "sha512-JOAzJ4pJ+tHzA2pgsWQi4804XisPHOtbvwUyqsuuq8+y5B5GMZs7lI1xDWs6V2d7gE/Ez5bTGojSK12+IIPtXA==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/visitor-keys": "5.30.7", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/visitor-keys": "5.33.1", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", @@ -3328,33 +3449,33 @@ } }, "@typescript-eslint/utils": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.30.7.tgz", - "integrity": "sha512-Z3pHdbFw+ftZiGUnm1GZhkJgVqsDL5CYW2yj+TB2mfXDFOMqtbzQi2dNJIyPqPbx9mv2kUxS1gU+r2gKlKi1rQ==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.33.1.tgz", + "integrity": "sha512-uphZjkMaZ4fE8CR4dU7BquOV6u0doeQAr8n6cQenl/poMaIyJtBu8eys5uk6u5HiDH01Mj5lzbJ5SfeDz7oqMQ==", "dev": true, "requires": { "@types/json-schema": "^7.0.9", - "@typescript-eslint/scope-manager": "5.30.7", - "@typescript-eslint/types": "5.30.7", - "@typescript-eslint/typescript-estree": "5.30.7", + "@typescript-eslint/scope-manager": "5.33.1", + "@typescript-eslint/types": "5.33.1", + "@typescript-eslint/typescript-estree": "5.33.1", "eslint-scope": "^5.1.1", "eslint-utils": "^3.0.0" } }, "@typescript-eslint/visitor-keys": { - "version": "5.30.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.30.7.tgz", - "integrity": "sha512-KrRXf8nnjvcpxDFOKej4xkD7657+PClJs5cJVSG7NNoCNnjEdc46juNAQt7AyuWctuCgs6mVRc1xGctEqrjxWw==", + "version": "5.33.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.33.1.tgz", + "integrity": "sha512-nwIxOK8Z2MPWltLKMLOEZwmfBZReqUdbEoHQXeCpa+sRVARe5twpJGHCB4dk9903Yaf0nMAlGbQfaAH92F60eg==", "dev": true, "requires": { - "@typescript-eslint/types": "5.30.7", + "@typescript-eslint/types": "5.33.1", "eslint-visitor-keys": "^3.3.0" } }, "acorn": { - "version": "8.7.1", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz", - "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==", + "version": "8.8.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.0.tgz", + "integrity": "sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w==", "dev": true }, "acorn-jsx": { @@ -3713,13 +3834,14 @@ "dev": true }, "eslint": { - "version": "8.20.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.20.0.tgz", - "integrity": "sha512-d4ixhz5SKCa1D6SCPrivP7yYVi7nyD6A4vs6HIAul9ujBzcEmZVM3/0NN/yu5nKhmO1wjp5xQ46iRfmDGlOviA==", + "version": "8.22.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.22.0.tgz", + "integrity": "sha512-ci4t0sz6vSRKdmkOGmprBo6fmI4PrphDFMy5JEq/fNS0gQkJM3rLmrqcp8ipMcdobH3KtUP40KniAE9W19S4wA==", "dev": true, "requires": { "@eslint/eslintrc": "^1.3.0", - "@humanwhocodes/config-array": "^0.9.2", + "@humanwhocodes/config-array": "^0.10.4", + "@humanwhocodes/gitignore-to-minimatch": "^1.0.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", @@ -3729,14 +3851,17 @@ "eslint-scope": "^7.1.1", "eslint-utils": "^3.0.0", "eslint-visitor-keys": "^3.3.0", - "espree": "^9.3.2", + "espree": "^9.3.3", "esquery": "^1.4.0", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^6.0.1", "globals": "^13.15.0", + "globby": "^11.1.0", + "grapheme-splitter": "^1.0.4", "ignore": "^5.2.0", "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", @@ -3764,6 +3889,49 @@ "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true } } }, @@ -4104,12 +4272,12 @@ "dev": true }, "espree": { - "version": "9.3.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.2.tgz", - "integrity": "sha512-D211tC7ZwouTIuY5x9XnS0E9sWNChB7IYKX/Xp5eQj3nFXhqmiUDB9q27y76oFl8jTg3pXcQx/bpxMfs3CIZbA==", + "version": "9.3.3", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.3.tgz", + "integrity": "sha512-ORs1Rt/uQTqUKjDdGCyrtYxbazf5umATSf/K4qxjmZHORR6HJk+2s/2Pqe+Kk49HHINC/xNIrGfgh8sZcll0ng==", "dev": true, "requires": { - "acorn": "^8.7.1", + "acorn": "^8.8.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.3.0" } @@ -4341,6 +4509,12 @@ "slash": "^3.0.0" } }, + "grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -4736,9 +4910,9 @@ "dev": true }, "monaco-editor": { - "version": "npm:@codingame/monaco-editor@0.33.7", - "resolved": "https://registry.npmjs.org/@codingame/monaco-editor/-/monaco-editor-0.33.7.tgz", - "integrity": "sha512-4nsW5GVTuqPD042sJNWzwJnlHtvxjmvs80GiGZtA+133pvABWRgQn9VP1pqnCbRxuY2DwqIBgYpRkuMoEdjVaQ==" + "version": "npm:@codingame/monaco-editor@0.34.0", + "resolved": "https://registry.npmjs.org/@codingame/monaco-editor/-/monaco-editor-0.34.0.tgz", + "integrity": "sha512-2wJ6feW2WQNTOghAVv4ll819pXQu42OXabELxVz90Op8KLLv7YwMUF+EPwkbtAoEmG1HzFiUjqJ13Y1Ew1SYng==" }, "ms": { "version": "2.1.2", @@ -5232,11 +5406,11 @@ "dev": true }, "vscode": { - "version": "npm:@codingame/monaco-vscode-api@1.67.19", - "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.67.19.tgz", - "integrity": "sha512-yxX47tUTlX/Vu+jKYQWqJtR0VTGeHgpUE8l/n38/YRfMQi+ggMbXVLHO72O67zG5q0R4HybYfiKiSE1l3VHYhA==", + "version": "npm:@codingame/monaco-vscode-api@1.69.2", + "resolved": "https://registry.npmjs.org/@codingame/monaco-vscode-api/-/monaco-vscode-api-1.69.2.tgz", + "integrity": "sha512-9vpLBDOFDzagKFnu5YoL6hG/xynwTjGSKOx0fPSqexvbGWOopZ9hIqMsD7kxsSGWudDYwiHgtqIKbFWTds7z9w==", "requires": { - "monaco-editor": "^0.33.0" + "monaco-editor": "^0.34.0" } }, "vscode-oniguruma": { @@ -5244,6 +5418,12 @@ "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.2.tgz", "integrity": "sha512-KH8+KKov5eS/9WhofZR8M8dMHWN2gTxjMsG4jd04YhpbPR91fUj7rYQ2/XjeHCJWbg7X++ApRIU9NUwM2vTvLA==" }, + "vscode-textmate": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-7.0.1.tgz", + "integrity": "sha512-zQ5U/nuXAAMsh691FtV0wPz89nSkHbs+IQV8FDk+wew9BlSDhf4UmWGlWJfTR2Ti6xZv87Tj5fENzKf6Qk7aLw==", + "peer": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -5306,6 +5486,12 @@ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true } } } diff --git a/package.json b/package.json index e31d282..5122859 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ ], "types": "dist/index.d.ts", "dependencies": { - "@codingame/monaco-editor-wrapper": "^2.2.0", + "@codingame/monaco-editor-wrapper": "^3.0.0", "deep-equal": "^2.0.5", "lodash.debounce": "^4.0.8" }, @@ -30,10 +30,10 @@ "@types/deep-equal": "^1.0.1", "@types/lodash.debounce": "^4.0.7", "@types/react": "17.0.40", - "@typescript-eslint/eslint-plugin": "5.30.7", - "@typescript-eslint/parser": "5.30.7", + "@typescript-eslint/eslint-plugin": "5.33.1", + "@typescript-eslint/parser": "5.33.1", "conventional-changelog-conventionalcommits": "^5.0.0", - "eslint": "8.20.0", + "eslint": "8.22.0", "eslint-config-standard": "17.0.0", "eslint-config-standard-jsx": "11.0.0", "eslint-plugin-import": "2.26.0", From d14b95b4ee6125a5e10e92425b319517f715d71a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Aug 2022 18:56:38 +0200 Subject: [PATCH 3/6] fix!: replace useThemeData hook by useColorTheme --- src/MonacoEditor.tsx | 12 ++++++------ src/hooks.ts | 24 +++++++++++------------- src/index.ts | 4 ++-- 3 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/MonacoEditor.tsx b/src/MonacoEditor.tsx index d932cd7..6a949d2 100644 --- a/src/MonacoEditor.tsx +++ b/src/MonacoEditor.tsx @@ -2,7 +2,7 @@ import React, { ForwardedRef, forwardRef, ReactElement, useEffect, useMemo, useR import debounce from 'lodash.debounce' import { monaco, createEditor, getMonacoLanguage, updateEditorKeybindingsMode, registerEditorOpenHandler } from '@codingame/monaco-editor-wrapper' import { IEditorOptions } from 'vscode/service-override/modelEditor' -import { useDeepMemo, useLastValueRef, useLastVersion, useThemeData } from './hooks' +import { useDeepMemo, useLastValueRef, useLastVersion, useColorTheme } from './hooks' import './style' const STATUS_BAR_HEIGHT = 20 @@ -116,7 +116,7 @@ function MonacoEditor ({ const preventTriggerChangeEventRef = useRef(false) const [height, setHeight] = useState(requestedHeight !== 'auto' ? requestedHeight : 50) - const themeData = useThemeData() + const colorTheme = useColorTheme() const containerRef = useRef(null) const statusBarRef = useRef(null) @@ -325,11 +325,11 @@ function MonacoEditor ({ const statusBarStyle = useMemo(() => { return { - backgroundColor: themeData?.getColor('statusBar.background')?.toString() ?? '#007ACC', - color: themeData?.getColor('statusBar.foreground')?.toString() ?? '#FFFFFF', - borderTop: `1px solid ${themeData?.getColor('statusBar.border')?.toString() ?? '#FFFFFF'}` + backgroundColor: colorTheme.getColor('statusBar.background')?.toString() ?? '#007ACC', + color: colorTheme.getColor('statusBar.foreground')?.toString() ?? '#FFFFFF', + borderTop: `1px solid ${colorTheme.getColor('statusBar.border')?.toString() ?? '#FFFFFF'}` } - }, [themeData]) + }, [colorTheme]) return (
diff --git a/src/hooks.ts b/src/hooks.ts index 4653402..5210f5e 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -1,24 +1,22 @@ import { MutableRefObject, useCallback, useEffect, useMemo, useRef, useState } from 'react' import deepEqual from 'deep-equal' -import { getConfiguration, getThemeData, onConfigurationChanged, monaco } from '@codingame/monaco-editor-wrapper' +import { getConfiguration, onConfigurationChanged, monaco } from '@codingame/monaco-editor-wrapper' +import { StandaloneServices, IThemeService, IColorTheme } from 'vscode/services' -const standaloneThemeService = monaco.extra.StandaloneServices.get(monaco.editor.IStandaloneThemeService) -export function useThemeData (): monaco.extra.ColorThemeData | null { - const [themeName, setThemeName] = useState(standaloneThemeService.getColorTheme().themeName) - const updateTheme = (theme: monaco.editor.IColorTheme) => { - setThemeName((theme as monaco.editor.IStandaloneTheme).themeName) - } +export function useColorTheme (): IColorTheme { + const themeService = useMemo(() => StandaloneServices.get(IThemeService), []) + const [theme, setTheme] = useState(themeService.getColorTheme()) useEffect(() => { - const disposable = standaloneThemeService.onDidColorThemeChange(updateTheme) - updateTheme(standaloneThemeService.getColorTheme()) + const disposable = themeService.onDidColorThemeChange(() => { + setTheme(themeService.getColorTheme()) + }) + setTheme(themeService.getColorTheme()) return () => { disposable.dispose() } - }, []) + }, [themeService]) - return useMemo(() => { - return getThemeData(themeName) - }, [themeName]) + return theme } export function useUserConfiguration (programmingLanguageId?: string): Partial { diff --git a/src/index.ts b/src/index.ts index 5bbffdc..653d712 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,11 +1,11 @@ import { loadLanguage, monaco, updateKeybindings, updateUserConfiguration } from '@codingame/monaco-editor-wrapper' -import { useThemeData, useUserConfiguration } from './hooks' +import { useColorTheme, useUserConfiguration } from './hooks' import MonacoEditor, { MonacoEditorProps } from './MonacoEditor' export default MonacoEditor export { monaco, - useThemeData, + useColorTheme, useUserConfiguration, updateKeybindings, updateUserConfiguration, From 9ccd395b1613bde8c05737c26e341e6e05dfed7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Aug 2022 18:56:55 +0200 Subject: [PATCH 4/6] clean: remove hack as monaco 0.34 was released --- src/MonacoEditor.tsx | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/MonacoEditor.tsx b/src/MonacoEditor.tsx index 6a949d2..6583490 100644 --- a/src/MonacoEditor.tsx +++ b/src/MonacoEditor.tsx @@ -158,10 +158,7 @@ function MonacoEditor ({ lastSaveViewState(editorRef.current!, model) if (existingModel == null) { // Only dispose if we are the one who created the model - setTimeout(() => { - // setTimeout is required until monaco 0.34 is released (https://github.com/TypeFox/monaco-languageclient/issues/387) - model.dispose() - }) + model.dispose() } } } else { From d6be3fee6f19c0a930e25f312ed852f963f9151e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Thu, 18 Aug 2022 18:57:36 +0200 Subject: [PATCH 5/6] feat: add a prop preventing the monaco created internally from being disposed --- src/MonacoEditor.tsx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/MonacoEditor.tsx b/src/MonacoEditor.tsx index 6583490..ef28671 100644 --- a/src/MonacoEditor.tsx +++ b/src/MonacoEditor.tsx @@ -94,6 +94,11 @@ export interface MonacoEditorProps { * Default is opening a new editor in a popup */ onEditorOpenRequest?: (model: monaco.editor.ITextModel, options: IEditorOptions | undefined, source: monaco.editor.ICodeEditor, sideBySide?: boolean) => Promise + + /** + * Dispose + */ + disposeModels?: boolean } function MonacoEditor ({ @@ -109,7 +114,8 @@ function MonacoEditor ({ markers, saveViewState = defaultSaveViewState, restoreViewState = defaultRestoreViewState, - onEditorOpenRequest + onEditorOpenRequest, + disposeModels = true }: MonacoEditorProps, ref: ForwardedRef): ReactElement { const editorRef = useRef() const modelRef = useRef() @@ -155,6 +161,9 @@ function MonacoEditor ({ lastRestoreViewState(editorRef.current, model) } return () => { + if (!disposeModels) { + return + } lastSaveViewState(editorRef.current!, model) if (existingModel == null) { // Only dispose if we are the one who created the model @@ -166,7 +175,7 @@ function MonacoEditor ({ editorRef.current?.setModel(null) } return undefined - }, [monacoLanguage, modelUri, valueRef, lastSaveViewState, lastRestoreViewState]) + }, [monacoLanguage, modelUri, valueRef, lastSaveViewState, lastRestoreViewState, disposeModels]) // Create editor useEffect(() => { From 1ffd5a2d7c0e9c5951bd717a97f5b996af2390ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= Date: Fri, 19 Aug 2022 16:44:07 +0200 Subject: [PATCH 6/6] doc: add some comments --- src/MonacoEditor.tsx | 3 ++- src/hooks.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/MonacoEditor.tsx b/src/MonacoEditor.tsx index ef28671..2bedc6d 100644 --- a/src/MonacoEditor.tsx +++ b/src/MonacoEditor.tsx @@ -96,7 +96,8 @@ export interface MonacoEditorProps { onEditorOpenRequest?: (model: monaco.editor.ITextModel, options: IEditorOptions | undefined, source: monaco.editor.ICodeEditor, sideBySide?: boolean) => Promise /** - * Dispose + * if true, the models created by the component will be disposed when they are no longer displayed in the editor + * if false, the models will be kept and re-used the next time the same uri is provided */ disposeModels?: boolean } diff --git a/src/hooks.ts b/src/hooks.ts index 5210f5e..0e27740 100644 --- a/src/hooks.ts +++ b/src/hooks.ts @@ -10,6 +10,8 @@ export function useColorTheme (): IColorTheme { const disposable = themeService.onDidColorThemeChange(() => { setTheme(themeService.getColorTheme()) }) + // Since useEffect is asynchronous, the theme may have changed between the initialization of state and now + // Let's update the state just in case setTheme(themeService.getColorTheme()) return () => { disposable.dispose()