Skip to content

Remove npm global prefix workaround after use-m fix#1911

Merged
konard merged 2 commits into
mainfrom
issue-1910-a4d417edc608
Jun 12, 2026
Merged

Remove npm global prefix workaround after use-m fix#1911
konard merged 2 commits into
mainfrom
issue-1910-a4d417edc608

Conversation

@konard

@konard konard commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #1910.

  • Removed Hive Mind's ensureWritableNpmGlobalPrefix bootstrap preflight and deleted src/npm-global-prefix.lib.mjs.
  • Replaced workaround-specific tests with tests/test-use-m-bootstrap-no-npm-prefix-workaround.mjs, which guards against reintroducing project-local npm prefix policy.
  • Updated the issue Fix install error #1897 case study and added a patch changeset for the cleanup.

Upstream Verification

  • link-foundation/use-m#55 was merged on June 12, 2026 and closes link-foundation/use-m#54.
  • use-m@8.13.8 is the latest npm release, published on June 12, 2026.
  • I unpacked use-m@8.13.8 and verified use.js, use.mjs, and use.cjs include the upstream non-writable npm global-root fallback: they check npm root -g, preserve explicit npm_config_prefix / NPM_CONFIG_PREFIX with actionable errors, and otherwise redirect installs to a use-m-owned cache prefix under XDG_CACHE_HOME or ~/.cache/use-m/npm-global.

Reproduction

The new regression guard fails on the pre-fix code because src/npm-global-prefix.lib.mjs exists and src/use-m-bootstrap.lib.mjs imports/runs the local preflight:

  • node tests/test-use-m-bootstrap-no-npm-prefix-workaround.mjs

Verification

  • node tests/test-use-m-bootstrap-no-npm-prefix-workaround.mjs
  • npm run lint
  • npm run format:check
  • npm test (all 248 selected default test files passed)
  • git diff --check

Adding .gitkeep for PR creation (default mode).
This file will be removed when the task is complete.

Issue: #1910
@konard konard self-assigned this Jun 12, 2026
@konard konard changed the title [WIP] Remove npm global prefix workaround after use-m handles non-writable global roots Remove npm global prefix workaround after use-m fix Jun 12, 2026
@konard konard marked this pull request as ready for review June 12, 2026 21:52
@konard

konard commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Working session summary

Implemented and pushed PR 1911: #1911

Removed Hive Mind’s local npm global-prefix workaround now that upstream use-m@8.13.8 handles non-writable global roots. The PR now deletes src/npm-global-prefix.lib.mjs, simplifies src/use-m-bootstrap.lib.mjs, replaces the workaround test with a guard against reintroducing local prefix policy, updates the issue #1897 case study, and adds a patch changeset.

Verification:

PR is marked ready for review, merge state is clean, and git status --short is clean.


This summary was automatically extracted from the AI working session output.

@konard

konard commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $13.445166

📊 Context and tokens usage:

  • 200.1K / 1.1M (19%) input tokens, 33.5K / 128K (26%) output tokens

Total: (200.1K + 9.9M cached) input tokens, 33.5K output tokens, $13.445166 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (43837KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard

konard commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 21be4a2 into main Jun 12, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove npm global prefix workaround after use-m handles non-writable global roots

1 participant