Raphael von der Grün [Thu, 10 Oct 2019 14:58:48 +0000 (16:58 +0200)]
Replace underscore with modern JS (#772)
* _.extend => Object.assign
* Rewrite plugman/variable-merge w/out underscore
* _.find => Array.prototype.find
* _.clone => Object.assign
* Rewrite plugman/util/dependencies w/out underscore
* Remove last occurence of underscore usage
* Remove dependency on underscore
Raphael von der Grün [Thu, 10 Oct 2019 14:46:12 +0000 (16:46 +0200)]
chore: drop node 6 and 8 support (#799)
Raphael von der Grün [Thu, 10 Oct 2019 14:44:32 +0000 (16:44 +0200)]
chore: bump version to 10.0.0-dev (#798)
Raphael von der Grün [Thu, 10 Oct 2019 13:26:00 +0000 (15:26 +0200)]
Use up-to-date fixtures in tests (#770)
* Add helper to get up-to-date test fixtures
* Use up-to-date project fixture in E2E plugin dependency tests
* Use up-to-date platform fixture in plugman.install tests
* Use up-to-date platform in HooksRunner E2E tests
* Use up-to-date platform fixture in plugman.uninstall tests
* Use up-to-date project fixture in pkgJson plugin E2E tests
* Use up-to-date platform fixture in plugin.spec E2E tests
* Remove unused and outdated Android project fixture
* Remove unused project fixture "base"
* Use cordova-test-platform to test platform installation from local path
* Remove unused cordova-browser fixture
* Use cordova-test-platform to test getInstalledPlatformsWithVersions
* Remove unused cordova-android fixture
* Use testPlatformApp fixture to test cordova/util.getPlatformApiFunction
* Finally remove shelljs (again)
Had to be kept in devDeps before because of some outdated fixtures
* Make platformApi fixture project a minimal stub
Raphael von der Grün [Thu, 10 Oct 2019 08:50:51 +0000 (10:50 +0200)]
HooksRunner code & spec cleanup (#796)
* Cleanup HooksRunner code
* Merge the 'plugin hooks' blocks in HooksRunner.spec
* Reduce amount of fixtures for HooksRunner test
Geert Ijewski [Fri, 4 Oct 2019 14:39:27 +0000 (16:39 +0200)]
fix: error message during plugin installation w/ missing engine (#791)
エリス [Sun, 21 Jul 2019 05:27:19 +0000 (14:27 +0900)]
chore: add Node.js 12 to CI services (#777)
Chris Brody [Tue, 18 Jun 2019 21:38:17 +0000 (17:38 -0400)]
Quick workaround for e2e failure on AppVeyor CI (#786)
Chris Brody [Wed, 12 Jun 2019 21:42:56 +0000 (17:42 -0400)]
nyc@14 update in devDependencies (#783)
Raphael von der Grün [Wed, 17 Apr 2019 00:11:14 +0000 (02:11 +0200)]
Merge pull request #775 from raphinesse/cpj-cleanup
Cleanup plugman.createPackageJson
Raphael von der Grün [Wed, 17 Apr 2019 00:06:37 +0000 (02:06 +0200)]
Simpler and better cordova/util.getPlatformApiFunction (#767)
* Simpler and better cordova/util.getPlatformApiFunction
* Apply suggestions from code review
Co-Authored-By: raphinesse <raphinesse@gmail.com>
Raphael von der Grün [Mon, 15 Apr 2019 11:37:05 +0000 (13:37 +0200)]
Collapse declaration of globals to a single line
Raphael von der Grün [Sun, 14 Apr 2019 11:44:22 +0000 (13:44 +0200)]
Get rid of hacky default.json file for init-defaults
Raphael von der Grün [Mon, 15 Apr 2019 11:15:28 +0000 (13:15 +0200)]
Remove unused parameter `test` from `readDeps`
The parameter `test` was actually never used in `readDeps`. That means
that both `dependencies` and `devDependencies` will be populated with
_all_ packages installed to node_modules XD
Raphael von der Grün [Sun, 14 Apr 2019 13:33:57 +0000 (15:33 +0200)]
Remove unused key `defaults.bugs` in createpackagejson
Raphael von der Grün [Sun, 14 Apr 2019 13:04:58 +0000 (15:04 +0200)]
Remove futile attempts to read npm config values
Our init-defaults.js apparently is a slightly modified copy of
init-package-json/default-input.js. When npm calls `init-package-json`
they probably pass an object parsed from their configuration file.
We on the other hand always pass `{}`. Which means that any call to
`config.get` will return `undefined`.
This commit replaces all these calls in our code with `undefined` and
does some constant folding to tidy things up.
Raphael von der Grün [Mon, 15 Apr 2019 01:09:49 +0000 (03:09 +0200)]
Make src/plugman/init-defaults.js lintable (#774)
Work around using the reserved word `package` to be able to lint
src/plugman/init-defaults.js
Raphael von der Grün [Sun, 14 Apr 2019 19:50:25 +0000 (21:50 +0200)]
Have plugman.createPackageJson create file in plugin dir, not in cwd (#773)
Right now `plugman createpackagejson <plugin dir>` reads values from `plugin.xml` in `<plugin dir>` but creates the `package.json` in `process.cwd()`. This seems to be undocumented behavior, and is considered a bug.
With this patch, we always create the `package.json` in `<plugin dir>` next to `plugin.xml` instead.
Raphael von der Grün [Sun, 14 Apr 2019 10:47:53 +0000 (12:47 +0200)]
Prevent masking of errors during testing (#771)
Node.js throws an Error if the error event is emitted on a EventEmitter instance that has no handlers attached for it. This is usually the case during testing and often masks the actual error that is causing the issue.
So we attach a listener to just log error events to console. During passing tests runs, no additional output is generated.
Raphael von der Grün [Sun, 14 Apr 2019 10:45:49 +0000 (12:45 +0200)]
Proper async code in src/plugman/createpackagejson.js (#768)
The existing code returned an instantly resolved promise despite the fact that it was doing async operations.
Raphael von der Grün [Sat, 13 Apr 2019 09:57:06 +0000 (11:57 +0200)]
Merge pull request #764 from raphinesse/expressive-pkgJson.spec
Expressive pkg json.spec
Raphael von der Grün [Sat, 13 Apr 2019 09:42:33 +0000 (11:42 +0200)]
Remove unnecessary spy (#763)
The stubbing is not actually needed for the tests. It rather causes problems if the tests are using an up-to-date cordova-android as that currently requires ActionStack.prototype.process to return a Q instance.
Raphael von der Grün [Sat, 13 Apr 2019 00:14:37 +0000 (02:14 +0200)]
Remove unused fixtures
Raphael von der Grün [Sat, 13 Apr 2019 00:14:36 +0000 (02:14 +0200)]
Merge describe blocks in pkgJson.spec
Raphael von der Grün [Sat, 13 Apr 2019 00:14:35 +0000 (02:14 +0200)]
Create projects instead of asserting their properties in pkgJson.spec
Raphael von der Grün [Sat, 13 Apr 2019 00:14:34 +0000 (02:14 +0200)]
Factor out common project test helpers
Raphael von der Grün [Fri, 12 Apr 2019 13:30:25 +0000 (15:30 +0200)]
Remove unused fixtures (#762)
These are only test fixtures, so this is a patch-level change.
Related to #757
Raphael von der Grün [Mon, 1 Apr 2019 14:27:28 +0000 (16:27 +0200)]
Merge pull request #761 from raphinesse/misc-test-improvements
Various test improvements
Raphael von der Grün [Mon, 1 Apr 2019 14:25:29 +0000 (16:25 +0200)]
Minor cleanup of CI configs (#760)
* Cleanup CI configs
* Shallowly clone in AppVeyor CI
Raphael von der Grün [Mon, 1 Apr 2019 10:43:25 +0000 (12:43 +0200)]
Fix some test descriptions in cordova/util.spec
Raphael von der Grün [Mon, 1 Apr 2019 10:43:24 +0000 (12:43 +0200)]
Stop cordova/util.spec from messing with the user's home directory!
Raphael von der Grün [Mon, 1 Apr 2019 10:43:23 +0000 (12:43 +0200)]
Proper temp folder usage in cordova/util.spec
Raphael von der Grün [Mon, 1 Apr 2019 10:43:21 +0000 (12:43 +0200)]
Remove outdated test from cordova/util.spec
isCordova does not actually care about the user's home directory.
Raphael von der Grün [Mon, 1 Apr 2019 10:43:20 +0000 (12:43 +0200)]
Remove rewire/revert anti-pattern
There is no need to clear all the test doubles in afterEach if we
re-set them in beforeEach anyway.
Raphael von der Grün [Mon, 1 Apr 2019 10:43:19 +0000 (12:43 +0200)]
Remove superspawn faking from HooksRunner.spec
This sets executable bit for plugin hooks launched by superspawn,
so that they actually run.
Darryl Pogue [Mon, 1 Apr 2019 04:33:36 +0000 (21:33 -0700)]
Incremented package version to -dev
Darryl Pogue [Mon, 1 Apr 2019 04:27:31 +0000 (21:27 -0700)]
Update version and RELEASENOTES for release 9.0.1
Raphael von der Grün [Sat, 30 Mar 2019 19:34:01 +0000 (20:34 +0100)]
Fix faulty Promise handling in plugman.uninstall (#759)
* Fix unhandled rejections with dependent plugin uninstall
This also includes two changes to improve the robustness of plugman_uninstall.spec:
* Proper mock return value for npmUninstall
* Get rid of fs-stubbing
Raphael von der Grün [Sat, 30 Mar 2019 19:28:43 +0000 (20:28 +0100)]
Refactor plugin_fetch.spec (#758)
- Refactored the test to be more readable, robust and self contained
- Removed the reliance on the outdated fixtures
- Moved the test to spec/ since it is actually a unit test
Darryl Pogue [Fri, 29 Mar 2019 16:44:05 +0000 (09:44 -0700)]
Fix restoring plugins from package.json
Some of the code removed in GH-750 had side effects on the rest of the
plugin restoration procedure. Namely, despite wanting to migrate to
package.json, we actually relied on config.xml for retrieving the plugin
spec and variables. When we stopped syncing changes back to config.xml,
those plugins stopped getting restored.
I've refactored this significantly to reduce complexity and make it
easier to read and understand.
The existing tests did neither describe nor test the new behavior
sufficiently.
Oliver Salzburg [Wed, 27 Mar 2019 09:04:59 +0000 (10:04 +0100)]
Do not wrap engine script path in quotes (#755)
Fixes #754
Fixes apache/cordova#52
エリス [Fri, 15 Mar 2019 08:30:26 +0000 (17:30 +0900)]
GH-10 Incremented package version to -dev
エリス [Fri, 15 Mar 2019 07:40:23 +0000 (16:40 +0900)]
GH-10 Updated version and RELEASENOTES.md for release 9.0.0
Darryl Pogue [Fri, 15 Mar 2019 06:13:41 +0000 (23:13 -0700)]
Remove saving platforms/plugins to config.xml (#750)
We've had one major version of cordova-lib that attempted to ensure both
config.xml and package.json were kept in sync, and now it's time to push
people more strongly towards using package.json.
We will still attempt to read values from config.xml and update them in
package.json, but we will no longer reflect changes back to config.xml.
Whatever's saved in package.json should always have priority over what
is read from config.xml.
The next phase will be to improve the handling of package.json updates,
and then in the next major to completely remove the code that looks at
config.xml for platforms/plugins.
Darryl Pogue [Fri, 15 Mar 2019 06:12:27 +0000 (23:12 -0700)]
Pass project config.xml path to platform's prepare (#751)
Currently we're passing in an already-constructed ConfigParser instance
as part of the fake projectInfo object, but the problem is that it's
constructed with the version of cordova-common depended on by
*cordova-lib* as opposed to the version of cordova-common depended on by
the *platform*. By passing the path in, we can construct the
ConfigParser at the Platform API level, using the correct version.
In the meantime, for compatibility reasons, we have to keep passing in a
ConfigParser instance, and the Platform API needs to handle the case
where rootConfigXml is undefined and it needs to fetch the path out of
the existing ConfigParser instance and then overwrite it with a newly
constructed ConfigParser.
We should at some point look into making this "root project info" object
a class in cordova-common so that we can document what it's expected to
contain and rely on that both here and in the platforms.
エリス [Thu, 14 Mar 2019 03:39:32 +0000 (12:39 +0900)]
Merge pull request #749 from erisu/cordova-9-prep
Cordova Lib Release Preparation (Cordova 9)
Raphael von der Grün [Wed, 13 Mar 2019 16:36:42 +0000 (17:36 +0100)]
Remove unused property apiCompatibleSince from platformsConfig.json
Property is unused since
9f1fbf4918cd
Raphael von der Grün [Wed, 13 Mar 2019 15:27:51 +0000 (16:27 +0100)]
Fix plugin dependency tests when using npm >= 5
npm >= 5 automatically prunes any unsaved packages during installation
(see https://github.com/npm/npm/issues/16853). Therefore, installing
platforms and plugins without saving them to package.json is essentially
broken right now.
エリス [Wed, 13 Mar 2019 07:10:03 +0000 (16:10 +0900)]
Bump All Platform Pinning and Support Minor SemVer
エリス [Wed, 13 Mar 2019 06:29:43 +0000 (15:29 +0900)]
Bump dependency jasmine@^3.3.1
エリス [Wed, 13 Mar 2019 06:24:13 +0000 (15:24 +0900)]
Bump dependency globby@^9.1.0
エリス [Wed, 13 Mar 2019 06:12:54 +0000 (15:12 +0900)]
Bump dependency underscore@^1.9.1
エリス [Wed, 13 Mar 2019 06:12:09 +0000 (15:12 +0900)]
Bump dependency semver@^5.6.0
エリス [Wed, 13 Mar 2019 06:11:18 +0000 (15:11 +0900)]
Bump dependency read-chunk@^3.1.0
エリス [Wed, 13 Mar 2019 06:10:37 +0000 (15:10 +0900)]
Bump dependency init-package-json@^1.10.3
エリス [Wed, 13 Mar 2019 06:09:55 +0000 (15:09 +0900)]
Bumped dependency fs-extra@^7.0.1
エリス [Wed, 13 Mar 2019 06:02:54 +0000 (15:02 +0900)]
Added missing dev dependency shelljs to fix failing tests
Raphael von der Grün [Tue, 12 Mar 2019 15:16:45 +0000 (16:16 +0100)]
Remove handling of legacy .fetch.json files (#748)
The files in question have last been used in Cordova 4.3.0 and have been
removed by commit
c49eaa86c92b.
エリス [Tue, 12 Mar 2019 07:45:38 +0000 (16:45 +0900)]
Updated Dev Dependencies
- codecov@^3.2.0
- delay@^4.1.0
エリス [Tue, 12 Mar 2019 07:06:20 +0000 (16:06 +0900)]
Updated nyc code coverage dependency
エリス [Tue, 12 Mar 2019 07:04:47 +0000 (16:04 +0900)]
Updated ESlint dependencies with lint corrections
エリス [Tue, 12 Mar 2019 06:54:12 +0000 (15:54 +0900)]
Updated Package Cordova Dependencies
- cordova-common@^3.1.0
- cordova-create@^2.0.0
- cordova-fetch@^2.0.0
- cordova-serve@^3.0.0
エリス [Tue, 12 Mar 2019 06:44:32 +0000 (15:44 +0900)]
Merge pull request #709 from raphinesse/next-gen-requireCordovaModule
- Throw error if non-cordova module is required (Resolves #689)
- Remove outdated compatibility layer from 2015
- Lazily load Context.cordova to avoid cyclical dependency
- Use const for imports
Almir Kadric [Thu, 7 Mar 2019 06:32:22 +0000 (15:32 +0900)]
CB-14166: (cli) Fixed issue when install plugins on windows (#622)
The npm package name is already wrapped in quotes to prevent special characters from being execute. However the additional win32 code was further injecting quotes around the version causing npm to return a EINVALIDTAGNAME error. The win32 code is redundant and seems to not be required.
Jan Piotrowski [Mon, 11 Feb 2019 17:37:37 +0000 (18:37 +0100)]
Add or update GitHub pull request and issue template
エリス [Tue, 11 Dec 2018 06:36:16 +0000 (15:36 +0900)]
Add Electron Platform (#744)
* Add Electron Platform
* Updated test spec to include Electron
エリス [Tue, 11 Dec 2018 06:35:28 +0000 (15:35 +0900)]
Updated Platform Config Git URL Paths (#743)
Chris Brody [Tue, 4 Dec 2018 17:30:17 +0000 (12:30 -0500)]
Cleanup indentation spacing in */jasmine.json (#742)
Ran Benita [Tue, 4 Dec 2018 13:52:39 +0000 (15:52 +0200)]
Fix crash in `cordova requirements` due to an unbound function (#741)
Functions in utils.js expect to be called with `this` bound to the
module. So this call crashed with an error
this.isCordova is not a function
Fixes #740.
Jan Piotrowski [Wed, 3 Oct 2018 23:07:21 +0000 (01:07 +0200)]
remove JIRA link
Darryl Pogue [Sun, 30 Sep 2018 06:47:49 +0000 (23:47 -0700)]
Fix 2 integration tests failures on macOS
Raphael von der Grün [Sun, 30 Sep 2018 00:26:16 +0000 (02:26 +0200)]
Merge pull request #710 from raphinesse/q-nomore
Drop dependency on Q, use native promises
Raphael von der Grün [Sat, 29 Sep 2018 09:05:00 +0000 (11:05 +0200)]
Remove Q :tada:
Raphael von der Grün [Sat, 29 Sep 2018 09:04:59 +0000 (11:04 +0200)]
Fix some unhandled promises
Raphael von der Grün [Sat, 29 Sep 2018 09:04:58 +0000 (11:04 +0200)]
Add ESLint rule against unhandled promises
Raphael von der Grün [Sat, 29 Sep 2018 09:04:57 +0000 (11:04 +0200)]
Rewrite cordova/requirements to get rid of `Q.allSettled`
Behavior of cordova/requirements should remain unchanged.
Raphael von der Grün [Sat, 29 Sep 2018 09:04:56 +0000 (11:04 +0200)]
Use `superspawn` to get rid of `Q.defer` in plugman/install
Raphael von der Grün [Sat, 29 Sep 2018 09:04:55 +0000 (11:04 +0200)]
Replace `Q.delay` with npm package `delay`
Raphael von der Grün [Sat, 29 Sep 2018 09:04:54 +0000 (11:04 +0200)]
Fix linting error `prefer-promise-reject-errors`
Raphael von der Grün [Sat, 29 Sep 2018 09:04:52 +0000 (11:04 +0200)]
Search and replace usage of Q's static API
Raphael von der Grün [Sat, 29 Sep 2018 09:04:51 +0000 (11:04 +0200)]
Replace leftover usage of Q's instance API
Raphael von der Grün [Sat, 29 Sep 2018 00:07:42 +0000 (02:07 +0200)]
Merge pull request #687 from raphinesse/to-serve-and-protect
Test, fix and cleanup `cordova serve`
Raphael von der Grün [Fri, 28 Sep 2018 23:46:07 +0000 (01:46 +0200)]
Use const for imports
Raphael von der Grün [Fri, 28 Sep 2018 19:08:50 +0000 (21:08 +0200)]
Lazily load Context.cordova
Raphael von der Grün [Fri, 28 Sep 2018 17:47:17 +0000 (19:47 +0200)]
Remove compatibility layer from 2015
Raphael von der Grün [Fri, 28 Sep 2018 15:56:35 +0000 (17:56 +0200)]
Throw error if non-cordova module is required
Resolves #689
Raphael von der Grün [Fri, 28 Sep 2018 23:38:49 +0000 (01:38 +0200)]
Merge pull request #707 from raphinesse/deprecate-requireCordovaModule
Deprecate `requireCordovaModule` for non-Cordova modules
Raphael von der Grün [Fri, 28 Sep 2018 16:59:46 +0000 (18:59 +0200)]
Update JSDoc and clarify inline comments
Raphael von der Grün [Fri, 28 Sep 2018 16:59:45 +0000 (18:59 +0200)]
Emit deprecation warning when requiring non-cordova modules
Raphael von der Grün [Fri, 28 Sep 2018 16:59:43 +0000 (18:59 +0200)]
Fix for module names that start with "cordova-lib"
Raphael von der Grün [Fri, 28 Sep 2018 16:59:42 +0000 (18:59 +0200)]
Add unit tests for `Context#requireCordovaModule`
Some of these are failing at this point
Oliver Salzburg [Tue, 25 Sep 2018 11:06:17 +0000 (13:06 +0200)]
Dereference possible symlinks when copying plugin (#705)
When `npm install`ing a local plugin, npm will create a symlink to the source. When we then attempt to copy that symlink, the result will be invalid on Windows OS. Thus, we need to dereference the link/junction and create a proper copy.
Fixes #700
Fixes #704
Raphael von der Grün [Tue, 18 Sep 2018 12:04:26 +0000 (14:04 +0200)]
Increase timeout for cordova.platform e2e tests (#699)
Raphael von der Grün [Tue, 18 Sep 2018 11:18:43 +0000 (13:18 +0200)]
Increase plugman install test timeout (#698)
Chris Brody [Fri, 14 Sep 2018 14:16:39 +0000 (10:16 -0400)]
Update cordova-windows pattern to ~6.0.0 (#691)
Chris Brody [Wed, 12 Sep 2018 19:36:52 +0000 (15:36 -0400)]
Start 9.0.0-dev (#690)
Raphael von der Grün [Sat, 8 Sep 2018 15:19:41 +0000 (17:19 +0200)]
Fix waiting for launched server
Raphael von der Grün [Sat, 8 Sep 2018 15:19:40 +0000 (17:19 +0200)]
Add failing test for handling failed server launch
Raphael von der Grün [Sat, 8 Sep 2018 15:19:39 +0000 (17:19 +0200)]
Organize imports
Raphael von der Grün [Sat, 8 Sep 2018 15:19:38 +0000 (17:19 +0200)]
Improve tests after improving testability