Follow symlinks?
See original GitHub issueDo you want to request a feature or report a bug?
Feature
What is the current behavior?
I’m removing a test from DependencyGraph-test
that looked like so, but wasn’t actually working after I fixed problems with the fs
mocks:
it('should work with packages with symlinked subdirs', function() {
var root = '/root';
setMockFileSystem({
'symlinkedPackage': {
'package.json': JSON.stringify({
name: 'aPackage',
main: 'main.js',
}),
'main.js': 'lol',
'subdir': {
'lolynot.js': 'lolynot',
},
},
'root': {
'index.js': [
'/**',
' * @providesModule index',
' */',
'require("aPackage/subdir/lolynot")',
].join('\n'),
'aPackage': { SYMLINK: '/symlinkedPackage' },
},
});
var dgraph = new DependencyGraph({
...defaults,
roots: [root],
});
return getOrderedDependenciesAsJSON(dgraph, '/root/index.js').then(function(deps) {
expect(deps)
.toEqual([
{
id: 'index',
path: '/root/index.js',
dependencies: ['aPackage/subdir/lolynot'],
isAsset: false,
isJSON: false,
isPolyfill: false,
resolution: undefined,
resolveDependency: undefined,
},
{
id: 'aPackage/subdir/lolynot.js',
path: '/root/aPackage/subdir/lolynot.js',
dependencies: [],
isAsset: false,
isJSON: false,
isPolyfill: false,
resolution: undefined,
resolveDependency: undefined,
},
]);
});
});
What is the expected behavior?
Reintroduce the test and verify symlinks work.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:300
- Comments:207 (16 by maintainers)
Top Results From Across the Web
What is Options +FollowSymLinks? - Stack Overflow
FollowSymLinks relates to server security. When dealing with web servers, you can't just leave things undefined. You have to tell who has access ......
Read more >FollowSymLinks
FollowSymLinks is a directive in your web server configuration that tells your web server to follow so called symbolic links. As one would...
Read more >How to get full path of original file of a soft symbolic link?
-f , --canonicalize : canonicalize by following every symlink in every component of the given name recursively; all but the last component must...
Read more >How to Follow Symbolic Links - Linux Handbook
You got a symbolic link and wondering about the actual source file? Here's how to follow symlinks in Linux.
Read more >Command differences with symbolic links - IBM
Some shell commands have minor technical differences when they refer to symbolic links instead of regular files or directories. For example, ls does...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can we leave this open until it’s resolved?
This is a huge PITA for code sharing, and developing modules. I’m not sure what your looking for in terms of a strong case, but it’s definitely a major pain point for me, and module developers.
Currently I am trying to use lerna, and react-primitives to reorganize a project boilerplate to maximize code reuse, while maintaining upgradability by rn.
Lerna works by symlinking and installing your packages in a mono repo, which is an incredibly helpful pattern for code reuse, and completely broken when the react native packager won’t follow symlinks.
I think we won’t have time to deal with this anytime soon unfortunately. I’d love to reopen once we have a strong case.