Skip to content

Commit

Permalink
Merge branch 'Fix-icon-overlapping' of https://github.com/sudhanshuga…
Browse files Browse the repository at this point in the history
…utam2911/novu into Fix-icon-overlapping
  • Loading branch information
sudhanshugautam2911 committed Oct 19, 2023
2 parents 6a7f495 + 5335655 commit 9e6a023
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
3 changes: 2 additions & 1 deletion docker/local/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ For a full guide on running novu locally for development needs, please read our

### Advanced - Running with a Redis Cluster

Novu has support for redis cluster, however you must set the following env variables to enable it:
Novu has support for [redis cluster](https://redis.io/docs/management/scaling/), however you must set the following env variables to enable it:

// To be determined

In the local development example in the docker-compose.redis-cluster.yml file, the primary nodes are hard coded to 6391 through 6393 and
Expand Down
47 changes: 28 additions & 19 deletions scripts/print-affected-array.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function commaSeparatedListToArray(str) {
function getAffectedCommandResult(str) {
const outputLines = str.trim().split(/\r?\n/);
if (outputLines.length > 2) {
return outputLines.slice(-1)[0];
return outputLines.slice(2).join('');
}

return '';
Expand All @@ -91,13 +91,22 @@ async function affectedProjectsContainingTask(taskName, baseBranch) {

return JSON.parse(cache);
}
// pnpm nx print-affected --target=[task] --base [base branch] --select=tasks.target.project
const result = commaSeparatedListToArray(
getAffectedCommandResult(
await pnpmRun('nx', 'print-affected', '--target', taskName, '--base', baseBranch, '--select=tasks.target.project')
)

const affectedCommandResult = await pnpmRun(
'nx',
'show',
'projects',
'--affected',
'--withTarget',
taskName,
'--base',
baseBranch,
'--json'
);

// pnpm nx show projects --affected --withTarget=[task] --base [base branch] --json
const result = JSON.parse(getAffectedCommandResult(affectedCommandResult));

fs.writeFileSync(cachePath, JSON.stringify(result));

return result;
Expand All @@ -113,21 +122,21 @@ async function allProjectsContainingTask(taskName) {
return JSON.parse(cache);
}

// pnpm nx print-affected --target=[task] --files package.json --select=tasks.target.project
const result = commaSeparatedListToArray(
getAffectedCommandResult(
await pnpmRun(
'nx',
'print-affected',
'--target',
taskName,
'--files',
'package.json',
'--select=tasks.target.project'
)
)
// pnpm nx show projects --affected --withTarget=[task] --files package.json --json
const affectedCommandResult = await pnpmRun(
'nx',
'show',
'projects',
'--affected',
'--withTarget',
taskName,
'--files',
'package.json',
'--json'
);

const result = JSON.parse(getAffectedCommandResult(affectedCommandResult));

fs.writeFileSync(cachePath, JSON.stringify(result));

return result;
Expand Down

0 comments on commit 9e6a023

Please sign in to comment.