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

liquidjs

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidjs - npm Package Compare versions

Comparing version

to
10.3.3

7

CHANGELOG.md

@@ -0,1 +1,8 @@

## [10.3.3](https://github.com/harttle/liquidjs/compare/v10.3.2...v10.3.3) (2022-12-18)
### Bug Fixes
* type compatible with v9 tag definition, support `Context` as scope in various render APIs, [#570](https://github.com/harttle/liquidjs/issues/570) ([fb6a9f8](https://github.com/harttle/liquidjs/commit/fb6a9f8717cd57522d53687da7e4718b28a7f68a))
## [10.3.2](https://github.com/harttle/liquidjs/compare/v10.3.1...v10.3.2) (2022-12-13)

@@ -2,0 +9,0 @@

5

dist/liquid-options.d.ts
import { LiquidCache } from './cache';
import { FS } from './fs/fs';
import { FS, LookupType } from './fs';
import { Operators } from './render';

@@ -86,2 +86,5 @@ declare type OutputEscape = (value: any) => string;

}
export interface RenderFileOptions extends RenderOptions {
lookupType?: LookupType;
}
interface NormalizedOptions extends LiquidOptions {

@@ -88,0 +91,0 @@ root?: string[];

21

dist/liquid.d.ts
/// <reference types="node" />
import { Context } from './context';
import { TagClass, TagImplOptions, FilterImplOptions, Template } from './template';
import { LookupType } from './fs/loader';
import { Render } from './render';
import { Parser } from './parser';
import { LiquidOptions, NormalizedFullOptions, RenderOptions } from './liquid-options';
import { LiquidOptions, NormalizedFullOptions, RenderOptions, RenderFileOptions } from './liquid-options';
export declare class Liquid {

@@ -15,15 +16,17 @@ readonly options: NormalizedFullOptions;

parse(html: string, filepath?: string): Template[];
_render(tpl: Template[], scope: object | undefined, renderOptions: RenderOptions): IterableIterator<any>;
_render(tpl: Template[], scope: Context | object | undefined, renderOptions: RenderOptions): IterableIterator<any>;
render(tpl: Template[], scope?: object, renderOptions?: RenderOptions): Promise<any>;
renderSync(tpl: Template[], scope?: object, renderOptions?: RenderOptions): any;
renderToNodeStream(tpl: Template[], scope?: object, renderOptions?: RenderOptions): NodeJS.ReadableStream;
_parseAndRender(html: string, scope: object | undefined, renderOptions: RenderOptions): IterableIterator<any>;
parseAndRender(html: string, scope?: object, renderOptions?: RenderOptions): Promise<any>;
parseAndRenderSync(html: string, scope?: object, renderOptions?: RenderOptions): any;
_parseAndRender(html: string, scope: Context | object | undefined, renderOptions: RenderOptions): IterableIterator<any>;
parseAndRender(html: string, scope?: Context | object, renderOptions?: RenderOptions): Promise<any>;
parseAndRenderSync(html: string, scope?: Context | object, renderOptions?: RenderOptions): any;
_parsePartialFile(file: string, sync?: boolean, currentFile?: string): Generator<unknown, Template[], string | Template[]>;
_parseLayoutFile(file: string, sync?: boolean, currentFile?: string): Generator<unknown, Template[], string | Template[]>;
parseFile(file: string): Promise<Template[]>;
parseFileSync(file: string): Template[];
renderFile(file: string, ctx?: object, renderOptions?: RenderOptions): Promise<any>;
renderFileSync(file: string, ctx?: object, renderOptions?: RenderOptions): any;
_parseFile(file: string, sync?: boolean, lookupType?: LookupType, currentFile?: string): Generator<unknown, Template[]>;
parseFile(file: string, lookupType?: LookupType): Promise<Template[]>;
parseFileSync(file: string, lookupType?: LookupType): Template[];
_renderFile(file: string, ctx: Context | object | undefined, renderFileOptions: RenderFileOptions): Generator<any>;
renderFile(file: string, ctx?: Context | object, renderFileOptions?: RenderFileOptions): Promise<any>;
renderFileSync(file: string, ctx?: Context | object, renderFileOptions?: RenderFileOptions): any;
renderFileToNodeStream(file: string, scope?: object, renderOptions?: RenderOptions): Promise<NodeJS.ReadableStream>;

@@ -30,0 +33,0 @@ _evalValue(str: string, scope?: object | Context): IterableIterator<any>;

@@ -6,5 +6,6 @@ import { Tag, TagClass, TagRenderReturn } from './tag';

export interface TagImplOptions {
parse?: (this: Tag, token: TagToken, remainingTokens: TopLevelToken[]) => void;
render: (this: Tag, ctx: Context, emitter: Emitter, hash: Record<string, any>) => TagRenderReturn;
[key: string]: any;
parse?: (this: Tag & TagImplOptions, token: TagToken, remainingTokens: TopLevelToken[]) => void;
render: (this: Tag & TagImplOptions, ctx: Context, emitter: Emitter, hash: Record<string, any>) => TagRenderReturn;
}
export declare function createTagClass(options: TagImplOptions): TagClass;
{
"name": "liquidjs",
"version": "10.3.2",
"version": "10.3.3",
"description": "A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript.",

@@ -5,0 +5,0 @@ "main": "dist/liquid.node.cjs.js",

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

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

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

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