Commit Graph

14 Commits

Author SHA1 Message Date
Zoltan Kochan
bc34aba650 style: adhere conventions 2018-03-05 15:49:34 +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
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
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
zkochan
c9abd79661 refactor: rename storePath in .modules.yaml to store 2017-06-25 21:16:22 +03:00
zkochan
af79c8c319 feat: add independent-leaves config
BREAKING CHANGE:

independent dependencies are not symlinked from the global store
by default

Close #821
2017-06-23 22:03:52 +03:00
zkochan
ec6e577387 feat: add layoutVersion to .modules.yaml
BREAKING CHANGE:

The new layout is not compatible with previous versions.
2017-06-23 00:57:15 +03:00
zkochan
f414e256e8 fix: subdeps of skipped optionals are skipped as well 2017-06-03 14:31:17 +03:00
zkochan
765a139ede fix: store status doesn't fail on skipped optional deps
A new property called `skipped` added to
`node_modules/.modules.yaml`. The property is an array of
package IDs, of those packages that are optional an were
skipped during installation.

Close #681
2017-04-09 14:06:49 +03:00
zkochan
c5faf44f55 refactor(fs): use packages for loading/writing YAML files 2017-02-12 13:25:04 +02:00
zkochan
32e4130bea refactor: remove preserve-symlinks and flat-tree options
Close #546

BREAKING CHANGE:

Removed preserve-symlinks option

BREAKING CHANGE:

Removed flat-tree option
2017-01-25 22:12:38 +02:00
Zoltan Kochan
38837b131c Pure store (#524)
* feat: drop Node.js <= 6.3 support

BREAKING CHANGE:

drop support of Node.js pre-6.3

* refactor: remove the redundant subfolder in store

* refactor: rename linkPeers

* refactor: remove not used code

* feat: link each file separately

* refactor: change store structure

* refactor: resolve github dependencies to commits

* chore(package.json): pass --preserve-symlinks to ts-node

* test: temporarily skip failing tests

* refactor(git): use more human-friendly Git IDs

* refactor: resolve

* refactor: divide resolution and fetching

* refactor(fetch): better variable naming

* feat: add shrinkwrap.yaml

* test(shrinkwrap): shrinkwrap locks dependencies

* style: fix typing issue

* fix(fetch): properly link node_modules on repeat install

* refactor: comment skipped test with single-line comments

* fix: circular symlinks are avoided

* refactor(fetch): remove redundant type properties

* test: additional check for circular symlinks

* feat: saving dependency graph in node_modules instead of in store

BREAKING CHANGE:

Dependency graph moved out from store

* feat: add store.yaml with info about dependent projects

* refactor: remove name from FetchedPackage

* refactor: change the location of packages from npm in store

BREAKING CHANGE:

Structure of store changed

* refactor: change global store path

BREAKING CHANGE:

Move the store path out of ~/.pnpm

* refactor: remove justFetched from FetchedPackage

* refactor(install): use functional programming to filter deps

* refactor(install): remove redundant node_modules creation

* fix(install): installation of concurent circular dependencies

* feat: copy not link some packages

Packages that have install lifecycle events are copied not linked.

* fix(store.yaml): don't duplicate records

* perf: resolve a package only once per project

* test: concurrent installation of the same dependency

* fix: packages are not removed in the middle of fetch

* fix: dependencies are linked only once

* fix: make linking work on Windows

* fix: installing local dependencies on Windows

* fix: don't reinstall dependencies of the same package

* fix(bin): the run function always returns a Promise

* fix: use hard links to link files to the .resolutions folder

* fix: peers are linked into the correct location

* fix: bundled dependencies are not reinstalled

* refactor: remove unsymlink

It is not used anymore

* chore(CI): test on Node.js v4 as well

* refactor: use UPPER_CASE for constants

* chore(package): return support of Node.js v4

* fix: make pnpm Node.js 4 compatible again

* test: don't run tsnode with --preserve-symlinks

--preserve-symlinks makes tests fail on Node.js 4

* fix(bin): don't use --preserve-symlinks on Node pre-6.3

* test: use global stores in tests

* fix: flat-tree installation should not work on Node 4

* fix: show warning

When trying to install into a node_modules created by older pnpm

* refactor: change the global store location

From `~/.store` to `~/.pnpm-store`

* docs: note that some of the info is out of date

* test: fix typing error

* test: fix frequently failing test
2017-01-08 15:47:50 +02:00
zkochan
142ecfb139 refactor: make yaml reading async and some minor changes
PR #429
2016-10-19 02:13:18 +03:00
zkochan
e52c293454 refactor(store): avoid unnecessary subdirs in stores
Don't divide the store into two types when it is used only by
one package.

Throw an error when trying to use a store with a specific dependency
tree type for installation of an another tree type.
2016-10-19 00:44:57 +03:00