Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

liquidjs

Package Overview
Dependencies
Maintainers
1
Versions
208
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 10.7.1 to 10.8.0

dist/src/tokens/filtered-value-token.d.ts

2

dist/src/filters/array.d.ts

@@ -13,4 +13,6 @@ import { FilterImpl } from '../template';

export declare function concat<T1, T2>(v: T1[], arg?: T2[]): (T1 | T2)[];
export declare function push<T>(v: T[], arg: T): T[];
export declare function slice<T>(v: T[] | string, begin: number, length?: number): T[] | string;
export declare function where<T extends object>(this: FilterImpl, arr: T[], property: string, expected?: any): IterableIterator<unknown>;
export declare function uniq<T>(arr: T[]): T[];
export declare function sample<T>(v: T[] | string, count?: number | undefined): (T | string)[];

@@ -14,3 +14,4 @@ export declare enum TokenKind {

Operator = 2048,
FilteredValue = 4096,
Delimited = 12
}

11

dist/src/parser/tokenizer.d.ts

@@ -1,2 +0,2 @@

import { TagToken, HTMLToken, HashToken, QuotedToken, LiquidTagToken, OutputToken, ValueToken, Token, RangeToken, FilterToken, TopLevelToken, OperatorToken, IdentifierToken } from '../tokens';
import { FilteredValueToken, TagToken, HTMLToken, HashToken, QuotedToken, LiquidTagToken, OutputToken, ValueToken, Token, RangeToken, FilterToken, TopLevelToken, OperatorToken, IdentifierToken } from '../tokens';
import { TokenizationError } from '../util';

@@ -9,2 +9,3 @@ import { Operators, Expression } from '../render';

file?: string | undefined;
private range?;
p: number;

@@ -14,6 +15,7 @@ N: number;

private opTrie;
constructor(input: string, operators?: Operators, file?: string | undefined);
constructor(input: string, operators?: Operators, file?: string | undefined, range?: [number, number] | undefined);
readExpression(): Expression;
readExpressionTokens(): IterableIterator<Token>;
readOperator(): OperatorToken | undefined;
readFilteredValue(): FilteredValueToken;
readFilters(): FilterToken[];

@@ -30,4 +32,5 @@ readFilter(): FilterToken | null;

readLiquidTagTokens(options?: NormalizedFullOptions): LiquidTagToken[];
readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken;
mkError(msg: string, begin: number): TokenizationError;
readLiquidTagToken(options: NormalizedFullOptions): LiquidTagToken | undefined;
error(msg: string, pos?: number): TokenizationError;
assert(pred: unknown, msg: string | (() => string), pos?: number): void;
snapshot(begin?: number): string;

@@ -34,0 +37,0 @@ /**

@@ -7,4 +7,5 @@ import { Token, QuotedToken } from '../tokens';

evaluate(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
valid(): boolean;
}
export declare function evalToken(token: Token | undefined, ctx: Context, lenient?: boolean): IterableIterator<unknown>;
export declare function evalQuotedToken(token: QuotedToken): string;

@@ -7,2 +7,3 @@ import { Liquid, Tag, Template, Context, TagToken, TopLevelToken } from '..';

render(ctx: Context): Generator<unknown, void, string>;
private readVariableName;
}

@@ -5,4 +5,4 @@ import { TopLevelToken, Liquid, Emitter, TagToken, Context, Tag } from '..';

private group?;
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
}
import { Liquid, TopLevelToken, Emitter, TagToken, Context, Tag } from '..';
export default class extends Tag {
private value;
private value?;
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
}
import { TemplateImpl } from './template-impl';
import type { Emitter } from '../emitters/emitter';
import type { Tokenizer } from '../parser';
import type { Context } from '../context/context';

@@ -11,2 +12,3 @@ import type { TopLevelToken, TagToken } from '../tokens';

liquid: Liquid;
protected tokenizer: Tokenizer;
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);

@@ -13,0 +15,0 @@ abstract render(ctx: Context, emitter: Emitter): TagRenderReturn;

import { Filter } from './filter';
import { Expression } from '../render';
import type { FilteredValueToken } from '../tokens';
import type { Liquid } from '../liquid';

@@ -11,5 +12,5 @@ import type { Context } from '../context';

*/
constructor(str: string, liquid: Liquid);
constructor(input: string | FilteredValueToken, liquid: Liquid);
value(ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown>;
private getFilter;
}

@@ -6,4 +6,5 @@ import { Token } from './token';

trimRight: boolean;
content: string;
constructor(kind: TokenKind, content: string, input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: string);
contentRange: [number, number];
constructor(kind: TokenKind, [contentBegin, contentEnd]: [number, number], input: string, begin: number, end: number, trimLeft: boolean, trimRight: boolean, file?: string);
get content(): string;
}

@@ -18,1 +18,2 @@ export * from './top-level-token';

export * from './delimited-token';
export * from './filtered-value-token';
import { DelimitedToken } from './delimited-token';
import { NormalizedFullOptions } from '../liquid-options';
import { Tokenizer } from '../parser';
/**
* LiquidTagToken is different from TagToken by not having delimiters `{%` or `%}`
*/
export declare class LiquidTagToken extends DelimitedToken {
name: string;
args: string;
tokenizer: Tokenizer;
constructor(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: string);
}
import { DelimitedToken } from './delimited-token';
import { Tokenizer } from '../parser';
import type { NormalizedFullOptions } from '../liquid-options';
export declare class TagToken extends DelimitedToken {
name: string;
args: string;
tokenizer: Tokenizer;
constructor(input: string, begin: number, end: number, options: NormalizedFullOptions, file?: string);
get args(): string;
}

@@ -6,4 +6,5 @@ import { Token } from '../tokens/token';

context: string;
private originalError;
constructor(err: Error, token: Token);
private originalError?;
constructor(err: Error | string, token: Token);
private defineUnEnumerable;
protected update(): void;

@@ -10,0 +11,0 @@ }

{
"name": "liquidjs",
"version": "10.7.1",
"version": "10.8.0",
"description": "A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript.",

@@ -27,2 +27,3 @@ "main": "dist/liquid.node.cjs.js",

"build:dist": "rollup -c rollup.config.mjs",
"build:cjs": "BUNDLES=cjs rollup -c rollup.config.mjs",
"build:docs": "bin/build-docs.sh"

@@ -29,0 +30,0 @@ },

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc