This repository has been archived by the owner on Aug 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: update async, clone, mkdirp, uuid
- Loading branch information
1 parent
61f7f96
commit 6aada66
Showing
3 changed files
with
3,812 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,12 +2,12 @@ | |
Copyright (C) 2012 - 2016 Markus Kohlhase <[email protected]> | ||
*/ | ||
|
||
import async from 'async'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import uuid from 'uuid'; | ||
import mkdirp from 'mkdirp'; | ||
import clone from 'clone'; | ||
import async from 'async'; | ||
import fs from 'fs'; | ||
import path from 'path'; | ||
import { v4 as uuidv4 } from 'uuid'; | ||
import mkdirp from 'mkdirp'; | ||
import clone from 'clone'; | ||
|
||
const isJSONFile = f => f.substr(-5) === ".json"; | ||
const removeFileExtension = f => f.split(".json")[0]; | ||
|
@@ -69,7 +69,7 @@ const saveObjectToFile = function(o, file, cb) { | |
} | ||
} | ||
|
||
const tmpFileName = file + uuid.v4() + ".tmp"; | ||
const tmpFileName = file + uuidv4() + ".tmp"; | ||
|
||
if (typeof cb === "function") { | ||
canWriteToFile(file, (err) => { | ||
|
@@ -243,7 +243,7 @@ class Store { | |
this._pretty = opt.pretty === true; | ||
this._memory = opt.memory === true || opt.type === 'memory'; | ||
this._saveId = opt.saveId; | ||
this._idGenerator = typeof opt.idGenerator === "function" ? opt.idGenerator : uuid.v4; | ||
this._idGenerator = typeof opt.idGenerator === "function" ? opt.idGenerator : uuidv4; | ||
|
||
if (isJSONFile(this.name)) { | ||
this.name = this.name.split(".json")[0]; | ||
|
Oops, something went wrong.