Skip to content

Commit 19113dd

Browse files
committed
Aligning with code style
1 parent 3675588 commit 19113dd

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ defaults:
2121

2222
env:
2323
TZ: 'America/Phoenix'
24+
LOCALE_ID: 'en-US'
2425

2526
jobs:
2627
install-and-build:

packages/xpath/test/setup.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ declare global {
2727
*
2828
* @example 'en-US' // American English
2929
*/
30-
const locale: string;
30+
const LOCALE_ID: string;
3131
}
3232

3333
beforeEach(() => {
34-
const dateOnTimezone = new Date().toLocaleString(locale, { timeZone: TZ });
34+
const dateOnTimezone = new Date().toLocaleString(LOCALE_ID, { timeZone: TZ });
3535
vi.useFakeTimers({
3636
now: new Date(dateOnTimezone).getTime(),
3737
});

packages/xpath/vite.config.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ export default defineConfig(({ mode }) => {
5959
const isTest = mode === 'test';
6060

6161
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+
6364
if (isTest) {
6465
timeZoneId = timeZoneId ?? TEST_TIME_ZONE;
65-
locale = locale ?? TEST_LOCALE;
66+
localeId = localeId ?? TEST_LOCALE;
6667
}
6768

6869
// `expressionParser.ts` is built as a separate entry so it can be consumed
@@ -95,7 +96,7 @@ export default defineConfig(({ mode }) => {
9596
},
9697
define: {
9798
TZ: JSON.stringify(timeZoneId),
98-
locale: JSON.stringify(locale),
99+
LOCALE_ID: JSON.stringify(localeId),
99100
},
100101
esbuild: {
101102
target: 'esnext',

0 commit comments

Comments
 (0)