mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
Merge remote-tracking branch 'origin/master' into pr/Javey/34
This commit is contained in:
commit
bb70a4ba02
13 changed files with 31099 additions and 23791 deletions
|
|
@ -20,6 +20,7 @@ This npm module is bundled and distributed in the [monaco-editor](https://www.np
|
||||||
* `git clone https://github.com/Microsoft/monaco-typescript`
|
* `git clone https://github.com/Microsoft/monaco-typescript`
|
||||||
* `cd monaco-typescript`
|
* `cd monaco-typescript`
|
||||||
* `npm install .`
|
* `npm install .`
|
||||||
|
* `npm run compile`
|
||||||
* `npm run watch`
|
* `npm run watch`
|
||||||
* open `$/monaco-typescript/test/index.html` in your favorite browser.
|
* open `$/monaco-typescript/test/index.html` in your favorite browser.
|
||||||
|
|
||||||
|
|
|
||||||
8
package-lock.json
generated
8
package-lock.json
generated
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "monaco-typescript",
|
"name": "monaco-typescript",
|
||||||
"version": "3.4.1",
|
"version": "3.5.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
@ -52,9 +52,9 @@
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"typescript": {
|
"typescript": {
|
||||||
"version": "3.3.3333",
|
"version": "3.5.1",
|
||||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.3.3333.tgz",
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.1.tgz",
|
||||||
"integrity": "sha512-JjSKsAfuHBE/fB2oZ8NxtRTk5iGcg6hkYXMnZ3Wc+b2RSqejEqTaem11mHASMnFilHrax3sLK0GDzcJrekZYLw==",
|
"integrity": "sha512-64HkdiRv1yYZsSe4xC1WVgamNigVYjlssIoaH2HcZF0+ijsk5YK2g0G34w9wJkze8+5ow4STd22AynfO6ZYYLw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"uglify-js": {
|
"uglify-js": {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "monaco-typescript",
|
"name": "monaco-typescript",
|
||||||
"version": "3.4.1",
|
"version": "3.5.0",
|
||||||
"description": "TypeScript and JavaScript language support for Monaco Editor",
|
"description": "TypeScript and JavaScript language support for Monaco Editor",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"compile-amd": "mcopy ./src/lib/typescriptServices-amd.js ./release/dev/lib/typescriptServices.js && tsc -p ./src/tsconfig.json",
|
"compile-amd": "mcopy ./src/lib/typescriptServices-amd.js ./release/dev/lib/typescriptServices.js && tsc -p ./src/tsconfig.json",
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
"monaco-languages": "^1.7.0",
|
"monaco-languages": "^1.7.0",
|
||||||
"monaco-plugin-helpers": "^1.0.2",
|
"monaco-plugin-helpers": "^1.0.2",
|
||||||
"requirejs": "^2.3.6",
|
"requirejs": "^2.3.6",
|
||||||
"typescript": "^3.3.3333",
|
"typescript": "^3.5.1",
|
||||||
"uglify-js": "^3.4.9"
|
"uglify-js": "^3.4.9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
const child_process = require('child_process');
|
||||||
|
|
||||||
const TYPESCRIPT_LIB_SOURCE = path.join(__dirname, '../node_modules/typescript/lib');
|
const TYPESCRIPT_LIB_SOURCE = path.join(__dirname, '../node_modules/typescript/lib');
|
||||||
const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
||||||
|
|
@ -17,6 +18,14 @@ const TYPESCRIPT_LIB_DESTINATION = path.join(__dirname, '../src/lib');
|
||||||
}
|
}
|
||||||
importLibs();
|
importLibs();
|
||||||
|
|
||||||
|
const npmLsOutput = JSON.parse(child_process.execSync("npm ls typescript --depth=0 --json=true").toString());
|
||||||
|
const typeScriptDependencyVersion = npmLsOutput.dependencies.typescript.version;
|
||||||
|
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(TYPESCRIPT_LIB_DESTINATION, 'typescriptServicesMetadata.ts'),
|
||||||
|
`export const typescriptVersion = "${typeScriptDependencyVersion}";\n`
|
||||||
|
);
|
||||||
|
|
||||||
var tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescriptServices.js')).toString();
|
var tsServices = fs.readFileSync(path.join(TYPESCRIPT_LIB_SOURCE, 'typescriptServices.js')).toString();
|
||||||
|
|
||||||
// Ensure we never run into the node system...
|
// Ensure we never run into the node system...
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
739
src/lib/typescriptServices.d.ts
vendored
739
src/lib/typescriptServices.d.ts
vendored
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
1
src/lib/typescriptServicesMetadata.ts
Normal file
1
src/lib/typescriptServicesMetadata.ts
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
export const typescriptVersion = "3.5.1";
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
import * as mode from './tsMode';
|
import * as mode from './tsMode';
|
||||||
|
import { typescriptVersion } from './lib/typescriptServicesMetadata'; // do not import the whole typescriptServices here
|
||||||
|
|
||||||
import Emitter = monaco.Emitter;
|
import Emitter = monaco.Emitter;
|
||||||
import IEvent = monaco.IEvent;
|
import IEvent = monaco.IEvent;
|
||||||
|
|
@ -204,6 +205,7 @@ function createAPI(): typeof monaco.languages.typescript {
|
||||||
NewLineKind: NewLineKind,
|
NewLineKind: NewLineKind,
|
||||||
ScriptTarget: ScriptTarget,
|
ScriptTarget: ScriptTarget,
|
||||||
ModuleResolutionKind: ModuleResolutionKind,
|
ModuleResolutionKind: ModuleResolutionKind,
|
||||||
|
typescriptVersion,
|
||||||
typescriptDefaults: typescriptDefaults,
|
typescriptDefaults: typescriptDefaults,
|
||||||
javascriptDefaults: javascriptDefaults,
|
javascriptDefaults: javascriptDefaults,
|
||||||
getTypeScriptWorker: getTypeScriptWorker,
|
getTypeScriptWorker: getTypeScriptWorker,
|
||||||
|
|
|
||||||
2
src/monaco.d.ts
vendored
2
src/monaco.d.ts
vendored
|
|
@ -166,6 +166,8 @@ declare module monaco.languages.typescript {
|
||||||
setEagerModelSync(value: boolean): void;
|
setEagerModelSync(value: boolean): void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export var typescriptVersion: string;
|
||||||
|
|
||||||
export var typescriptDefaults: LanguageServiceDefaults;
|
export var typescriptDefaults: LanguageServiceDefaults;
|
||||||
export var javascriptDefaults: LanguageServiceDefaults;
|
export var javascriptDefaults: LanguageServiceDefaults;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
"dom",
|
"dom",
|
||||||
"es5",
|
"es5",
|
||||||
"es2015.collection",
|
"es2015.collection",
|
||||||
|
"es2015.iterable",
|
||||||
"es2015.promise"
|
"es2015.promise"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
"dom",
|
"dom",
|
||||||
"es5",
|
"es5",
|
||||||
"es2015.collection",
|
"es2015.collection",
|
||||||
|
"es2015.iterable",
|
||||||
"es2015.promise"
|
"es2015.promise"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue