Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add projectRootDir for monorepo connection sequences #1100

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Always show connection sequences with projectRootDir
stefan-toubia committed Apr 3, 2021
commit 36e1afaf79f5f2f4d70f090c127639b6388e5a7a
5 changes: 4 additions & 1 deletion src/nrepl/connectSequence.ts
Original file line number Diff line number Diff line change
@@ -209,7 +209,10 @@ function getConnectSequences(projectTypes: string[]): ReplConnectSequence[] {
const customSequences = getCustomConnectSequences();
const defSequences = projectTypes.reduce((seqs, projectType) => seqs.concat(defaultSequences[projectType]), []);
const defSequenceProjectTypes = [...new Set(defSequences.map(s => s.projectType))];
const sequences = customSequences.filter(customSequence => defSequenceProjectTypes.includes(customSequence.projectType)).concat(defSequences);
const sequences = customSequences.filter(customSequence =>
!!customSequence.projectRootDir
|| defSequenceProjectTypes.includes(customSequence.projectType)
).concat(defSequences);
Comment on lines +212 to +215
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite remember where the result from this function is used. Can you explain why you filter away sequences with the setting? (I'm sure it is the right thing to do, just want to understand why. 😄 )

return sequences;
}