mirror of
https://github.com/status-im/react-native.git
synced 2025-01-15 03:56:03 +00:00
c5ce762697
Summary: We use projectRoots to limit crawling of jest-haste-map in large codebases. Since this implies multiple projects roots, it makes it very hard (or impossible) to reliably cache dependency resolutions. If we can replace this with a single project root and a set of watch roots, we can have relative path resolutions for all dependencies which van be cached. Reviewed By: rafeca Differential Revision: D8450498 fbshipit-source-id: 830c21e847c3236e42d5414a8587508cb73864bd
25 lines
562 B
JavaScript
25 lines
562 B
JavaScript
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const launchEditor = require('../util/launchEditor');
|
|
|
|
module.exports = function({watchFolders}) {
|
|
return function(req, res, next) {
|
|
if (req.url === '/open-stack-frame') {
|
|
const frame = JSON.parse(req.rawBody);
|
|
launchEditor(frame.file, frame.lineNumber, watchFolders);
|
|
res.end('OK');
|
|
} else {
|
|
next();
|
|
}
|
|
};
|
|
};
|