Skip to content

Commit 87ba0e5

Browse files
committed
refactor: replace usage of deprecated mapTo with map
1 parent a189f17 commit 87ba0e5

File tree

1 file changed

+3
-3
lines changed
  • packages/angular_devkit/build_angular/src/builders/ng-packagr

1 file changed

+3
-3
lines changed

packages/angular_devkit/build_angular/src/builders/ng-packagr/index.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect';
1010
import type { NgPackagrOptions } from 'ng-packagr';
11-
import { join, resolve } from 'path';
12-
import { Observable, catchError, from, mapTo, of, switchMap } from 'rxjs';
11+
import { join, resolve } from 'node:path';
12+
import { Observable, catchError, from, map, of, switchMap } from 'rxjs';
1313
import { normalizeCacheOptions } from '../../utils/normalize-cache';
1414
import { purgeStaleBuildCache } from '../../utils/purge-cache';
1515
import { Schema as NgPackagrBuilderOptions } from './schema';
@@ -58,7 +58,7 @@ export function execute(
5858
switchMap(({ packager, ngPackagrOptions }) =>
5959
options.watch ? packager.watch(ngPackagrOptions) : packager.build(ngPackagrOptions),
6060
),
61-
mapTo({ success: true }),
61+
map(() => ({ success: true })),
6262
catchError((err) => of({ success: false, error: err.message })),
6363
);
6464
}

0 commit comments

Comments
 (0)