File tree Expand file tree Collapse file tree 3 files changed +82
-2
lines changed Expand file tree Collapse file tree 3 files changed +82
-2
lines changed Original file line number Diff line number Diff line change
1
+ name : CI
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+ build :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ matrix :
14
+ deno-version : [v1.x]
15
+ steps :
16
+ - name : Git Checkout Deno Module
17
+ uses : actions/checkout@v2
18
+ - name : Use Deno Version ${{ matrix.deno-version }}
19
+ uses : denoland/setup-deno@v1
20
+ with :
21
+ deno-version : ${{ matrix.deno-version }}
22
+ - name : Format
23
+ run : deno fmt --check
24
+ - name : Lint
25
+ run : deno lint
26
+ - name : Unit Test
27
+ run : deno test --coverage=coverage
28
+ - name : Create coverage report
29
+ run : deno coverage ./coverage --lcov > coverage.lcov
30
+ - name : Collect coverage
31
+
32
+ with :
33
+ file : ./coverage.lcov
34
+ - name : Build Module
35
+ run : deno task build:npm
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ export class Interpreter implements Runtime {
21
21
decorateValue ?: ( value : FormatParameterValue ) => unknown ,
22
22
) : string {
23
23
const [ strings , values ] = ast ;
24
- let result = strings . at ( 0 ) ?? "" ;
24
+ let result = strings [ 0 ] ?? "" ;
25
25
values . forEach ( ( [ valueName , methods ] , valueIndex ) => {
26
26
const self = parameters [ valueName ] ;
27
27
@@ -50,7 +50,7 @@ export class Interpreter implements Runtime {
50
50
}
51
51
52
52
result += value && value . toString ? value . toString ( ) : ( value ?? "" ) ;
53
- result += strings . at ( valueIndex + 1 ) ?? "" ;
53
+ result += strings [ valueIndex + 1 ] ?? "" ;
54
54
} ) ;
55
55
return result ;
56
56
}
Original file line number Diff line number Diff line change
1
+ import { build , emptyDir } from "@deno/dnt" ;
2
+ import { bgGreen } from "@std/fmt/colors" ;
3
+
4
+ const denoInfo = JSON . parse (
5
+ Deno . readTextFileSync ( new URL ( "../deno.json" , import . meta. url ) ) ,
6
+ ) ;
7
+ const version = denoInfo . version ;
8
+
9
+ console . log ( bgGreen ( `version: ${ version } ` ) ) ;
10
+
11
+ await emptyDir ( "./.npm" ) ;
12
+
13
+ await build ( {
14
+ entryPoints : [ "./mod.ts" ] ,
15
+ outDir : "./.npm" ,
16
+ shims : {
17
+ deno : false ,
18
+ } ,
19
+ test : false ,
20
+ compilerOptions : {
21
+ lib : [ "ES2021" , "DOM" ] ,
22
+ } ,
23
+ package : {
24
+ name : "intlit" ,
25
+ version,
26
+ description : "A comprehensive Intl formatter." ,
27
+ keywords : [
28
+ "intl" ,
29
+ "formatter" ,
30
+ "i18n" ,
31
+ "gettext" ,
32
+ ] ,
33
+ license : "MIT" ,
34
+ repository : {
35
+ type : "git" ,
36
+ url : "git+https://github.com/denostack/intlit.git" ,
37
+ } ,
38
+ bugs : {
39
+ url : "https://github.com/denostack/intlit/issues" ,
40
+ } ,
41
+ } ,
42
+ } ) ;
43
+
44
+ // post build steps
45
+ Deno . copyFileSync ( "README.md" , ".npm/README.md" ) ;
You can’t perform that action at this time.
0 commit comments