Skip to content

Commit 8e8314c

Browse files
build: use mjs files for ng-dev configuration (#32309)
* build: use mjs files for ng-dev configuration In preperation for ng-dev requiring mjs files for configuration, switch over our usage * ci: set up validation of the ng-dev configuration on CI
1 parent cd22ab6 commit 8e8314c

File tree

15 files changed

+62
-57
lines changed

15 files changed

+62
-57
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@95e3a0ede6dfa1aedd34b03918ad72b18f87e5ae
2525
- name: Install node modules
2626
run: pnpm install --frozen-lockfile
27+
- name: Validate ng-dev config
28+
run: pnpm ng-dev config validate
2729
- name: Checking package externals
2830
run: |
2931
bazel build //:package_externals

.github/workflows/pr.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@95e3a0ede6dfa1aedd34b03918ad72b18f87e5ae
2323
- name: Install node modules
2424
run: pnpm install --frozen-lockfile
25+
- name: Validate ng-dev config
26+
run: pnpm ng-dev config validate
2527
- name: Checking package externals
2628
run: |
2729
bazel build //:package_externals

.ng-dev/caretaker.mts renamed to .ng-dev/caretaker.mjs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
import {CaretakerConfig} from '@angular/ng-dev';
2-
3-
/** The configuration for `ng-dev caretaker` commands. */
4-
export const caretaker: CaretakerConfig = {
1+
/**
2+
* The configuration for `ng-dev caretaker` commands.
3+
*
4+
* @type { import("@angular/ng-dev").CaretakerConfig }
5+
*/
6+
export const caretaker = {
57
githubQueries: [
68
{
79
name: 'Merge Queue',

.ng-dev/commit-message.mts renamed to .ng-dev/commit-message.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
import {CommitMessageConfig} from '@angular/ng-dev';
2-
31
/**
42
* The configuration for `ng-dev commit-message` commands.
3+
*
4+
* @type { import("@angular/ng-dev").CommitMessageConfig }
55
*/
6-
export const commitMessage: CommitMessageConfig = {
6+
export const commitMessage = {
77
maxLineLength: Infinity,
88
minBodyLength: 0,
99
minBodyLengthTypeExcludes: ['docs'],
File renamed without changes.

.ng-dev/format.mjs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/**
2+
* Configuration for the `ng-dev format` command.
3+
*
4+
* @type { import("@angular/ng-dev").FormatConfig }
5+
*/
6+
export const format = {
7+
buildifier: true,
8+
prettier: {
9+
matchers: ['**/*.{js,ts,mts,mjs,json}'],
10+
},
11+
};

.ng-dev/format.mts

Lines changed: 0 additions & 12 deletions
This file was deleted.

.ng-dev/github.mjs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/**
2+
* Github configuration for the `ng-dev` command. This repository is used as
3+
* remote for the merge script and other utilities like `ng-dev pr rebase`.
4+
*
5+
* @type { import("@angular/ng-dev").GithubConfig }
6+
*/
7+
export const github = {
8+
owner: 'angular',
9+
name: 'components',
10+
mainBranchName: 'main',
11+
useNgDevAuthService: true,
12+
};

.ng-dev/github.mts

Lines changed: 0 additions & 12 deletions
This file was deleted.

.ng-dev/pull-request.mts renamed to .ng-dev/pull-request.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import {PullRequestConfig} from '@angular/ng-dev';
2-
31
/**
4-
* Configuration for the pull request commands in `ng-dev`. This includes the
5-
* setup for the merge command.
2+
* Configuration for the merge tool in `ng-dev`. This sets up the labels which
3+
* are respected by the merge script (e.g. the target labels).
4+
*
5+
* @type { import("@angular/ng-dev").PullRequestConfig }
66
*/
7-
export const pullRequest: PullRequestConfig = {
7+
export const pullRequest = {
88
// By default, the merge script merges locally with `git cherry-pick` and autosquash.
99
// This has the downside of pull requests showing up as `Closed` instead of `Merged`.
1010
// In the components repository, since we don't use fixup or squash commits, we can

0 commit comments

Comments
 (0)