Skip to content

Commit

Permalink
fix: use = sep
Browse files Browse the repository at this point in the history
  • Loading branch information
sun0day committed Dec 19, 2023
1 parent 7d37746 commit 23e3eb0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions crates/napi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub fn compute_root(root: Option<Buffer>) -> Option<PathBuf> {
}
}

// alias: module1:path1 module2:path2
// alias: name1=path1 name2=path2
pub fn compute_alias(root: &Option<PathBuf>, alias: Option<Buffer>) -> Option<Alias> {
match alias {
Some(buf) => {
Expand All @@ -21,8 +21,7 @@ pub fn compute_alias(root: &Option<PathBuf>, alias: Option<Buffer>) -> Option<Al
.trim()
.split(" ")
.map(|s| {
let kv: Vec<&str> = s.split(":").collect();
println!("{:?}", kv);
let kv: Vec<&str> = s.split("=").collect();
let paths: Vec<AliasValue> = kv[1]
.split(",")
.map(|p| {
Expand Down
2 changes: 1 addition & 1 deletion packages/graph/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class Parser {
Object
.keys(alias)
.reduce(
(s, key) => [s, `${key}:${
(s, key) => [s, `${key}=${
isAbsolute(alias[key]) ? alias[key] : resolve(absRoot, alias[key])
}`].join(' '),
''
Expand Down

0 comments on commit 23e3eb0

Please sign in to comment.