Commit c6a6ef1 1 parent 6fb707f commit c6a6ef1 Copy full SHA for c6a6ef1
File tree 6 files changed +47
-5
lines changed
6 files changed +47
-5
lines changed Original file line number Diff line number Diff line change 23
23
"prefer-const" : 2 ,
24
24
"no-unused-vars" : "off" ,
25
25
"indent" : "off" ,
26
+ "no-mixed-operators" : "off" ,
26
27
"no-dupe-class-members" : "off" ,
27
28
"no-useless-constructor" : "off" ,
28
29
"@typescript-eslint/indent" : [ "error" , 2 ] ,
Original file line number Diff line number Diff line change 5
5
name : Test
6
6
strategy :
7
7
matrix :
8
- os : [ubuntu-latest, macos-latest ]
8
+ os : [ubuntu-latest]
9
9
timezone : [Etc/GMT, Asia/Shanghai, America/New_York]
10
+ node-version : [22]
11
+ include :
12
+ - os : macos-latest
13
+ timezone : America/New_York
14
+ node-versoin : 22
15
+ - os : ubuntu-latest
16
+ timezone : Etc/GMT
17
+ node-version : 16
18
+ - os : ubuntu-latest
19
+ timezone : Asia/Shanghai
20
+ node-version : 14
10
21
runs-on : ${{ matrix.os }}
11
22
steps :
12
23
- name : Checkout
16
27
- name : Setup Node.js
17
28
uses : actions/setup-node@v3
18
29
with :
19
- node-version : ' 20 '
30
+ node-version : ${{ matrix.node-version }}
20
31
- name : Install dependencies
21
32
run : npm ci
22
33
- name : Download artifacts
Original file line number Diff line number Diff line change @@ -50,6 +50,10 @@ const browserStream = {
50
50
delimiters : [ '' , '' ] ,
51
51
'./streamed-emitter' : '../build/streamed-emitter-browser'
52
52
}
53
+ const browserPerf = {
54
+ include : [ './src/context/context.ts' , './src/render/render.ts' ] ,
55
+ 'node:perf_hooks' : '../build/perf_hooks-browser'
56
+ }
53
57
const esmRequire = {
54
58
include : './src/fs/node.ts' ,
55
59
delimiters : [ '' , '' ] ,
@@ -95,6 +99,7 @@ const browserEsm = {
95
99
versionInjection ,
96
100
replace ( browserFS ) ,
97
101
replace ( browserStream ) ,
102
+ replace ( browserPerf ) ,
98
103
typescript ( tsconfig ( 'es6' ) )
99
104
] ,
100
105
treeshake,
@@ -113,6 +118,7 @@ const browserUmd = {
113
118
versionInjection ,
114
119
replace ( browserFS ) ,
115
120
replace ( browserStream ) ,
121
+ replace ( browserPerf ) ,
116
122
typescript ( tsconfig ( 'es5' ) )
117
123
] ,
118
124
treeshake,
@@ -131,6 +137,7 @@ const browserMin = {
131
137
versionInjection ,
132
138
replace ( browserFS ) ,
133
139
replace ( browserStream ) ,
140
+ replace ( browserPerf ) ,
134
141
typescript ( tsconfig ( 'es5' ) ) ,
135
142
uglify ( )
136
143
] ,
Original file line number Diff line number Diff line change
1
+ const polyfill = {
2
+ now : ( ) => Date . now ( )
3
+ }
4
+
5
+ export const performance = typeof window === 'object' && window . performance || polyfill
Original file line number Diff line number Diff line change
1
+ import { Parser } from './parser'
2
+ import { Liquid , TokenKind } from '..'
3
+
4
+ describe ( 'Parser' , ( ) => {
5
+ it ( 'should coerce input to string' , ( ) => {
6
+ const parser = new Parser ( new Liquid ( ) )
7
+ const templates = parser . parse ( { } as any )
8
+ expect ( templates . length ) . toEqual ( 1 )
9
+ expect ( templates [ 0 ] ) . toMatchObject ( {
10
+ str : '[object Object]' ,
11
+ token : {
12
+ kind : TokenKind . HTML ,
13
+ input : '[object Object]' ,
14
+ begin : 0 ,
15
+ end : 15
16
+ }
17
+ } )
18
+ } )
19
+ } )
Original file line number Diff line number Diff line change 1
- import { Liquid } from '../../src/liquid'
2
- import { Drop } from '../../src/drop/drop'
1
+ import { Drop , Liquid } from '../..'
3
2
4
3
class SettingsDrop extends Drop {
5
- private foo = 'FOO'
4
+ public foo = 'FOO'
6
5
public bar ( ) {
7
6
return 'BAR'
8
7
}
You can’t perform that action at this time.
0 commit comments