From 5dd201ef22f8386600bce7f73f42d472a2a405a3 Mon Sep 17 00:00:00 2001 From: Yiyi Wang Date: Mon, 18 Mar 2024 11:56:58 +0800 Subject: [PATCH] feat: Updated crossnote to 0.9.9 (#1966) --- .github/workflows/release.yml | 4 ++-- .github/workflows/test.yml | 4 ++-- CHANGELOG.md | 14 ++++++++++++++ build.js | 2 +- flake.lock | 14 +++++++------- flake.nix | 2 +- package.json | 4 ++-- shell.nix | 2 +- src/extension-common.ts | 9 ++++++++- yarn.lock | 8 ++++---- 10 files changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 583ce8b..919aa59 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,10 +10,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 - - name: 'Install nodejs 18' + - name: 'Install nodejs 20' uses: actions/setup-node@v2 with: - node-version: '18' + node-version: '20' - name: Install dependencies run: | corepack enable diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 512766b..ccc87f1 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,10 +18,10 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 - - name: 'Install nodejs 18' + - name: 'Install nodejs 20' uses: actions/setup-node@v2 with: - node-version: '18' + node-version: '20' - name: 'Build and test' run: | corepack enable diff --git a/CHANGELOG.md b/CHANGELOG.md index a26633a..0d4a372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.8.13] - 2024-03-18 + +Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.8](https://github.com/shd101wyy/crossnote/releases/tag/0.9.9). + +### Bug fixes + +- Fixed [a bug of link redirection in preview](https://github.com/shd101wyy/vscode-markdown-preview-enhanced/issues/1951) by @byte-clown +- Fixed [Long sidebarToc does not display completely](https://github.com/shd101wyy/crossnote/pull/354) by @moonlitusun +- Removed the `text` as the default language selector for code block. + +### Chore + +- Updated [flake.nix](./flake.nix) and node.js to 20. + ## [0.8.12] - 2024-03-10 Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.8](https://github.com/shd101wyy/crossnote/releases/tag/0.9.8). diff --git a/build.js b/build.js index 02d57a1..6df478c 100644 --- a/build.js +++ b/build.js @@ -20,7 +20,7 @@ const esbuildProblemMatcherPlugin = { if (result.errors.length) { result.errors.forEach((error) => console.error( - `> ${error.location.file}:${error.location.line}:${error.location.column}: error: ${error.text}`, + `> ${error.location?.file}:${error.location?.line}:${error.location?.column}: error: ${error.text}`, ), ); } else { diff --git a/flake.lock b/flake.lock index 249fd07..3c2e892 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1689068808, - "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -20,16 +20,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1692525914, - "narHash": "sha256-MUgZ9/9mE/EbEQA6JPdcQHkjoR5fgvaKhpy6UO67uEc=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "475d5ae2c4cb87b904545bdb547af05681198fcc", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-23.05", + "ref": "nixos-23.11", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index f261b22..e58ff29 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,7 @@ inputs = { nixpkgs = { - url = "github:NixOS/nixpkgs/nixos-23.05"; + url = "github:NixOS/nixpkgs/nixos-23.11"; inputs.nixpkgs.follows = "nixpkgs"; }; flake-utils = { url = "github:numtide/flake-utils"; }; diff --git a/package.json b/package.json index 5026881..b25609f 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "markdown-preview-enhanced", "displayName": "%displayName%", - "version": "0.8.12", + "version": "0.8.13", "description": "%description%", "categories": [ "Other" @@ -679,7 +679,7 @@ "@types/crypto-js": "^4.1.2", "@types/vfile": "^3.0.2", "async-mutex": "^0.4.0", - "crossnote": "^0.9.8", + "crossnote": "^0.9.9", "crypto-js": "^4.2.0" }, "devDependencies": { diff --git a/shell.nix b/shell.nix index 779dabe..d019cab 100644 --- a/shell.nix +++ b/shell.nix @@ -1,7 +1,7 @@ { pkgs ? import { } }: with pkgs; mkShell { - buildInputs = [ nodejs_18 yarn ]; + buildInputs = [ nodejs_20 yarn ]; shellHook = '' # ... ''; diff --git a/src/extension-common.ts b/src/extension-common.ts index 580afea..423038e 100644 --- a/src/extension-common.ts +++ b/src/extension-common.ts @@ -557,7 +557,14 @@ export async function initExtensionCommon(context: vscode.ExtensionContext) { if (fileExists) { const previewMode = getPreviewMode(); - const document = await vscode.workspace.openTextDocument(vscode.Uri.parse(openFilePath.split('#').slice(0, -1).join('#')||openFilePath)); + const document = await vscode.workspace.openTextDocument( + vscode.Uri.parse( + openFilePath + .split('#') + .slice(0, -1) + .join('#') || openFilePath, + ), + ); // Open custom editor if ( previewMode === PreviewMode.PreviewsOnly && diff --git a/yarn.lock b/yarn.lock index bbcc8c4..02055b7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1913,10 +1913,10 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -crossnote@^0.9.8: - version "0.9.8" - resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.8.tgz#431c88b2eb6d02d9f031370dc55ec8e517738e4b" - integrity sha512-oIbryBodITwFn1SksIDkuXWW2KkqSBaVyx/44qVPGJ4ziI//UvyDY4Hq9RzCF0crDv+kAafOkz4jP/GXULg0NQ== +crossnote@^0.9.9: + version "0.9.9" + resolved "https://registry.yarnpkg.com/crossnote/-/crossnote-0.9.9.tgz#a0a964f90311e9fb7902ba995901d5458ccf87e3" + integrity sha512-KaJt53tA89NUck20cu+xY8qjbqckvSAf77QEx4VaUFH9QDjAM6PCv/YWGLsW0iKAaY1akC80GqJ+tsX2dFA3Tg== dependencies: "@headlessui/react" "^1.7.17" "@heroicons/react" "^2.0.18"