mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Drop unused runtime deps (huggingface, koa, langchain, react-markdown, react-syntax-highlighter, next-i18next, p-queue, trie-search, sse, codemirror-companion-extension, tabler/icons-react, etc.) and demote build-only packages to devDependencies. Delete dead source files (quick-ask modes, ListPromptModal, NewChatConfirmModal, PatternMatchingModal, ContainerContext, command-ui chat-message, ui/tabs) and unused exports flagged by knip. Add `lint:dead` script backed by knip and a knip.json config. Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
20 lines
725 B
JavaScript
20 lines
725 B
JavaScript
module.exports = {
|
|
preset: "ts-jest",
|
|
testEnvironment: "jsdom",
|
|
roots: ["<rootDir>/src"],
|
|
transform: {
|
|
"^.+\\.(js|jsx|ts|tsx)$": "ts-jest",
|
|
},
|
|
moduleNameMapper: {
|
|
"^@/(.*)$": "<rootDir>/src/$1",
|
|
"^obsidian$": "<rootDir>/__mocks__/obsidian.js",
|
|
// The yaml package's "exports" field defaults to a browser ESM entry under
|
|
// jsdom; Jest can't parse ESM without extra config, so point at the CJS
|
|
// build it ships under dist/.
|
|
"^yaml$": "<rootDir>/node_modules/yaml/dist/index.js",
|
|
},
|
|
testRegex: ".*\\.test\\.(jsx?|tsx?)$",
|
|
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
|
|
testPathIgnorePatterns: ["/node_modules/"],
|
|
setupFiles: ["<rootDir>/jest.setup.js"],
|
|
};
|