Skip to content

Commit be0b7fd

Browse files
author
John Doe
committed
refactor: cleanup
1 parent 9fc52be commit be0b7fd

File tree

7 files changed

+6
-32
lines changed

7 files changed

+6
-32
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,6 @@ Therefore, PRs are merged via one of two strategies:
8383
- rebase - branch cannot contain merge commits ([rebase instead of merge](https://www.atlassian.com/git/tutorials/merging-vs-rebasing)),
8484
- squash - single commit whose message is the PR title (should be in conventional commit format).
8585

86-
## Releases
87-
88-
We use nx release command to create releases for GitHub as well as publish to npm.
89-
90-
**Preconditions:**
91-
92-
- `npm login` - Only users with write access to [code-pushup](https://www.npmjs.com/org/code-pushup) can publish
93-
- (optional) `GITHUB_TOKEN=ghp_...` in `.env` - [Personal access token](https://github.com/settings/personal-access-tokens/new) to create a GitHub release.
94-
95-
**Steps:**
96-
97-
- `git checkout main`, `git pull`
98-
- (recommended optional) `npx nx release --dryRun`
99-
- `npx nx release` and confirm publish prompt
100-
10186
## Project tags
10287

10388
[Nx tags](https://nx.dev/core-features/enforce-module-boundaries) are used to enforce module boundaries in the project graph when linting.

code-pushup.config.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ const config: CoreConfig = {
2121
server: 'https://api.staging.code-pushup.dev/graphql',
2222
apiKey: process.env['CP_API_KEY'],
2323
},
24-
persist: {
25-
outputDir: '.code-pushup',
26-
},
2724
}),
2825
plugins: [],
2926
};

packages/nx-plugin/src/executors/internal/config.ts

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,12 @@ export function persistConfig(
2727
): Partial<PersistConfig> {
2828
const {
2929
format,
30-
outputDir = '{workspaceRoot}/.code-pushup/{projectName}',
30+
outputDir = '{projectRoot}/.code-pushup',
3131
filename,
3232
} = options;
3333

34-
const { workspaceRoot, projectConfig } = context;
35-
const projectName = projectConfig?.name ?? '';
36-
const resolvedOutputDir = outputDir
37-
.replace('{workspaceRoot}', workspaceRoot)
38-
.replace('{projectName}', projectName);
39-
4034
return {
41-
outputDir: resolvedOutputDir,
35+
outputDir,
4236
...(format ? { format } : {}),
4337
...(filename ? { filename } : {}),
4438
};

packages/utils/src/lib/execute-process.int.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ describe('executeProcess', () => {
104104
expect(logger.command).toHaveBeenCalledWith(
105105
'echo hello',
106106
expect.any(Function),
107-
{},
108107
);
109108
});
110109

packages/utils/src/lib/execute-process.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export function executeProcess(cfg: ProcessConfig): Promise<ProcessResult> {
158158
const { onStdout, onStderr, onError, onComplete } = observer ?? {};
159159

160160
const bin = [command, ...(args ?? [])].join(' ');
161-
logger.debug(JSON.stringify(options), { force: true });
161+
162162
const worker = () =>
163163
new Promise<ProcessResult>((resolve, reject) => {
164164
const spawnedProcess = spawn(command, args ?? [], {
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import ansis from 'ansis';
2-
31
// removes all color codes from the output for snapshot readability
42
export function removeColorCodes(stdout: string) {
5-
return ansis.strip(stdout);
3+
// eslint-disable-next-line no-control-regex
4+
return stdout.replace(/\u001B\[\d+m/g, '');
65
}

tools/src/debug/debug.plugin.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { CreateNodes, CreateNodesContext } from '@nx/devkit';
22
import { dirname } from 'node:path';
3-
import { objectToCliArgs } from '@code-pushup/utils';
3+
import { objectToCliArgs } from '../../../packages/nx-plugin/src/executors/internal/cli.js';
44
import { TOOLS_TSCONFIG_PATH } from '../constants.js';
55
import { KILL_PROCESS_BIN, LIST_PROCESS_BIN } from './constants.js';
66

0 commit comments

Comments
 (0)