@volar/language-core 1.5.0-alpha.0 → 1.5.1
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/out/languageContext.js +14 -1
- package/package.json +3 -3
package/out/languageContext.js
CHANGED
|
@@ -7,7 +7,20 @@ const types_1 = require("./types");
|
|
|
7
7
|
function createLanguageContext(modules, host, languages) {
|
|
8
8
|
for (const language of languages.reverse()) {
|
|
9
9
|
if (language.resolveHost) {
|
|
10
|
-
|
|
10
|
+
const pastHost = host;
|
|
11
|
+
let proxyHost = language.resolveHost(host);
|
|
12
|
+
if (proxyHost === pastHost) {
|
|
13
|
+
console.warn(`[volar] language.resolveHost() should not return the same host instance.`);
|
|
14
|
+
proxyHost = { ...proxyHost };
|
|
15
|
+
}
|
|
16
|
+
host = new Proxy(proxyHost, {
|
|
17
|
+
get(target, p) {
|
|
18
|
+
if (p in target) {
|
|
19
|
+
return target[p];
|
|
20
|
+
}
|
|
21
|
+
return pastHost[p];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
11
24
|
}
|
|
12
25
|
}
|
|
13
26
|
let lastProjectVersion;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"directory": "packages/language-core"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/source-map": "1.5.
|
|
16
|
+
"@volar/source-map": "1.5.1"
|
|
17
17
|
},
|
|
18
|
-
"gitHead": "
|
|
18
|
+
"gitHead": "5f65e85adee6030451f15f1ebb5dae40b38e9e40"
|
|
19
19
|
}
|