1.4.4 • Published 10 months ago

pnpm-single-version v1.4.4

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

pnpm single version

Enforce Single version of dependencies on pnpm workspace.

Commitizen friendly

Installation

pnpm add -D pnpm-single-version

Usage

Add following options to package.json in project root

"pnpmSingleVersion": {
    "includes": [
        // Place all the single version dependencies here
        "@babel/core",
        "esbuild",
        // glob is also supported
        "eslint-plugin-*",
        "*-plugin",
    ]
}

Maunal Checking using CLI

You can pnpm-single-version in Terminal

pnpm pnpm-single-version

or

pnpm psv

Automatic resolve (Recommanded)

Apart from manual checking, checking can also be done when pnpm-lock.yaml is resolved, where pnpm detected dependencies changes running pnpm install , pnpm update and pnpm removed. This is much effective.

By using afterAllResolved hook in .pnpmfile.cjs, installation process can be interrupted when non-single version dependencies is detected.

To setup it up,

  1. First, install checker via

    pnpm pnpm-single-version install

    this command will generate a checker file inside .psv directory of the root directory of workspace.

  2. Then you should create a .pnpmfile.cjs and add following code

    const hook = require('./.psv/hook')
    
    module.exports = {
        hooks: {
            afterAllResolved: hook
        }
    }

Now, when you call pnpm install and pnpm update, checking is going to be involve automatically only when have dependenices changes.

PS: You may need to run psv install every time you update pnpm-single-version

More about .pnpmfile.cjs at https://pnpm.io/pnpmfile

1.4.4

10 months ago

1.4.3

11 months ago

1.4.2

1 year ago

1.4.1

1 year ago

1.4.0

1 year ago

1.2.8-beta6

2 years ago

1.3.5

2 years ago

1.3.4

2 years ago

1.3.3

2 years ago

1.3.2

2 years ago

1.2.8-beta3

2 years ago

1.3.1

2 years ago

1.2.8-beta4

2 years ago

1.3.0

2 years ago

1.2.8-beta5

2 years ago

1.3.5-beta.1

2 years ago

1.3.5-beta.4

2 years ago

1.3.5-beta.5

2 years ago

1.3.5-beta.2

2 years ago

1.3.5-beta.3

2 years ago

1.2.8-beta2

2 years ago

1.2.8-beta1

2 years ago

1.2.8-beta0

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

0.1.0

2 years ago

0.1.0-beta.1

2 years ago

0.1.0-beta0

2 years ago