Skip to content

fix: published npm-shrinkwrap.json installs development dependencies for dependency consumers #82

Closed

Description

@abruption

What happened

[email protected] publishes the repository's full npm-shrinkwrap.json (#71), which also lists every development dependency. When the package is installed as a regular dependency, npm installs those development entries under node_modules/codex-unlock/node_modules as extraneous packages.

npm install [email protected]   -> added 3 packages
npm install [email protected]   -> added 105 packages (typescript, eslint, ajv, ... marked extraneous)
npm install -g [email protected] -> added 3 packages

Global installs are unaffected, which is why the package smoke test (it installs with --omit=dev) and the global install check did not catch it.

What you expected

Installing codex-unlock as a dependency installs only codex-unlock, fs-ext-extra-prebuilt, and nan, with the runtime tree still pinned for npm consumers.

Environment

  • codex-unlock 0.4.1 (541542f), npm 10.9.2 and 11.x, macOS 27.0 arm64

Source evidence

Acceptance criteria

  • The published npm-shrinkwrap.json contains only the runtime tree (no dev/devOptional entries and no root devDependencies).
  • A regular dependency install of the packed artifact installs exactly codex-unlock, fs-ext-extra-prebuilt, and nan, and package smoke asserts it.
  • Runtime pins for npm consumers are unchanged (fs-ext-extra-prebuilt 2.2.14 and the locked nan).

Scope and limitations

  • No runtime behavior change; the extra packages are not loaded. The impact is install size, additional supply-chain surface, and npm audit noise for dependency consumers (for example users of codex-unlock/types).

Checked

Activity

  1. added this to the v0.4.2 milestone on Sep 29, 2026
  2. added
    bug
    on Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions