refactor: remove unused methods and locals

This commit is contained in:
Alan Agius 2024-10-04 06:48:52 +00:00 committed by Alan Agius
parent d3709e83ba
commit 4941725f9e
4 changed files with 8 additions and 15 deletions

View File

@ -383,7 +383,7 @@ export abstract class SchematicsCommandModule
}
private getProjectName(): string | undefined {
const { workspace, logger } = this.context;
const { workspace } = this.context;
if (!workspace) {
return undefined;
}

View File

@ -365,16 +365,6 @@ function unwrapTemplateLiteral(
return [messageParts, expressions];
}
function unwrapLocalizeCall(
path: NodePath<types.CallExpression>,
utils: LocalizeUtilityModule,
): [TemplateStringsArray, types.Expression[]] {
const [messageParts] = utils.unwrapMessagePartsFromLocalizeCall(path);
const [expressions] = utils.unwrapSubstitutionsFromLocalizeCall(path);
return [messageParts, expressions];
}
async function loadLocaleData(path: string, optimize: boolean): Promise<string> {
// The path is validated during option processing before the build starts
const content = await fs.readFile(path, 'utf8');

View File

@ -125,7 +125,7 @@ export class AngularWebpackPlugin {
}
apply(compiler: Compiler): void {
const { NormalModuleReplacementPlugin, WebpackError, util } = compiler.webpack;
const { NormalModuleReplacementPlugin, util } = compiler.webpack;
this.webpackCreateHash = util.createHash;
// Setup file replacements with webpack
@ -648,7 +648,11 @@ export class AngularWebpackPlugin {
];
diagnosticsReporter(diagnostics);
const transformers = createJitTransformers(builder, this.compilerCli, this.pluginOptions);
const transformers = createJitTransformers(
builder,
this.compilerCliTooling,
this.pluginOptions,
);
return {
fileEmitter: this.createFileEmitter(builder, transformers, () => []),

View File

@ -6,9 +6,8 @@
* found in the LICENSE file at https://angular.dev/license
*/
import * as ts from 'typescript';
import ts from 'typescript';
const TARGET_TEXT = '@NgModule';
const BUILTIN_LOADERS = new Set([
'provideCloudflareLoader',
'provideCloudinaryLoader',