Skip to content

Commit

Permalink
feat: internally replace dayjs with localTime (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
kirillgroshkov committed Mar 27, 2022
1 parent 498e180 commit 2feb187
Show file tree
Hide file tree
Showing 3 changed files with 314 additions and 311 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@naturalcycles/cli": "^1.0.0",
"@naturalcycles/js-lib": "^14.0.0",
"@naturalcycles/nodejs-lib": "^12.0.0",
"@naturalcycles/time-lib": "^3.0.1",
"@types/fs-extra": "^9.0.0",
"@types/jest": "^27.0.0",
"@types/node": "^17.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/util/buildInfo.util.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { dayjs } from '@naturalcycles/time-lib'
import { localTime } from '@naturalcycles/js-lib'
import { BuildInfo } from './buildInfo.model'
import {
gitCurrentBranchName,
Expand All @@ -8,7 +8,7 @@ import {
} from './git.util'

export async function generateBuildInfo(dev = false): Promise<BuildInfo> {
const now = dayjs()
const now = localTime()

const [rev, branchName, repoName, tsCommit] = dev
? ['devRev', 'devBranch', 'devRepo', now.unix()]
Expand All @@ -23,7 +23,7 @@ export async function generateBuildInfo(dev = false): Promise<BuildInfo> {

const tsStr = now.toPretty()

const ver = [now.toCompactTime(), repoName, branchName, rev].join('_')
const ver = [now.toStringCompact(), repoName, branchName, rev].join('_')

return {
ts,
Expand Down
Loading

0 comments on commit 2feb187

Please sign in to comment.