Commit Graph

880 Commits

Author SHA1 Message Date
zkochan
6345c19f95 fix: remove spread-operator usage to support Node 4 2017-01-20 02:26:02 +02:00
zkochan
d6f5c68cfd chore(package): don't use tap-diff
When tests run with tap-diff, ts-node errors are ignored.
2017-01-20 02:26:02 +02:00
Andrey Popp
b035c1d1f9 refactor: provide b/c for shrinkwrap 2017-01-20 01:20:52 +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
cf729e1a65 refactor: save every resolution to shrinkwrap 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
greenkeeperio-bot
d78ccce693 chore(package): update unpack-stream to version 1.1.0
https://greenkeeper.io/
2017-01-19 21:52:39 +02:00
zkochan
48644e9764 chore: release v0.49.2 v0.49.2 2017-01-19 02:20:54 +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
b3de7d7d56 chore: release v0.49.1 v0.49.1 2017-01-18 10:19:17 +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
49932fcd73 revert: "test: temporarily skip GitHub tests"
This reverts commit 84878f8750.
2017-01-18 00:03:04 +02:00
zkochan
61e5eb294d refactor(git): remove unnecessary code from Git fetch logic 2017-01-18 00:02:24 +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
1754db9034 chore: release v0.49.0 v0.49.0 2017-01-17 01:40:17 +02:00
zkochan
0619600501 refactor: unite to if statements in hardlinkDir 2017-01-17 01:37:07 +02:00
Andrey Popp
2e49815ca1 refactor: log a warning in case of a broken symlink found 2017-01-17 01:37:07 +02:00
Andrey Popp
aadcf0e656 test: rm unused artifacts in the fixture packages
Note that has-broken-symlink/has-broken.symlink.tar.gz contains a broken
link so the corresponding test case is useful.
2017-01-17 01:37:07 +02:00
Andrey Popp
d2375370a1 test: add test for a tarball with a broken symlink 2017-01-17 01:37:07 +02:00
Andrey Popp
48e5a1d1c9 refactor: check for ENOENT in safeLink instead of doing a stat 2017-01-17 01:37:07 +02:00
Andrey Popp
d5f6b09806 fix: filter out broken symlinks when linking installs
We use `fs.lstat()` so we can gather the info about the link itself then use
`fs.exists()` in case of symbolic link to test if symlink is valid. Skip if it's
not.

Fixes #550
2017-01-17 01:37:07 +02:00
zkochan
08adc17413 test: remove not needed test 2017-01-16 23:43:17 +02:00
Andrey Popp
d0a1be6be8 fix: make fetch atomic
We fetch into a temp directory now and then fs.rename() into the target dir.
With fs.rename() being an atomic operation we don't leave target dir in an
inconsistent state if failure happen in some parallel installation process.
2017-01-16 23:43:17 +02:00
Zoltan Kochan
46c3b04ea8 docs(README): remove known issues section 2017-01-16 20:51:12 +02:00
zkochan
eb7c570143 chore: update dependencies 2017-01-16 20:49:18 +02:00
zkochan
ce477172ea style(logging): fix indentation in streamParser.ts 2017-01-16 20:49:18 +02:00
zkochan
1647adaabe fix(logging): lifecycle logs text 2017-01-16 20:49:18 +02:00
zkochan
74f8525bc1 refactor: rename pnpm-reporter-default 2017-01-16 20:49:18 +02:00
zkochan
53336acdae refactor: move out file reporter to separate package 2017-01-16 20:49:18 +02:00
zkochan
ad82df438b refactor(logging): less postinstall debug logs
Reduce the number of redundant logs.
2017-01-16 20:49:18 +02:00
zkochan
d59afc8008 feat: add ndjson reporter 2017-01-16 20:49:18 +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
2dc2711914 feat(reporter): report everything via ndjson 2017-01-16 20:49:18 +02:00
zkochan
1087d87bb8 refactor: remove redundant reporter import from extendOptions 2017-01-16 20:49:18 +02:00
zkochan
b96e30cf3f refactor(reporter): remove debug option
Debug option was used with the debug package.
debug was substituted with bole.
To have more info printed a new reporter have to be created.

BREAKING CHANGE:

--debug option removed
2017-01-16 20:49:18 +02:00
zkochan
04c104c614 refactor(reporter): move reporter selection out of API 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
zkochan
383e772921 test: use verdaccio instead of sinopia
Unfortunately sinopia is not maintained anymore.
2017-01-15 18:43:18 +02:00
Zoltan Kochan
cab64a98ef docs(README): update preview 2017-01-15 16:54:29 +02:00
zkochan
84878f8750 test: temporarily skip GitHub tests
Ref #536
2017-01-13 23:24:22 +02:00
zkochan
dca99b8817 chore: release v0.48.1 v0.48.1 2017-01-13 01:03:32 +02:00
zkochan
924b584f6b fix(install): logging of cached packages should show resolved version 2017-01-13 01:02:46 +02:00
Zoltan Kochan
aadede005a docs(LICENSE): update years 2017-01-11 22:44:37 +02:00
zkochan
110e403503 docs(README): fix store structure example 2017-01-11 09:29:11 +02:00
zkochan
eb1ec303f2 refactor: force users to reinstall old node_modules v0.48.0 2017-01-11 09:06:23 +02:00
zkochan
59cd8cbede fix: packages can require themself
node_modules structure changed
2017-01-11 08:51:01 +02:00