From 1c952eff0e17efb07ccc1f12940b984142b10f9d Mon Sep 17 00:00:00 2001 From: mgmeyers Date: Mon, 19 Feb 2024 12:42:04 -0800 Subject: [PATCH] Fix build --- package.json | 2 +- src/postProcessor.ts | 2 +- tsconfig.json | 25 ++++++++++--------------- yarn.lock | 10 +++++----- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 7916d52..5f684d9 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "devDependencies": { "@codemirror/state": "^6.0.0", "@codemirror/view": "^6.0.0", - "@codemirror/language": "https://github.com/lishid/cm-language", + "@codemirror/language": "https://github.com/lishid/cm-language#1aadcc247f20ccfda76424a9f853dbb4ee203fdc", "@trivago/prettier-plugin-sort-imports": "4.2.0", "@types/node": "^16.11.6", "@typescript-eslint/eslint-plugin": "^5.2.0", diff --git a/src/postProcessor.ts b/src/postProcessor.ts index 73a4d02..9ddeb34 100644 --- a/src/postProcessor.ts +++ b/src/postProcessor.ts @@ -3,7 +3,7 @@ import { MarkdownPostProcessor, setIcon } from 'obsidian'; import { CalloutConfig } from './settings'; function getFirstTextNode(li: HTMLElement) { - for (const node of li.childNodes) { + for (const node of Array.from(li.childNodes)) { if ( node.nodeType === document.ELEMENT_NODE && (node as HTMLElement).tagName === 'P' diff --git a/tsconfig.json b/tsconfig.json index 7f4d486..5d845fc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,24 +1,19 @@ { "compilerOptions": { + "allowJs": true, + "allowSyntheticDefaultImports": true, "baseUrl": ".", + "importHelpers": true, "inlineSourceMap": true, "inlineSources": true, + "isolatedModules": true, + "jsx": "react", + "lib": ["dom", "es6", "scripthost", "es2018"], "module": "ESNext", - "target": "ES6", - "allowJs": true, - "noImplicitAny": true, "moduleResolution": "node", - "importHelpers": true, - "isolatedModules": true, - "lib": [ - "DOM", - "DOM.Iterable", - "ES5", - "ES6", - "ES7" - ] + "noImplicitAny": true, + "skipLibCheck": true, + "target": "es2018" }, - "include": [ - "**/*.ts" - ] + "include": ["./src/**/*.ts", "./src/**/*.tsx"] } diff --git a/yarn.lock b/yarn.lock index 5afe212..bdcc9ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -122,13 +122,13 @@ "@babel/helper-validator-identifier" "^7.22.20" to-fast-properties "^2.0.0" -"@codemirror/language@https://github.com/lishid/cm-language": - version "6.9.2" - resolved "https://github.com/lishid/cm-language#cc6a2cc30288db6be3f879ddf0e3ef64f14ed6ab" +"@codemirror/language@https://github.com/lishid/cm-language#1aadcc247f20ccfda76424a9f853dbb4ee203fdc": + version "6.6.0" + resolved "https://github.com/lishid/cm-language#1aadcc247f20ccfda76424a9f853dbb4ee203fdc" dependencies: "@codemirror/state" "^6.0.0" "@codemirror/view" "^6.0.0" - "@lezer/common" "^1.1.0" + "@lezer/common" "^1.0.0" "@lezer/highlight" "^1.0.0" "@lezer/lr" "^1.0.0" style-mod "^4.0.0" @@ -208,7 +208,7 @@ "@jridgewell/resolve-uri" "^3.1.0" "@jridgewell/sourcemap-codec" "^1.4.14" -"@lezer/common@^1.0.0", "@lezer/common@^1.1.0": +"@lezer/common@^1.0.0": version "1.2.1" resolved "https://registry.yarnpkg.com/@lezer/common/-/common-1.2.1.tgz#198b278b7869668e1bebbe687586e12a42731049" integrity sha512-yemX0ZD2xS/73llMZIK6KplkjIjf2EvAHcinDi/TfJ9hS25G0388+ClHt6/3but0oOxinTcQHJLDXh6w1crzFQ==