Skip to content

Commit a18753e

Browse files
authored
build: switch to dev-infra configuration directory (#19581)
We recently updated the shared dev-infra package to the latest version (in order to bring in the benchmark utils), but this actually broke the merge script because dev-infra landed a change on how the configuration is loaded. Previously, the configuration has been loaded from a single file at project root, but now dev-infra loads it from a dedicated dev-infra folder. This has been done that way to allow for dedicated configuration files for individual `ng-dev` command parts.
1 parent fb814bb commit a18753e

File tree

4 files changed

+20
-17
lines changed

4 files changed

+20
-17
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,7 @@
315315

316316
# Misc
317317
/* @angular/dev-infra-components @jelbourn
318+
/.ng-dev/** @angular/dev-infra-components
318319
/.github/** @angular/dev-infra-components @jelbourn
319320
/.vscode/** @angular/dev-infra-components @mmalerba
320321
/src/* @jelbourn

.ng-dev/config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import {github} from './github';
2+
import {merge} from './merge';
3+
4+
module.exports = {
5+
github,
6+
merge,
7+
};

.ng-dev/github.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import {GithubConfig} from '@angular/dev-infra-private/utils/config';
2+
3+
/**
4+
* Github configuration for the ng-dev command. This repository is
5+
* uses as remote for the merge script.
6+
*/
7+
export const github: GithubConfig = {
8+
owner: 'angular',
9+
name: 'components'
10+
};

.ng-dev-config.ts renamed to .ng-dev/merge.ts

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,12 @@
11
import {MergeConfig} from '@angular/dev-infra-private/pr/merge/config';
22
import {determineMergeBranches} from '@angular/dev-infra-private/pr/merge/determine-merge-branches';
3-
import {GithubConfig} from '@angular/dev-infra-private/utils/config';
4-
5-
/**
6-
* Github configuration for the ng-dev command. This repository is
7-
* uses as remote for the merge script.
8-
*/
9-
const github: GithubConfig = {
10-
owner: 'angular',
11-
name: 'components'
12-
};
133

144
/**
155
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
166
* are respected by the merge script (e.g. the target labels).
177
*/
18-
const merge = (): MergeConfig => {
19-
const currentVersion = require('./package.json').version;
8+
export const merge = (): MergeConfig => {
9+
const currentVersion = require('../package.json').version;
2010
// We use the `@angular/cdk` as source of truth for the latest published version in NPM.
2111
// Any package from the monorepo could technically work and result in the same version.
2212
const {minor, patch} = determineMergeBranches(currentVersion, '@angular/cdk');
@@ -57,8 +47,3 @@ const merge = (): MergeConfig => {
5747
],
5848
};
5949
};
60-
61-
module.exports = {
62-
github,
63-
merge,
64-
};

0 commit comments

Comments
 (0)