🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@lwc/ssr-compiler

Package Overview
Dependencies
Maintainers
14
Versions
101
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/ssr-compiler - npm Package Compare versions

Comparing version

to
8.20.0

1

dist/compile-template/ir-to-es.d.ts

@@ -10,3 +10,4 @@ import type { ChildNode as IrChildNode, Node as IrNode } from '@lwc/template-compiler';

statements: EsStatement[];
cxt: TransformerContext;
};
//# sourceMappingURL=ir-to-es.d.ts.map
import type { Node as IrNode } from '@lwc/template-compiler';
import type { Statement as EsStatement } from 'estree';
export type Transformer<T extends IrNode = IrNode> = (node: T, cxt: TransformerContext) => EsStatement[];
export interface SlotMetadataContext {
shadow: {
isDuplicate: (uniqueNodeId: string) => boolean;
register: (uniqueNodeId: string, kebabCmpName: string) => string;
getFnName: (uniqueNodeId: string) => string | null;
};
}
export interface TransformerContext {

@@ -8,2 +15,3 @@ pushLocalVars: (vars: string[]) => void;

isLocalVar: (varName: string | null | undefined) => boolean;
getLocalVars: () => string[];
templateOptions: TemplateOpts;

@@ -13,2 +21,11 @@ siblings: IrNode[] | undefined;

isSlotted?: boolean;
hoistedStatements: {
module: EsStatement[];
templateFn: EsStatement[];
};
hoist: {
module: (stmt: EsStatement, optionalDedupeKey?: unknown) => void;
templateFn: (stmt: EsStatement, optionalDedupeKey?: unknown) => void;
};
slots: SlotMetadataContext;
import: (imports: string | string[] | Record<string, string | undefined>, source?: string) => void;

@@ -15,0 +32,0 @@ }

30

dist/shared.d.ts
import type { LwcBabelPluginOptions } from '@lwc/babel-plugin-component';
import type { Config as TemplateCompilerConfig } from '@lwc/template-compiler';
export type Expression = string;
export type Instruction = IEmitTagName | IEmitStaticString | IEmitExpression | IStartConditional | IEndConditional | IInvokeConnectedCallback | IRenderChild | IHoistImport | IHoistInstantiation;
export interface IEmitTagName {
kind: 'emitTagName';
}
export interface IEmitStaticString {
kind: 'emitStaticString';
}
export interface IEmitExpression {
kind: 'emitExpression';
expression: Expression;
}
export interface IStartConditional {
kind: 'startConditional';
}
export interface IEndConditional {
kind: 'endConditional';
}
export interface IInvokeConnectedCallback {
kind: 'invokeConnectedCallback';
}
export interface IRenderChild {
kind: 'renderChild';
dynamic: Expression | null;
}
export interface IHoistImport {
kind: 'hoistImport';
}
export interface IHoistInstantiation {
kind: 'hoistInstantiation';
}
export type TemplateTransformOptions = Pick<TemplateCompilerConfig, 'name' | 'namespace'>;

@@ -35,0 +5,0 @@ export type ComponentTransformOptions = Partial<Pick<LwcBabelPluginOptions, 'name' | 'namespace'>> & {

@@ -7,3 +7,3 @@ {

"name": "@lwc/ssr-compiler",
"version": "8.19.1",
"version": "8.20.0",
"description": "Compile component for use during server-side rendering",

@@ -53,5 +53,5 @@ "keywords": [

"@babel/types": "7.27.0",
"@lwc/errors": "8.19.1",
"@lwc/shared": "8.19.1",
"@lwc/template-compiler": "8.19.1",
"@lwc/errors": "8.20.0",
"@lwc/shared": "8.20.0",
"@lwc/template-compiler": "8.20.0",
"acorn": "8.14.1",

@@ -64,5 +64,5 @@ "astring": "^1.9.0",

"devDependencies": {
"@lwc/babel-plugin-component": "8.19.1",
"@lwc/babel-plugin-component": "8.20.0",
"@types/estree": "^1.0.7"
}
}

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display