Skip to content

Commit

Permalink
fix(src): ensure correct scopes derived from paths of the form "packa…
Browse files Browse the repository at this point in the history
…ges/X" and "external*/Y"
  • Loading branch information
Xunnamius committed Apr 4, 2022
1 parent 44e37a3 commit 165a89c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,10 @@ export function configureProgram(program?: Program): Context {
if (finalArgv.scopeRoot) {
const splitScope = computedScope.split('/').filter(Boolean);

if (computedScope.startsWith('packages/') && splitScope.length > 2) {
if (splitScope[0] == 'packages' && splitScope.length >= 2) {
computedScope = `packages/${splitScope[1]}`;
} else {
if (computedScope.startsWith('external-scripts')) {
if (splitScope[0].startsWith('external')) {
splitScope[0] = 'externals';
}

Expand Down

0 comments on commit 165a89c

Please sign in to comment.