Skip to content

Commit

Permalink
Merge pull request #1918 from micalevisk/refactor-remove-deprecated-n…
Browse files Browse the repository at this point in the history
…ode-apis

refactor: drop deprecate nodejs utility api
  • Loading branch information
kamilmysliwiec authored Oct 28, 2024
2 parents 5eddd5a + e323a5a commit 2546cdb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/lib/service/service.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import {
Tree,
url,
} from '@angular-devkit/schematics';
import { isNullOrUndefined } from 'util';
import { normalizeToKebabOrSnakeCase } from '../../utils/formatting';
import {
DeclarationOptions,
Expand All @@ -25,6 +24,10 @@ import { Location, NameParser } from '../../utils/name.parser';
import { mergeSourceRoot } from '../../utils/source-root.helpers';
import { ServiceOptions } from './service.schema';

function isNullOrUndefined(value: any): value is null | undefined {
return value === null || value === undefined;
}

export function main(options: ServiceOptions): Rule {
options = transform(options);
return (tree: Tree, context: SchematicContext) => {
Expand Down Expand Up @@ -63,8 +66,8 @@ function transform(source: ServiceOptions): ServiceOptions {
function generate(options: ServiceOptions) {
return (context: SchematicContext) =>
apply(url(join('./files' as Path, options.language)), [
options.spec
? noop()
options.spec
? noop()
: filter((path) => {
const languageExtension = options.language || 'ts';
const suffix = `.__specFileSuffix__.${languageExtension}`;
Expand Down

0 comments on commit 2546cdb

Please sign in to comment.