Skip to content

Commit

Permalink
refactor: replace usage of deprecated mapTo with map
Browse files Browse the repository at this point in the history
  • Loading branch information
alan-agius4 committed Apr 18, 2024
1 parent 54d4a3f commit 4d3bf84
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import { BuilderContext, BuilderOutput, createBuilder } from '@angular-devkit/architect';
import type { NgPackagrOptions } from 'ng-packagr';
import { join, resolve } from 'path';
import { Observable, catchError, from, mapTo, of, switchMap } from 'rxjs';
import { Observable, catchError, from, map, of, switchMap } from 'rxjs';
import { normalizeCacheOptions } from '../../utils/normalize-cache';
import { purgeStaleBuildCache } from '../../utils/purge-cache';
import { Schema as NgPackagrBuilderOptions } from './schema';
Expand Down Expand Up @@ -58,7 +58,7 @@ export function execute(
switchMap(({ packager, ngPackagrOptions }) =>
options.watch ? packager.watch(ngPackagrOptions) : packager.build(ngPackagrOptions),
),
mapTo({ success: true }),
map(() => ({ success: true })),
catchError((err) => of({ success: false, error: err.message })),
);
}
Expand Down

0 comments on commit 4d3bf84

Please sign in to comment.