cordova-fetch.git
4 weeks agodependency updates (cordova-common@3, etc.) master
Darryl Pogue [Tue, 6 Nov 2018 02:00:35 +0000 (18:00 -0800)] 
dependency updates (cordova-common@3, etc.)

* Update npm deps
* Fix new eslint complaints
* Update jasmine to 3.3.0

2 months agoCollect test coverage during `npm test` (#48)
Ken Naito [Mon, 1 Oct 2018 07:33:29 +0000 (16:33 +0900)] 
Collect test coverage during `npm test` (#48)

2 months agoDrop Q, use native promises :tada: (#49)
Raphael von der Grün [Sun, 30 Sep 2018 00:30:08 +0000 (02:30 +0200)] 
Drop Q, use native promises :tada: (#49)

2 months agoHandle broken NODE_PATH setups gracefully (#50)
Raphael von der Grün [Sat, 29 Sep 2018 22:43:00 +0000 (00:43 +0200)] 
Handle broken NODE_PATH setups gracefully (#50)

Previously, when NODE_PATH had a trailing separator like `/foo:/bar:`,
resolving a module would hang indefinitely when the module was not found

2 months agoRun test in well-defined directory (#51)
Raphael von der Grün [Sat, 29 Sep 2018 15:58:11 +0000 (17:58 +0200)] 
Run test in well-defined directory (#51)

2 months agoLook for node_modules in any recursive parent directory (#44)
Andres Riofrio [Fri, 28 Sep 2018 07:44:29 +0000 (00:44 -0700)] 
Look for node_modules in any recursive parent directory (#44)

This change causes `cordova-fetch` to look for already installed packages using Node.js' module resolution algorithm. It considers directories from NODE_PATH if it is set, but it will not take the fixed set of Node.js GLOBAL_FOLDERS into account.

3 months agoAdd ESLint config file for tests (#41)
Raphael von der Grün [Tue, 14 Aug 2018 14:38:57 +0000 (16:38 +0200)] 
Add ESLint config file for tests (#41)

Instead of configuring rules per file using comments.

3 months agoImprove and update docs (#42)
Raphael von der Grün [Tue, 14 Aug 2018 12:37:31 +0000 (14:37 +0200)] 
Improve and update docs (#42)

* Improve docs and bring them up to date with the latest changes.
* Moves badges into headline.

Note that there are more supported options than documented. As they've not been documented before, they are considered private for now.

4 months agoGH-35 .ratignore ignore *.git
Christopher J. Brody [Mon, 6 Aug 2018 22:35:32 +0000 (18:35 -0400)] 
GH-35 .ratignore ignore *.git

to ignore artifacts in spec/support/repo-name-neq-plugin-id.git

4 months agoGH-35 add license header to dummy-local-plugin
Christopher J. Brody [Mon, 6 Aug 2018 21:23:56 +0000 (17:23 -0400)] 
GH-35 add license header to dummy-local-plugin

spec/support/dummy-local-plugin/plugin.xml

(copied from cordova-plugin-device)

4 months agodos2unix spec/support/dummy-local-plugin/plugin.xml
Christopher J. Brody [Mon, 6 Aug 2018 19:51:18 +0000 (15:51 -0400)] 
dos2unix spec/support/dummy-local-plugin/plugin.xml

4 months agoeslint devDep updates (#28)
Chris Brody [Thu, 2 Aug 2018 21:39:51 +0000 (17:39 -0400)] 
eslint devDep updates (#28)

- eslint@4 devDep update
- in-range eslint-* devDep updates

4 months agoCB-14250 start cordova-fetch@2.0.0-dev 27/head
Christopher J. Brody [Thu, 2 Aug 2018 19:39:53 +0000 (15:39 -0400)] 
CB-14250 start cordova-fetch@2.0.0-dev

5 months agoCB-14173 Fix cordova <platform|plugin> add --link (#26)
Raphael von der Grün [Thu, 28 Jun 2018 16:27:47 +0000 (18:27 +0200)] 
CB-14173 Fix cordova <platform|plugin> add --link (#26)

This drops support for the untested and undocumented `link` option
which when set, caused `npm link` to be run instead of `npm install`.
However, the installed package's name cannot be extracted from the
output of `npm link`. Thus we failed in that case.

Now we always run `npm install` instead. This works for the use case of
`cordova <platform|plugin> add --link` since packages identified by a
local path are installed as symbolic links by npm.

5 months agoMerge pull request #24 from raphinesse/performance
Raphael von der Grün [Sat, 16 Jun 2018 22:23:24 +0000 (00:23 +0200)] 
Merge pull request #24 from raphinesse/performance

CB-14133 Avoid reinstalling already installed plugins

5 months agoCB-14133 Avoid fetching already installed packages 24/head
Raphael von der Grün [Sat, 16 Jun 2018 12:01:03 +0000 (14:01 +0200)] 
CB-14133 Avoid fetching already installed packages

5 months agoSpeed up tests by about 250%
Raphael von der Grün [Sat, 16 Jun 2018 12:01:02 +0000 (14:01 +0200)] 
Speed up tests by about 250%

- Add local git fixture repo to speed up test ~50s to ~5s
- Reduce run time of longest test from ~60s to ~25s
- Reduce amount of git tests for double fetch tests

5 months agoSimplify fetch unit tests
Raphael von der Grün [Sat, 16 Jun 2018 12:01:01 +0000 (14:01 +0200)] 
Simplify fetch unit tests

5 months agoMove and rename some e2e tests
Raphael von der Grün [Sat, 16 Jun 2018 12:00:59 +0000 (14:00 +0200)] 
Move and rename some e2e tests

This is actually part of the previous commit, but committed separately
to have readable diffs.

5 months agoRefactor fetch e2e tests
Raphael von der Grün [Sat, 16 Jun 2018 12:00:58 +0000 (14:00 +0200)] 
Refactor fetch e2e tests

This should not change the test coverage at all. It only factors out
commonly used patterns into functions.

Best viewed with --anchored=describe

5 months agoRefactor fetch code
Raphael von der Grün [Sat, 16 Jun 2018 12:00:57 +0000 (14:00 +0200)] 
Refactor fetch code

- Package installation was factored out to prepare for the next commit
- Verbose logging was altered
- Unit tests use less mocks and test subjects directly

Functionality should be completely unchanged.

5 months agoMerge pull request #23 from raphinesse/remove-shelljs
Raphael von der Grün [Sat, 16 Jun 2018 02:35:04 +0000 (04:35 +0200)] 
Merge pull request #23 from raphinesse/remove-shelljs

[CB-14140] Remove shelljs

5 months agoUse fs.readJsonSync for reading package.json to avoid caching 23/head
Raphael von der Grün [Thu, 14 Jun 2018 22:46:18 +0000 (00:46 +0200)] 
Use fs.readJsonSync for reading package.json to avoid caching

5 months agoReplace shelljs with fs-extra and which
Raphael von der Grün [Thu, 14 Jun 2018 22:46:17 +0000 (00:46 +0200)] 
Replace shelljs with fs-extra and which

5 months agoSimplify tempDir setup in tests
Raphael von der Grün [Thu, 14 Jun 2018 22:46:16 +0000 (00:46 +0200)] 
Simplify tempDir setup in tests

5 months agoDon't manually delete node_modules contents
Raphael von der Grün [Thu, 14 Jun 2018 22:46:15 +0000 (00:46 +0200)] 
Don't manually delete node_modules contents

5 months agoSimplify installation location retrieval (#18)
Raphael von der Grün [Tue, 12 Jun 2018 20:11:40 +0000 (22:11 +0200)] 
Simplify installation location retrieval (#18)

This replaces the whole existing logic to determine the path of an installed package with a new one.

Instead of a lot of guessing we now read the output of npm. Unfortunately we have to parse the human readable output since the information we need (which package was just installed) is not reliably extractable from the output generated when passing --json or --parseable.

Apart from a tremendous simplification of the existing code, with this change we now transparently support all spec formats that npm supports too.

The removal of getPath is a possibly breaking change. The function was neither documented nor used in any apache/cordova-* repositories though.

This supports all npm versions from 6 down to 3 (which are all that are bundled with supported node versions).

6 months agoHandle missing options (#22)
Raphael von der Grün [Thu, 7 Jun 2018 14:56:04 +0000 (16:56 +0200)] 
Handle missing options (#22)

6 months agoAdd workaround for failing tests on AppVeyor/Node10
Raphael von der Grün [Thu, 7 Jun 2018 09:20:27 +0000 (11:20 +0200)] 
Add workaround for failing tests on AppVeyor/Node10

6 months agoCB-14066: Drop support for Node 4
Raphael von der Grün [Wed, 6 Jun 2018 22:54:28 +0000 (00:54 +0200)] 
CB-14066: Drop support for Node 4

6 months agoFix repo url in package.json (#20)
Raphael von der Grün [Thu, 7 Jun 2018 09:00:49 +0000 (11:00 +0200)] 
Fix repo url in package.json (#20)

6 months agoIncrease test timeouts to reduce spurious failures (#19)
Raphael von der Grün [Thu, 7 Jun 2018 08:57:13 +0000 (10:57 +0200)] 
Increase test timeouts to reduce spurious failures (#19)

I just doubled timeouts until it worked on my local machine. The real problem is that we are cloning 50MB worth of git repos over the network in some tests.

6 months agoIsolate Q usage to prepare later removal
Raphael von der Grün [Tue, 5 Jun 2018 07:48:19 +0000 (09:48 +0200)] 
Isolate Q usage to prepare later removal

6 months agoFail test if promise unexpectedly resolves
Raphael von der Grün [Tue, 5 Jun 2018 07:19:24 +0000 (09:19 +0200)] 
Fail test if promise unexpectedly resolves

6 months agoLet jasmine handle promises
Raphael von der Grün [Tue, 5 Jun 2018 07:13:42 +0000 (09:13 +0200)] 
Let jasmine handle promises

6 months agoMerge pull request #15 from raphinesse/fix-linting
Darryl Pogue [Tue, 5 Jun 2018 06:48:21 +0000 (23:48 -0700)] 
Merge pull request #15 from raphinesse/fix-linting

Fix linting

6 months agoFix linting errors 15/head
Raphael von der Grün [Tue, 5 Jun 2018 06:26:48 +0000 (08:26 +0200)] 
Fix linting errors

6 months agoLint all *.js files in the repo
Raphael von der Grün [Tue, 5 Jun 2018 06:25:20 +0000 (08:25 +0200)] 
Lint all *.js files in the repo

9 months agoMerge pull request #13 from devtobo/CB-13503-squashed
Steve Gill [Tue, 20 Feb 2018 19:07:48 +0000 (11:07 -0800)] 
Merge pull request #13 from devtobo/CB-13503-squashed

CB-13503 fix trimID bug when using file:path/to/plugin

9 months agoCB-13503 fix trimID bug when using file:path/to/plugin 13/head
Thomas Brian [Fri, 16 Feb 2018 20:38:20 +0000 (15:38 -0500)] 
CB-13503 fix trimID bug when using file:path/to/plugin

10 months agoMerge pull request #12 from funkyvisions/patch-1
Steve Gill [Tue, 6 Feb 2018 19:28:00 +0000 (11:28 -0800)] 
Merge pull request #12 from funkyvisions/patch-1

Enabling support for git+http

10 months agoAdding a unit test 12/head
daviesd [Fri, 2 Feb 2018 16:17:35 +0000 (11:17 -0500)] 
Adding a unit test

10 months agoEnabling support for git+http
daviesd [Mon, 29 Jan 2018 14:32:20 +0000 (09:32 -0500)] 
Enabling support for git+http

11 months agoCB-13674 Incremented package version to -dev
Steve Gill [Thu, 14 Dec 2017 21:43:45 +0000 (13:43 -0800)] 
CB-13674 Incremented package version to -dev

11 months agoCB-13674 Updated version and RELEASENOTES.md for release 1.3.0 1.3.0 rel/1.3.0
Steve Gill [Thu, 14 Dec 2017 19:43:55 +0000 (11:43 -0800)] 
CB-13674 Updated version and RELEASENOTES.md for release 1.3.0

11 months agoMerge pull request #11 from stevengill/master
Steve Gill [Thu, 14 Dec 2017 00:23:03 +0000 (16:23 -0800)] 
Merge pull request #11 from stevengill/master

 CB-13055: fixed failing tests in cordova-lib

11 months agoCB-13055: fixed failing tests in cordova-lib 11/head
Steve Gill [Wed, 13 Dec 2017 23:16:24 +0000 (15:16 -0800)] 
CB-13055: fixed failing tests in cordova-lib

11 months agoMerge pull request #10 from dpogue/github-url
Audrey [Thu, 7 Dec 2017 22:24:21 +0000 (14:24 -0800)] 
Merge pull request #10 from dpogue/github-url

Support git shortlink package references

12 months agoMerge pull request #10 from dpogue/github-url
Audrey [Thu, 7 Dec 2017 22:24:21 +0000 (14:24 -0800)] 
Merge pull request #10 from dpogue/github-url

Support git shortlink package references

12 months agoSupport git shortlink package references 10/head
Darryl Pogue [Fri, 17 Nov 2017 19:44:16 +0000 (11:44 -0800)] 
Support git shortlink package references

13 months ago CB-13504: Incremented package version to -dev 1.2.x
Audrey So [Fri, 27 Oct 2017 22:48:28 +0000 (15:48 -0700)] 
 CB-13504: Incremented package version to -dev

13 months agoCB-13504 Updated version and RELEASENOTES.md for release 1.2.1 1.2.1
Audrey So [Fri, 27 Oct 2017 22:05:46 +0000 (15:05 -0700)] 
CB-13504 Updated version and RELEASENOTES.md for release 1.2.1

13 months agoCB-13504: updating package.json versions for cordova-fetch 1.2.1 release 9/head
Audrey So [Fri, 27 Oct 2017 21:43:48 +0000 (14:43 -0700)] 
CB-13504: updating package.json versions for cordova-fetch 1.2.1 release

13 months agoCB-13501 : added support for node 8 8/head
Audrey So [Fri, 27 Oct 2017 17:46:41 +0000 (10:46 -0700)] 
CB-13501 : added support for node 8

13 months agoCB-13492 : updating opts.save and including a tests for no-save 7/head
Audrey So [Wed, 25 Oct 2017 21:19:31 +0000 (14:19 -0700)] 
CB-13492 : updating opts.save and including a tests for no-save

14 months agoCB-13380 Incremented package version to -dev
Steve Gill [Fri, 6 Oct 2017 22:28:29 +0000 (15:28 -0700)] 
CB-13380 Incremented package version to -dev

14 months agoCB-13380 Updated version and RELEASENOTES.md for release 1.2.0 1.2.0 rel/1.2.0
Steve Gill [Thu, 5 Oct 2017 19:18:29 +0000 (12:18 -0700)] 
CB-13380 Updated version and RELEASENOTES.md for release 1.2.0

14 months agoCB-13303 : updating opts.production
Audrey So [Tue, 3 Oct 2017 20:54:46 +0000 (13:54 -0700)] 
CB-13303 : updating opts.production

 This closes #6

14 months agoCB-13353 : added saveexact as an option and updated fetch test 4/head
Audrey So [Fri, 29 Sep 2017 22:29:29 +0000 (15:29 -0700)] 
CB-13353 : added saveexact as an option and updated fetch test

14 months agoCB-13308, CB-13252 fix issue with plugins turning into symlinks on restore 5/head
Steve Gill [Tue, 3 Oct 2017 05:54:41 +0000 (22:54 -0700)] 
CB-13308, CB-13252 fix issue with plugins turning into symlinks on restore

14 months agoCB-13303 : setting production flag to default during npm install and test 3/head
Audrey So [Thu, 21 Sep 2017 18:45:53 +0000 (11:45 -0700)] 
CB-13303 : setting production flag to default during npm install and test

14 months agoCB-12895 : setting up eslint and removing jshint
Audrey So [Fri, 9 Jun 2017 17:39:48 +0000 (10:39 -0700)] 
CB-12895 : setting up eslint and removing jshint

 This closes #2

15 months ago CB-13010: Improve logic for searching packages which being installed from git url
Nikita Matrosov [Mon, 14 Aug 2017 14:32:02 +0000 (17:32 +0300)] 
 CB-13010: Improve logic for searching packages which being installed from git url

close #1

15 months agoremoved ssh test so tests pass
Steve Gill [Wed, 16 Aug 2017 18:37:52 +0000 (11:37 -0700)] 
removed ssh test so tests pass

17 months agoCB-11980: fixed incorrect appveyor image
Steve Gill [Wed, 14 Jun 2017 19:26:37 +0000 (12:26 -0700)] 
CB-11980: fixed incorrect appveyor image

18 months agoCB-12785: added test for supporting git+ssh npm install syntax
Steve Gill [Thu, 8 Jun 2017 00:34:05 +0000 (17:34 -0700)] 
CB-12785: added test for supporting git+ssh npm install syntax

18 months agoCB-12785: added .gitignore file
Steve Gill [Tue, 6 Jun 2017 23:14:25 +0000 (16:14 -0700)] 
CB-12785: added .gitignore file

18 months agoCB-12785: added travis and appveyor
Steve Gill [Tue, 6 Jun 2017 22:52:03 +0000 (15:52 -0700)] 
CB-12785: added travis and appveyor

18 months agoCB-12786: Improve logic for searching plugin id in case of module already exists...
Nikita Matrosov [Mon, 5 Jun 2017 07:48:38 +0000 (10:48 +0300)] 
CB-12786: Improve logic for searching plugin id in case of module already exists in node_modules

 This closes #555

18 months agoCB-12762 : updated common, fetch, and serve pkgJson to point pkgJson repo items to...
Audrey So [Fri, 2 Jun 2017 22:00:01 +0000 (15:00 -0700)] 
CB-12762 : updated common, fetch, and serve pkgJson to point pkgJson repo items to github mirrors

 This closes #560

18 months agoCB-12787: Fix plugin installation with --link option
Nikita Matrosov [Fri, 12 May 2017 11:26:05 +0000 (14:26 +0300)] 
CB-12787: Fix plugin installation with --link option

 This closes #557

18 months agoCB-12738: Cordova ignores plugin dependency version on windows platform
Nikita Matrosov [Thu, 11 May 2017 19:43:49 +0000 (22:43 +0300)] 
CB-12738: Cordova ignores plugin dependency version on windows platform

 This closes #554

19 months agoCB-12747 Incremented package version to -dev
Steve Gill [Tue, 2 May 2017 00:05:27 +0000 (02:05 +0200)] 
CB-12747 Incremented package version to -dev

19 months agoCB-12747 Updated version and RELEASENOTES.md for release 1.1.0
Steve Gill [Mon, 1 May 2017 23:17:35 +0000 (01:17 +0200)] 
CB-12747 Updated version and RELEASENOTES.md for release 1.1.0

19 months agoCB-12747 Updated version and RELEASENOTES.md for release 7.0.0
Steve Gill [Mon, 1 May 2017 23:17:19 +0000 (01:17 +0200)] 
CB-12747 Updated version and RELEASENOTES.md for release 7.0.0

19 months agoupdated dependency-ls dependency for cordova-fetch
Steve Gill [Tue, 25 Apr 2017 18:48:08 +0000 (11:48 -0700)] 
updated dependency-ls dependency for cordova-fetch

19 months agoCB-12665 removed enginestrict since it is deprecated
Steve Gill [Wed, 19 Apr 2017 18:30:48 +0000 (11:30 -0700)] 
CB-12665 removed enginestrict since it is deprecated

19 months agoCB-12662 - update cordova-common dependency to 2.0.2
Shazron Abdullah [Mon, 17 Apr 2017 18:34:27 +0000 (11:34 -0700)] 
CB-12662 - update cordova-common dependency to 2.0.2

 This closes #543

21 months agoincreased timeout on fetch tests
Steve Gill [Fri, 10 Mar 2017 21:35:16 +0000 (13:35 -0800)] 
increased timeout on fetch tests

21 months agoCB-11977 : updated engines and enginescript for common, fetch, and serve
Audrey So [Fri, 10 Mar 2017 17:57:59 +0000 (09:57 -0800)] 
CB-11977 : updated engines and enginescript for common, fetch, and serve

 This closes #520

21 months agoincreased timeout on cordova-fetch test
Steve Gill [Thu, 9 Mar 2017 18:58:39 +0000 (10:58 -0800)] 
increased timeout on cordova-fetch test

21 months agofixfetch : updated index.js to deal with local path
Audrey So [Wed, 15 Feb 2017 18:10:32 +0000 (10:10 -0800)] 
fixfetch : updated index.js to deal with local path

22 months agoupdated cordova-fetch releaste notes
Steve Gill [Wed, 25 Jan 2017 22:33:28 +0000 (14:33 -0800)] 
updated cordova-fetch releaste notes

22 months agoCB-12358 Incremented package version to -dev
Steve Gill [Wed, 18 Jan 2017 01:55:27 +0000 (17:55 -0800)] 
CB-12358 Incremented package version to -dev

22 months agoCB-12358 Updated version and RELEASENOTES.md for release 1.0.2
Steve Gill [Tue, 17 Jan 2017 23:33:48 +0000 (15:33 -0800)] 
CB-12358 Updated version and RELEASENOTES.md for release 1.0.2

2 years agoupdated cordova-common dep for cordova-fetch to 1.4.0
Steve Gill [Fri, 29 Jul 2016 18:21:17 +0000 (11:21 -0700)] 
updated cordova-common dep for cordova-fetch to 1.4.0

2 years agoCB-11569 Incremented package versions to -dev
Vladimir Kotikov [Tue, 12 Jul 2016 15:53:02 +0000 (18:53 +0300)] 
CB-11569 Incremented package versions to -dev

2 years agoFixed broken fetch tests
Steve Gill [Thu, 16 Jun 2016 21:17:21 +0000 (14:17 -0700)] 
Fixed broken fetch tests

2 years agoenhanced cordova-fetch to better handle multiple fetches via git urls
Steve Gill [Wed, 15 Jun 2016 00:50:29 +0000 (17:50 -0700)] 
enhanced cordova-fetch to better handle multiple fetches via git urls

2 years agoRevert "attempting to fix failing travis and appveyor tests"
Darryl Pogue [Sun, 5 Jun 2016 04:59:58 +0000 (21:59 -0700)] 
Revert "attempting to fix failing travis and appveyor tests"

This reverts commit bebbbe78cf8f9fecc95e99433b41fea625eb3c33.

2 years ago[CB-11252] Fix cordova-fetch tests
Darryl Pogue [Sun, 5 Jun 2016 04:56:41 +0000 (21:56 -0700)] 
[CB-11252] Fix cordova-fetch tests

It's only a scoped package if the @ is the first character.

2 years agoCB-11252 minor fix to trimID function in cordova-fetch
Steve Gill [Sat, 4 Jun 2016 00:14:38 +0000 (17:14 -0700)] 
CB-11252 minor fix to trimID function in cordova-fetch

2 years agoCB-11252 Fix cordova fetch for scoped packages
carynbear [Fri, 3 Jun 2016 21:47:09 +0000 (14:47 -0700)] 
CB-11252 Fix cordova fetch for scoped packages

 This closes #450

2 years agoattempting to fix failing travis and appveyor tests
Steve Gill [Wed, 1 Jun 2016 23:46:29 +0000 (16:46 -0700)] 
attempting to fix failing travis and appveyor tests

2 years agoCB-11252 added scoped package test to cordova-fetch
Steve Gill [Fri, 13 May 2016 07:16:03 +0000 (00:16 -0700)] 
CB-11252 added scoped package test to cordova-fetch

2 years agoCB-11260 Incremented package version to -dev
Steve Gill [Fri, 13 May 2016 06:04:35 +0000 (23:04 -0700)] 
CB-11260 Incremented package version to -dev

2 years agoCB-11260 linkified release notes
Steve Gill [Fri, 13 May 2016 05:48:45 +0000 (22:48 -0700)] 
CB-11260 linkified release notes

2 years agoCB-11260 added missing headers
Steve Gill [Fri, 13 May 2016 02:49:34 +0000 (19:49 -0700)] 
CB-11260 added missing headers

2 years agoCB-11260 Updated version and RELEASENOTES.md for cordova-fetch release 1.0.0
Steve Gill [Fri, 13 May 2016 00:47:01 +0000 (17:47 -0700)] 
CB-11260 Updated version and RELEASENOTES.md for cordova-fetch release 1.0.0

2 years agoCB-9858 merging initial fetch work for plugin and platform fetching
Steve Gill [Mon, 9 May 2016 21:18:21 +0000 (14:18 -0700)] 
CB-9858 merging initial fetch work for plugin and platform fetching