fix(.envrc): add --no-pure-eval for devenv flake compatibility (#20692)

* feat(nix): add flake module and offline-friendly build

* chore(nix): upgrade to Node.js 24 and pnpm 10

Update devenv.nix to match project dependencies:
- Upgrade Node.js from 22 to 24 (aligns with Dockerfile node:24-bookworm)
- Upgrade pnpm from 9 to 10 (aligns with package.json pnpm@10.22.0)

* test: fix buffer-get test timeout

Replace external URL with mock server endpoint to prevent test timeout.
The test was trying to fetch from http://example.com which is not mocked,
causing it to timeout. Now uses http://rsshub.test/headers which is
properly mocked in the test setup.

* fix(.envrc): add --no-pure-eval for devenv flake compatibility

This fixes an issue where devenv fails when entering the directory with
direnv, reporting: "devenv was not able to determine the current directory."

The --no-pure-eval flag allows devenv to determine the project root via
builtins.getEnv "PWD" in flake mode.

Also adds .direnv, .devenv, and .pre-commit-config.yaml to .gitignore
following alphabetical order as per project conventions.
This commit is contained in:
Dzming Li
2025-12-18 08:00:46 -08:00
committed by GitHub
parent 3300fb07e4
commit ce34d6eb59
2 changed files with 4 additions and 1 deletions

2
.envrc
View File

@@ -1 +1 @@
use flake .
use flake . --no-pure-eval

3
.gitignore vendored
View File

@@ -1,8 +1,11 @@
.DS_Store
.cursorrules
.devenv
.direnv
.env
.eslintcache
.idea
.pre-commit-config.yaml
.log
.now
.roomodes