lirantal / lirantal/create-node-lib

Apply packageManager minimum for package manager directives

Open
#49 0 comments 0 reactions 1 assignee View on GitHub

@lirantal is already working on this.

Since May 22, 2026.

bug
Dominant language
JavaScript
Stars
45
Forks
11
PR merge metrics
No merged PRs in 30d

Description

Currently there's a .npmrc and pnpm-workspace.yaml created in the template/ directory but they rely on directives which may not be available for the pnpm version install

as such we should update the package.json to declare per the package manager selected by the user as follows for when it is pnpm as an example:

  "devEngines": {
    "packageManager": { "name": "pnpm", "version": ">=11.0.0", "onFail": "download" }
  }

but the devEngines is only needed for when the package manager is pnpm. When it is npm, you just need to set the engines field (with the npm version being >= 11.10.0)

--

Also the template package.json file has the wrong version set for the pnpm, it's currently set to this in the sao.js file which has the logic to set it:

'use strict'
const validateNpmPackageName = require('validate-npm-package-name')

const PACKAGE_MANAGER_ENGINES = {
  pnpm: '>=10.26.0',
  npm: '>=11.10.0'
}

so this also needs to be fixed

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.