Skip to content

Commit

Permalink
rebuild: include prefix when filtering with --only
Browse files Browse the repository at this point in the history
The logic currently ignores a module prefix when filtering packages
passed via `--only=`. This is quite confusing: to only rebuild
something like `@theia/node-pty` we must pass `--only=node-pty`.

This commit adds a lookup using the prefixed name.
  • Loading branch information
paul-marechal committed Sep 2, 2021
1 parent 26cae3d commit 9208213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export class Rebuilder {
}
this.realModulePaths.add(realPath);

if (this.prodDeps[`${prefix}${modulePath}`] && (!this.onlyModules || this.onlyModules.includes(modulePath))) {
if (this.prodDeps[`${prefix}${modulePath}`] && (!this.onlyModules || this.onlyModules.includes(modulePath) || this.onlyModules.includes(`${prefix}${modulePath}`))) {
this.rebuilds.push(() => this.rebuildModuleAt(realPath));
}

Expand Down

0 comments on commit 9208213

Please sign in to comment.