Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

cmd-shim

npm17.1mISC7.0.0TypeScript support: definitely-typed

Used in npm for command line application support

readme

cmd-shim

The cmd-shim used in npm to create executable scripts on Windows, since symlinks are not suitable for this purpose there.

On Unix systems, you should use a symbolic link instead.

Build Status Dependency Status npm version

Installation

npm install cmd-shim

API

cmdShim(from, to) -> Promise

Create a cmd shim at to for the command line program at from. e.g.

var cmdShim = require('cmd-shim');
cmdShim(__dirname + '/cli.js', '/usr/bin/command-name').then(() => {
  // shims are created!
})

cmdShim.ifExists(from, to) -> Promise

The same as above, but will just continue if the file does not exist.

changelog

Changelog

7.0.0 (2024-08-26)

⚠️ BREAKING CHANGES

  • cmd-shim now supports node ^18.17.0 || >=20.5.0

Bug Fixes

  • aaf6016 #154 align to npm 10 node engine range (@hashtagchris)

Chores

  • 926af07 #154 run template-oss-apply (@hashtagchris)
  • 7c154f3 #151 postinstall for dependabot template-oss PR (@hashtagchris)
  • 21178ef #151 bump @npmcli/template-oss from 4.22.0 to 4.23.1 (@dependabot[bot])

6.0.3 (2024-05-04)

Bug Fixes

Documentation

  • 5598b4b #137 readme: fix broken badge URLs (#137) (@10xLaCroixDrinker)

Chores

  • 3140bb1 #140 bump @npmcli/template-oss to 4.22.0 (@lukekarrys)
  • c944f6b #140 postinstall for dependabot template-oss PR (@lukekarrys)
  • fa3f56b #139 bump @npmcli/template-oss from 4.21.3 to 4.21.4 (@dependabot[bot])

6.0.2 (2023-10-18)

Bug Fixes

  • 3bdb518 #117 don't assume cygpath is available (#117) (@davhdavh)

6.0.1 (2022-12-13)

Bug Fixes

  • a32b3a0 #96 drop the -S flag from env (#96) (@nlf, @yeldiRium)

6.0.0 (2022-10-11)

⚠️ BREAKING CHANGES

  • this module will no longer attempt to alter file ownership
  • cmd-shim is now compatible with the following semver range for node: ^14.17.0 || ^16.13.0 || >=18.0.0

Features

  • ef99e1c #88 remove ownership changing features (#88) (@nlf)
  • d5881e8 #82 postinstall for dependabot template-oss PR (@lukekarrys)

5.0.0 (2022-04-05)

⚠ BREAKING CHANGES

  • this drops support for node 10 and non-LTS versions of node 12 and node 14

Bug Fixes

Dependencies