163 Commits

Author SHA1 Message Date
Eduardo Freitas
7f26c5b856 Fix bug unauthenticated git protocol in GitHubResolver (#2612)
Co-authored-by: Adam Stankiewicz <sheerun@sher.pl>
2022-03-14 16:23:54 +01:00
Adam Stankiewicz
bcb1911268 Test subpackages, all node versions, and all platforms (#2554) 2020-04-25 02:14:49 +02:00
Adam Stankiewicz
fd2d448b7e Test node 10 and 12 on CI (#2548) 2019-12-10 08:53:36 +01:00
Adam Stankiewicz
6bc778df32 Format with prettier (#2510) 2018-03-28 19:28:43 +02:00
Adam Stankiewicz
bb17839bc2 Allow shallow cloning when source is a ssh protocol (#2506) 2018-03-28 17:37:34 +02:00
Eugene Kenny
b716bc4e3a Prefer exact versions when dissecting dependencies (#2371) 2016-11-08 09:11:29 +01:00
Guillermo Ignacio Enriquez Gutierrez
f7c5154490 Fix ssl handling by not setting GIT_SSL_NO_VERIFY=false (#2361) 2016-11-07 01:50:57 +01:00
Ben
353a399f75 Fix test & build for shorthand resolver 2016-05-10 10:46:07 +02:00
Ben
db1ed1c08f Fix build errors #2
Related to the change from git:// to https://
2016-04-28 12:32:13 +02:00
Ben
3c2562ca0e Fix failing tests 2016-04-28 12:23:54 +02:00
Oskar Cieślik
343e6ac8bc Implement postuninstall hooks with tests (#2252) 2016-04-14 15:02:07 +02:00
Adam Stankiewicz
3251051d20 Fix tests given the new registry 2016-04-10 13:15:57 +02:00
Adam Stankiewicz
12d41aeb8c Warn instead of erroring for invalida package names, #2233 2016-04-05 13:34:06 +02:00
Adam Stankiewicz
46655b7c4e Final .eslintrc configuration 2016-03-31 19:27:12 +02:00
Adam Stankiewicz
16cde3118a Revert "Merge pull request #2197 from albertinadx/albertinad/fix-scripts-hooks"
This reverts commit 0a81308e98, reversing
changes made to f2884656c0.
2016-03-31 01:36:05 +02:00
Adam Stankiewicz
53eeca97d3 Use eslint instead jscs 2016-03-31 00:27:17 +02:00
Albertina Durante
8d76b87d65 Supporting shell operators in hooks scripts.
- Removing module "shell-quote"
- Adding tests for hooks scripts with shell operators
- This fixes issue #1594
2016-03-05 21:50:05 -03:00
Sivakumar Kailasam
9f4c2384ea Replace all occurrences of % character in hook commands.
Fixes #2174 % character replaced once in .bowerrc scripts
2016-02-15 20:34:01 +05:30
Adam Stankiewicz
bbaaee67a1 Update publishing script to bundle all modules 2016-01-25 22:57:07 +01:00
Adam Stankiewicz
38c3cee1a7 Perform test on fake .git directory 2016-01-25 19:40:54 +01:00
Piotr Wielgolaski
f0a54d0018 set GIT_SSL_NO_VERIFY for opposite value than strictSsl 2016-01-23 20:29:28 +01:00
Piotr Wielgolaski
1d73764788 when strictSsl is false set GIT_SSL_NO_VERIFY=true for git command
Solves #2129
2016-01-23 14:26:48 +01:00
Manas
64db869bd4 Adds tests for pluginResolverFactory.js 2016-01-18 01:22:07 +05:30
AnthonyBobsin
19fc84007d Implements jscs to enforce a newly created style guide for the repo. Uses jscs to fix some minor style guide warnings. 2015-11-29 16:22:58 -05:00
Utsav Shah
e8a2d92785 Remove @ in temporary directories 2015-11-27 11:36:14 -06:00
Adam Stankiewicz
ca0a36abcf Make downloader work on all platforms, fixes #2050 2015-11-27 13:45:19 +01:00
Adam Stankiewicz
df8e5a16be Fix readdir call on Windows
Sometimes it return ENOENT instead of ENODIR for normal files.

This broke code paths in few places. Also, see:
https://github.com/isaacs/chmodr/pull/8
2015-10-14 16:09:38 +02:00
Adam Stankiewicz
3ce2dd3989 Replace all fs with graceful-fs 2015-10-14 14:31:13 +02:00
Adam Stankiewicz
99105fbb57 Try chmod 777 + rimraf as fallback on rimraf in all places 2015-10-14 12:50:41 +02:00
Adam Stankiewicz
96f1e98859 test: Fix url for js-event-emitter 2015-10-13 17:56:42 +02:00
Adam Stankiewicz
d614b057c9 fix: Set environment variable as string, not number 2015-10-13 17:27:27 +02:00
Luke Melia
5d13ffda09 Include package name in error info when a version is not found.
Prior to this commit, when specifying a package version that cannot
be resolved, but other versions are available, the error message
did not state which what package failed, allowing for confusion.

For example, you might see:

```
bower ENORESTARGET  No tag found that was able to satisfy 1.0.2

Additional error details:
Available versions: 1.0.1, 1.0.0
```

After this change, in the above situation the svn and git resolvers
will produce the following:

```
bower ENORESTARGET  No tag found that was able to satisfy 1.0.2

Additional error details:
Available versions in somelib: 1.0.1, 1.0.0
```
2015-09-12 21:10:01 -04:00
Sindre Sorhus
490f63a838 modularize the MD5 util function 2015-09-03 11:00:38 +07:00
Adam Stankiewicz
26f80d25be Put smart host detection behind a configuration, fixes #1764 2015-08-25 22:26:26 +02:00
Adam Stankiewicz
fe9a1bb5fc Revert "upgrade to newer semver, fixes #1817,#1845,#1851"
This reverts commit 8744449016.
2015-08-25 17:12:51 +02:00
Adam Stankiewicz
793268ed54 Merge pull request #1871 from bower/1.5.0-preview
Pluggable resolvers
2015-08-23 14:28:25 +02:00
Adam Stankiewicz
ed27e87540 Fix the tests 2015-08-04 06:40:03 +02:00
Adam Stankiewicz
4fc2b5cf76 Add tests and improve resolver interface 2015-08-04 06:21:06 +02:00
Peter Chanthamynavong
8744449016 upgrade to newer semver, fixes #1817,#1845,#1851
Upgrading to latest version of semver to fix (#1817, #1845, #1851).

Possible breaking changes in regards to the way semvers handles pre-releases.

If a version has a prerelease tags (for example, 1.2.3-alpha.3) then it will only be allowed to satisfy comparator sets if at least one comparator with the same [major, minor, patch] tuple also has a prerelease tag.

For example, the range >1.2.3-alpha.0 would be allowed to match the version 1.2.3-alpha.7, but it would not be satisfied by * or 1.2.3. See [semvers](https://github.com/npm/node-semver#prerelease-tags) additional details.
2015-07-23 07:52:14 -05:00
Mat Scales
126da9ee12 Unregister and login commands 2015-03-29 17:56:04 -07:00
Nils Winkler
7e0a2ea4cb Added check for empty remote or no protocol set. 2015-03-24 20:36:15 +01:00
Nils Winkler
912808b672 Added support for caching hosts that support shallow cloning. 2015-03-24 20:22:15 +01:00
Nils Winkler
a352d51711 Using a function reference instead of calling directly from constructor 2015-03-24 17:14:28 +01:00
Nils Winkler
4ad5ed64d7 Automatically detecting _smart Git hosts_.
Added logic to automatically detect smart Git hosts that allow shallow
cloning. This is done by sending an `ls-remote` request to the server
and then evaluating the returned HTTP header fields. For this, Curl
verbose logging is enabled for the `ls-remote` request, since Curl
verbose logging sends the returned HTTP headers to `stderr`.

If the `stderr` output contains the desired header

  Content-Type: application/x-git-upload-pack-advertisement

then the server supports shallow cloning.

This approach uses Git and Curl for the heavy lifting. Instead of
implementing the request to the server using a simple HTTP client, Git
is used, since it takes care of authentication using stored credentials.

The used approach should also work for BitBucket, which only sends the
Content-Type header when a specific user agent is used. Using Git to
make the request enables this behavior.

The function to detect the smart Git host
(`GitRemoteResolver.prototype._supportsShallowCloning`) returns a
promise that is resolved when the server's request is evaluated. The
promise handling required an addition to `GitHubResolver.js` - to always
resolve the promise to `true`, since GitHub supports shallow cloning.

Added test cases to verify the new functionality.
2015-03-24 17:13:18 +01:00
Adam Stankiewicz
182d92f9bd test: Fix SvnResolver tests on all platforms 2015-02-28 23:56:17 -08:00
Adam Stankiewicz
61a68a9e38 test: Replace dejavu repo with pure (dejavu moved) 2015-02-28 19:52:40 -08:00
Adam Stankiewicz
c7df6f50ca Add AppVeyor config for Windows CI 2015-01-11 03:08:43 +01:00
Adam Stankiewicz
df71d251f0 Disable SVN testing for unsuppoted hosts (e.g. AppVeyor) 2015-01-11 03:08:41 +01:00
Burak Yigit Kaya
623f6e9542 Use tar-fs instead of tar for faster TAR extraction 2014-09-07 19:29:37 +02:00
Sindre Sorhus
321ddabfd5 Merge pull request #1502 from bower/fix/bowerrc-cwd
Read .bowerrc from specified cwd, fixes #1301
2014-09-06 18:15:55 +02:00