facebook / facebook/relay

Relay-compiler will delete any file in a hidden directory!!

Open
#4,861 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

Running relay-compiler (tested v16-18) will remove files from `__generated__` in any hidden directory such as `.wtf/__generated__`

For example, when running relay-compiler, all files in `.nodevenv/lib/node_modules/npm/node_modules/@sigstore/protobuf-specs/dist/__generated__/` are nuked.

This happens even if I've set the exclude paths in relay.config.js

```
excludes: [
'.nodeenv/**',
'**/node_modules/**',
'**/__mocks__/**',
'**/__generated__/**',
],
```

It breaks my npm installation.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the deletion with relay-compiler and the relay.config.js excludes shown in the report, using a hidden directory containing __generated__ files. Trace the compiler's exclude-path handling and verify that files under hidden directories and node_modules are preserved when the issue's exclude patterns are configured.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react, rust
Domain
compilers, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.