Commit Graph

65 Commits

Author SHA1 Message Date
zkochan
a6a7ca5b04 fix: authorization during tarball fetch
Close #718, Close #708
2017-04-25 17:19:02 +03:00
zkochan
7a9f657acf fix: installation of packages from non-github repos
Close #716
2017-04-23 20:09:37 +03:00
zkochan
7f426d0cc7 fix: use the new npm-package-arg 2017-04-15 20:51:03 +03:00
zkochan
88633546d6 refactor: better typing for package specs 2017-04-15 16:18:23 +03:00
zkochan
c336f4a026 refactor: use hosted-git-info instead of @zkochan/hosted-git-info 2017-03-22 22:46:04 +02:00
zkochan
686abe864b fix: registry can be passed in via parameter 2017-03-19 00:35:10 +02:00
zkochan
317cac03b6 feat: make shrinkwrap.yaml smaller
Ref #664
2017-03-19 00:35:10 +02:00
zkochan
185d1f6625 refactor: rename getRegistryFolderName()
Rename getRegistryFolderName() to getRegistryName()
2017-03-16 01:44:54 +02:00
zkochan
4f484162d4 feat: add offline support
Close #508, Close #659
2017-03-13 02:31:37 +02:00
zkochan
f0ae7a0ff2 fix: the tag config is used only for top-level named installs 2017-03-05 19:14:20 +02:00
zkochan
d68fb703d8 refactor(shinkwrap): not type prop for tarball resolutions
Most of the resolutions are tarball files. Skipping the
type property for these decreases the size of `shrinkwrap.yaml`
significantly.
2017-03-04 16:07:48 +02:00
zkochan
be633ffb73 feat: save tarballs before unpacking
...and unpack tarballs one by one

Close #600
2017-02-27 00:10:01 +02:00
zkochan
65d7c20763 refactor: move npm resolve related files to one dir 2017-02-27 00:10:01 +02:00
zkochan
a1ee21b907 feat: use a local registry similar to sinopia's storage 2017-02-27 00:10:01 +02:00
zkochan
f119c76118 fix(resolve): normalize SSH URLs
Close #419
2017-02-22 21:32:17 +02:00
zkochan
02a53797e8 fix(git+ssh): git clone with correct ssh URL
Close #419
2017-02-17 20:34:06 +02:00
zkochan
c170f798ae refactor: remove not used file 2017-02-16 00:03:45 +02:00
zkochan
0eedfd53c3 feat: try to resolve URL dependencies to npm packages 2017-02-14 00:59:42 +02:00
zkochan
f763d6a321 fix(resolve): tarball depedencies have readable IDs 2017-02-13 23:32:38 +02:00
zkochan
dfb7acc9bd fix(resolve): git dependencies should have platform agnostic IDs 2017-02-13 21:11:00 +02:00
zkochan
5169b3725b feat: better shrinkwrap.yaml
Close #587

BREAKING CHANGE:

the `shrinkwrap.yaml` format has been changed
2017-02-12 13:25:04 +02:00
zkochan
c40264a9cd refactor: use read-pkg 2017-02-07 01:27:43 +02:00
Zoltan Kochan
0da7115d1d fix: simultanious operations on meta.json 2017-02-03 00:05:05 +02:00
zkochan
5f07768d2d feat: semver aware caching
Invalidate caching in semver aware way.

Remove caching into filesystem.

Rel #568, Close #580
2017-02-02 22:11:03 +02:00
zkochan
aa1a1b2b0e fix: package id should be similar on different platforms 2017-01-28 16:44:36 +02:00
Andrey Popp
0f51b06047 refactor: process linkLocal during the fetching
Previously we processed it during the resolution process but we don't need to
anymore.
2017-01-20 01:20:52 +02:00
Andrey Popp
95f247e123 refactor: make resolvers return {resolution, package}
That removes pkg field from package resolution and we can simplify code which
saves resolution to a shrinkwrap. Also we now can unify package and tarball
resolutions.
2017-01-20 01:20:52 +02:00
Andrey Popp
24dfeaa630 refactor: unify directory with link, tarball and local-tarball
Also make git resolver return tarball resolution for github hosted packages
2017-01-20 01:20:52 +02:00
Andrey Popp
fd806ac561 refactor: factor out fetch code from resolve
I replaved `ResolveResult` with `Resolution` which is more detailed type, a
discriminated union.

Then I removed `fetch` attribute from `ResolveResult` and moved that logic to
`fetchResolution` function. Thus removing `src/resolve/fetch` module entirely.
2017-01-20 01:20:52 +02:00
zkochan
658b263709 perf(git-resolver): try the GitHub API first to resolve git deps
Try the GitHub API first to resolve git deps. If fails due to
API limit, fall back to `git ls-remote`.

Always use codeload to download deps from GitHub.

Close #536
2017-01-18 21:19:15 +02:00
zkochan
a8e3648c16 fix(git): git-hosted packages location in store
The commit ID has to be the last folder name of a git-hosted
dependency in the store.
2017-01-18 00:15:05 +02:00
zkochan
01fdfbad2e fix(git): don't use GitHub API to avoid rate limit errors
Additionally, use ls-remote to resolve refs to commits, before clonings
2017-01-17 23:39:25 +02:00
zkochan
a7d508782c refactor: move reporters to separate packages 2017-01-16 20:49:18 +02:00
zkochan
a33870b4b9 refactor: use pnpm namespaced logs 2017-01-16 20:49:18 +02:00
zkochan
b748c213db refactor: rename logger to reporter
Reporter is a better name for specifying console output themes.

BREAKING CHANGE: the logger config renamed to reporter
2017-01-16 20:49:18 +02:00
zkochan
53f94417e7 feat(log): use ndjson for console output
Close #538
2017-01-16 20:49:18 +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
Zoltan Kochan
712358efd5 chore: update dependencies 2016-11-25 14:58:38 -08:00
Zoltan Kochan
e1cea455f5 chore: update typescript 2016-11-20 10:40:18 -08:00
Zoltan Kochan
41cbf055d6 fix(install): dirs in stores can't contain colons
Close #479
2016-11-17 09:11:39 -08:00
zkochan
e767ebdea4 refactor: return the package when available after resolving 2016-11-03 14:29:02 +02:00
zkochan
0632510b61 refactor: better naming
Rename the install method to fetch. Move a method out of installMultiple
and call it install instead.
2016-10-29 15:04:22 +03:00
Zoltan Kochan
ee1da1f6c1 refactor: remove context from package install 2016-10-29 15:04:22 +03:00
zkochan
3e3fe5d31e refactor: use unpack-stream 2016-10-22 23:06:10 +03:00
zkochan
26fbe5dd51 perf: read pkg json files asynchronously
Use load-json-file and mem
2016-10-22 21:02:07 +03:00
Zoltan Kochan
429dc67c2a refactor: use link-dir
Use the link-dir package for linking directories instead of
own code.
2016-10-22 16:37:11 +03:00
zkochan
eaa50dc328 feat: add --depth option 2016-10-11 15:07:28 +03:00
zkochan
5a1c2c9d7b fix(install): interpret versions and ranges loosely
Close #380
2016-09-29 21:25:37 +03:00
zkochan
6126577efb refactor(types): move the Package type out of initCmd 2016-09-28 22:42:17 +03:00
zkochan
c94eb15a47 refactor: use the term id instead of fullname
npm uses the term ID, so for consistency pnpm should
use the same terminology.

Close #377
2016-09-28 01:38:41 +03:00