From 60203003f061d487a902b5ec281d265e1aab728d Mon Sep 17 00:00:00 2001 From: Johannes Millan Date: Wed, 4 Feb 2026 18:30:51 +0100 Subject: [PATCH] fix(build): update glob API and remove unused Angular imports Use globSync instead of callback-based glob (breaking change in glob v9+). Remove unused MatHint and AsyncPipe imports to fix NG8113 warnings. --- .../clipboard-images-cfg.component.ts | 3 +-- .../note/dialog-add-note/dialog-add-note.component.ts | 2 -- tools/remove-woff.js | 9 ++++----- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/app/features/config/clipboard-images-cfg/clipboard-images-cfg.component.ts b/src/app/features/config/clipboard-images-cfg/clipboard-images-cfg.component.ts index 4966a5b909..73cc9f83f2 100644 --- a/src/app/features/config/clipboard-images-cfg/clipboard-images-cfg.component.ts +++ b/src/app/features/config/clipboard-images-cfg/clipboard-images-cfg.component.ts @@ -19,7 +19,7 @@ import { } from '../global-config.model'; import { ProjectCfgFormKey } from '../../project/project.model'; import { IS_ELECTRON } from '../../../app.constants'; -import { MatFormField, MatHint, MatLabel } from '@angular/material/form-field'; +import { MatFormField, MatLabel } from '@angular/material/form-field'; import { MatInput } from '@angular/material/input'; import { FormsModule } from '@angular/forms'; import { DialogClipboardImagesManagerComponent } from './dialog-clipboard-images-manager/dialog-clipboard-images-manager.component'; @@ -36,7 +36,6 @@ import { getDefaultClipboardImagesPath } from '../../../util/get-default-clipboa TranslatePipe, MatFormField, MatLabel, - MatHint, MatInput, FormsModule, ], diff --git a/src/app/features/note/dialog-add-note/dialog-add-note.component.ts b/src/app/features/note/dialog-add-note/dialog-add-note.component.ts index 5efa795a72..cb442b3b4e 100644 --- a/src/app/features/note/dialog-add-note/dialog-add-note.component.ts +++ b/src/app/features/note/dialog-add-note/dialog-add-note.component.ts @@ -11,7 +11,6 @@ import { MatIcon } from '@angular/material/icon'; import { MatButton, MatIconButton } from '@angular/material/button'; import { TranslatePipe } from '@ngx-translate/core'; import { SnackService } from '../../../core/snack/snack.service'; -import { AsyncPipe } from '@angular/common'; @Component({ // selector: 'dialog-add-note', @@ -32,7 +31,6 @@ import { AsyncPipe } from '@angular/common'; MatButton, MatIconButton, TranslatePipe, - AsyncPipe, ], }) export class DialogAddNoteComponent extends DialogFullscreenMarkdownComponent { diff --git a/tools/remove-woff.js b/tools/remove-woff.js index f13b469eab..727979c14a 100644 --- a/tools/remove-woff.js +++ b/tools/remove-woff.js @@ -1,13 +1,12 @@ /* eslint-env es6 */ -const glob = require('glob'); +const { globSync } = require('glob'); const fs = require('fs'); // "removeWOFF2": "find dist/ -type f -iname '*.woff' -delete && find dist/ -type f -iname '*.css' -exec sed -i \"s/, url\\('.*'\\) format\\('woff'\\)//g\" {} \\;", -glob('dist/*.woff', function (er, files) { - files.forEach((filePath) => { - fs.unlinkSync(filePath); - }); +const files = globSync('dist/*.woff'); +files.forEach((filePath) => { + fs.unlinkSync(filePath); }); // NOTE: this would remove the dead references, but it should be no problem anyway