Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file.

### Added

- **devenv/pnpm**: Keep the cached `pnpm-install-contract.json` writable after
copying the generated read-only contract into `.devenv/task-cache`, so repeat
`pnpm:install` runs can replace mutable cache state without downstream
chmod workarounds.

- **@overeng/notion-effect-client**: Add `NotionMarkdown.markdownToBlocks`,
an AST-based selected-GFM Markdown importer that emits Notion append/create
block payloads for paragraphs, headings, dividers, lists, task lists, code,
Expand Down
2 changes: 2 additions & 0 deletions nix/devenv-modules/tasks/shared/pnpm.nix
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,9 @@ let
echo "$_gvs_hash" > "$_gvs_hash_file"
fi
if [ -n "''${_pnpm_install_contract_file:-}" ]; then
rm -f "$contract_state_file"
cp "$_pnpm_install_contract_file" "$contract_state_file"
chmod u+w "$contract_state_file" 2>/dev/null || true
if pnpm_contract_supports_dependency_materialization_profile ${pkgs.nodejs}/bin/node "$_pnpm_install_contract_file"; then
if [ -n "''${CI:-}" ]; then
_dependency_materialization_trait="ciJobLocal"
Expand Down
11 changes: 11 additions & 0 deletions nix/devenv-modules/tasks/shared/tests/pnpm-task-smoke.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,17 @@ echo "Test 2: exec runs fake pnpm and populates cache"
grep -qF ".effect-utils-pnpm-store.lock" "$tmpdir/pnpm-install.exec.sh"
)

echo "Test 2b: exec rewrites read-only generated contract cache state"
(
cd "$workspace"
export HOME="$tmpdir/home"
export PNPM_HOME="$workspace/.pnpm-home-a"
contract_state_file="$workspace/.devenv/task-cache/pnpm-install/pnpm-install-contract.json"
chmod a-w "$workspace/pnpm-install-contract.json" "$contract_state_file"
bash "$tmpdir/pnpm-install.exec.sh"
test -w "$contract_state_file"
)

echo "Test 3: status hits after install with same GVS path"
(
cd "$workspace"
Expand Down
Loading