@skeptools/skep-organization-project 0.0.15 → 0.0.16
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/.jsii +113 -3
- package/API.md +74 -43
- package/lib/skep-organization-project.js +1 -1
- package/node_modules/liquidjs/README.md +17 -10
- package/node_modules/liquidjs/dist/context/context.d.ts +7 -1
- package/node_modules/liquidjs/dist/drop/drop.d.ts +1 -1
- package/node_modules/liquidjs/dist/filters/array.d.ts +14 -14
- package/node_modules/liquidjs/dist/filters/html.d.ts +6 -5
- package/node_modules/liquidjs/dist/filters/math.d.ts +9 -9
- package/node_modules/liquidjs/dist/filters/string.d.ts +22 -21
- package/node_modules/liquidjs/dist/fs/map-fs.d.ts +13 -0
- package/node_modules/liquidjs/dist/fs/node-require.d.ts +1 -2
- package/node_modules/liquidjs/dist/index.d.ts +1 -1
- package/node_modules/liquidjs/dist/liquid-options.d.ts +28 -2
- package/node_modules/liquidjs/dist/liquid.browser.min.js +1 -1
- package/node_modules/liquidjs/dist/liquid.browser.min.js.map +1 -1
- package/node_modules/liquidjs/dist/{liquid.browser.esm.js → liquid.browser.mjs} +443 -227
- package/node_modules/liquidjs/dist/liquid.browser.umd.js +604 -368
- package/node_modules/liquidjs/dist/liquid.browser.umd.js.map +1 -1
- package/node_modules/liquidjs/dist/liquid.d.ts +3 -0
- package/node_modules/liquidjs/dist/{liquid.node.cjs.js → liquid.node.js} +432 -227
- package/node_modules/liquidjs/dist/{liquid.node.esm.js → liquid.node.mjs} +448 -228
- package/node_modules/liquidjs/dist/parser/parser.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/parser.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/parser/tokenizer.d.ts +4 -3
- package/node_modules/liquidjs/dist/tags/block.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/capture.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/case.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/for.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/if.d.ts +3 -2
- package/node_modules/liquidjs/dist/tags/include.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/layout.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/liquid.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/render.d.ts +3 -2
- package/node_modules/liquidjs/dist/tags/tablerow.d.ts +2 -1
- package/node_modules/liquidjs/dist/tags/unless.d.ts +2 -1
- package/node_modules/liquidjs/dist/template/filter-impl-options.d.ts +2 -0
- package/node_modules/liquidjs/dist/template/filter.d.ts +3 -1
- package/node_modules/liquidjs/dist/template/hash.d.ts +1 -1
- package/node_modules/liquidjs/dist/template/tag.d.ts +2 -2
- package/node_modules/liquidjs/dist/tokens/identifier-token.d.ts +0 -1
- package/node_modules/liquidjs/dist/util/assert.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/error.d.ts +7 -2
- package/node_modules/liquidjs/dist/util/error.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/index.d.ts +2 -1
- package/node_modules/liquidjs/dist/util/intl.d.ts +6 -0
- package/node_modules/liquidjs/dist/util/limiter.d.ts +8 -0
- package/node_modules/liquidjs/dist/util/liquid-date.d.ts +39 -7
- package/node_modules/liquidjs/dist/util/liquid-date.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/performance.d.ts +5 -0
- package/node_modules/liquidjs/dist/util/performance.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/type-guards.spec.d.ts +1 -0
- package/node_modules/liquidjs/dist/util/underscore.d.ts +2 -1
- package/node_modules/liquidjs/package.json +10 -7
- package/package.json +16 -12
- package/node_modules/liquidjs/dist/util/timezone-date.d.ts +0 -44
- /package/node_modules/liquidjs/dist/{util/timezone-date.spec.d.ts → fs/map-fs.spec.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -23,7 +23,7 @@ export declare class Tokenizer {
|
|
|
23
23
|
readTopLevelTokens(options?: NormalizedFullOptions): TopLevelToken[];
|
|
24
24
|
readTopLevelToken(options: NormalizedFullOptions): TopLevelToken;
|
|
25
25
|
readHTMLToken(stopStrings: string[]): HTMLToken;
|
|
26
|
-
readTagToken(options
|
|
26
|
+
readTagToken(options: NormalizedFullOptions): TagToken;
|
|
27
27
|
readToDelimiter(delimiter: string, respectQuoted?: boolean): number;
|
|
28
28
|
readOutputToken(options?: NormalizedFullOptions): OutputToken;
|
|
29
29
|
readEndrawOrRawContent(options: NormalizedFullOptions): HTMLToken | TagToken;
|
|
@@ -39,11 +39,12 @@ export declare class Tokenizer {
|
|
|
39
39
|
readIdentifier(): IdentifierToken;
|
|
40
40
|
readNonEmptyIdentifier(): IdentifierToken | undefined;
|
|
41
41
|
readTagName(): string;
|
|
42
|
-
readHashes(jekyllStyle?: boolean): HashToken[];
|
|
43
|
-
readHash(jekyllStyle?: boolean): HashToken | undefined;
|
|
42
|
+
readHashes(jekyllStyle?: boolean | string): HashToken[];
|
|
43
|
+
readHash(jekyllStyle?: boolean | string): HashToken | undefined;
|
|
44
44
|
remaining(): string;
|
|
45
45
|
advance(step?: number): void;
|
|
46
46
|
end(): boolean;
|
|
47
|
+
read(): string;
|
|
47
48
|
readTo(end: string): number;
|
|
48
49
|
readValue(): ValueToken | undefined;
|
|
49
50
|
readScopeValue(): ValueToken | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Liquid, TagToken, TopLevelToken, Template, Context, Emitter, Tag } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
block: string;
|
|
4
5
|
templates: Template[];
|
|
5
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
6
7
|
render(ctx: Context, emitter: Emitter): Generator<any, void, unknown>;
|
|
7
8
|
private getBlockRender;
|
|
8
9
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Liquid, Tag, Template, Context, TagToken, TopLevelToken } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
variable: string;
|
|
4
5
|
templates: Template[];
|
|
5
|
-
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
6
7
|
render(ctx: Context): Generator<unknown, void, string>;
|
|
7
8
|
private readVariableName;
|
|
8
9
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ValueToken, Liquid, Value, Emitter, TagToken, TopLevelToken, Context, Template, Tag } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
value: Value;
|
|
4
5
|
branches: {
|
|
@@ -6,6 +7,6 @@ export default class extends Tag {
|
|
|
6
7
|
templates: Template[];
|
|
7
8
|
}[];
|
|
8
9
|
elseTemplates: Template[];
|
|
9
|
-
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
10
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
10
11
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
11
12
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Hash, ValueToken, Liquid, Tag, Emitter, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
variable: string;
|
|
4
5
|
collection: ValueToken;
|
|
5
6
|
hash: Hash;
|
|
6
7
|
templates: Template[];
|
|
7
8
|
elseTemplates: Template[];
|
|
8
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
9
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
9
10
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void | string, Template[]>;
|
|
10
11
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Liquid, Tag, Value, Emitter, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
branches: {
|
|
4
5
|
value: Value;
|
|
5
6
|
templates: Template[];
|
|
6
7
|
}[];
|
|
7
|
-
elseTemplates: Template[];
|
|
8
|
-
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
elseTemplates: Template[] | undefined;
|
|
9
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
9
10
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, string>;
|
|
10
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { TopLevelToken, Liquid, Tag, Emitter, TagToken, Context } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
private withVar?;
|
|
4
5
|
private hash;
|
|
5
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
6
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
6
7
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
7
8
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Template, Liquid, Tag, Emitter, Hash, TagToken, TopLevelToken, Context } from '..';
|
|
2
2
|
import { ParsedFileName } from './render';
|
|
3
|
+
import { Parser } from '../parser';
|
|
3
4
|
export default class extends Tag {
|
|
4
5
|
args: Hash;
|
|
5
6
|
templates: Template[];
|
|
6
7
|
file?: ParsedFileName;
|
|
7
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
8
9
|
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
|
|
9
10
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Template, Emitter, Liquid, TopLevelToken, TagToken, Context, Tag } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
templates: Template[];
|
|
4
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
5
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
5
6
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
6
7
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { TopLevelToken, Liquid, Token, Template, Tokenizer, Emitter, TagToken, Context, Tag } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export type ParsedFileName = Template[] | Token | string | undefined;
|
|
3
4
|
export default class extends Tag {
|
|
4
5
|
private file;
|
|
5
6
|
private currentFile?;
|
|
6
7
|
private hash;
|
|
7
|
-
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
constructor(token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
8
9
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
9
10
|
}
|
|
10
11
|
/**
|
|
@@ -13,5 +14,5 @@ export default class extends Tag {
|
|
|
13
14
|
* @return Token for expression (not quoted)
|
|
14
15
|
* @throws TypeError if cannot read next token
|
|
15
16
|
*/
|
|
16
|
-
export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid): ParsedFileName;
|
|
17
|
+
export declare function parseFilePath(tokenizer: Tokenizer, liquid: Liquid, parser: Parser): ParsedFileName;
|
|
17
18
|
export declare function renderFilePath(file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown>;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { ValueToken, Liquid, Tag, Emitter, Hash, TagToken, TopLevelToken, Context, Template } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
variable: string;
|
|
4
5
|
args: Hash;
|
|
5
6
|
templates: Template[];
|
|
6
7
|
collection: ValueToken;
|
|
7
|
-
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
8
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
8
9
|
render(ctx: Context, emitter: Emitter): Generator<unknown, void, unknown>;
|
|
9
10
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Liquid, Tag, Value, TopLevelToken, Template, Emitter, Context, TagToken } from '..';
|
|
2
|
+
import { Parser } from '../parser';
|
|
2
3
|
export default class extends Tag {
|
|
3
4
|
branches: {
|
|
4
5
|
value: Value;
|
|
@@ -6,6 +7,6 @@ export default class extends Tag {
|
|
|
6
7
|
templates: Template[];
|
|
7
8
|
}[];
|
|
8
9
|
elseTemplates: Template[];
|
|
9
|
-
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid);
|
|
10
|
+
constructor(tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid, parser: Parser);
|
|
10
11
|
render(ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown>;
|
|
11
12
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import type { Context } from '../context';
|
|
2
2
|
import type { Liquid } from '../liquid';
|
|
3
|
+
import type { FilterToken } from '../tokens';
|
|
3
4
|
export interface FilterImpl {
|
|
4
5
|
context: Context;
|
|
6
|
+
token: FilterToken;
|
|
5
7
|
liquid: Liquid;
|
|
6
8
|
}
|
|
7
9
|
export type FilterHandler = (this: FilterImpl, value: any, ...args: any[]) => any;
|
|
@@ -2,12 +2,14 @@ import { Context } from '../context';
|
|
|
2
2
|
import { FilterImplOptions } from './filter-impl-options';
|
|
3
3
|
import { FilterArg } from '../parser/filter-arg';
|
|
4
4
|
import { Liquid } from '../liquid';
|
|
5
|
+
import { FilterToken } from '../tokens';
|
|
5
6
|
export declare class Filter {
|
|
6
7
|
name: string;
|
|
7
8
|
args: FilterArg[];
|
|
8
9
|
readonly raw: boolean;
|
|
9
10
|
private handler;
|
|
10
11
|
private liquid;
|
|
11
|
-
|
|
12
|
+
private token;
|
|
13
|
+
constructor(token: FilterToken, options: FilterImplOptions | undefined, liquid: Liquid);
|
|
12
14
|
render(value: any, context: Context): IterableIterator<unknown>;
|
|
13
15
|
}
|
|
@@ -11,7 +11,7 @@ type HashValueTokens = Record<string, Token | undefined>;
|
|
|
11
11
|
*/
|
|
12
12
|
export declare class Hash {
|
|
13
13
|
hash: HashValueTokens;
|
|
14
|
-
constructor(markup: string, jekyllStyle?: boolean);
|
|
14
|
+
constructor(markup: string, jekyllStyle?: boolean | string);
|
|
15
15
|
render(ctx: Context): Generator<unknown, Record<string, any>, unknown>;
|
|
16
16
|
}
|
|
17
17
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TemplateImpl } from './template-impl';
|
|
2
2
|
import type { Emitter } from '../emitters/emitter';
|
|
3
|
-
import type { Tokenizer } from '../parser';
|
|
3
|
+
import type { Parser, Tokenizer } from '../parser';
|
|
4
4
|
import type { Context } from '../context/context';
|
|
5
5
|
import type { TopLevelToken, TagToken } from '../tokens';
|
|
6
6
|
import type { Template } from './template';
|
|
@@ -14,5 +14,5 @@ export declare abstract class Tag extends TemplateImpl<TagToken> implements Temp
|
|
|
14
14
|
abstract render(ctx: Context, emitter: Emitter): TagRenderReturn;
|
|
15
15
|
}
|
|
16
16
|
export interface TagClass {
|
|
17
|
-
new (token: TagToken, tokens: TopLevelToken[], liquid: Liquid): Tag;
|
|
17
|
+
new (token: TagToken, tokens: TopLevelToken[], liquid: Liquid, parser: Parser): Tag;
|
|
18
18
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Token } from '../tokens/token';
|
|
2
2
|
import { Template } from '../template/template';
|
|
3
3
|
export declare abstract class LiquidError extends Error {
|
|
4
|
-
|
|
4
|
+
token: Token;
|
|
5
5
|
context: string;
|
|
6
|
-
|
|
6
|
+
originalError?: Error;
|
|
7
7
|
constructor(err: Error | string, token: Token);
|
|
8
8
|
protected update(): void;
|
|
9
9
|
static is(obj: unknown): obj is LiquidError;
|
|
@@ -18,6 +18,11 @@ export declare class RenderError extends LiquidError {
|
|
|
18
18
|
constructor(err: Error, tpl: Template);
|
|
19
19
|
static is(obj: any): obj is RenderError;
|
|
20
20
|
}
|
|
21
|
+
export declare class LiquidErrors extends LiquidError {
|
|
22
|
+
errors: RenderError[];
|
|
23
|
+
constructor(errors: RenderError[]);
|
|
24
|
+
static is(obj: any): obj is LiquidErrors;
|
|
25
|
+
}
|
|
21
26
|
export declare class UndefinedVariableError extends LiquidError {
|
|
22
27
|
constructor(err: Error, token: Token);
|
|
23
28
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function getDateTimeFormat(): {
|
|
2
|
+
(locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): Intl.DateTimeFormat;
|
|
3
|
+
new (locales?: string | string[] | undefined, options?: Intl.DateTimeFormatOptions | undefined): Intl.DateTimeFormat;
|
|
4
|
+
supportedLocalesOf(locales: string | string[], options?: Intl.DateTimeFormatOptions | undefined): string[];
|
|
5
|
+
readonly prototype: Intl.DateTimeFormat;
|
|
6
|
+
} | undefined;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* A date implementation with timezone info, just like Ruby date
|
|
3
|
+
*
|
|
4
|
+
* Implementation:
|
|
5
|
+
* - create a Date offset by it's timezone difference, avoiding overriding a bunch of methods
|
|
6
|
+
* - rewrite getTimezoneOffset() to trick strftime
|
|
5
7
|
*/
|
|
6
|
-
export
|
|
8
|
+
export declare class LiquidDate {
|
|
9
|
+
private locale;
|
|
10
|
+
private timezoneOffset;
|
|
11
|
+
private timezoneName;
|
|
12
|
+
private date;
|
|
13
|
+
private displayDate;
|
|
14
|
+
private DateTimeFormat;
|
|
15
|
+
timezoneFixed: boolean;
|
|
16
|
+
constructor(init: string | number | Date, locale: string, timezone?: number | string);
|
|
7
17
|
getTime(): number;
|
|
8
18
|
getMilliseconds(): number;
|
|
9
19
|
getSeconds(): number;
|
|
@@ -13,8 +23,30 @@ export interface LiquidDate {
|
|
|
13
23
|
getDate(): number;
|
|
14
24
|
getMonth(): number;
|
|
15
25
|
getFullYear(): number;
|
|
26
|
+
toLocaleString(locale?: string, init?: any): string;
|
|
27
|
+
toLocaleTimeString(locale?: string): string;
|
|
28
|
+
toLocaleDateString(locale?: string): string;
|
|
16
29
|
getTimezoneOffset(): number;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
30
|
+
getTimeZoneName(): string | undefined;
|
|
31
|
+
getLongMonthName(): string;
|
|
32
|
+
getShortMonthName(): string;
|
|
33
|
+
getLongWeekdayName(): string;
|
|
34
|
+
getShortWeekdayName(): string;
|
|
35
|
+
valid(): boolean;
|
|
36
|
+
private format;
|
|
37
|
+
/**
|
|
38
|
+
* Create a Date object fixed to it's declared Timezone. Both
|
|
39
|
+
* - 2021-08-06T02:29:00.000Z and
|
|
40
|
+
* - 2021-08-06T02:29:00.000+08:00
|
|
41
|
+
* will always be displayed as
|
|
42
|
+
* - 2021-08-06 02:29:00
|
|
43
|
+
* regardless timezoneOffset in JavaScript realm
|
|
44
|
+
*
|
|
45
|
+
* The implementation hack:
|
|
46
|
+
* Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
|
|
47
|
+
* we create a different Date to trick strftime, it's both simpler and more performant.
|
|
48
|
+
* Given that a template is expected to be parsed fewer times than rendered.
|
|
49
|
+
*/
|
|
50
|
+
static createDateFixedToTimezone(dateString: string, locale: string): LiquidDate;
|
|
51
|
+
private static getTimezoneOffset;
|
|
20
52
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,7 @@ export declare function stringify(value: any): string;
|
|
|
11
11
|
export declare function toEnumerable<T = unknown>(val: any): T[];
|
|
12
12
|
export declare function toArray(val: any): any[];
|
|
13
13
|
export declare function toValue(value: any): any;
|
|
14
|
+
export declare function toNumber(value: any): number;
|
|
14
15
|
export declare function isNumber(value: any): value is number;
|
|
15
16
|
export declare function toLiquid(value: any): any;
|
|
16
17
|
export declare function isNil(value: any): boolean;
|
|
@@ -31,5 +32,5 @@ export declare function identify<T>(val: T): T;
|
|
|
31
32
|
export declare function changeCase(str: string): string;
|
|
32
33
|
export declare function ellipsis(str: string, N: number): string;
|
|
33
34
|
export declare function caseInsensitiveCompare(a: any, b: any): 0 | 1 | -1;
|
|
34
|
-
export declare function argumentsToValue<F extends (...args: any) => any>(fn: F): (...args: Parameters<F>) => any;
|
|
35
|
+
export declare function argumentsToValue<F extends (...args: any) => any, T>(fn: F): (this: T, ...args: Parameters<F>) => any;
|
|
35
36
|
export declare function escapeRegExp(text: string): string;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "liquidjs",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.18.0",
|
|
4
4
|
"description": "A simple, expressive and safe Shopify / Github Pages compatible template engine in pure JavaScript.",
|
|
5
|
-
"main": "dist/liquid.node.
|
|
6
|
-
"module": "dist/liquid.node.
|
|
7
|
-
"es2015": "dist/liquid.browser.
|
|
5
|
+
"main": "dist/liquid.node.js",
|
|
6
|
+
"module": "dist/liquid.node.mjs",
|
|
7
|
+
"es2015": "dist/liquid.browser.mjs",
|
|
8
8
|
"browser": {
|
|
9
|
-
"./dist/liquid.node.
|
|
10
|
-
"./dist/liquid.node.
|
|
9
|
+
"./dist/liquid.node.js": "./dist/liquid.browser.umd.js",
|
|
10
|
+
"./dist/liquid.node.mjs": "./dist/liquid.browser.mjs"
|
|
11
11
|
},
|
|
12
12
|
"types": "dist/index.d.ts",
|
|
13
13
|
"engines": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"test": "jest",
|
|
20
20
|
"test:coverage": "jest --coverage src test/integration",
|
|
21
21
|
"test:e2e": "jest test/e2e",
|
|
22
|
+
"test:demo": "./test/demo/test.sh",
|
|
22
23
|
"perf:diff": "bin/perf-diff.sh",
|
|
23
24
|
"perf:engines": "cd benchmark && npm run engines",
|
|
24
25
|
"version": "npm run build && npm test",
|
|
@@ -72,6 +73,7 @@
|
|
|
72
73
|
"@types/express": "^4.17.2",
|
|
73
74
|
"@types/jest": "^29.4.0",
|
|
74
75
|
"@types/jsdom": "^12.2.2",
|
|
76
|
+
"@types/node": "^22.3.0",
|
|
75
77
|
"@types/sinon": "^10.0.13",
|
|
76
78
|
"@types/supertest": "^2.0.7",
|
|
77
79
|
"@typescript-eslint/eslint-plugin": "^5.6.0",
|
|
@@ -102,7 +104,8 @@
|
|
|
102
104
|
"supertest": "^3.4.2",
|
|
103
105
|
"ts-jest": "^29.0.5",
|
|
104
106
|
"tslib": "^2.3.1",
|
|
105
|
-
"typedoc": "^0.
|
|
107
|
+
"typedoc": "^0.26.5",
|
|
108
|
+
"typedoc-plugin-missing-exports": "^3.0.0",
|
|
106
109
|
"typescript": "^4.5.3"
|
|
107
110
|
},
|
|
108
111
|
"dependencies": {
|
package/package.json
CHANGED
|
@@ -35,23 +35,24 @@
|
|
|
35
35
|
"organization": false
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
+
"@stylistic/eslint-plugin": "^2",
|
|
38
39
|
"@types/jest": "29",
|
|
39
40
|
"@types/node": "^20",
|
|
40
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
41
|
-
"@typescript-eslint/parser": "^
|
|
41
|
+
"@typescript-eslint/eslint-plugin": "^8",
|
|
42
|
+
"@typescript-eslint/parser": "^8",
|
|
43
|
+
"commit-and-tag-version": "^12",
|
|
42
44
|
"constructs": "^10.0.0",
|
|
43
|
-
"eslint": "^
|
|
44
|
-
"eslint-import-resolver-typescript": "^3.6.
|
|
45
|
+
"eslint": "^9",
|
|
46
|
+
"eslint-import-resolver-typescript": "^3.6.3",
|
|
45
47
|
"eslint-plugin-import": "^2.29.1",
|
|
46
48
|
"jest": "29",
|
|
47
49
|
"jest-junit": "^15",
|
|
48
50
|
"jsii": "~5",
|
|
49
|
-
"jsii-diff": "^1.
|
|
50
|
-
"jsii-docgen": "^
|
|
51
|
-
"jsii-pacmak": "^1.
|
|
51
|
+
"jsii-diff": "^1.103.1",
|
|
52
|
+
"jsii-docgen": "^10.5.0",
|
|
53
|
+
"jsii-pacmak": "^1.103.1",
|
|
52
54
|
"jsii-rosetta": "~5",
|
|
53
|
-
"projen": "
|
|
54
|
-
"standard-version": "^9",
|
|
55
|
+
"projen": "0.0.0",
|
|
55
56
|
"ts-jest": "29",
|
|
56
57
|
"ts-node": "^10.9.2",
|
|
57
58
|
"typescript": "^4.9.5"
|
|
@@ -78,11 +79,14 @@
|
|
|
78
79
|
"publishConfig": {
|
|
79
80
|
"access": "public"
|
|
80
81
|
},
|
|
81
|
-
"version": "0.0.
|
|
82
|
+
"version": "0.0.16",
|
|
82
83
|
"jest": {
|
|
84
|
+
"coverageProvider": "v8",
|
|
83
85
|
"testMatch": [
|
|
84
|
-
"<rootDir
|
|
85
|
-
"<rootDir>/@(
|
|
86
|
+
"<rootDir>/@(src|test)/**/*(*.)@(spec|test).ts?(x)",
|
|
87
|
+
"<rootDir>/@(src|test)/**/__tests__/**/*.ts?(x)",
|
|
88
|
+
"<rootDir>/@(projenrc)/**/*(*.)@(spec|test).ts?(x)",
|
|
89
|
+
"<rootDir>/@(projenrc)/**/__tests__/**/*.ts?(x)"
|
|
86
90
|
],
|
|
87
91
|
"clearMocks": true,
|
|
88
92
|
"collectCoverage": true,
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { LiquidDate } from './liquid-date';
|
|
2
|
-
/**
|
|
3
|
-
* A date implementation with timezone info, just like Ruby date
|
|
4
|
-
*
|
|
5
|
-
* Implementation:
|
|
6
|
-
* - create a Date offset by it's timezone difference, avoiding overriding a bunch of methods
|
|
7
|
-
* - rewrite getTimezoneOffset() to trick strftime
|
|
8
|
-
*/
|
|
9
|
-
export declare class TimezoneDate implements LiquidDate {
|
|
10
|
-
private timezoneOffset;
|
|
11
|
-
private timezoneName;
|
|
12
|
-
private date;
|
|
13
|
-
private displayDate;
|
|
14
|
-
constructor(init: string | number | Date | TimezoneDate, timezone: number | string);
|
|
15
|
-
getTime(): number;
|
|
16
|
-
getMilliseconds(): number;
|
|
17
|
-
getSeconds(): number;
|
|
18
|
-
getMinutes(): number;
|
|
19
|
-
getHours(): number;
|
|
20
|
-
getDay(): number;
|
|
21
|
-
getDate(): number;
|
|
22
|
-
getMonth(): number;
|
|
23
|
-
getFullYear(): number;
|
|
24
|
-
toLocaleString(locale?: string, init?: any): string;
|
|
25
|
-
toLocaleTimeString(locale?: string): string;
|
|
26
|
-
toLocaleDateString(locale?: string): string;
|
|
27
|
-
getTimezoneOffset(): number;
|
|
28
|
-
getTimezoneName(): string;
|
|
29
|
-
/**
|
|
30
|
-
* Create a Date object fixed to it's declared Timezone. Both
|
|
31
|
-
* - 2021-08-06T02:29:00.000Z and
|
|
32
|
-
* - 2021-08-06T02:29:00.000+08:00
|
|
33
|
-
* will always be displayed as
|
|
34
|
-
* - 2021-08-06 02:29:00
|
|
35
|
-
* regardless timezoneOffset in JavaScript realm
|
|
36
|
-
*
|
|
37
|
-
* The implementation hack:
|
|
38
|
-
* Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,
|
|
39
|
-
* we create a different Date to trick strftime, it's both simpler and more performant.
|
|
40
|
-
* Given that a template is expected to be parsed fewer times than rendered.
|
|
41
|
-
*/
|
|
42
|
-
static createDateFixedToTimezone(dateString: string): LiquidDate;
|
|
43
|
-
private static getTimezoneOffset;
|
|
44
|
-
}
|
|
File without changes
|