Skip to content

Commit 31bc248

Browse files
authored
fix: Fixed the build for vscode web (#2113)
1 parent 322a4ce commit 31bc248

File tree

6 files changed

+2222
-1883
lines changed

6 files changed

+2222
-1883
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.8.18] - 2025-03-16
11+
12+
Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.13](https://github.com/shd101wyy/crossnote/releases/tag/0.9.14).
13+
14+
### Bug fixes
15+
16+
- Fixed the build for vscode-web caused by prismjs.
17+
1018
## [0.8.17] - 2025-03-16
1119

1220
Updated [crossnote](https://github.com/shd101wyy/crossnote) to version [0.9.13](https://github.com/shd101wyy/crossnote/releases/tag/0.9.13).

flake.lock

Lines changed: 25 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,36 @@
33

44
inputs = {
55
nixpkgs = {
6-
url = "github:NixOS/nixpkgs/nixos-24.05";
6+
url = "github:NixOS/nixpkgs/nixos-24.11";
77
inputs.nixpkgs.follows = "nixpkgs";
88
};
9-
flake-utils = { url = "github:numtide/flake-utils"; };
9+
unstableNixpkgs = {
10+
url = "github:NixOS/nixpkgs/nixos-unstable";
11+
inputs.nixpkgs.follows = "nixpkgs";
12+
};
13+
flake-utils = {
14+
url = "github:numtide/flake-utils";
15+
};
1016
};
1117

12-
outputs = { self, nixpkgs, flake-utils }:
13-
flake-utils.lib.eachDefaultSystem (system:
14-
let pkgs = import nixpkgs { inherit system; };
15-
in { devShell = import ./shell.nix { inherit pkgs; }; });
18+
outputs =
19+
{
20+
self,
21+
nixpkgs,
22+
unstableNixpkgs,
23+
flake-utils,
24+
}:
25+
flake-utils.lib.eachDefaultSystem (
26+
system:
27+
let
28+
pkgs = import nixpkgs { inherit system; };
29+
unstablePkgs = import unstableNixpkgs { inherit system; };
30+
in
31+
{
32+
devShell = import ./shell.nix {
33+
inherit pkgs;
34+
inherit unstablePkgs;
35+
};
36+
}
37+
);
1638
}
17-

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "markdown-preview-enhanced",
33
"displayName": "%displayName%",
4-
"version": "0.8.17",
4+
"version": "0.8.18",
55
"description": "%description%",
66
"categories": [
77
"Other"
@@ -680,7 +680,7 @@
680680
"@types/crypto-js": "^4.1.2",
681681
"@types/vfile": "^3.0.2",
682682
"async-mutex": "^0.4.0",
683-
"crossnote": "^0.9.13",
683+
"crossnote": "^0.9.14",
684684
"crypto-js": "^4.2.0"
685685
},
686686
"devDependencies": {
@@ -690,7 +690,7 @@
690690
"@types/vscode": "1.70.0",
691691
"@typescript-eslint/eslint-plugin": "^6.5.0",
692692
"@typescript-eslint/parser": "^6.5.0",
693-
"@vscode/test-web": "^0.0.45",
693+
"@vscode/test-web": "^0.0.67",
694694
"concurrently": "^8.2.1",
695695
"esbuild": "^0.25.0",
696696
"esbuild-plugin-polyfill-node": "^0.3.0",

shell.nix

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,21 @@
1-
{ pkgs ? import <nixpkgs> { } }:
1+
{
2+
pkgs ? import <nixpkgs> { },
3+
unstablePkgs ? import <nixpkgs> { },
4+
}:
25
with pkgs;
36
mkShell {
4-
buildInputs = [ nodejs_20 yarn ];
7+
buildInputs = [
8+
nodejs_20
9+
yarn
10+
];
11+
nativeBuildInputs = [
12+
unstablePkgs.playwright.browsers # 1.50.1
13+
# NOTE: ^ The version needs to match the version of playwright in @vscode/test-web
14+
];
515
shellHook = ''
616
# ...
17+
export PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1
18+
export PLAYWRIGHT_BROWSERS_PATH=${unstablePkgs.playwright.browsers}
19+
export PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS=true
720
'';
821
}
9-

0 commit comments

Comments
 (0)