@lwc/ssr-compiler
Advanced tools
Comparing version 8.12.0 to 8.12.1
@@ -0,4 +1,5 @@ | ||
import type { ComponentTransformOptions } from '../shared'; | ||
import type { CompilationMode } from '@lwc/shared'; | ||
export default function compileJS(src: string, filename: string, tagName: string, compilationMode: CompilationMode): { | ||
export default function compileJS(src: string, filename: string, tagName: string, options: ComponentTransformOptions, compilationMode: CompilationMode): { | ||
code: string; | ||
}; |
@@ -0,1 +1,3 @@ | ||
import type { ImportManager } from '../imports'; | ||
import type { ComponentTransformOptions } from '../shared'; | ||
import type { traverse } from 'estree-toolkit'; | ||
@@ -25,2 +27,4 @@ import type { Identifier, MemberExpression, MethodDefinition, Node, ObjectExpression, PropertyDefinition } from 'estree'; | ||
wireAdapters: WireAdapter[]; | ||
experimentalDynamicComponent: ComponentTransformOptions['experimentalDynamicComponent']; | ||
importManager: ImportManager; | ||
} |
import type { TransformerContext } from './types'; | ||
import type { Attribute as IrAttribute, Node as IrNode, Property as IrProperty } from '@lwc/template-compiler'; | ||
import type { Expression as EsExpression, ObjectExpression as EsObjectExpression, Statement as EsStatement } from 'estree'; | ||
import type { ComplexExpression as IrComplexExpression, Expression as IrExpression, Literal as IrLiteral } from '@lwc/template-compiler'; | ||
export declare function optimizeAdjacentYieldStmts(statements: EsStatement[]): EsStatement[]; | ||
@@ -17,1 +18,6 @@ export declare function bAttributeValue(node: IrNode, attrName: string): EsExpression; | ||
export declare function getChildAttrsOrProps(attrs: (IrAttribute | IrProperty)[], cxt: TransformerContext): EsObjectExpression; | ||
/** | ||
* Determine if the provided node is of type Literal | ||
* @param node | ||
*/ | ||
export declare function isLiteral(node: IrLiteral | IrExpression | IrComplexExpression): node is IrLiteral; |
@@ -11,2 +11,3 @@ import type { Node as IrNode } from '@lwc/template-compiler'; | ||
nextSibling?: IrNode; | ||
isSlotted?: boolean; | ||
import: (imports: string | string[] | Record<string, string | undefined>, source?: string) => void; | ||
@@ -13,0 +14,0 @@ } |
import { type CompilationMode } from '@lwc/shared'; | ||
import type { TransformOptions } from './shared'; | ||
import type { ComponentTransformOptions, TemplateTransformOptions } from './shared'; | ||
export interface CompilationResult { | ||
@@ -7,3 +7,3 @@ code: string; | ||
} | ||
export declare function compileComponentForSSR(src: string, filename: string, options: TransformOptions, mode?: CompilationMode): CompilationResult; | ||
export declare function compileTemplateForSSR(src: string, filename: string, options: TransformOptions, mode?: CompilationMode): CompilationResult; | ||
export declare function compileComponentForSSR(src: string, filename: string, options: ComponentTransformOptions, mode?: CompilationMode): CompilationResult; | ||
export declare function compileTemplateForSSR(src: string, filename: string, options: TemplateTransformOptions, mode?: CompilationMode): CompilationResult; |
@@ -0,1 +1,2 @@ | ||
import type { LwcBabelPluginOptions } from '@lwc/babel-plugin-component'; | ||
import type { Config as TemplateCompilerConfig } from '@lwc/template-compiler'; | ||
@@ -33,2 +34,5 @@ export type Expression = string; | ||
} | ||
export type TransformOptions = Pick<TemplateCompilerConfig, 'name' | 'namespace'>; | ||
export type TemplateTransformOptions = Pick<TemplateCompilerConfig, 'name' | 'namespace'>; | ||
export type ComponentTransformOptions = Pick<LwcBabelPluginOptions, 'name' | 'namespace'> & { | ||
experimentalDynamicComponent?: LwcBabelPluginOptions['dynamicImports']; | ||
}; |
@@ -7,3 +7,3 @@ { | ||
"name": "@lwc/ssr-compiler", | ||
"version": "8.12.0", | ||
"version": "8.12.1", | ||
"description": "Compile component for use during server-side rendering", | ||
@@ -51,6 +51,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@babel/types": "7.26.0", | ||
"@lwc/shared": "8.12.0", | ||
"@lwc/errors": "8.12.0", | ||
"@lwc/template-compiler": "8.12.0", | ||
"@babel/types": "7.26.3", | ||
"@lwc/shared": "8.12.1", | ||
"@lwc/errors": "8.12.1", | ||
"@lwc/template-compiler": "8.12.1", | ||
"acorn": "8.14.0", | ||
@@ -63,4 +63,5 @@ "astring": "^1.9.0", | ||
"devDependencies": { | ||
"@lwc/babel-plugin-component": "8.12.1", | ||
"@types/estree": "^1.0.6" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
364995
42
4588
2
+ Added@babel/types@7.26.3(transitive)
+ Added@lwc/errors@8.12.1(transitive)
+ Added@lwc/shared@8.12.1(transitive)
+ Added@lwc/template-compiler@8.12.1(transitive)
- Removed@babel/types@7.26.0(transitive)
- Removed@lwc/errors@8.12.0(transitive)
- Removed@lwc/shared@8.12.0(transitive)
- Removed@lwc/template-compiler@8.12.0(transitive)
Updated@babel/types@7.26.3
Updated@lwc/errors@8.12.1
Updated@lwc/shared@8.12.1