@codingame/monaco-languageclient-wrapper 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/tools.js ADDED
@@ -0,0 +1,117 @@
1
+ import { _ as _defineProperty } from './index2.js';
2
+
3
+ function unsupported() {
4
+ throw new Error('unsupported');
5
+ }
6
+
7
+ class MultiDisposeError extends Error {
8
+ constructor(errors) {
9
+ super("Encountered errors while disposing of store. Errors: [".concat(errors.join(', '), "]"));
10
+ this.errors = errors;
11
+ }
12
+
13
+ }
14
+
15
+ class SimpleExtensionContext {
16
+ constructor() {
17
+ _defineProperty(this, "subscriptions", []);
18
+
19
+ _defineProperty(this, "asAbsolutePath", unsupported);
20
+
21
+ _defineProperty(this, "storageUri", undefined);
22
+
23
+ _defineProperty(this, "storagePath", undefined);
24
+ }
25
+
26
+ dispose() {
27
+ const errors = [];
28
+
29
+ for (const d of this.subscriptions) {
30
+ try {
31
+ d.dispose();
32
+ } catch (e) {
33
+ errors.push(e);
34
+ }
35
+ }
36
+
37
+ if (errors.length === 1) {
38
+ throw errors[0];
39
+ } else if (errors.length > 1) {
40
+ throw new MultiDisposeError(errors);
41
+ }
42
+ }
43
+
44
+ get workspaceState() {
45
+ return unsupported();
46
+ }
47
+
48
+ get globalState() {
49
+ return unsupported();
50
+ }
51
+
52
+ get secrets() {
53
+ return unsupported();
54
+ }
55
+
56
+ get extensionUri() {
57
+ return unsupported();
58
+ }
59
+
60
+ get extensionPath() {
61
+ return unsupported();
62
+ }
63
+
64
+ get environmentVariableCollection() {
65
+ return unsupported();
66
+ }
67
+
68
+ get globalStorageUri() {
69
+ return unsupported();
70
+ }
71
+
72
+ get globalStoragePath() {
73
+ return unsupported();
74
+ }
75
+
76
+ get logUri() {
77
+ return unsupported();
78
+ }
79
+
80
+ get logPath() {
81
+ return unsupported();
82
+ }
83
+
84
+ get extensionMode() {
85
+ return unsupported();
86
+ }
87
+
88
+ get extension() {
89
+ return unsupported();
90
+ }
91
+
92
+ }
93
+
94
+ class ExtensionFeature {
95
+ constructor() {
96
+ _defineProperty(this, "context", new SimpleExtensionContext());
97
+ }
98
+
99
+ fillClientCapabilities() {}
100
+
101
+ initialize(capabilities, documentSelector) {
102
+ this.activate(this.context, capabilities, documentSelector);
103
+ }
104
+
105
+ getState() {
106
+ return {
107
+ kind: 'static'
108
+ };
109
+ }
110
+
111
+ dispose() {
112
+ this.context.dispose();
113
+ }
114
+
115
+ }
116
+
117
+ export { ExtensionFeature as E };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codingame/monaco-languageclient-wrapper",
3
- "version": "3.1.0",
3
+ "version": "3.2.0",
4
4
  "private": false,
5
5
  "description": "Enhanced Monaco editor with TextMate grammars and more",
6
6
  "scripts": {
@@ -8,13 +8,13 @@
8
8
  "test:watch": "jest --watch",
9
9
  "build": "npm run test && npm run compile && npm run generate-types",
10
10
  "compile": "rollup --config rollup.config.ts --configPlugin typescript",
11
- "generate-types": "tsc --project tsconfig.types.json && rollup --config rollup.types.config.ts --configPlugin typescript && rm -rf ./dist/types"
11
+ "generate-types": "tsc --project tsconfig.types.json && rollup --config rollup.types.config.ts --configPlugin typescript && rm -rf ./dist/types",
12
+ "preprepare": "./scripts/install-extensions"
12
13
  },
13
14
  "repository": {
14
15
  "type": "git",
15
16
  "url": "https://github.com/CodinGame/monaco-languageclient-wrapper"
16
17
  },
17
- "moduleResolution": "node",
18
18
  "main": "./dist/index.js",
19
19
  "module": "./dist/index.js",
20
20
  "files": [
@@ -23,62 +23,61 @@
23
23
  ],
24
24
  "types": "./dist/index.d.ts",
25
25
  "dependencies": {
26
- "@codingame/monaco-editor-wrapper": "^1.14.5",
27
- "@codingame/monaco-jsonrpc": "^0.4.0",
28
- "sweetalert": "^2.1.2",
29
- "vscode": "npm:@codingame/monaco-vscode-api@^1.68.4",
30
- "vscode-languageserver-protocol": "^3.17.1"
26
+ "@codingame/monaco-editor-wrapper": "^2.1.1",
27
+ "recast": "^0.21.1",
28
+ "vscode": "npm:@codingame/monaco-vscode-api@~1.67.12",
29
+ "vscode-languageserver-protocol": "^3.17.1",
30
+ "vscode-ws-jsonrpc": "^1.0.1"
31
31
  },
32
32
  "devDependencies": {
33
- "@babel/core": "7.18.5",
34
- "@babel/plugin-proposal-class-properties": "7.17.12",
35
- "@babel/plugin-proposal-optional-chaining": "7.17.12",
36
- "@babel/plugin-transform-modules-commonjs": "^7.18.2",
37
- "@babel/preset-env": "7.18.2",
38
- "@babel/preset-typescript": "7.17.12",
39
- "@babel/runtime": "7.18.3",
40
- "@codingame/monaco-jsonrpc": "^0.4.0",
33
+ "@babel/core": "7.18.6",
34
+ "@babel/plugin-proposal-class-properties": "7.18.6",
35
+ "@babel/plugin-proposal-optional-chaining": "7.18.6",
36
+ "@babel/plugin-transform-modules-commonjs": "^7.18.6",
37
+ "@babel/preset-env": "7.18.6",
38
+ "@babel/preset-typescript": "7.18.6",
39
+ "@babel/runtime": "7.18.6",
40
+ "@codingame/eslint-config": "^1.1.5",
41
+ "@codingame/tsconfig": "^1.1.0",
41
42
  "@rollup/plugin-alias": "3.1.9",
42
43
  "@rollup/plugin-babel": "5.3.1",
43
- "@rollup/plugin-commonjs": "22.0.0",
44
+ "@rollup/plugin-commonjs": "22.0.1",
44
45
  "@rollup/plugin-eslint": "8.0.2",
45
46
  "@rollup/plugin-json": "4.1.0",
46
47
  "@rollup/plugin-node-resolve": "13.3.0",
47
48
  "@rollup/plugin-typescript": "^8.3.3",
48
- "@types/jest": "^28.1.1",
49
+ "@types/jest": "^28.1.4",
49
50
  "@types/once": "^1.4.0",
50
- "@types/rollup-plugin-node-builtins": "^2.1.2",
51
- "@types/vscode": "^1.68.0",
52
- "@typescript-eslint/eslint-plugin": "5.28.0",
53
- "@typescript-eslint/parser": "5.28.0",
54
- "canvas": "^2.9.1",
51
+ "@types/vscode": "~1.67.0",
52
+ "@typescript-eslint/eslint-plugin": "5.30.5",
53
+ "@typescript-eslint/parser": "5.30.5",
54
+ "browser-resolve": "^2.0.0",
55
+ "canvas": "^2.9.3",
55
56
  "conventional-changelog-conventionalcommits": "^5.0.0",
56
57
  "delay": "^5.0.0",
57
- "eslint": "8.17.0",
58
+ "eslint": "8.19.0",
58
59
  "eslint-config-standard": "17.0.0",
59
- "eslint-config-standard-jsx": "11.0.0",
60
60
  "eslint-plugin-import": "2.26.0",
61
61
  "eslint-plugin-jest": "^26.5.3",
62
- "eslint-plugin-node": "11.1.0",
62
+ "eslint-plugin-n": "^15.2.4",
63
63
  "eslint-plugin-promise": "6.0.0",
64
- "eslint-plugin-unused-imports": "2.0.0",
65
- "jest": "^28.1.1",
66
- "jest-environment-jsdom": "^28.1.1",
67
- "monaco-languageclient": "^2.0.0-dev.1",
64
+ "eslint-plugin-unused-imports": "^2.0.0",
65
+ "jest": "^28.1.2",
66
+ "jest-environment-jsdom": "^28.1.2",
67
+ "monaco-languageclient": "^2.0.2",
68
68
  "proxy-polyfill": "^0.3.2",
69
- "rollup": "2.75.6",
69
+ "rollup": "2.76.0",
70
70
  "rollup-plugin-dts": "^4.2.2",
71
- "rollup-plugin-node-builtins": "^2.1.2",
72
71
  "rollup-plugin-postcss": "4.0.2",
73
72
  "rollup-plugin-visualizer": "5.6.0",
74
73
  "rollup-plugin-web-worker-loader": "1.6.1",
75
74
  "tslib": "^2.4.0",
76
- "typescript": "4.7.3",
75
+ "typescript": "4.7.4",
77
76
  "vscode-languageserver": "^8.0.1",
78
77
  "vscode-languageserver-protocol": "^3.17.1"
79
78
  },
80
79
  "resolutions": {
81
- "eslint": "8.17.0"
80
+ "eslint": "8.19.0"
82
81
  },
83
82
  "browserslist": [
84
83
  "defaults",
@@ -89,6 +88,7 @@
89
88
  "not IE_Mob 11"
90
89
  ],
91
90
  "jest": {
91
+ "resolver": "<rootDir>/jest/resolver.js",
92
92
  "testEnvironment": "jest-environment-jsdom",
93
93
  "modulePathIgnorePatterns": [
94
94
  "<rootDir>/dist/"