From a24367c815ef031d76e54c3c42047a1f89f72b61 Mon Sep 17 00:00:00 2001 From: jung-geun Date: Sat, 9 May 2026 15:42:10 +0900 Subject: [PATCH] =?UTF-8?q?src/lib:=20=EB=9D=BC=EC=9D=B4=EB=B8=8C=EB=9F=AC?= =?UTF-8?q?=EB=A6=AC=20=EC=A7=84=EC=9E=85=EC=A0=90=20+=201.0.0=20=ED=98=B8?= =?UTF-8?q?=ED=99=98=20shim?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit normalizeToNFC/normalizeToNFD — v1 require('@pieroot/nfd2nfc') 호환 유지. 신규 API: normalizeEntry, scan, shouldNormalize + 타입 export. tsconfig.lib.json: declaration: true, out/lib/에 .d.ts 생성. Co-Authored-By: Claude Opus 4.7 --- src/lib/index.ts | 9 +++++++++ tsconfig.lib.json | 14 ++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 src/lib/index.ts create mode 100644 tsconfig.lib.json diff --git a/src/lib/index.ts b/src/lib/index.ts new file mode 100644 index 0000000..d5fbbc9 --- /dev/null +++ b/src/lib/index.ts @@ -0,0 +1,9 @@ +// 1.0.0 호환 shim — 단순 문자열 정규화 +export const normalizeToNFC = (s: string): string => s.normalize('NFC'); +export const normalizeToNFD = (s: string): string => s.normalize('NFD'); + +// 파일 시스템 API +export { normalizeEntry } from '../core/normalizer'; +export { scan } from '../core/scanner'; +export { shouldNormalize } from '../core/filter'; +export type { RenameResult, FilterOptions, ScanEntry } from '../core/types'; diff --git a/tsconfig.lib.json b/tsconfig.lib.json new file mode 100644 index 0000000..fb6767d --- /dev/null +++ b/tsconfig.lib.json @@ -0,0 +1,14 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "module": "CommonJS", + "moduleResolution": "node", + "outDir": "out/lib", + "rootDir": "src", + "declaration": true, + "declarationMap": true, + "types": ["node"] + }, + "include": ["src/lib/**/*", "src/core/**/*"], + "exclude": ["node_modules", "out", "dist", "src/core/__tests__"] +}