@codingame/monaco-vscode-api 1.69.16 → 1.69.18
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/snippets.js +11 -1
- package/dist/webpack-loader.cjs +15 -0
- package/dist/webpack-loader.d.ts +3 -0
- package/package.json +13 -4
package/dist/snippets.js
CHANGED
|
@@ -38,7 +38,17 @@ function setSnippetSuggestSupport (support) {
|
|
|
38
38
|
if (monacoSuggest.setSnippetSuggestSupport != null) {
|
|
39
39
|
monacoSuggest.setSnippetSuggestSupport(support);
|
|
40
40
|
} else {
|
|
41
|
-
console.error(
|
|
41
|
+
console.error(
|
|
42
|
+
`setSnippetSuggestSupport does not exist in monaco-editor.
|
|
43
|
+
It's treeshaked out of monaco editor and needs to be reintroduced.
|
|
44
|
+
If you're using webpack, you can add a loader that will polyfill it:
|
|
45
|
+
\`\`\`
|
|
46
|
+
{
|
|
47
|
+
test: /node_modules\\/monaco-editor\\//,
|
|
48
|
+
loader: 'vscode/webpack-loader'
|
|
49
|
+
}
|
|
50
|
+
\`\`\`
|
|
51
|
+
`);
|
|
42
52
|
}
|
|
43
53
|
}
|
|
44
54
|
class SnippetBodyInsights {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const monacoPolyfillLoader = function (source) {
|
|
4
|
+
if (this.resourcePath.endsWith('monaco-editor/esm/vs/editor/contrib/suggest/browser/suggest.js')) {
|
|
5
|
+
return `${source}
|
|
6
|
+
export function setSnippetSuggestSupport(support) {
|
|
7
|
+
const old = _snippetSuggestSupport;
|
|
8
|
+
_snippetSuggestSupport = support;
|
|
9
|
+
return old;
|
|
10
|
+
}
|
|
11
|
+
`;
|
|
12
|
+
}
|
|
13
|
+
return source;
|
|
14
|
+
};
|
|
15
|
+
exports.default = monacoPolyfillLoader;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-api",
|
|
3
|
-
"version": "1.69.
|
|
3
|
+
"version": "1.69.18",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor",
|
|
6
6
|
"keywords": [],
|
|
@@ -75,6 +75,10 @@
|
|
|
75
75
|
"./monaco": {
|
|
76
76
|
"types": "./dist/monaco.d.ts",
|
|
77
77
|
"default": "./dist/monaco.js"
|
|
78
|
+
},
|
|
79
|
+
"./webpack-loader": {
|
|
80
|
+
"types": "./dist/webpack-loader.d.ts",
|
|
81
|
+
"default": "./dist/webpack-loader.cjs"
|
|
78
82
|
}
|
|
79
83
|
},
|
|
80
84
|
"typesVersions": {
|
|
@@ -120,6 +124,9 @@
|
|
|
120
124
|
],
|
|
121
125
|
"monaco": [
|
|
122
126
|
"./dist/monaco.d.ts"
|
|
127
|
+
],
|
|
128
|
+
"webpack-loader": [
|
|
129
|
+
"./dist/webpack-loader.d.ts"
|
|
123
130
|
]
|
|
124
131
|
}
|
|
125
132
|
},
|
|
@@ -128,8 +135,9 @@
|
|
|
128
135
|
"README.md"
|
|
129
136
|
],
|
|
130
137
|
"scripts": {
|
|
131
|
-
"build": "rm -rf dist/ && npm run lint && npm run compile && npm run generate-types",
|
|
138
|
+
"build": "rm -rf dist/ && npm run lint && npm run compile && npm run generate-types && npm run compile-webpack-loader",
|
|
132
139
|
"compile": "rollup --config rollup/rollup.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup.json`}' --vscode-version ${npm_package_config_vscode_version}",
|
|
140
|
+
"compile-webpack-loader": "tsc --target es2020 -lib es2020 --module commonjs --skipLibCheck --moduleResolution node --declaration --outDir dist src/webpack-loader.ts && mv dist/webpack-loader.js dist/webpack-loader.cjs",
|
|
133
141
|
"preprepare": "./scripts/install-vscode",
|
|
134
142
|
"lint": "eslint --ext ts src",
|
|
135
143
|
"generate-types": "tsc --project tsconfig.types.json && rollup --config rollup/rollup.types.config.ts --configPlugin 'typescript={tsconfig: `tsconfig.rollup.json`}' && rm -rf ./dist/types",
|
|
@@ -172,6 +180,7 @@
|
|
|
172
180
|
"semver": "^7.3.8",
|
|
173
181
|
"ts-node": "^10.9.1",
|
|
174
182
|
"typescript": "^4.9.5",
|
|
183
|
+
"webpack": "^5.75.0",
|
|
175
184
|
"zx": "^7.1.1"
|
|
176
185
|
},
|
|
177
186
|
"dependencies": {},
|
|
@@ -186,7 +195,7 @@
|
|
|
186
195
|
}
|
|
187
196
|
},
|
|
188
197
|
"volta": {
|
|
189
|
-
"node": "
|
|
190
|
-
"npm": "
|
|
198
|
+
"node": "18.13.0",
|
|
199
|
+
"npm": "9.4.1"
|
|
191
200
|
}
|
|
192
201
|
}
|