diff --git a/docs/roadmap.md b/docs/roadmap.md index 7b286030aa..c1d3313ae0 100644 --- a/docs/roadmap.md +++ b/docs/roadmap.md @@ -12,6 +12,7 @@ - [ ] git-hosted packages (`npm i rstacruz/scourjs`) - [ ] optional dependencies (`npm i escodegen@1.8.0` wants `source-map@~0.2.0`) - [ ] file packages (`npm i file:../path`) + - [x] windows support - [x] bin executables - [ ] `--global` installs - [x] `--save` (et al) diff --git a/docs/vs-npm.md b/docs/vs-npm.md index 0a2f22f230..af97d670f9 100644 --- a/docs/vs-npm.md +++ b/docs/vs-npm.md @@ -31,7 +31,6 @@ On the other hand, pnpm manages `node_modules` as an addressable storage in its ## Limitations -- Windows is [not fully supported](https://github.com/rstacruz/pnpm/issues/6) (yet). - You can't install from [shrinkwrap][] (yet). - Peer dependencies are a little trickier to deal with. - You can't publish npm modules with `bundleDependencies` managed by pnpm. diff --git a/lib/rel_symlink.js b/lib/rel_symlink.js index e1c99575cc..1c3c19c8a9 100644 --- a/lib/rel_symlink.js +++ b/lib/rel_symlink.js @@ -7,6 +7,9 @@ var relative = require('path').relative */ module.exports = function relSymlink (src, dest) { - var rel = relative(dirname(dest), src) - return symlink(rel, dest) + // Turn it into a relative path when not in win32. + var isWindows = process.platform === 'win32' + var rel = isWindows ? src : relative(dirname(dest), src) + + return symlink(rel, dest, 'junction') }