From 857de3b2bc298cbcec932102afe252c579d781f4 Mon Sep 17 00:00:00 2001 From: saberzero1 Date: Thu, 26 Nov 2026 00:16:56 +0100 Subject: [PATCH] chore(deps): chokidar 6 (requires Node.js 22.22) --- .changeset/chokidar-6.md | 5 +++++ .node-version | 2 +- docs/getting-started/index.md | 2 +- docs/getting-started/installation.md | 2 +- package-lock.json | 29 +++++++++++++++++++++------- package.json | 4 ++-- quartz/bootstrap-cli.mjs | 6 +++--- 7 files changed, 35 insertions(+), 15 deletions(-) create mode 100644 .changeset/chokidar-6.md diff --git a/.changeset/chokidar-6.md b/.changeset/chokidar-6.md new file mode 100644 index 000000000..8537f080d --- /dev/null +++ b/.changeset/chokidar-6.md @@ -0,0 +1,5 @@ +--- +"@jackyzha0/quartz": minor +--- + +Quartz now requires Node.js 22.22 or later (was 22), for chokidar 6, which watches content in `--serve` mode. chokidar 6 confirms each change against the file system before rebuilding and fixes missed and duplicate change events. diff --git a/.node-version b/.node-version index aebd91c52..42a1c98ac 100644 --- a/.node-version +++ b/.node-version @@ -1 +1 @@ -v22.16.0 +v22.22.0 diff --git a/docs/getting-started/index.md b/docs/getting-started/index.md index 7327e124c..ff2ea7161 100644 --- a/docs/getting-started/index.md +++ b/docs/getting-started/index.md @@ -14,7 +14,7 @@ You need these tools installed before continuing: > [!warning] Common issues > -> - **Linux**: System packages (`apt install nodejs`) often ship much older versions. Use [nvm](https://github.com/nvm-sh/nvm) or the [NodeSource](https://github.com/nodesource/distributions) repository to get Node.js v22. +> - **Linux**: System packages (`apt install nodejs`) often ship much older versions. Use [nvm](https://github.com/nvm-sh/nvm) or the [NodeSource](https://github.com/nodesource/distributions) repository to get Node.js v22.22 or later. > - **Windows**: When installing Git, make sure **"Git from the command line and also from 3rd-party software"** is selected so that `git` is available in your terminal. If `node -v` or `git -v` shows "command not found", restart your terminal or check your PATH. > - **macOS**: The Xcode command-line tools include Git (`xcode-select --install`). For Node.js, [nvm](https://github.com/nvm-sh/nvm) or the [official installer](https://nodejs.org/) both work. diff --git a/docs/getting-started/installation.md b/docs/getting-started/installation.md index 1790565f9..74733544f 100644 --- a/docs/getting-started/installation.md +++ b/docs/getting-started/installation.md @@ -39,7 +39,7 @@ cd quartz ## 2. Install Dependencies > [!important] -> Quartz requires **Node.js 22** or later. Check your version with `node -v` and upgrade at [nodejs.org](https://nodejs.org/) if needed. +> Quartz requires **Node.js 22.22** or later. Check your version with `node -v` and upgrade at [nodejs.org](https://nodejs.org/) if needed. ```bash npm i diff --git a/package-lock.json b/package-lock.json index df1706cb3..8711f78a0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,7 +56,7 @@ "@quartz-themes/core": "^3.1.0", "ansi-truncate": "^1.4.0", "async-mutex": "^0.5.0", - "chokidar": "^5.0.0", + "chokidar": "^6.0.0", "esbuild-sass-plugin": "^3.6.0", "globby": "^16.1.0", "gray-matter": "^4.0.3", @@ -112,7 +112,7 @@ "typescript": "^5.9.3" }, "engines": { - "node": ">=22", + "node": ">=22.22", "npm": ">=10.9.2" } }, @@ -3773,15 +3773,15 @@ "license": "MIT" }, "node_modules/chokidar": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", - "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-6.0.0.tgz", + "integrity": "sha512-Ec2Z7wpcKBiMpR7DxteoqS/sq5G5d2A4fpxzPv6+fD7xNNdrTghn7L11YwV5EN1B3i72Erc3XVT5FkWIDx90+A==", "license": "MIT", "dependencies": { - "readdirp": "^5.0.0" + "readdirp": "^5.1.1" }, "engines": { - "node": ">= 20.19.0" + "node": ">= 22.22" }, "funding": { "url": "https://paulmillr.com/funding/" @@ -6719,6 +6719,21 @@ "@parcel/watcher": "^2.4.1" } }, + "node_modules/sass/node_modules/chokidar": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-5.0.0.tgz", + "integrity": "sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==", + "license": "MIT", + "dependencies": { + "readdirp": "^5.0.0" + }, + "engines": { + "node": ">= 20.19.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/section-matter": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/section-matter/-/section-matter-1.0.0.tgz", diff --git a/package.json b/package.json index f34c79b72..42da05742 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ }, "engines": { "npm": ">=10.9.2", - "node": ">=22" + "node": ">=22.22" }, "keywords": [ "site generator", @@ -86,7 +86,7 @@ "@quartz-themes/core": "^3.1.0", "ansi-truncate": "^1.4.0", "async-mutex": "^0.5.0", - "chokidar": "^5.0.0", + "chokidar": "^6.0.0", "esbuild-sass-plugin": "^3.6.0", "globby": "^16.1.0", "gray-matter": "^4.0.3", diff --git a/quartz/bootstrap-cli.mjs b/quartz/bootstrap-cli.mjs index 4b2a7ee88..ab1cece81 100755 --- a/quartz/bootstrap-cli.mjs +++ b/quartz/bootstrap-cli.mjs @@ -1,8 +1,8 @@ #!/usr/bin/env -S node --no-deprecation -const [major] = process.versions.node.split(".").map(Number) -if (major < 22) { +const [major, minor] = process.versions.node.split(".").map(Number) +if (major < 22 || (major === 22 && minor < 22)) { console.error( - `\nQuartz requires Node.js >= 22, but you are running Node.js ${process.version}.\n` + + `\nQuartz requires Node.js >= 22.22, but you are running Node.js ${process.version}.\n` + `Please upgrade: https://nodejs.org/\n`, ) process.exit(1)