mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 05:50:11 +01:00
Adopt latest deps
This commit is contained in:
parent
1c57ad0197
commit
994b5d31e9
3 changed files with 26 additions and 7 deletions
25
gulpfile.js
25
gulpfile.js
|
|
@ -101,6 +101,17 @@ function pluginStream(plugin, type, destinationPath) {
|
|||
pluginPath + '/**/*',
|
||||
'!' + contribPath
|
||||
])
|
||||
.pipe(es.through(function(data) {
|
||||
if (!/_\.contribution/.test(data.path)) {
|
||||
this.emit('data', data);
|
||||
return;
|
||||
}
|
||||
|
||||
let contents = data.contents.toString();
|
||||
contents = contents.replace('define(["require", "exports"],', 'define(["require", "exports", "vs/editor/editor.api"],');
|
||||
data.contents = new Buffer(contents);
|
||||
this.emit('data', data);
|
||||
}))
|
||||
.pipe(gulp.dest(destinationPath + plugin.modulePrefix))
|
||||
);
|
||||
}
|
||||
|
|
@ -155,8 +166,11 @@ function addPluginContribs(type) {
|
|||
|
||||
var contribDefineIndex = contribContents.indexOf('define("' + plugin.contrib);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(1) CANNOT DETERMINE AMD define location for contribution', pluginPath);
|
||||
process.exit(-1);
|
||||
contribDefineIndex = contribContents.indexOf('define(\'' + plugin.contrib);
|
||||
if (contribDefineIndex === -1) {
|
||||
console.error('(1) CANNOT DETERMINE AMD define location for contribution', pluginPath);
|
||||
process.exit(-1);
|
||||
}
|
||||
}
|
||||
|
||||
var depsEndIndex = contribContents.indexOf(']', contribDefineIndex);
|
||||
|
|
@ -167,6 +181,11 @@ function addPluginContribs(type) {
|
|||
|
||||
contribContents = contribContents.substring(0, depsEndIndex) + ',"vs/editor/editor.api"' + contribContents.substring(depsEndIndex);
|
||||
|
||||
contribContents = contribContents.replace(
|
||||
'define("vs/basic-languages/_.contribution",["require","exports"],',
|
||||
'define("vs/basic-languages/_.contribution",["require","exports","vs/editor/editor.api"],',
|
||||
);
|
||||
|
||||
extraContent.push(contribContents);
|
||||
});
|
||||
|
||||
|
|
@ -232,7 +251,7 @@ function ESM_pluginStream(plugin, destinationPath) {
|
|||
if (!/(^\.\/)|(^\.\.\/)/.test(importText)) {
|
||||
// non-relative import
|
||||
if (!/^monaco-editor-core/.test(importText)) {
|
||||
console.error(`Non-relative import for unknown module: ${importText}`);
|
||||
console.error(`Non-relative import for unknown module: ${importText} in ${data.path}`);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
|
|
|
|||
6
package-lock.json
generated
6
package-lock.json
generated
|
|
@ -2395,9 +2395,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"monaco-languages": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.0.1.tgz",
|
||||
"integrity": "sha512-s1/fMbR3DM04wCxlL03ZFe6aMFrnTusLoIz/rNNGdPYceAyBM7NXt62c6wm3wsBlo4/M698dWRj1p7FEgGdiRg==",
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/monaco-languages/-/monaco-languages-1.0.2.tgz",
|
||||
"integrity": "sha512-xQEdlbw7nEQoopkPwQTHx3EFPflTrYOqxhY4gGFunbnjY5pIsqROH5/THALSYf3ZWXAZ3vlMxp/lS4eegTdowA==",
|
||||
"dev": true
|
||||
},
|
||||
"monaco-typescript": {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
"monaco-editor-core": "0.11.3",
|
||||
"monaco-html": "2.0.2",
|
||||
"monaco-json": "2.0.1",
|
||||
"monaco-languages": "1.0.1",
|
||||
"monaco-languages": "1.0.2",
|
||||
"monaco-typescript": "3.0.0",
|
||||
"rimraf": "^2.5.2",
|
||||
"typedoc": "^0.8.0",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue