mirror of https://github.com/aminya/setup-cpp
fix: fix numerous locale loading
This commit is contained in:
parent
3b060efc8e
commit
c5296bc8b0
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -40,9 +40,10 @@
|
|||
"execa": "^5.1.1",
|
||||
"mri": "^1.2.0",
|
||||
"msvc-dev-cmd": "github:aminya/msvc-dev-cmd#9f672c1",
|
||||
"numerous": "1.0.3",
|
||||
"semver": "7.3.7",
|
||||
"setup-python": "github:actions/setup-python#7f80679172b057fc5e90d70d197929d454754a5a",
|
||||
"time-delta": "github:aminya/time-delta#b8d65be65af2ad348ae21f4e0e2fd2ee7430c299",
|
||||
"time-delta": "github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e",
|
||||
"untildify": "^4.0.0",
|
||||
"which": "^2.0.2"
|
||||
},
|
||||
|
|
|
@ -31,6 +31,7 @@ specifiers:
|
|||
msvc-dev-cmd: github:aminya/msvc-dev-cmd#9f672c1
|
||||
npm-check-updates: ^12.5.9
|
||||
npm-run-all2: ^5.0.2
|
||||
numerous: 1.0.3
|
||||
parcel: ^2.4.1
|
||||
prettier: 2.6.2
|
||||
prettier-config-atomic: ^3.0.9
|
||||
|
@ -38,7 +39,7 @@ specifiers:
|
|||
setup-python: github:actions/setup-python#7f80679172b057fc5e90d70d197929d454754a5a
|
||||
shx: 0.3.4
|
||||
terser-config-atomic: ^0.1.1
|
||||
time-delta: github:aminya/time-delta#b8d65be65af2ad348ae21f4e0e2fd2ee7430c299
|
||||
time-delta: github:aminya/time-delta#69d91a41cef28e569be9a2991129f5f7d1f0d00e
|
||||
ts-jest: ^27.1.4
|
||||
typescript: ^4.6.3
|
||||
untildify: ^4.0.0
|
||||
|
@ -52,9 +53,10 @@ dependencies:
|
|||
execa: 5.1.1
|
||||
mri: 1.2.0
|
||||
msvc-dev-cmd: github.com/aminya/msvc-dev-cmd/9f672c1
|
||||
numerous: 1.0.3
|
||||
semver: 7.3.7
|
||||
setup-python: github.com/actions/setup-python/7f80679172b057fc5e90d70d197929d454754a5a
|
||||
time-delta: github.com/aminya/time-delta/b8d65be65af2ad348ae21f4e0e2fd2ee7430c299
|
||||
time-delta: github.com/aminya/time-delta/69d91a41cef28e569be9a2991129f5f7d1f0d00e
|
||||
untildify: 4.0.0
|
||||
which: 2.0.2
|
||||
|
||||
|
@ -3858,7 +3860,7 @@ packages:
|
|||
doctrine: 2.1.0
|
||||
eslint: 8.13.0
|
||||
has: 1.0.3
|
||||
jsx-ast-utils: 2.4.1
|
||||
jsx-ast-utils: 3.2.2
|
||||
minimatch: 3.1.2
|
||||
object.entries: 1.1.5
|
||||
object.fromentries: 2.0.5
|
||||
|
@ -8255,8 +8257,8 @@ packages:
|
|||
sort-object-keys: 1.1.3
|
||||
dev: true
|
||||
|
||||
github.com/aminya/time-delta/b8d65be65af2ad348ae21f4e0e2fd2ee7430c299:
|
||||
resolution: {tarball: https://codeload.github.com/aminya/time-delta/tar.gz/b8d65be65af2ad348ae21f4e0e2fd2ee7430c299}
|
||||
github.com/aminya/time-delta/69d91a41cef28e569be9a2991129f5f7d1f0d00e:
|
||||
resolution: {tarball: https://codeload.github.com/aminya/time-delta/tar.gz/69d91a41cef28e569be9a2991129f5f7d1f0d00e}
|
||||
name: time-delta
|
||||
version: 1.0.0
|
||||
engines: {node: '>=12'}
|
||||
|
|
11
src/main.ts
11
src/main.ts
|
@ -21,7 +21,13 @@ import { isGitHubCI } from "./utils/env/isci"
|
|||
import * as timeDelta from "time-delta"
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import enLocale from "time-delta/locales/en.js"
|
||||
import timeDeltaLocale from "time-delta/locales/en.js"
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import * as numerous from "numerous"
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
import numerousLocale from "numerous/locales/en.js"
|
||||
|
||||
import semverValid from "semver/functions/valid"
|
||||
import { getVersion } from "./default_versions"
|
||||
|
@ -129,7 +135,8 @@ export async function main(args: string[]): Promise<number> {
|
|||
const errorMessages: string[] = []
|
||||
|
||||
const timeFormatter = timeDelta.create({ autoloadLocales: true })
|
||||
timeDelta.addLocale(enLocale as timeDelta.Locale)
|
||||
timeDelta.addLocale(timeDeltaLocale as timeDelta.Locale)
|
||||
numerous.addLocale(numerousLocale)
|
||||
let time1: number
|
||||
let time2: number
|
||||
|
||||
|
|
Loading…
Reference in New Issue