@xaendar/vscode-client 0.9.29 → 0.9.31
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/package.json +1 -1
- package/server/server.cjs +11 -15
- package/server/server.cjs.map +1 -1
package/package.json
CHANGED
package/server/server.cjs
CHANGED
|
@@ -228271,12 +228271,16 @@ function resolveExpression(expression, compilerContext, options) {
|
|
|
228271
228271
|
function emitNode(node, parent, compilerContext, options) {
|
|
228272
228272
|
if ((0, import_typescript3.isIdentifier)(node) && needsResolution(node, parent)) {
|
|
228273
228273
|
const text = node.text;
|
|
228274
|
+
if (options.skipResolution) {
|
|
228275
|
+
return { expression: text };
|
|
228276
|
+
}
|
|
228274
228277
|
if (compilerContext.hasUnresolvableIdentifier(text)) {
|
|
228275
228278
|
return { expression: text, reactive: compilerContext.getUnresolvableIdentifierKind(text) === "signal" };
|
|
228276
228279
|
}
|
|
228277
|
-
|
|
228278
|
-
|
|
228279
|
-
|
|
228280
|
+
if (compilerContext.hasIdentifier(text)) {
|
|
228281
|
+
const kind = compilerContext.getIdentifierKind(text);
|
|
228282
|
+
const access = `context.get('${text}')`;
|
|
228283
|
+
return kind === "signal" ? { expression: `${access}()`, reactive: true } : { expression: access, reactive: false };
|
|
228280
228284
|
}
|
|
228281
228285
|
if (options.resolver) {
|
|
228282
228286
|
return { expression: `${options.resolver}.${text}` };
|
|
@@ -228296,14 +228300,6 @@ function emitNode(node, parent, compilerContext, options) {
|
|
|
228296
228300
|
});
|
|
228297
228301
|
return { expression: `${result.expression}${slice(sourceText, lastEnd, node.getEnd())}`, reactive: result.reactive };
|
|
228298
228302
|
}
|
|
228299
|
-
function resolveIdentifierAccess(text, compilerContext) {
|
|
228300
|
-
if (compilerContext.hasIdentifier(text)) {
|
|
228301
|
-
const kind = compilerContext.getIdentifierKind(text);
|
|
228302
|
-
const access = `context.get('${text}')`;
|
|
228303
|
-
return kind === "signal" ? { expression: `${access}()`, reactive: true } : { expression: access, reactive: false };
|
|
228304
|
-
}
|
|
228305
|
-
return void 0;
|
|
228306
|
-
}
|
|
228307
228303
|
function containsResolvableIdentifier(node, parent) {
|
|
228308
228304
|
if ((0, import_typescript3.isIdentifier)(node) && needsResolution(node, parent)) {
|
|
228309
228305
|
return true;
|
|
@@ -228335,7 +228331,7 @@ function getIdentifier(prefix, parentNode, index) {
|
|
|
228335
228331
|
function mapDefaultOptions(options) {
|
|
228336
228332
|
return {
|
|
228337
228333
|
resolver: options?.resolver ?? "this",
|
|
228338
|
-
|
|
228334
|
+
skipResolution: options?.skipResolution ?? false
|
|
228339
228335
|
};
|
|
228340
228336
|
}
|
|
228341
228337
|
|
|
@@ -228466,7 +228462,7 @@ function generateFor(node, parentNode, index, compilerContext) {
|
|
|
228466
228462
|
const evenName = resolveImplicit(node, "$even");
|
|
228467
228463
|
const oddName = resolveImplicit(node, "$odd");
|
|
228468
228464
|
const forContext = new CompilerContext(compilerContext);
|
|
228469
|
-
forContext.
|
|
228465
|
+
forContext.addIdentifier(node.itemAlias);
|
|
228470
228466
|
const identifiers = [indexName, firstName, lastName, evenName, oddName];
|
|
228471
228467
|
for (let i2 = 0; i2 < identifiers.length; i2++) {
|
|
228472
228468
|
forContext.addUnresolvableIdentifier(identifiers[i2], "signal");
|
|
@@ -228490,7 +228486,7 @@ function generateFor(node, parentNode, index, compilerContext) {
|
|
|
228490
228486
|
},
|
|
228491
228487
|
args: [forKey, "parentContext", itemsName, counterName, "anchor"]
|
|
228492
228488
|
});
|
|
228493
|
-
retVal.code.push(`_for(${parentNode}, context, () => ${iterableExpr}, ${node.itemAlias} => ${resolveExpression(node.trackExpression, forContext).expression}, this.${forKey}.bind(this));`);
|
|
228489
|
+
retVal.code.push(`_for(${parentNode}, context, () => ${iterableExpr}, (${node.itemAlias}, ${indexName}) => ${resolveExpression(node.trackExpression, forContext, { skipResolution: true }).expression}, this.${forKey}.bind(this));`);
|
|
228494
228490
|
return retVal;
|
|
228495
228491
|
}
|
|
228496
228492
|
function resolveImplicit(node, implicit) {
|
|
@@ -228630,7 +228626,7 @@ var Generator = class {
|
|
|
228630
228626
|
this._nodeToProcess.clear();
|
|
228631
228627
|
const compilerContext = new CompilerContext();
|
|
228632
228628
|
for (let i2 = 0; i2 < signals.length; i2++) {
|
|
228633
|
-
compilerContext.addUnresolvableIdentifier(signals[i2]
|
|
228629
|
+
compilerContext.addUnresolvableIdentifier(`this.${signals[i2]}`, "signal");
|
|
228634
228630
|
}
|
|
228635
228631
|
const generatedCode = [
|
|
228636
228632
|
"_render() {",
|