Skip to content

Commit 1ba432a

Browse files
committed
build: update to the latest version of dev-infra with ESM (#25052)
* build: update to the latest version of dev-infra with ESM Updates to the latest version of dev-infra with full ESM. * build: enable `--strict` for tools typescript code * build: update notify slack script to ESM as it imports from `ng-dev` (cherry picked from commit 621f209)
1 parent 8f7394a commit 1ba432a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+1418
-433
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
# ----------------------------------------------------------------------------
File renamed without changes.
File renamed without changes.

.ng-dev/config.mts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import {format} from './format.mjs';
2+
import {github} from './github.mjs';
3+
import {pullRequest} from './pull-request.mjs';
4+
import {commitMessage} from './commit-message.mjs';
5+
import {caretaker} from './caretaker.mjs';
6+
import {release} from './release.mjs';
7+
8+
export {commitMessage, format, github, pullRequest, caretaker, release};

.ng-dev/config.ts

Lines changed: 0 additions & 15 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.

.ng-dev/release.ts renamed to .ng-dev/release.mts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {SemVer} from 'semver';
1+
import semver from 'semver';
22
import {ReleaseConfig} from '@angular/dev-infra-private/ng-dev';
3-
import {assertValidFrameworkPeerDependency} from '../tools/release-checks/check-framework-peer-dependency';
4-
import {assertValidUpdateMigrationCollections} from '../tools/release-checks/check-migration-collections';
5-
import {assertValidNpmPackageOutput} from '../tools/release-checks/npm-package-output';
3+
import {assertValidFrameworkPeerDependency} from '../tools/release-checks/check-framework-peer-dependency.mjs';
4+
import {assertValidUpdateMigrationCollections} from '../tools/release-checks/check-migration-collections.mjs';
5+
import {assertValidNpmPackageOutput} from '../tools/release-checks/npm-package-output/index.mjs';
66

77
/**
88
* Packages that will be published as part of the project.
@@ -46,11 +46,11 @@ export const release: ReleaseConfig = {
4646
buildPackages: async () => {
4747
// The `performNpmReleaseBuild` function is loaded at runtime as loading of the
4848
// script results in an invocation of Bazel for any `yarn ng-dev` command.
49-
const {performNpmReleaseBuild} = await import('../scripts/build-packages-dist');
49+
const {performNpmReleaseBuild} = await import('../scripts/build-packages-dist.mjs');
5050
return performNpmReleaseBuild();
5151
},
5252
prereleaseCheck: async (newVersionStr, builtPackagesWithInfo) => {
53-
const newVersion = new SemVer(newVersionStr);
53+
const newVersion = new semver.SemVer(newVersionStr);
5454

5555
await assertValidFrameworkPeerDependency(newVersion);
5656
await assertValidUpdateMigrationCollections(newVersion);

.ng-dev/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"compilerOptions": {
33
"strict": true,
4-
"target": "es2015",
5-
"module": "commonjs",
4+
"target": "es2020",
5+
"module": "Node16",
66
"esModuleInterop": true,
77
"noEmit": true,
88
"skipLibCheck": true,

0 commit comments

Comments
 (0)