Skip to content

Commit d7e83fa

Browse files
committed
build: update notify slack script to ESM as it imports from ng-dev
1 parent 2be70ec commit d7e83fa

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ var_20: &slack_notify_on_failure
128128
run:
129129
name: 'Notifying team about job failure'
130130
when: on_fail
131-
command: node ./scripts/circleci/notify-slack-job-failure.js
131+
command: node ./scripts/circleci/notify-slack-job-failure.mjs
132132

133133
# Branch filter that only matches the main branch.
134134
var_21: &only_main_branch_filter
@@ -509,7 +509,7 @@ jobs:
509509
name: Running size integration tests (failures are reported in Slack only).
510510
command: |
511511
# If the size integration tests fail, report the failure to a dedicated #components-ci-size-tracking Slack channel.
512-
yarn integration-tests:size-test || node ./scripts/circleci/notify-slack-job-failure.js components-ci-size-tracking
512+
yarn integration-tests:size-test || node ./scripts/circleci/notify-slack-job-failure.mjs components-ci-size-tracking
513513
- *slack_notify_on_failure
514514

515515
# ----------------------------------------------------------------------------

scripts/circleci/notify-slack-job-failure.js renamed to scripts/circleci/notify-slack-job-failure.mjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
* will be a noop when running for forked builds (i.e. PRs).
66
*/
77

8-
const {
8+
import {
99
isVersionBranch,
1010
getConfig,
1111
assertValidGithubConfig,
12-
} = require('@angular/dev-infra-private/ng-dev');
12+
} from '@angular/dev-infra-private/ng-dev';
1313

1414
if (process.env.CIRCLE_PR_NUMBER) {
1515
console.info('Skipping notifications for pull requests.');
@@ -23,7 +23,7 @@ const {
2323
SLACK_COMPONENTS_CI_FAILURES_WEBHOOK_URL: webhookUrl,
2424
} = process.env;
2525

26-
const {github} = getConfig([assertValidGithubConfig]);
26+
const {github} = await getConfig([assertValidGithubConfig]);
2727
const isPublishBranch = isVersionBranch(branchName) || branchName === github.mainBranchName;
2828

2929
// We don't want to spam the CI failures channel with e.g. Renovate branch failures.

0 commit comments

Comments
 (0)