From 423a5643b41ac56e2fb5770ce4f60ce0423df6c9 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 4 Dec 2026 18:40:02 +0100 Subject: [PATCH 1/3] ci: lint via hk --- .editorconfig | 16 ++ .editorconfig-checker.json | 3 + .github/dependabot.yml | 4 + .github/workflows/ci.yml | 30 +++ .github/workflows/publish.yml | 17 +- .github/workflows/test.yml | 21 -- .rumdl.toml | 7 + README.md | 2 +- biome.json | 13 + hk.pkl | 36 +++ logseq/config.edn | 62 ++--- mise.lock | 448 ++++++++++++++++++++++++++++++++++ mise.toml | 14 ++ package.json | 28 +-- scripts/convert.ts | 14 +- tsconfig.json | 78 +++--- wrangler.jsonc | 86 +++---- 17 files changed, 715 insertions(+), 164 deletions(-) create mode 100644 .editorconfig create mode 100644 .editorconfig-checker.json create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/test.yml create mode 100644 .rumdl.toml create mode 100644 biome.json create mode 100644 hk.pkl create mode 100644 mise.lock create mode 100644 mise.toml diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3632bda --- /dev/null +++ b/.editorconfig @@ -0,0 +1,16 @@ +# http://editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +tab_width = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true +max_line_length = 120 + +# Formatted by biome, yamlfmt or taplo, which cannot wrap strings +[*.{json,jsonc,yaml,yml,toml}] +max_line_length = off diff --git a/.editorconfig-checker.json b/.editorconfig-checker.json new file mode 100644 index 0000000..b57507a --- /dev/null +++ b/.editorconfig-checker.json @@ -0,0 +1,3 @@ +{ + "Exclude": [] +} diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6a49d05..5e22f34 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -4,7 +4,11 @@ updates: directory: "/" schedule: interval: "monthly" + cooldown: + default-days: 7 - package-ecosystem: "npm" directory: "/" schedule: interval: "monthly" + cooldown: + default-days: 7 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..454fe6e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI +on: + push: + branches: [main] + pull_request: + branches: [main] +jobs: + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v7 + - uses: jdx/mise-action@7e2b3c3d1450331892809a84e22e30e3f52c1e92 # v5.5.0 + - uses: actions/setup-node@v7 + with: + cache: npm + node-version: latest + check-latest: true + - run: npm ci + - run: hk check --all + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + validate: + name: Validate Graph + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v7 + - name: Graph Validation + uses: logseq/graph-validator@v0.5.0 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 773d57b..153aba5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,10 +1,11 @@ name: Publish on: workflow_run: - workflows: ["Test"] + workflows: ['CI'] types: [completed] + conclusion: success branches: - - "main" + - 'main' permissions: contents: read jobs: @@ -28,8 +29,8 @@ jobs: - name: Setup Node.js uses: actions/setup-node@v7 with: - cache: "npm" - node-version: "latest" + cache: 'npm' + node-version: 'latest' check-latest: true - name: Install dependencies run: npm ci @@ -49,8 +50,8 @@ jobs: ref: ${{ github.head_ref }} - uses: actions/setup-node@v7 with: - cache: "npm" - node-version: "latest" + cache: 'npm' + node-version: 'latest' check-latest: true - name: Export graph as RDF uses: logseq/rdf-export@v0.2.1 @@ -62,5 +63,5 @@ jobs: npm run convert - uses: stefanzweifel/git-auto-commit-action@v7 with: - file_pattern: "notes.nq notes.jsonld" - commit_message: "Update linked data" + file_pattern: 'notes.nq notes.jsonld' + commit_message: 'Update linked data' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index a670a05..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,21 +0,0 @@ -name: Test -on: - push: - branches: [main] - pull_request: - branches: [main] -jobs: - spellcheck: - name: Spellchecker - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v7 - - uses: crate-ci/typos@v1.52.2 - validate: - name: Validate Graph - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v7 - - name: Graph Validation - uses: logseq/graph-validator@v0.5.0 diff --git a/.rumdl.toml b/.rumdl.toml new file mode 100644 index 0000000..8a5cb9b --- /dev/null +++ b/.rumdl.toml @@ -0,0 +1,7 @@ +[global] +flavor = "gfm" +editorconfig = true + +[MD013] +reflow = true +reflow-mode = "semantic-line-breaks" diff --git a/README.md b/README.md index d572011..e8bddb2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ # Notes -[![Test](https://github.com/chadsr/notes/actions/workflows/test.yml/badge.svg)](https://github.com/chadsr/notes/actions/workflows/test.yml) +[![CI](https://github.com/chadsr/notes/actions/workflows/ci.yml/badge.svg)](https://github.com/chadsr/notes/actions/workflows/ci.yml) [![Publish](https://github.com/chadsr/notes/actions/workflows/publish.yml/badge.svg)](https://github.com/chadsr/notes/actions/workflows/publish.yml) diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..f21298a --- /dev/null +++ b/biome.json @@ -0,0 +1,13 @@ +{ + "$schema": "https://biomejs.dev/schemas/2.6.9/schema.json", + "assist": { + "actions": { + "source": { + "useSortedKeys": "on" + } + } + }, + "formatter": { + "indentStyle": "space" + } +} diff --git a/hk.pkl b/hk.pkl new file mode 100644 index 0000000..5f8582d --- /dev/null +++ b/hk.pkl @@ -0,0 +1,36 @@ +amends "hk:/Config.pkl" + +import "hk:/Builtins.pkl" +// Using a coding agent? See https://hk.jdx.dev/agents + +local linters = new Mapping { + ["mise"] = Builtins.mise + ["mixed-line-ending"] = Builtins.mixed_line_ending + ["pkl-format"] = Builtins.pkl_format + ["jactionlint"] = Builtins.jactionlint + // hk doesn't add node_modules/.bin to PATH, so run the project's own tsc through npx + ["tsc"] = (Builtins.tsc) { + check = "npx --no-install tsc --noEmit -p {{workspace_indicator}}" + } + ["detect-private-key"] = Builtins.detect_private_key + ["zizmor"] = Builtins.zizmor + ["trailing-whitespace"] = Builtins.trailing_whitespace + ["check-added-large-files"] = (Builtins.check_added_large_files) { + check = "hk util check-added-large-files --maxkb 27000 {{files}}" + } + ["typos"] = (Builtins.typos) { + apply_check_diff = false + fix = "typos --force-exclude {{files}}" + } + ["biome"] = (Builtins.biome) { + // Also format json(c) + glob = List("**/*.js", "**/*.jsx", "**/*.ts", "**/*.tsx", "**/*.json", "**/*.jsonc") + } + ["cljstyle"] = new Step { + glob = List("**/*.clj", "**/*.cljc", "**/*.edn") + check = "cljstyle check {{files}}" + fix = "cljstyle fix {{files}}" + } +} + +steps = linters diff --git a/logseq/config.edn b/logseq/config.edn index 9d3b85a..7dda66a 100644 --- a/logseq/config.edn +++ b/logseq/config.edn @@ -5,7 +5,7 @@ ;; maybe your personal preferred format is Org but you'd ;; need to use Markdown for some projects. ;; :preferred-format "" - + ;; Preferred workflow style. ;; Value is either ":now" for NOW/LATER style, ;; or ":todo" for TODO/DOING style. @@ -23,14 +23,14 @@ ;; Set a custom date format for journal page title ;; Example: ;; :journal/page-title-format "EEE, do MMM yyyy" - + ;; Whether to enable hover on tooltip preview feature ;; Default is true, you can also toggle this via setting page :ui/enable-tooltip? true ;; Show brackets around page references ;; :ui/show-brackets? true - + ;; Enable showing the body of blocks when referencing them. :ui/show-full-blocks? false @@ -46,23 +46,23 @@ ;; Enable journals ;; :feature/enable-journals? true - + ;; Enable flashcards ;; :feature/enable-flashcards? true - + ;; Enable Whiteboards ;; :feature/enable-whiteboards? true - + ;; Disable the built-in Scheduled tasks and deadlines query ;; :feature/disable-scheduled-and-deadline-query? true - + ;; Specify the number of days in the future to display in the ;; scheduled tasks and deadlines query, with a default value of 0 which ;; only displays tasks for today. ;; Example usage: ;; Display all scheduled tasks and deadlines in the next 7 days ;; :scheduled/future-days 7 - + ;; Specify the date on which the week starts. ;; Goes from 0 to 6 (Monday to Sunday), default to 6 :start-of-week 6 @@ -73,15 +73,15 @@ ;; https://github.com/logseq/awesome-logseq#css-themes ;; Example: ;; :custom-css-url "@import url('https://cdn.jsdelivr.net/gh/dracula/logseq@master/custom.css');" - + ;; Specify a custom js import ;; This option take precedence over your local `logseq/custom.js` file ;; :custom-js-url "" - + ;; Set a custom Arweave gateway ;; Default gateway: https://arweave.net ;; :arweave/gateway "" - + ;; Set Bullet indentation when exporting ;; default option: tab ;; Possible options are for `:sidebar` are @@ -89,7 +89,7 @@ ;; 2. `:four-spaces` as four spaces ;; 3. `:two-spaces` as two spaces ;; :export/bullet-indentation :tab - + ;; When :all-pages-public? true, export repo would export all pages within that repo. ;; Regardless of whether you've set any page to public or not. ;; Example: @@ -114,16 +114,16 @@ ;; Tell logseq to use a specific folder in the repo as a default location for notes ;; if not specified, notes are stored in `pages` directory ;; :pages-directory "your-directory" - + ;; Tell logseq to use a specific folder in the repo as a default location for journals ;; if not specified, journals are stored in `journals` directory ;; :journals-directory "your-directory" - + ;; Set this to true will convert ;; `[[Grant Ideas]]` to `[[file:./grant_ideas.org][Grant Ideas]]` for org-mode ;; For more, see https://github.com/logseq/logseq/issues/672 ;; :org-mode/insert-file-link? true - + ;; Setup custom shortcuts under `:shortcuts` key ;; Syntax: ;; 1. `+` means keys pressing simultaneously. eg: `ctrl+shift+a` @@ -250,56 +250,56 @@ ;; any number between 0 and 1 (the greater it is the faster the changes of the next-interval of card reviews) (default 0.5) ;; :srs/learning-fraction 0.5 - + ;; the initial interval after the first successful review of a card (default 4) ;; :srs/initial-interval 4 - + ;; hide specific properties for blocks ;; E.g. :block-hidden-properties #{:created-at :updated-at} ;; :block-hidden-properties #{} - + ;; Enable all your properties to have corresponding pages :property-pages/enabled? true ;; Properties to exclude from having property pages ;; E.g.:property-pages/excludelist #{:duration :author} ;; :property-pages/excludelist - + ;; By default, property value separated by commas will not be treated as ;; page references. You can add properties to enable it. ;; E.g. :property/separated-by-commas #{:alias :tags} ;; :property/separated-by-commas #{} - + ;; Properties that are ignored when parsing property values for references ;; :ignored-page-references-keywords #{:author :startup} - + ;; logbook setup ;; :logbook/settings ;; {:with-second-support? false ;limit logbook to minutes, seconds will be eliminated ;; :enabled-in-all-blocks true ;display logbook in all blocks after timetracking ;; :enabled-in-timestamped-blocks false ;don't display logbook at all ;; } - + ;; Mobile photo uploading setup ;; :mobile/photo ;; {:allow-editing? true ;; :quality 80} - + ;; Mobile features options ;; Gestures ;; :mobile ;; {:gestures/disabled-in-block-with-tags ["kanban"]} - + ;; Extra CodeMirror options ;; See https://codemirror.net/5/doc/manual.html#config for possible options ;; :editor/extra-codemirror-options {:keyMap "emacs" :lineWrapping true} - + ;; Enable logical outdenting ;; :editor/logical-outdenting? true - + ;; When both text and a file are in the clipboard, paste the file ;; :editor/preferred-pasting-file? true - + ;; Quick capture templates for receiving contents from other apps. ;; Each template contains three elements {time}, {text} and {url}, which can be auto-expanded ;; by received contents from other apps. Note: the {} cannot be omitted. @@ -312,14 +312,14 @@ ;; :quick-capture-templates ;; {:text "[[quick capture]] **{time}**: {text} from {url}" ;; :media "[[quick capture]] **{time}**: {url}"} - + ;; Quick capture options ;; :quick-capture-options {:insert-today? false :redirect-page? false :default-page "my page"} - + ;; File sync options ;; Ignore these files when syncing, regexp is supported. ;; :file-sync/ignore-files [] - + ;; dwim (do what I mean) for Enter key when editing. ;; Context-awareness of Enter key makes editing more easily ; :dwim/settings { @@ -330,7 +330,7 @@ ; :properties? true ; :list? true ; } - + ;; Decide the way to escape the special characters in the page title. ;; Warning: ;; This is a dangerous operation. If you want to change the setting, diff --git a/mise.lock b/mise.lock new file mode 100644 index 0000000..5df85c3 --- /dev/null +++ b/mise.lock @@ -0,0 +1,448 @@ +# @generated - this file is auto-generated by `mise lock` https://mise.jdx.dev/dev-tools/mise-lock.html + +lockfile_version = 5 + +[[tools.biome]] +version = "2.6.10" +backend = "aqua:biomejs/biome" +specifiers = ["latest"] + +[tools.biome."platforms.linux-arm64"] +checksum = "sha256:3ffda97c1aaaf5bb7a5feb769a5ecd33abacc6bba2fd0ee78eefc97f73fdb823" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-linux-arm64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454444" +provenance = "github-attestations" + +[tools.biome."platforms.linux-arm64-musl"] +checksum = "sha256:3ffda97c1aaaf5bb7a5feb769a5ecd33abacc6bba2fd0ee78eefc97f73fdb823" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-linux-arm64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454444" +provenance = "github-attestations" + +[tools.biome."platforms.linux-x64"] +checksum = "sha256:9a81ccc455f1705939cd3220f8b5bc77cd726e2ab81cb7e9e60ecf1b1421bfc6" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-linux-x64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454441" +provenance = "github-attestations" + +[tools.biome."platforms.linux-x64-musl"] +checksum = "sha256:9a81ccc455f1705939cd3220f8b5bc77cd726e2ab81cb7e9e60ecf1b1421bfc6" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-linux-x64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454441" +provenance = "github-attestations" + +[tools.biome."platforms.macos-arm64"] +checksum = "sha256:2021b7210f3c6325b815ad53b2dbc6a51cad3938780968b938e992039abe24a4" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-darwin-arm64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454446" +provenance = "github-attestations" + +[tools.biome."platforms.macos-x64"] +checksum = "sha256:9c30ff311ce77153e89357f8149fcdaf8241290269f727250a08a334e94d4fdc" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-darwin-x64" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454443" +provenance = "github-attestations" + +[tools.biome."platforms.windows-x64"] +checksum = "sha256:446814a3b7984c30b6dd97691ce5be77656f1971ca682d3d8c367d0ea09a95ff" +url = "https://github.com/biomejs/biome/releases/download/%40biomejs/biome%402.6.10/biome-win32-x64.exe" +url_api = "https://api.github.com/repos/biomejs/biome/releases/assets/826454439" +provenance = "github-attestations" + +[[tools.cljstyle]] +version = "0.17.642" +backend = "github:greglook/cljstyle" +specifiers = ["latest"] + +[tools.cljstyle."platforms.linux-arm64"] +checksum = "sha256:0240ae4d97835db341bb03d910c858185fe838620aab9cd50f02fcc709e3fa61" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle-0.17.642.jar" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214222" + +[tools.cljstyle."platforms.linux-arm64-musl"] +checksum = "sha256:0240ae4d97835db341bb03d910c858185fe838620aab9cd50f02fcc709e3fa61" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle-0.17.642.jar" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214222" + +[tools.cljstyle."platforms.linux-x64"] +checksum = "sha256:292e1263f5a119c7af75e941e407bcf841625a627ce8bb40371ab78bf7b57b06" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle_0.17.642_linux_amd64.zip" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214250" + +[tools.cljstyle."platforms.linux-x64-musl"] +checksum = "sha256:292e1263f5a119c7af75e941e407bcf841625a627ce8bb40371ab78bf7b57b06" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle_0.17.642_linux_amd64.zip" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214250" + +[tools.cljstyle."platforms.macos-arm64"] +checksum = "sha256:34d7798e94a63fac46c85c66cd3a1e6132ce06e369eab7ffbf0212ae8bbf8c85" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle_0.17.642_macos_arm64.zip" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214264" + +[tools.cljstyle."platforms.macos-x64"] +checksum = "sha256:fa0226a3bad13f9b76fb797b0c0771d10e7ee6adc871e1d43841281046293117" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle_0.17.642_macos_amd64.zip" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214262" + +[tools.cljstyle."platforms.windows-x64"] +checksum = "sha256:0240ae4d97835db341bb03d910c858185fe838620aab9cd50f02fcc709e3fa61" +url = "https://github.com/greglook/cljstyle/releases/download/0.17.642/cljstyle-0.17.642.jar" +url_api = "https://api.github.com/repos/greglook/cljstyle/releases/assets/212214222" + +[[tools.hk]] +version = "2.15.0" +backend = "packslip:github.com/jdx/hk" +specifiers = ["latest"] +unsupported_platforms = ["macos-x64"] + +[tools.hk."platforms.linux-arm64"] +checksum = "sha256:5f438dbaee53997ae8caa388efb01f1e45ff41325672d4b9f5a061dfb8d4ed7b" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-aarch64-unknown-linux-gnu.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[tools.hk."platforms.linux-arm64-musl"] +checksum = "sha256:c49f8155a33ebb8829b3a7ccedf518bbe8ceb420074640e478bf0441dbb92839" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-aarch64-unknown-linux-musl.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[tools.hk."platforms.linux-x64"] +checksum = "sha256:9fb1a9b2466442cce5b3c57db3550a4a248c0566f2ba7ca4a31aa39fb23e1f08" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-x86_64-unknown-linux-gnu.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[tools.hk."platforms.linux-x64-musl"] +checksum = "sha256:f841b63ba59ae6e89eb425052c0cae6d6c7226f0e1ae209993b0d74701063ad3" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-x86_64-unknown-linux-musl.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[tools.hk."platforms.macos-arm64"] +checksum = "sha256:129615f1d6eaa9d181e0cd34f792b4993aa381523f7187096cc51d757d883e5e" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-aarch64-apple-darwin.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[tools.hk."platforms.windows-x64"] +checksum = "sha256:e0b0d9a7b95077800dcad75c46bcf29358c0ea908c9ebe151abac7b9a0cf97e9" +url = "https://github.com/jdx/hk/releases/download/v2.15.0/hk-x86_64-pc-windows-msvc.zip" +signer = "sigstore-oidc:https://github.com/jdx/hk/.github/workflows/release.yml" +repository_ids = { repository = "922514152" } + +[[tools.jactionlint]] +version = "2.7.0" +backend = "packslip:github.com/jdx/jactionlint" +specifiers = ["latest"] + +[tools.jactionlint."platforms.linux-arm64"] +checksum = "sha256:a615936cb17f36a9a6472d3a402a0752403b49c5cf18c1820cdbc74012759fa4" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_linux_arm64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.linux-arm64-musl"] +checksum = "sha256:a615936cb17f36a9a6472d3a402a0752403b49c5cf18c1820cdbc74012759fa4" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_linux_arm64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.linux-x64"] +checksum = "sha256:a86405db17b2dd04c0b431d07da7c4cc3ff49f13f5b3c0f72d732d72af4bee7a" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_linux_amd64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.linux-x64-musl"] +checksum = "sha256:a86405db17b2dd04c0b431d07da7c4cc3ff49f13f5b3c0f72d732d72af4bee7a" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_linux_amd64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.macos-arm64"] +checksum = "sha256:2d5b5cad53212b5d6eee235596715c24d25acbcdbe73e347fe49785395458814" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_darwin_arm64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.macos-x64"] +checksum = "sha256:a383f17a2d5cc1b26bc5a0e531175704a94ac2b08abbb5f6d46027f36fa3a244" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_darwin_amd64.tar.gz" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[tools.jactionlint."platforms.windows-x64"] +checksum = "sha256:61909e844575bf04f0418df0d1e1aa2674bff760597f85fa64eccbcee5cfdc86" +url = "https://github.com/jdx/jactionlint/releases/download/v2.7.0/jactionlint_2.7.0_windows_amd64.zip" +signer = "sigstore-oidc:https://github.com/jdx/jactionlint/.github/workflows/release.yaml" +repository_ids = { repository = "1404951382" } + +[[tools.pkl]] +version = "0.33.1" +backend = "aqua:apple/pkl" +specifiers = ["latest"] + +[tools.pkl."platforms.linux-arm64"] +checksum = "sha256:4a752096dab13d7432e1f0a4f1219833df95e1e36ce0b8d424b0edb2cd5436f9" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-linux-aarch64" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390162" + +[tools.pkl."platforms.linux-arm64-musl"] +checksum = "sha256:4a752096dab13d7432e1f0a4f1219833df95e1e36ce0b8d424b0edb2cd5436f9" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-linux-aarch64" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390162" + +[tools.pkl."platforms.linux-x64"] +checksum = "sha256:acbca9bb4f31139d09e295d03c9fb25f77edf5a74af4e772b56b32dc6dc17c44" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-linux-amd64" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390166" + +[tools.pkl."platforms.linux-x64-musl"] +checksum = "sha256:acbca9bb4f31139d09e295d03c9fb25f77edf5a74af4e772b56b32dc6dc17c44" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-linux-amd64" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390166" + +[tools.pkl."platforms.macos-arm64"] +checksum = "sha256:6f93ddf6524a5771bd4b6ebde11010c6dfee8e3a8906ffebaa8f52f8a0ba16b7" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-macos-aarch64" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390310" + +[tools.pkl."platforms.windows-x64"] +checksum = "sha256:b1da686befc4ce4d92fe81bd2892e7457a505328313380010c4791c7f68d7432" +checksum_source = "mise-versions" +url = "https://github.com/apple/pkl/releases/download/0.33.1/pkl-windows-amd64.exe" +url_api = "https://api.github.com/repos/apple/pkl/releases/assets/764390372" + +[[tools.rumdl]] +version = "0.3.10" +backend = "aqua:rvben/rumdl" +specifiers = ["latest"] + +[tools.rumdl."platforms.linux-arm64"] +checksum = "sha256:6a2024ebd2841034e311e6447196a1a669ba089f1949fd3ae444305edd4b66c7" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471375" +provenance = "github-attestations" + +[tools.rumdl."platforms.linux-arm64-musl"] +checksum = "sha256:94c1cd32b52a44a52346a21661bb869dd2386f226b37c50c4ec7f19dfe1d182c" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471386" +provenance = "github-attestations" + +[tools.rumdl."platforms.linux-x64"] +checksum = "sha256:21d03418add1dee37337fab0efd956db6797454c28626978d104219b946616fd" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471374" +provenance = "github-attestations" + +[tools.rumdl."platforms.linux-x64-musl"] +checksum = "sha256:ecd0a42518ccf38943d5f80db6e866954b5bd64780d4651eda1a9c731ae6fdc8" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471384" +provenance = "github-attestations" + +[tools.rumdl."platforms.macos-arm64"] +checksum = "sha256:cc4980510625d9e676aa54608f0fdb3f50a157b7791cf4cef64994b11646bbe5" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471385" +provenance = "github-attestations" + +[tools.rumdl."platforms.macos-x64"] +checksum = "sha256:c454cfb398a05afd7485b6651040fbc92c1583b2a8c8f4f42b073aef7c4bc8f1" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471377" +provenance = "github-attestations" + +[tools.rumdl."platforms.windows-x64"] +checksum = "sha256:5b88f9c1b8e66d50886724862088b949fe02fe99369bdbed90baf0489b5734e0" +url = "https://github.com/rvben/rumdl/releases/download/v0.3.10/rumdl-v0.3.10-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/rvben/rumdl/releases/assets/809471393" +provenance = "github-attestations" + +[[tools.taplo]] +version = "0.10.0" +backend = "aqua:tamasfe/taplo" +specifiers = ["latest"] + +[tools.taplo."platforms.linux-arm64"] +checksum = "sha256:033681d01eec8376c3fd38fa3703c79316f5e14bb013d859943b60a07bccdcc3" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-linux-aarch64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257322597" + +[tools.taplo."platforms.linux-arm64-musl"] +checksum = "sha256:033681d01eec8376c3fd38fa3703c79316f5e14bb013d859943b60a07bccdcc3" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-linux-aarch64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257322597" + +[tools.taplo."platforms.linux-x64"] +checksum = "sha256:8fe196b894ccf9072f98d4e1013a180306e17d244830b03986ee5e8eabeb6156" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-linux-x86_64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257322600" + +[tools.taplo."platforms.linux-x64-musl"] +checksum = "sha256:8fe196b894ccf9072f98d4e1013a180306e17d244830b03986ee5e8eabeb6156" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-linux-x86_64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257322600" + +[tools.taplo."platforms.macos-arm64"] +checksum = "sha256:713734314c3e71894b9e77513c5349835eefbd52908445a0d73b0c7dc469347d" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-darwin-aarch64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257323110" + +[tools.taplo."platforms.macos-x64"] +checksum = "sha256:898122cde3a0b1cd1cbc2d52d3624f23338218c91b5ddb71518236a4c2c10ef2" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-darwin-x86_64.gz" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257323116" + +[tools.taplo."platforms.windows-x64"] +checksum = "sha256:1615eed140039bd58e7089109883b1c434de5d6de8f64a993e6e8c80ca57bdf9" +url = "https://github.com/tamasfe/taplo/releases/download/0.10.0/taplo-windows-x86_64.zip" +url_api = "https://api.github.com/repos/tamasfe/taplo/releases/assets/257323062" + +[[tools.typos]] +version = "1.53.0" +backend = "aqua:crate-ci/typos" +specifiers = ["latest"] + +[tools.typos."platforms.linux-arm64"] +checksum = "sha256:836dc050ba38f728ec8ed35ecb6d47d2959a8a6a9f22003c2dac0e08e605f7e6" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815613697" + +[tools.typos."platforms.linux-arm64-musl"] +checksum = "sha256:836dc050ba38f728ec8ed35ecb6d47d2959a8a6a9f22003c2dac0e08e605f7e6" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-aarch64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815613697" + +[tools.typos."platforms.linux-x64"] +checksum = "sha256:e9f7ad767336661a22b4977e929bdb8fef3d3d1ddb630e0cace651058e762681" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815616265" + +[tools.typos."platforms.linux-x64-musl"] +checksum = "sha256:e9f7ad767336661a22b4977e929bdb8fef3d3d1ddb630e0cace651058e762681" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-x86_64-unknown-linux-musl.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815616265" + +[tools.typos."platforms.macos-arm64"] +checksum = "sha256:a4877e9ec7062dcd4115a65184c31452dbdc59f06e42c81e13a2230710d92717" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815617361" + +[tools.typos."platforms.macos-x64"] +checksum = "sha256:5324d78ad8e0ee0579e515fdfb473c5730b5c76ebbc3da99832f5c48bd08e3b2" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815615423" + +[tools.typos."platforms.windows-x64"] +checksum = "sha256:275d91f4f695cd26a1f296154e4073ff1efbbe7ebbdd6d041ed5cd5dd96ebf1b" +checksum_source = "mise-versions" +url = "https://github.com/crate-ci/typos/releases/download/v1.53.0/typos-v1.53.0-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/crate-ci/typos/releases/assets/815616739" + +[[tools.yamlfmt]] +version = "0.21.0" +backend = "aqua:google/yamlfmt" +specifiers = ["latest"] + +[tools.yamlfmt."platforms.linux-arm64"] +checksum = "sha256:5b2689c963b177271330c5ce8ca7396751107e5a826be46f03d2cb9b6f0c7784" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650208" + +[tools.yamlfmt."platforms.linux-arm64-musl"] +checksum = "sha256:5b2689c963b177271330c5ce8ca7396751107e5a826be46f03d2cb9b6f0c7784" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_arm64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650208" + +[tools.yamlfmt."platforms.linux-x64"] +checksum = "sha256:1f300d9257b232bb3b541d7fb1b0e6b3c121bcbab381c86cd38cb8722be8a566" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_x86_64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650203" + +[tools.yamlfmt."platforms.linux-x64-musl"] +checksum = "sha256:1f300d9257b232bb3b541d7fb1b0e6b3c121bcbab381c86cd38cb8722be8a566" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Linux_x86_64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650203" + +[tools.yamlfmt."platforms.macos-arm64"] +checksum = "sha256:4b417ecb94339d57e4c122ecc948c1a00fe328b5853266de9806e652a92858fa" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Darwin_arm64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650209" + +[tools.yamlfmt."platforms.macos-x64"] +checksum = "sha256:060e943bcb8583c456810eb1ff4721b4f46c4a0c1a4432449d5dc3bbfe29a22b" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Darwin_x86_64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650207" + +[tools.yamlfmt."platforms.windows-x64"] +checksum = "sha256:07f80ce5d741eb4b0a9380ac78a19c7cb5bd44e2a9a47a5a04839e3ba54dd463" +checksum_source = "mise-versions" +url = "https://github.com/google/yamlfmt/releases/download/v0.21.0/yamlfmt_0.21.0_Windows_x86_64.tar.gz" +url_api = "https://api.github.com/repos/google/yamlfmt/releases/assets/336650206" + +[[tools.zizmor]] +version = "1.33.1" +backend = "aqua:zizmorcore/zizmor" +specifiers = ["latest"] + +[tools.zizmor."platforms.linux-arm64"] +checksum = "sha256:aa487c792a7cbbe86e4f8dccd3b66de33b3b51813c090aaa0842d7ea08a3fc35" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655950" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-arm64-musl"] +checksum = "sha256:aa487c792a7cbbe86e4f8dccd3b66de33b3b51813c090aaa0842d7ea08a3fc35" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-aarch64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655950" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-x64"] +checksum = "sha256:3e6a301c7a820a2501915f5a9de8c0486da82bdec7965f068477538a98743d43" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655958" +provenance = "github-attestations" + +[tools.zizmor."platforms.linux-x64-musl"] +checksum = "sha256:3e6a301c7a820a2501915f5a9de8c0486da82bdec7965f068477538a98743d43" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-x86_64-unknown-linux-gnu.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655958" +provenance = "github-attestations" + +[tools.zizmor."platforms.macos-arm64"] +checksum = "sha256:68516d45723aac36e9c87c47d56e8418009fcb919c6ceb44514d85b9d0c1c011" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-aarch64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655957" +provenance = "github-attestations" + +[tools.zizmor."platforms.macos-x64"] +checksum = "sha256:8b609d38243c6dd6ddd29bf93d02d886eb507383fe4735b1cde73e66e4de4f29" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-x86_64-apple-darwin.tar.gz" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655956" +provenance = "github-attestations" + +[tools.zizmor."platforms.windows-x64"] +checksum = "sha256:f02ebeedf651da468b4de19d31f0609050af74e11be41dc46d82e355cf44f68b" +url = "https://github.com/zizmorcore/zizmor/releases/download/v1.33.1/zizmor-x86_64-pc-windows-msvc.zip" +url_api = "https://api.github.com/repos/zizmorcore/zizmor/releases/assets/780655954" +provenance = "github-attestations" diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..32bedd6 --- /dev/null +++ b/mise.toml @@ -0,0 +1,14 @@ +[tools] +biome = "latest" +cljstyle = "latest" +hk = "latest" +jactionlint = "latest" +pkl = "latest" +rumdl = "latest" +taplo = "latest" +typos = "latest" +yamlfmt = "latest" +zizmor = "latest" + +[settings] +lockfile = true diff --git a/package.json b/package.json index 9113b27..3808576 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,8 @@ { - "name": "notes", - "version": "1.0.0", - "description": "Notes", - "scripts": { - "convert": "tsx ./scripts/convert.ts", - "deploy": "wrangler deploy --assets ./dist" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/chadsr/notes.git" - }, - "license": "MIT", "bugs": { "url": "https://github.com/chadsr/notes/issues" }, - "homepage": "https://github.com/chadsr/notes#readme", + "description": "Notes", "devDependencies": { "@types/jsonld": "^1.5.15", "@types/node": "^26.2.0", @@ -24,5 +12,17 @@ "tsx": "^4.23.11", "typescript": "^7.0.2", "wrangler": "^4.120.0" - } + }, + "homepage": "https://github.com/chadsr/notes#readme", + "license": "MIT", + "name": "notes", + "repository": { + "type": "git", + "url": "git+https://github.com/chadsr/notes.git" + }, + "scripts": { + "convert": "tsx ./scripts/convert.ts", + "deploy": "wrangler deploy --assets ./dist" + }, + "version": "1.0.0" } diff --git a/scripts/convert.ts b/scripts/convert.ts index d652d63..f4b6c6b 100644 --- a/scripts/convert.ts +++ b/scripts/convert.ts @@ -1,13 +1,13 @@ #!/usr/bin/env node -import * as fs from 'fs'; -import * as jsonld from 'jsonld'; +import * as fs from "fs"; +import * as jsonld from "jsonld"; export default async function main() { - const nquads = fs.readFileSync('./notes.nq').toString() - const jsonLdArr = await jsonld.fromRDF(nquads, { format: 'application/n-quads' }); - const jsonLdStr = JSON.stringify(jsonLdArr, null, 4); - fs.writeFileSync('./notes.jsonld', jsonLdStr); + const nquads = fs.readFileSync("./notes.nq").toString(); + const jsonLdArr = await jsonld.fromRDF(nquads, { format: "application/n-quads" }); + const jsonLdStr = JSON.stringify(jsonLdArr, null, 2); + fs.writeFileSync("./notes.jsonld", jsonLdStr); } -main(); \ No newline at end of file +main(); diff --git a/tsconfig.json b/tsconfig.json index 35bf01a..a3fe875 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,38 +1,5 @@ { "compilerOptions": { - /* Visit https://aka.ms/tsconfig to read more about this file */ - /* Projects */ - // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ - // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ - // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ - // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ - // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ - // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ - /* Language and Environment */ - "target": "ESNext", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ - // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ - // "jsx": "preserve", /* Specify what JSX code is generated. */ - // "libReplacement": true, /* Enable lib replacement. */ - // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ - // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ - // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ - // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ - // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ - // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ - // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ - // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ - // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ - /* Modules */ - "module": "nodenext", /* Specify what module code is generated. */ - // "rootDir": "./", /* Specify the root folder within your source files. */ - "moduleResolution": "nodenext", /* Specify how TypeScript looks up a file from a given module specifier. */ - // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ - // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ - // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ - // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ - "types": [ - "node" - ], /* Specify type package names to be included without being referenced in a source file. */ // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ // "moduleSuffixes": [], /* List of file name suffixes to search when resolving a module. */ // "allowImportingTsExtensions": true, /* Allow imports to include TypeScript file extensions. Requires '--moduleResolution bundler' and either '--noEmit' or '--emitDeclarationOnly' to be set. */ @@ -76,11 +43,25 @@ // "isolatedDeclarations": true, /* Require sufficient annotation on exports so other tools can trivially generate declaration files. */ // "erasableSyntaxOnly": true, /* Do not allow runtime constructs that are not part of ECMAScript. */ // "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ - "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */, // "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */ - "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ - /* Type Checking */ - "strict": true, /* Enable all strict type-checking options. */ + "forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */, + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "jsx": "preserve", /* Specify what JSX code is generated. */ + // "libReplacement": true, /* Enable lib replacement. */ + // "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */ + // "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */ + // "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h'. */ + // "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */ + // "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using 'jsx: react-jsx*'. */ + // "reactNamespace": "", /* Specify the object invoked for 'createElement'. This only applies when targeting 'react' JSX emit. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + // "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + /* Modules */ + "module": "nodenext" /* Specify what module code is generated. */, + // "rootDir": "./", /* Specify the root folder within your source files. */ + "moduleResolution": "nodenext" /* Specify how TypeScript looks up a file from a given module specifier. */, // "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied 'any' type. */ // "strictNullChecks": true, /* When type checking, take into account 'null' and 'undefined'. */ // "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */ @@ -102,6 +83,25 @@ // "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */ /* Completeness */ // "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */ - "skipLibCheck": true /* Skip type checking all .d.ts files. */ + "skipLibCheck": true /* Skip type checking all .d.ts files. */, + /* Type Checking */ + "strict": true /* Enable all strict type-checking options. */, + /* Visit https://aka.ms/tsconfig to read more about this file */ + /* Projects */ + // "incremental": true, /* Save .tsbuildinfo files to allow for incremental compilation of projects. */ + // "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */ + // "tsBuildInfoFile": "./.tsbuildinfo", /* Specify the path to .tsbuildinfo incremental compilation file. */ + // "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects. */ + // "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */ + // "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */ + /* Language and Environment */ + "target": "ESNext" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */, + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + // "typeRoots": [], /* Specify multiple folders that act like './node_modules/@types'. */ + "types": [ + "node" + ] /* Specify type package names to be included without being referenced in a source file. */ } -} \ No newline at end of file +} diff --git a/wrangler.jsonc b/wrangler.jsonc index ce45629..f416c2b 100644 --- a/wrangler.jsonc +++ b/wrangler.jsonc @@ -3,46 +3,46 @@ * https://developers.cloudflare.com/workers/wrangler/configuration/ */ { - "$schema": "node_modules/wrangler/config-schema.json", - "name": "notes", - "compatibility_date": "2025-09-09", - "send_metrics": false, - "assets": { - // The path to the directory containing the `index.html` file to be served at `/` - "directory": "./dist", - "not_found_handling": "404-page" - }, - "observability": { - "enabled": true - } - /** - * Smart Placement - * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement - */ - // "placement": { "mode": "smart" } - /** - * Bindings - * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including - * databases, object storage, AI inference, real-time communication and more. - * https://developers.cloudflare.com/workers/runtime-apis/bindings/ - */ - /** - * Environment Variables - * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables - */ - // "vars": { "MY_VARIABLE": "production_value" } - /** - * Note: Use secrets to store sensitive data. - * https://developers.cloudflare.com/workers/configuration/secrets/ - */ - /** - * Static Assets - * https://developers.cloudflare.com/workers/static-assets/binding/ - */ - // "assets": { "directory": "./public/", "binding": "ASSETS" } - /** - * Service Bindings (communicate between multiple Workers) - * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings - */ - // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }] -} \ No newline at end of file + "$schema": "node_modules/wrangler/config-schema.json", + "assets": { + // The path to the directory containing the `index.html` file to be served at `/` + "directory": "./dist", + "not_found_handling": "404-page" + }, + "compatibility_date": "2025-09-09", + "name": "notes", + "observability": { + "enabled": true + }, + "send_metrics": false + /** + * Smart Placement + * Docs: https://developers.cloudflare.com/workers/configuration/smart-placement/#smart-placement + */ + // "placement": { "mode": "smart" } + /** + * Bindings + * Bindings allow your Worker to interact with resources on the Cloudflare Developer Platform, including + * databases, object storage, AI inference, real-time communication and more. + * https://developers.cloudflare.com/workers/runtime-apis/bindings/ + */ + /** + * Environment Variables + * https://developers.cloudflare.com/workers/wrangler/configuration/#environment-variables + */ + // "vars": { "MY_VARIABLE": "production_value" } + /** + * Note: Use secrets to store sensitive data. + * https://developers.cloudflare.com/workers/configuration/secrets/ + */ + /** + * Static Assets + * https://developers.cloudflare.com/workers/static-assets/binding/ + */ + // "assets": { "directory": "./public/", "binding": "ASSETS" } + /** + * Service Bindings (communicate between multiple Workers) + * https://developers.cloudflare.com/workers/wrangler/configuration/#service-bindings + */ + // "services": [{ "binding": "MY_SERVICE", "service": "my-service" }] +} From 54a804663fe46f17434cc9d40c65ec8923fe4459 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 4 Dec 2026 18:42:07 +0100 Subject: [PATCH 2/3] base page lint fixes --- pages/CreativeWork.md | 2 +- pages/Note.md | 2 +- pages/StarkWare Industries.md | 2 +- pages/abstract.md | 2 +- pages/author.md | 2 +- ...o-Knowledge_Location_Privacy_2404.14983v2_1746716776817_0.md | 2 +- pages/hls__moonmath-v1.1.5_1746894282402_0.md | 2 +- pages/hls__zk_whiteboard_segment1_1746895258465_0.md | 2 +- pages/topic.md | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/pages/CreativeWork.md b/pages/CreativeWork.md index 33addcb..f14e573 100644 --- a/pages/CreativeWork.md +++ b/pages/CreativeWork.md @@ -1,5 +1,5 @@ type:: [[Class]] -parent:: [[Thing]] +parent:: [[Thing]] description:: The most generic kind of creative work, including books, movies, photographs, software programs, etc. url:: https://schema.org/CreativeWork sameas:: http://dbpedia.org/ontology/Work diff --git a/pages/Note.md b/pages/Note.md index 6f146b1..849f273 100644 --- a/pages/Note.md +++ b/pages/Note.md @@ -1,5 +1,5 @@ type:: [[Class]] -parent:: [[DigitalDocument]] +parent:: [[DigitalDocument]] description:: A note url:: {{notes-base-url Note}} sameas:: https://schema.org/NoteDigitalDocument diff --git a/pages/StarkWare Industries.md b/pages/StarkWare Industries.md index 7dedc61..d08cef9 100644 --- a/pages/StarkWare Industries.md +++ b/pages/StarkWare Industries.md @@ -1,2 +1,2 @@ -type:: [[PrivateCompany]] +type:: [[PrivateCompany]] sameas:: https://dbpedia.org/resource/StarkWare_Industries diff --git a/pages/abstract.md b/pages/abstract.md index 62e97e9..cbdc811 100644 --- a/pages/abstract.md +++ b/pages/abstract.md @@ -1,4 +1,4 @@ url:: https://schema.org/abstract type:: [[Property]] -rangeIncludes:: [[String]] +rangeIncludes:: [[String]] exclude-from-graph-view:: true diff --git a/pages/author.md b/pages/author.md index d70f990..f04e122 100644 --- a/pages/author.md +++ b/pages/author.md @@ -1,4 +1,4 @@ url:: https://schema.org/author type:: [[Property]] -rangeIncludes:: [[Person]] [[Organization]] +rangeIncludes:: [[Person]] [[Organization]] exclude-from-graph-view:: true diff --git a/pages/hls__Zero-Knowledge_Location_Privacy_2404.14983v2_1746716776817_0.md b/pages/hls__Zero-Knowledge_Location_Privacy_2404.14983v2_1746716776817_0.md index 023e291..1dad4d9 100644 --- a/pages/hls__Zero-Knowledge_Location_Privacy_2404.14983v2_1746716776817_0.md +++ b/pages/hls__Zero-Knowledge_Location_Privacy_2404.14983v2_1746716776817_0.md @@ -13,4 +13,4 @@ abstract:: We introduce Zero-Knowledge Location Privacy (ZKLP), enabling users t ls-type:: annotation hl-page:: 1 hl-color:: yellow - id:: 681cc872-8162-4694-83ce-c13b6689e084 + id:: 681cc872-8162-4694-83ce-c13b6689e084 \ No newline at end of file diff --git a/pages/hls__moonmath-v1.1.5_1746894282402_0.md b/pages/hls__moonmath-v1.1.5_1746894282402_0.md index ebea27e..ace1b6f 100644 --- a/pages/hls__moonmath-v1.1.5_1746894282402_0.md +++ b/pages/hls__moonmath-v1.1.5_1746894282402_0.md @@ -1,6 +1,6 @@ file:: [moonmath-v1.1.5_1746894282402_0.pdf](../assets/moonmath-v1.1.5_1746894282402_0.pdf) file-path:: ../assets/moonmath-v1.1.5_1746894282402_0.pdf -type:: [[Book]] +type:: [[Book]] bookedition:: v1.1.5 datepublished:: 11-06-2024 author:: [[Least Authority]] diff --git a/pages/hls__zk_whiteboard_segment1_1746895258465_0.md b/pages/hls__zk_whiteboard_segment1_1746895258465_0.md index b9cdfd0..5a1b98c 100644 --- a/pages/hls__zk_whiteboard_segment1_1746895258465_0.md +++ b/pages/hls__zk_whiteboard_segment1_1746895258465_0.md @@ -1,4 +1,4 @@ file:: [zk_whiteboard_segment1_1746895258465_0.pdf](../assets/zk_whiteboard_segment1_1746895258465_0.pdf) file-path:: ../assets/zk_whiteboard_segment1_1746895258465_0.pdf -type:: [[PresentationDigitalDocument]] +type:: [[PresentationDigitalDocument]] author:: [[ZK Hack]] [[Dan Boneh]] diff --git a/pages/topic.md b/pages/topic.md index eb3ff33..b82d41a 100644 --- a/pages/topic.md +++ b/pages/topic.md @@ -1,5 +1,5 @@ type:: [[Property]] url:: {{notes-base-url topic}} -rangeIncludes:: [[StringWithRefs]] +rangeIncludes:: [[StringWithRefs]] sameAs:: https://schema.org/about exclude-from-graph-view:: true From d1daec3b6eb884f8c0bdeea850c47485ae08cf51 Mon Sep 17 00:00:00 2001 From: Ross Date: Fri, 4 Dec 2026 20:08:37 +0100 Subject: [PATCH 3/3] ci: lint fixes --- .github/workflows/ci.yml | 29 ++++++++++++++++++++++---- .github/workflows/publish.yml | 39 ++++++++++++++++++++++------------- README.md | 1 - biome.json | 2 +- scripts/convert.ts | 6 ++++-- 5 files changed, 55 insertions(+), 22 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 454fe6e..bf80613 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,14 +4,22 @@ on: branches: [main] pull_request: branches: [main] +permissions: + contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: lint: name: Lint runs-on: ubuntu-latest + timeout-minutes: 30 steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false - uses: jdx/mise-action@7e2b3c3d1450331892809a84e22e30e3f52c1e92 # v5.5.0 - - uses: actions/setup-node@v7 + - uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7 with: cache: npm node-version: latest @@ -23,8 +31,21 @@ jobs: validate: name: Validate Graph runs-on: ubuntu-latest + timeout-minutes: 30 steps: - name: Checkout - uses: actions/checkout@v7 + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false - name: Graph Validation - uses: logseq/graph-validator@v0.5.0 + uses: logseq/graph-validator@69ebd330bd744a9f0d0b97a87b01382f1c115b84 # v0.5.0 + publish: + name: Publish + needs: [lint, validate] + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: $/.github/workflows/publish.yml + secrets: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + permissions: + contents: write diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 153aba5..9170b24 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,23 +1,29 @@ name: Publish on: - workflow_run: - workflows: ['CI'] - types: [completed] - conclusion: success - branches: - - 'main' + workflow_call: + secrets: + CLOUDFLARE_ACCOUNT_ID: + required: true + CLOUDFLARE_API_TOKEN: + required: true +concurrency: + group: Publish-${{ github.ref }} + cancel-in-progress: true permissions: contents: read jobs: deploy: runs-on: ubuntu-latest name: Publish Logseq SPA + timeout-minutes: 30 permissions: contents: write steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 + with: + persist-credentials: false - name: Build - uses: logseq/publish-spa@v0.3.1 + uses: logseq/publish-spa@3fa40f2288e96b5927037610e2445f892a438d79 # v0.3.1 with: theme-mode: dark accent-color: purple @@ -27,7 +33,7 @@ jobs: git status -s ls dist/ - name: Setup Node.js - uses: actions/setup-node@v7 + uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7 with: cache: 'npm' node-version: 'latest' @@ -42,26 +48,31 @@ jobs: publish-data: runs-on: ubuntu-latest name: Publish Linked Data + timeout-minutes: 30 permissions: contents: write steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 with: - ref: ${{ github.head_ref }} - - uses: actions/setup-node@v7 + persist-credentials: false + - uses: actions/setup-node@8fccf151e3ba8038c300f83b40c8fd1e94f9c5ce # v7 with: cache: 'npm' node-version: 'latest' check-latest: true - name: Export graph as RDF - uses: logseq/rdf-export@v0.2.1 + uses: logseq/rdf-export@3a11bf071e320cb4e014e697edf6911aa5f05208 # v0.2.1 with: rdfFile: notes.nq - name: Convert N-Quads to JSON-LD run: | npm ci npm run convert - - uses: stefanzweifel/git-auto-commit-action@v7 + # git-auto-commit pushes with the token from GH_TOKEN, not credentials stored by checkout + - run: git config --global credential.https://github.com.helper '!gh auth git-credential' + - uses: stefanzweifel/git-auto-commit-action@d0b01107b5db882071f96de5dd4b54961ea93f4c # v7 + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: file_pattern: 'notes.nq notes.jsonld' commit_message: 'Update linked data' diff --git a/README.md b/README.md index e8bddb2..038bd21 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,3 @@ # Notes [![CI](https://github.com/chadsr/notes/actions/workflows/ci.yml/badge.svg)](https://github.com/chadsr/notes/actions/workflows/ci.yml) -[![Publish](https://github.com/chadsr/notes/actions/workflows/publish.yml/badge.svg)](https://github.com/chadsr/notes/actions/workflows/publish.yml) diff --git a/biome.json b/biome.json index f21298a..0e6c15e 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.6.9/schema.json", + "$schema": "https://biomejs.dev/schemas/2.6.10/schema.json", "assist": { "actions": { "source": { diff --git a/scripts/convert.ts b/scripts/convert.ts index f4b6c6b..5c9badf 100644 --- a/scripts/convert.ts +++ b/scripts/convert.ts @@ -1,11 +1,13 @@ #!/usr/bin/env node -import * as fs from "fs"; +import * as fs from "node:fs"; import * as jsonld from "jsonld"; export default async function main() { const nquads = fs.readFileSync("./notes.nq").toString(); - const jsonLdArr = await jsonld.fromRDF(nquads, { format: "application/n-quads" }); + const jsonLdArr = await jsonld.fromRDF(nquads, { + format: "application/n-quads", + }); const jsonLdStr = JSON.stringify(jsonLdArr, null, 2); fs.writeFileSync("./notes.jsonld", jsonLdStr); }