mirror of https://github.com/status-im/metro.git
Updates from Thu Sep 3rd.
This commit is contained in:
commit
bad0a5cb46
|
@ -126,7 +126,7 @@ describe('processRequest', () => {
|
||||||
expect(Bundler.prototype.bundle).toBeCalledWith(
|
expect(Bundler.prototype.bundle).toBeCalledWith(
|
||||||
'index.js',
|
'index.js',
|
||||||
true,
|
true,
|
||||||
'index.map',
|
'index.map?platform=ios',
|
||||||
true,
|
true,
|
||||||
'ios',
|
'ios',
|
||||||
);
|
);
|
||||||
|
@ -271,7 +271,7 @@ describe('processRequest', () => {
|
||||||
expect(Bundler.prototype.bundle).toBeCalledWith(
|
expect(Bundler.prototype.bundle).toBeCalledWith(
|
||||||
'path/to/foo.js',
|
'path/to/foo.js',
|
||||||
false,
|
false,
|
||||||
'/path/to/foo.map',
|
'/path/to/foo.map?dev=false&runModule=false',
|
||||||
false,
|
false,
|
||||||
undefined
|
undefined
|
||||||
);
|
);
|
||||||
|
|
|
@ -429,8 +429,11 @@ class Server {
|
||||||
return true;
|
return true;
|
||||||
}).join('.') + '.js';
|
}).join('.') + '.js';
|
||||||
|
|
||||||
|
const sourceMapUrlObj = _.clone(urlObj);
|
||||||
|
sourceMapUrlObj.pathname = pathname.replace(/\.bundle$/, '.map');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sourceMapUrl: pathname.replace(/\.bundle$/, '.map'),
|
sourceMapUrl: url.format(sourceMapUrlObj),
|
||||||
entryFile: entryFile,
|
entryFile: entryFile,
|
||||||
dev: this._getBoolOptionFromQuery(urlObj.query, 'dev', true),
|
dev: this._getBoolOptionFromQuery(urlObj.query, 'dev', true),
|
||||||
minify: this._getBoolOptionFromQuery(urlObj.query, 'minify'),
|
minify: this._getBoolOptionFromQuery(urlObj.query, 'minify'),
|
||||||
|
|
|
@ -15,7 +15,7 @@ const debug = require('debug')('ReactPackager:SocketServer');
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const net = require('net');
|
const net = require('net');
|
||||||
|
|
||||||
const MAX_IDLE_TIME = 10 * 60 * 1000;
|
const MAX_IDLE_TIME = 30 * 1000;
|
||||||
|
|
||||||
class SocketServer {
|
class SocketServer {
|
||||||
constructor(sockPath, options) {
|
constructor(sockPath, options) {
|
||||||
|
@ -118,7 +118,7 @@ class SocketServer {
|
||||||
this._deathTimer = setTimeout(() => {
|
this._deathTimer = setTimeout(() => {
|
||||||
if (this._jobs <= 0) {
|
if (this._jobs <= 0) {
|
||||||
debug('server dying', process.pid);
|
debug('server dying', process.pid);
|
||||||
process.exit(1);
|
process.exit();
|
||||||
}
|
}
|
||||||
this._dieEventually();
|
this._dieEventually();
|
||||||
}, MAX_IDLE_TIME);
|
}, MAX_IDLE_TIME);
|
||||||
|
|
|
@ -12,7 +12,7 @@ const crypto = require('crypto');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const tmpdir = require('os').tmpDir();
|
const tmpdir = require('os').tmpDir();
|
||||||
|
|
||||||
function getCacheFilePath(args) {
|
function getCacheFilePath(...args) {
|
||||||
args = Array.prototype.slice.call(args);
|
args = Array.prototype.slice.call(args);
|
||||||
const prefix = args.shift();
|
const prefix = args.shift();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue