-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(stylex_path_resolver): resolve path of pnpm installed package cor…
…rectly
- Loading branch information
Showing
20 changed files
with
223 additions
and
50 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions
10
...s/.pnpm/@stylex+lib-exports-pnpm@0.1.0/node_modules/@stylex/lib-exports-pnpm/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
6 changes: 6 additions & 0 deletions
6
...cation/node_modules/.pnpm/stylex-lib-pnpm@0.1.0/node_modules/stylex-lib-pnpm/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
10 changes: 10 additions & 0 deletions
10
...lex-path-resolver/fixtures/application/node_modules/@stylex/lib-exports-pnpm/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Empty file.
6 changes: 6 additions & 0 deletions
6
crates/stylex-path-resolver/fixtures/application/node_modules/stylex-lib-pnpm/package.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
use std::{ | ||
fs, | ||
path::{Path, PathBuf}, | ||
}; | ||
|
||
pub(crate) fn _check_directory(path: &Path) -> bool { | ||
match fs::metadata(path) { | ||
Ok(metadata) => metadata.is_dir(), | ||
Err(_) => false, | ||
} | ||
} | ||
|
||
pub(crate) fn get_directories(path: &Path) -> Result<Vec<PathBuf>, std::io::Error> { | ||
Ok( | ||
fs::read_dir(path)? | ||
.filter_map(|entry| { | ||
entry.ok().and_then(|e| { | ||
let path = e.path(); | ||
if path.is_dir() { | ||
Some(path) | ||
} else { | ||
None | ||
} | ||
}) | ||
}) | ||
.collect::<Vec<_>>(), | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod file_system; | ||
mod package_json; | ||
pub mod resolvers; | ||
mod utils; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters