Commit Graph

363 Commits

Author SHA1 Message Date
Zoltan Kochan
bc34aba650 style: adhere conventions 2018-03-05 15:49:34 +02:00
Zoltan Kochan
c82a33678d fix: linking to global package 2018-03-05 11:36:22 +02:00
Zoltan Kochan
f34f966135 feat: specify linked deps in shrinkwrap.yaml (#51)
* feat: specify linked deps in shrinkwrap.yaml

* feat: node_modules is pruned after linking from external package

* feat: link() and linkFromGlobal() expect arrays as first args

BREAKING CHANGE:

link() expects an array as first arg

BREAKING CHANGE:

linkFromGlobal() expects and array as first arg

* feat: update specifiers field in shrinkwrap.yaml when linking

* fix: prune node_modules after linking
2018-03-05 09:48:51 +02:00
Zoltan Kochan
d60164d50f refactor: move shrinkwrap reading logic to separate file 2018-03-03 15:28:56 +02:00
Zoltan Kochan
08cc9ff284 fix: revert changes to global package.json 2018-03-01 01:08:35 +02:00
Zoltan Kochan
3063a6b7ea fix: create package.json during installation when there is no one
ref pnpm/pnpm#1049
2018-03-01 00:28:22 +02:00
Emanuele Tamponi
7a4661df37 fix: use the real path to node_modules (#49)
BREAKING CHANGE:

The API of link() has changed. The second param should be the target `node_modules` folder
2018-02-27 21:35:20 +02:00
Emanuele Tamponi
556910e9aa fix: flatten dependencies by alias (#47)
* fix: flatten by alias

* fix: rename field, other fixes

* fix: more bug fixes

* fix: make all tests run, write a (failing) test for pruning

* fix: reflatten after pruning

* fix: do not log installation/removal of hoisted aliases

* fix: follow review comments

* fix: use muteLogs instead of skipLogs
2018-02-25 13:42:17 +02:00
Emanuele Tamponi
d07a49a3d6 fix: do not run a double install with --shamefully-flatten (#46)
* fix: do not run a double install with --shamefully-flatten

* fix: reinstallForFlatten forces flatten even if no changes are seen
2018-02-23 18:45:16 +02:00
Emanuele Tamponi
1fe8bcb027 fix: do not update config or warn if reinstalling for flatten 2018-02-23 00:21:50 +01:00
Emanuele Tamponi
bfe9a7d2d6 fix: warn when using --shamefully-flatten (#45)
* chore: warn when using --shamefully-flatten

* chore: only warn for shamefully-flatten during install/update
2018-02-22 14:09:02 +02:00
Emanuele Tamponi
a5f9b30182 fix: --global --shamefully-flatten uses a different prefix 2018-02-22 00:21:16 +01:00
Emanuele Tamponi
fdad157392 feat: --shamefully-flatten (#42)
* feat: this is a best attempt at flattening the dependency tree, similar to what npm does

* test: shamefullyFlatten option

* feat: when uninstalling, if shamefully-flatten is true, we need to re-flatten

* fix: use new shrinkwrap, not the old one

* fix: changes suggested in PR

* test: remove test.only

* fix: various bugs in uninstall and general install, added tests

* test: fix test

* test: use project.has and project.hasNot correctly

* test: remove test.only

* test: added tsconfig.json, added lint-test script, lint fixes

* test: use correct message

* fix: check should work on windows too
2018-02-22 01:04:44 +02:00
Zoltan Kochan
6467b938a0 fix: update package-store to v0.17.0 2018-02-17 21:14:44 +02:00
Zoltan Kochan
38c43f142c fix: keep existing deps during named install with no shrinkwrap
ref pnpm/pnpm#1029
2018-02-11 21:13:10 +02:00
Zoltan Kochan
0b39b20d55 refactor: rename installMultiple to resolveDependencies 2018-02-11 19:44:10 +02:00
Zoltan Kochan
dbebdea0f2 refactor: use spread operator instead of Object.assign 2018-02-11 19:32:32 +02:00
Zoltan Kochan
46dde9a8e8 refactor: remove redundant imports of @pnpm/package-requester 2018-02-11 18:47:15 +02:00
Zoltan Kochan
e9c90db6a6 fix: update package-store to v0.16 2018-02-10 12:20:57 +02:00
Zoltan Kochan
e7afbbab58 refactor: resolvedId => depPath, shortId => relDepPath 2018-02-05 23:34:47 +02:00
Zoltan Kochan
e2394fe080 feat: add an option to ignore shrinkwrap.yaml
ref pnpm/pnpm#1025
2018-02-04 21:22:08 +02:00
Zoltan Kochan
704c64d7eb fix(unlink): unlink shouldn't change package.json 2018-02-04 15:38:00 +02:00
Zoltan Kochan
6740004fe6 feat(logging): log resolution_started and importing_started
ref pnpm/pnpm#1017
2018-01-31 00:28:31 +02:00
Zoltan Kochan
30fbc48ab5 fix: using the correct tag when installing aliased deps 2018-01-28 02:03:01 +02:00
Emanuele Tamponi
1b816176b8 fix: ignore upload errors, show warning 2018-01-23 22:51:19 +02:00
Emanuele Tamponi
0985078959 feat: side effects cache (#38)
* feat: upload side effects cache when needed

* feat: add side-effects-cache support

* fix: review suggestions

* fix: rename to cacheByNodeVersion, compute immediately centralLocation

* fix: make cacheByNodeVersion nullable, fix centralLocation, move nodeMajor to the top

* fix: s/nodeVersion/engineName/

* fix: some renames, add verifyStoreIntegrity option

* fix(deps): update

* fix: fix failing tests

* fix: update package-store to v0.15.1

* test: creating side effects cache

* test: using the side effects cache, in readonly mode too

* fix: rename engine to include 'node', test for opts.force
2018-01-22 02:02:01 +02:00
Zoltan Kochan
85bd4ee041 docs: add comment about why path.relative is used to compare paths
ref pnpm/pnpm#996
2018-01-18 21:34:35 +02:00
Nicholas Pape
7336862ee5 fix: store path check should do a path-comparison, not a string comparison (#39)
* Change string compare to a path compare

* Add some tests

* Fix problem with slashes

* Allow injecting of path

* Add a simpler test

* fix: remove unused variable

ref #996
2018-01-18 21:22:03 +02:00
Zoltan Kochan
10bdb22f20 refactor: remove the offline option
The offline option is passed to the resolver/fetcher, during
initialization, so no need to pass it to supi
2018-01-13 18:36:00 +02:00
Zoltan Kochan
715c82706e fix: node id should always be reliably splittable to package IDs
The > symbol is used to delimit package IDs in the Node ID.

The % and > symbols are encoded in package IDs.

ref https://github.com/pnpm/pnpm/issues/986
2018-01-11 09:41:34 +02:00
Zoltan Kochan
1c413655c8 feat: move package importing logic to the store
close #34
2018-01-09 01:20:32 +02:00
Zoltan Kochan
bb7aff4af6 refactor: use own options
BREAKING CHANGE:

storeController is not an optional parameter anymore
2018-01-07 22:34:31 +02:00
Zoltan Kochan
c7fbd36f93 feat: shrinkwrap only install
ref https://github.com/pnpm/pnpm/issues/981
2018-01-03 17:27:18 +02:00
Emanuele Tamponi
646841a0c9 feat: add packageImportMethod option (#32)
* feat: add reflinks option

* feat: packageImportMethod allows us to specify between auto, hardlink, reflink, copy

* refactor: split hardlinkPkg and reflinkPkg, refactor switch, add default method

* fix: add breaks, describe option in the README

* test: test the copy-only import option

* fix: use mkdirp in reflinkPkg too
2017-12-31 00:14:42 +02:00
Emanuele Tamponi
c2be0a1069 feat: incremental rebuild (#30)
* fix: run node-gyp rebuild when install is not specified

* feat: after pnpm install --ignore-script, pnpm rebuild is incremental

* refactor: add --pending option to rebuild, only store pending ids

* fix: javascript magic to avoid if statement

* fix: update pendingBuilds also when removing packages

* fix: remove old code, use testDefaults correctly

* test: add test for rebuild --pending

* chore: make my IDE and TSLint happy

* chore: @types/es6-promise makes IntelliJ happy and Travis sad

* fix: use Set, only append to pendingBuilds if ignoreScripts is true

* test: pendingBuilds handled correctly

* test: install and uninstall behavior with pendingBuilds

* fix: saveModules only when needed

* fix: Set has size, not length, add comment about the use of .concat
2017-12-29 22:44:41 +02:00
Zoltan Kochan
d57942ce8e feat: log installation stats about number of added/removed
BREAKING CHANGE:

The logging format changed of the installation stats
2017-12-27 02:31:41 +02:00
Zoltan Kochan
ae99b3aef6 feat: add an option for avoiding logging to extendOptions() 2017-12-25 21:11:51 +02:00
Zoltan Kochan
4ce61da867 feat: when resolving, prefer version ranges specified for top deps
ref https://github.com/pnpm/pnpm/issues/952
2017-12-25 02:07:07 +02:00
Emanuele Tamponi
3113be8472 fix: pass unsafePerm to lifecycle call 2017-12-24 19:56:38 +02:00
Zoltan Kochan
0191279754 chore: update dependencies 2017-12-23 15:27:04 +02:00
Zoltan Kochan
06b322b579 fix: always close the store 2017-12-16 03:10:52 +02:00
Zoltan Kochan
b600958d3b feat: storeController can be passed to supi via options
ref https://github.com/pnpm/pnpm/issues/832
2017-12-16 02:02:13 +02:00
Zoltan Kochan
abc7f1ba19 refactor: move out store-controller logic out of supi
ref https://github.com/pnpm/pnpm/issues/832
2017-12-10 23:20:01 +02:00
Zoltan Kochan
a3f1e5ec56 refactor: use @pnpm/fs-locker for locking 2017-12-10 00:56:40 +02:00
Zoltan Kochan
f1861cea5e refactor: update @pnpm/package-requester to version 0.4.0 2017-12-09 19:52:04 +02:00
Zoltan Kochan
c952203e0d refactor: update package-requester to version 0.3.0 2017-12-09 15:10:53 +02:00
Zoltan Kochan
79eadcc20c refactor: use @pnpm/package-requester
ref https://github.com/pnpm/pnpm/issues/559
close #24
2017-12-06 22:32:15 +02:00
Zoltan Kochan
8f030ed109 refactor: move option type to @pnpm/types 2017-12-04 21:39:47 +02:00
Zoltan Kochan
7b17368689 fix: update supi to version 0.7.0
ref https://github.com/pnpm/pnpm/issues/559
2017-11-26 23:41:51 +02:00
Zoltan Kochan
5c5e738f76 refactor: specs are parsed by package-store
ref https://github.com/pnpm/pnpm/issues/559
2017-11-26 17:54:36 +02:00