Commit 19113dd 1 parent 3675588 commit 19113dd Copy full SHA for 19113dd
File tree 3 files changed +7
-5
lines changed
3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ defaults:
21
21
22
22
env :
23
23
TZ : ' America/Phoenix'
24
+ LOCALE_ID : ' en-US'
24
25
25
26
jobs :
26
27
install-and-build :
Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ declare global {
27
27
*
28
28
* @example 'en-US' // American English
29
29
*/
30
- const locale : string ;
30
+ const LOCALE_ID : string ;
31
31
}
32
32
33
33
beforeEach ( ( ) => {
34
- const dateOnTimezone = new Date ( ) . toLocaleString ( locale , { timeZone : TZ } ) ;
34
+ const dateOnTimezone = new Date ( ) . toLocaleString ( LOCALE_ID , { timeZone : TZ } ) ;
35
35
vi . useFakeTimers ( {
36
36
now : new Date ( dateOnTimezone ) . getTime ( ) ,
37
37
} ) ;
Original file line number Diff line number Diff line change @@ -59,10 +59,11 @@ export default defineConfig(({ mode }) => {
59
59
const isTest = mode === 'test' ;
60
60
61
61
let timeZoneId : string | null = process . env . TZ ?? null ;
62
- let locale : string | null = process . env . locale ?? null ;
62
+ let localeId : string | null = process . env . LOCALE_ID ?? null ;
63
+
63
64
if ( isTest ) {
64
65
timeZoneId = timeZoneId ?? TEST_TIME_ZONE ;
65
- locale = locale ?? TEST_LOCALE ;
66
+ localeId = localeId ?? TEST_LOCALE ;
66
67
}
67
68
68
69
// `expressionParser.ts` is built as a separate entry so it can be consumed
@@ -95,7 +96,7 @@ export default defineConfig(({ mode }) => {
95
96
} ,
96
97
define : {
97
98
TZ : JSON . stringify ( timeZoneId ) ,
98
- locale : JSON . stringify ( locale ) ,
99
+ LOCALE_ID : JSON . stringify ( localeId ) ,
99
100
} ,
100
101
esbuild : {
101
102
target : 'esnext' ,
You can’t perform that action at this time.
0 commit comments