mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 20:15:11 +00:00
os.tmpDir() is deprecated
Summary: According to [5e5ec2cd1e](https://github.com/nodejs/node/commit/5e5ec2cd1e) os.tmpDir() is now deprecated in node.js 7 and `os.tmpdir()` is preferred :) Current status: Bundler shows annoying warning every time it runs :) Closes https://github.com/facebook/react-native/pull/10620 Differential Revision: D4101498 fbshipit-source-id: 0de8cc30f684f1f22191c64fa2c7ce73c5abf9ea
This commit is contained in:
parent
93ed185c3d
commit
cd97128ba3
@ -15,7 +15,7 @@ jest
|
||||
jest
|
||||
.mock('fs')
|
||||
.setMock('os', {
|
||||
tmpDir() { return 'tmpDir'; },
|
||||
tmpdir() { return 'tmpdir'; },
|
||||
});
|
||||
|
||||
jest.useRealTimers();
|
||||
|
@ -16,8 +16,7 @@ const denodeify = require('denodeify');
|
||||
const fs = require('graceful-fs');
|
||||
const isAbsolutePath = require('absolute-path');
|
||||
const path = require('path');
|
||||
/* $FlowFixMe: missing function definition. */
|
||||
const tmpDir = require('os').tmpDir();
|
||||
const tmpDir = require('os').tmpdir();
|
||||
|
||||
function getObjectValues<T>(object: {[key: string]: T}): Array<T> {
|
||||
return Object.keys(object).map(key => object[key]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user