Giter VIP home page Giter VIP logo

cordova-lib's Introduction

Build status Build Status Code coverage NPM

cordova-lib

Contains npm modules used primarily by cordova and plugman.

Setup from a cloned repo

  • Clone this repository onto your local machine. git clone https://github.com/apache/cordova-lib.git
  • Install dependencies and npm-link npm install && npm link

Setup from npm

  • npm install cordova-lib

Note: you will likely also want to get github.com/apache/cordova-common, github.com/apache/cordova-create, github.com/apache/cordova-serve which previously lived in this repo but have since been moved.

npm commands

This package exposes the following commands;

  • npm run lint - runs a linter (eslint) on relevant source and test code
  • npm run unit-tests - runs the unit tests (via jasmine) from the spec/ directory
  • npm run cover - runs istanbul code coverage tool to measure unit test code coverage
  • npm run e2e-tests - runs heavy integration tests from the integration-tests/ directory (WARNING: these take a long time to run and rely on file and network I/O)
  • npm test - shortcut for running the linter, the unit tests and the integration tests

cordova-lib's People

Contributors

agrieve avatar alsorokin avatar alunny avatar audreyso avatar axelnennker avatar bennmapes avatar brianleroux avatar bshepherdson avatar clelland avatar cmarcelk avatar csantanapr avatar dpogue avatar erisu avatar filmaj avatar gorkem avatar goya avatar imhotep avatar jsoref avatar kamrik avatar matrosov-nikita avatar mmocny avatar mreinstein avatar mwbrooks avatar purplecabbage avatar raphinesse avatar sgrebnov avatar shazron avatar stevengill avatar surajpindoria avatar timkim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cordova-lib's Issues

Improve how Cordova checks for required project information

As reported in apache/cordova#155, Cordova stops with an error message if there is no www directory. I have seen cases where this behavior is not really wanted. Some developers want to have third-party tools such as Ionic, Angular, or Webpack generate the entire www directory as part of the build process, within a hook script for example.

Another thing is that newer versions of Cordova will not work if there is no package.json file. As discussed in apache/cordova-cli#498, Cordova CLI reports a confusing error message if there is no package.json file.

I think Cordova should be updated to check for the required configuration in config.xml and package.json, and only require www when it is ready to prepare, build, or run a project.

Deprecate `plugin save`

Feature Request

Motivation Behind Feature

As the platform save command have been deprecated and removed, the plugin save command is also no longer required for the same following reasons that were applied to the platform save deprecation.

Background: https://issues.apache.org/jira/browse/CB-13057

Feature Description

Add deprecation warning for plugin save

Ios_Parser

Hello,

I was checking this repository, and it seems the javascript file ios_parser was removed a long time ago.

What should we use instead since it is removed?

Cordova platform add android, removes node modules with semver

Bug Report

When running

cordova platform add android --save

The node modules with a git reference and using semver are removed from the package-lock.json file and from node_modules folder.

I have run npm i, first and the modules are fetched fine. But the cordova command removes the modules and subsequent use of the modules fails.

The git reference and semver looks like this:

"dependencies": {
    "project": "https://bitbucket.org/project.git#semver:~v0.1.1"
}

Problem

Could be related to:
A similar issue I reported
An issue @dpogue describes

What is expected to happen?

Package-lock.json should be left untouched and the modules not deleted.

What does actually happen?

Package-lock.json is edited and the modules deleted.

Information

I removed semver from the git reference and simply use the hash then everything works again.

"dependencies": {
    "project": "https://bitbucket.org/project.git#v0.1.1"
}

Command or Code

NA

Environment, Platform, Device

NA

Version information

Cordova 9.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Use native Promises instead of Q

We have to do this top down in our dependency graph (see below). cordova-cli and cordova-plugman are already Q-less. So lib is ready to go next.

Cordova Tooling dependency graph

cordova view resolution problem

How to change cordovawebview resolution๏ผŸ

Case is๏ผš
I make a web app on android TV by cordova.
The TV device resolution is 1920x1080.
but when I run the app , the window.innerwidth/innerheight is 960x540 though it is fullscreen also.
While the html page is designed with 1920*1080 , so it was shown partly.
I find nothing useful about this from the cordova offical guideline.

Hope some help from you.

NodeJS14: Warning: Accessing non-existent property 'android'

Bug Report

Problem

cordova platform add android produces a warning

What is expected to happen?

No warnings produced

What does actually happen?

(node:11565) Warning: Accessing non-existent property 'android' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)

Information

NodeJS 14
Ubuntu 18
Cordova 9/ [email protected]

node --trace-warnings produces:

(node:11647) Warning: Accessing non-existent property 'android' of module exports inside circular dependency
    at emitCircularRequireWarning (internal/modules/cjs/loader.js:817:11)
    at Object.get (internal/modules/cjs/loader.js:831:5)
    at Object.hostSupports (/home/norman/.nvm/versions/node/v14.2.0/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/util.js:83:22)
    at addHelper (/home/norman/.nvm/versions/node/v14.2.0/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/addHelper.js:47:27)
    at Function.add (/home/norman/.nvm/versions/node/v14.2.0/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/index.js:27:12)
    at /home/norman/.nvm/versions/node/v14.2.0/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/platform/index.js:71:35

Low priority as it is just a warning, and the command still appears to work. But I think we should still look into why the warning is being produced to begin with.

This only occurs on the NodeJS 14.

Command or Code

cordova platform add android on a newly created project.

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Audit Promise return values

There are too many places where we have very inconsistent return types involving promises. Particularly cases where functions throw, return a resolving promise, and also return a rejecting promise. Also a lot of places where functions return promises that resolve with different value types in different paths.

HookRunner is one spot I've seen that's particularly bad for this, but I've seen it in a few other spots too.

My general recommendation:

  • Any function that returns a promise should never throw. It should reject the promise.
  • Any function that returns a promise should document the resolving value type of that promise, and ensure that only that value type is ever resolved.

Cordova prepare tries to add the same platform multiple times

When I do a cordova prepare in an empty project, but with an config.xml I get the following: (Cordova 8.1.2)

Discovered platform "ios@^4.5.4" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-ios@^4.5.4
Adding ios project...
Creating Cordova project for the iOS platform:
	Path: platforms/ios
	Package: xxxxxx
	Name: XXXXXX
iOS project created with [email protected]
Discovered platform "android@^7.1.1" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-android@^7.1.1
Error: Platform ios already added.

Prevent updating package.json if there are no actual changes

I use several additional tools with Cordova for build management. Some of those watch for changes in files in order to rebuild/redistribute. Many hard-code watching the package.json file for changes. When running cordova serve, that calls cordova prepare, and package.json gets updated (so does config.xml), whether there are actually changes to it or not (e.g., no results from a diff). This causes those build watchers to fire, rebuild, copy some files to www, which causes Cordova's auto-reload to kick in, which updates package.json again, which continues this infinite cycle.

Is there a way to avoid writing the exact same content to package.json that already exists in that file on every restart/reload? I get we need config.xml and package.json to "jive" but if there's no diff between what Cordova is about to write to package.json and what's already in package.json, can we skip the write?

Here is a Gist with my 2 files.

`npm t` fails locally on my machine

Running npm -t for master locally gives this output for me:


> [email protected] test C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib
> npm run eslint && npm run unit-tests && npm run e2e-tests


> [email protected] eslint C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib
> eslint .


> [email protected] unit-tests C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib
> jasmine JASMINE_CONFIG_PATH=spec/jasmine.json

Jasmine started

  build command

    failure
      ๏ฟฝ[32mโˆš Test 001 : should not run inside a project with no platforms๏ฟฝ[39m (0.01 sec)
      ๏ฟฝ[32mโˆš Test 002 : should not run outside of a Cordova-based project๏ฟฝ[39m (0.002 sec)

    success
      ๏ฟฝ[32mโˆš Test 003 : should run inside a Cordova-based project with at least one added platform and call both prepare and compile๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 004 : should pass down options๏ฟฝ[39m (0.002 sec)

    hooks

      when platforms are added
        ๏ฟฝ[32mโˆš Test 006 : should fire before hooks through the hooker module๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš Test 007 : should fire after hooks through the hooker module๏ฟฝ[39m (0.001 sec)

      with no platforms added
        ๏ฟฝ[32mโˆš Test 008 : should not fire the hooker๏ฟฝ[39m (0.001 sec)

  compile command

    failure
      ๏ฟฝ[32mโˆš Test 001 : should not run inside a Cordova-based project with no added platforms by calling util.listPlatforms๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 002 : should not run outside of a Cordova-based project๏ฟฝ[39m (0.001 sec)

    success
      ๏ฟฝ[32mโˆš Test 003 : should run inside a Cordova-based project with at least one added platform and shell out to build๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš Test 004 : should pass down optional parameters๏ฟฝ[39m (0.001 sec)

    hooks

      when platforms are added
        ๏ฟฝ[32mโˆš Test 006 : should fire before hooks through the hooker module๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš Test 007 : should fire after hooks through the hooker module๏ฟฝ[39m (0.001 sec)

      with no platforms added
        ๏ฟฝ[32mโˆš Test 008 : should not fire the hooker๏ฟฝ[39m (0.001 sec)

  cordova lib main export
    ๏ฟฝ[32mโˆš should be available๏ฟฝ[39m (0.001 sec)

  create basic test (see more in cordova-create)
    ๏ฟฝ[32mโˆš Test 003 : should successfully run๏ฟฝ[39m (0.264 sec)

  emulate command

    failure
      ๏ฟฝ[32mโˆš Test 001 : should not run inside a Cordova-based project with no added platforms by calling util.listPlatforms๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 002 : should not run outside of a Cordova-based project๏ฟฝ[39m (0.001 sec)

    success
      ๏ฟฝ[32mโˆš Test 003 : should run inside a Cordova-based project with at least one added platform and call prepare and shell out to the emulate script๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 004 : should pass down options๏ฟฝ[39m (0.001 sec)

      run parameters should not be altered by intermediate build command
        ๏ฟฝ[32mโˆš Test 006 : should leave parameters unchanged๏ฟฝ[39m (0.014 sec)

      ๏ฟฝ[32mโˆš Test 007 : should call platform's build method๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 008 : should not call build if --nobuild option is passed๏ฟฝ[39m (0.001 sec)

    hooks

      when platforms are added
        ๏ฟฝ[32mโˆš Test 009 : should fire before hooks through the hooker module๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš Test 010 : should fire after hooks through the hooker module๏ฟฝ[39m (0.001 sec)

      with no platforms added
        ๏ฟฝ[32mโˆš Test 011 : should not fire the hooker๏ฟฝ[39m (0.001 sec)

  cordova/platform/addHelper

    error/warning conditions
      ๏ฟฝ[32mโˆš should require specifying at least one platform๏ฟฝ[39m (0.068 sec)
      ๏ฟฝ[32mโˆš should log if host OS does not support the specified platform๏ฟฝ[39m (0.069 sec)
      ๏ฟฝ[32mโˆš should throw if platform was already added before adding๏ฟฝ[39m (0.058 sec)
      ๏ฟฝ[32mโˆš should throw if platform was not added before updating๏ฟฝ[39m (0.048 sec)

    happy path (success conditions)
      ๏ฟฝ[32mโˆš should fire the before_platform_* hook๏ฟฝ[39m (0.074 sec)

      platform spec inference
        ๏ฟฝ[32mโˆš should retrieve platform details from directories-specified-as-platforms using getPlatformDetailsFromDir๏ฟฝ[39m (0.055 sec)
        ๏ฟฝ[32mโˆš should retrieve platform details from URLs-specified-as-platforms using downloadPlatform๏ฟฝ[39m (0.039 sec)
        ๏ฟฝ[32mโˆš should use spec from config.xml if package.json does not contain dependency for platform๏ฟฝ[39m (0.047 sec)
        ๏ฟฝ[32mโˆš should attempt to retrieve from config.xml if exists and package.json does not๏ฟฝ[39m (0.031 sec)
        ๏ฟฝ[32mโˆš should fall back to using pinned version if both package.json and config.xml do not specify it๏ฟฝ[39m (0.029 sec)
        ๏ฟฝ[32mโˆš should invoke fetch if provided as an option and spec is a directory๏ฟฝ[39m (0.036 sec)

      platform api invocation
        ๏ฟฝ[32mโˆš should invoke the createPlatform platform API method when adding a platform, providing destination location, parsed config file and platform detail options as arguments๏ฟฝ[39m (0.023 sec)
        ๏ฟฝ[32mโˆš should invoke the update platform API method when updating a platform, providing destination location and plaform detail options as arguments๏ฟฝ[39m (0.032 sec)

      after platform api invocation

        when the restoring option is not provided
          ๏ฟฝ[33m* should invoke preparePlatforms twice (?!?), once before installPluginsForNewPlatforms and once after... ?!๏ฟฝ[39m

        ๏ฟฝ[32mโˆš should invoke the installPluginsForNewPlatforms method in the platform-add case๏ฟฝ[39m (0.043 sec)
        ๏ฟฝ[32mโˆš should write out the version of platform just added/updated to config.xml if the save option is provided๏ฟฝ[39m (0.039 sec)

        if the project contains a package.json
          ๏ฟฝ[32mโˆš should write out the platform just added/updated to the cordova.platforms property of package.json๏ฟฝ[39m (0.025 sec)
          ๏ฟฝ[32mโˆš should use pkgJson version devDependencies, if dependencies are undefined๏ฟฝ[39m (0.057 sec)
          ๏ฟฝ[32mโˆš should only write the package.json file if it was modified๏ฟฝ[39m (0.045 sec)
          ๏ฟฝ[32mโˆš should file the after_platform_* hook๏ฟฝ[39m (0.021 sec)

    downloadPlatform

      errors
        ๏ฟฝ[32mโˆš should reject the promise should fetch fail๏ฟฝ[39m (0.048 sec)

      happy path
        ๏ฟฝ[32mโˆš should invoke cordova-fetch if fetch was provided as an option๏ฟฝ[39m (0.022 sec)
        ๏ฟฝ[32mโˆš should pass along a libDir argument to getPlatformDetailsFromDir on a successful platform download๏ฟฝ[39m (0.027 sec)

    installPluginsForNewPlatform
      ๏ฟฝ[32mโˆš should immediately return if there are no plugins to install into the platform๏ฟฝ[39m (0.054 sec)
      ๏ฟฝ[32mโˆš should invoke plugman.install, giving correct platform, plugin and other arguments๏ฟฝ[39m (0.031 sec)
      ๏ฟฝ[32mโˆš should include any plugin variables as options when invoking plugman install๏ฟฝ[39m (0.022 sec)

  cordova/platform/check
    ๏ฟฝ[32mโˆš If no results, platforms cannot be updated๏ฟฝ[39m (2 secs)
    ๏ฟฝ[32mโˆš Should warn if install failed๏ฟฝ[39m (2 secs)
    ๏ฟฝ[32mโˆš Should warn if version-empty๏ฟฝ[39m (0.117 sec)
    ๏ฟฝ[32mโˆš Should warn if version-failed๏ฟฝ[39m (2 secs)

  cordova/platform/getPlatformDetailsFromDir
    ๏ฟฝ[32mโˆš should throw if no config.xml or pkgJson๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš should throw if no platform is provided๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should return a promise with platform and version๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should remove the cordova- prefix from the platform name for known platforms๏ฟฝ[39m (0.001 sec)

  cordova/platform

    main module function

      error/warning conditions
        ๏ฟฝ[32mโˆš should require at least one platform for add and remove commands๏ฟฝ[39m (0.017 sec)

      handling of targets parameter
        ๏ฟฝ[32mโˆš should be able to handle an array of platform targets๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should be able to handle a single platform target string๏ฟฝ[39m (0.001 sec)

      happy path (success conditions)
        ๏ฟฝ[32mโˆš should direct `add` commands to the `add` method/module๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should direct `remove` + `rm` commands to the `remove` method/module๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should direct `update` + `up` commands to the `update` method/module๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should direct `check` commands to the `check` method/module๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should direct `list`, all other commands and no command at all to the `list` method/module๏ฟฝ[39m (0.001 sec)

  cordova/platform/list
    ๏ฟฝ[32mโˆš should fire the before_platform_ls hook๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš should fire the after_platform_ls hook๏ฟฝ[39m (0.014 sec)
    ๏ฟฝ[32mโˆš should print results of available platforms๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš should return platform list๏ฟฝ[39m (0 sec)

  cordova.platform

    add function
      ๏ฟฝ[32mโˆš Test 004 : throws if the target list is empty๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 005 : throws if the target list is undefined๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 006 : throws if the target list is null๏ฟฝ[39m (0.001 sec)

  cordova/platform/remove

    error/warning conditions
      ๏ฟฝ[32mโˆš should require specifying at least one platform๏ฟฝ[39m (0.014 sec)

    happy path (success conditions)
      ๏ฟฝ[32mโˆš should fire the before_platform_* hook๏ฟฝ[39m (0.014 sec)
      ๏ฟฝ[32mโˆš should remove <platform>.json file from plugins directory๏ฟฝ[39m (0.012 sec)
      ๏ฟฝ[32mโˆš should remove from config.xml and platforms.json๏ฟฝ[39m (0.016 sec)
      ๏ฟฝ[32mโˆš should remove from package.json๏ฟฝ[39m (0.023 sec)
      ๏ฟฝ[32mโˆš fetch should be called๏ฟฝ[39m (0.009 sec)
      ๏ฟฝ[32mโˆš should file the after_platform_* hook๏ฟฝ[39m (0.01 sec)

  platforms/platforms
    ๏ฟฝ[32mโˆš should have getPlatformApi function as a property๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should have all and only the supported platforms๏ฟฝ[39m (0.016 sec)

    getPlatformApi method
      ๏ฟฝ[32mโˆš should return PlatformApi class defined by platform๏ฟฝ[39m (0.021 sec)
      ๏ฟฝ[32mโˆš should cache PlatformApi instance for further calls๏ฟฝ[39m (0.005 sec)
      ๏ฟฝ[32mโˆš should resolve symlinks before creating an instance๏ฟฝ[39m (0.017 sec)
      ๏ฟฝ[32mโˆš should return cached instance by symlink to project root๏ฟฝ[39m (0.005 sec)
      ๏ฟฝ[32mโˆš should succeed if called inside of cordova project w/out platformRoot param๏ฟฝ[39m (0.003 sec)
      ๏ฟฝ[32mโˆš should throw if called outside of cordova project w/out platformRoot param๏ฟฝ[39m (0.003 sec)
      ๏ฟฝ[32mโˆš should throw for unknown platform๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš should throw for nonsense www platform๏ฟฝ[39m (0.002 sec)

  cordova/plugin/add

    main method

      error/warning conditions
        ๏ฟฝ[32mโˆš should error out if at least one plugin is not specified๏ฟฝ[39m (0.003 sec)
        ๏ฟฝ[32mโˆš should error out if any mandatory plugin variables are not provided๏ฟฝ[39m (0.002 sec)

      happy path
        ๏ฟฝ[32mโˆš should fire the before_plugin_add hook๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should determine where to fetch a plugin from using determinePluginTarget and invoke plugman.fetch with the resolved target๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should retrieve any variables for the plugin from config.xml and add them as cli variables only when the variables were not already provided via options๏ฟฝ[39m (0.013 sec)
        ๏ฟฝ[32mโˆš should invoke plugman.install for each platform added to the project๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should save plugin variable information to package.json file (if exists)๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should overwrite plugin information in config.xml after a successful installation๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[33m* should invoke preparePlatforms if plugman.install returned a falsey value๏ฟฝ[39m
        ๏ฟฝ[32mโˆš should fire after_plugin_add hook๏ฟฝ[39m (0.001 sec)

    determinePluginTarget helper method
      ๏ฟฝ[32mโˆš should return the target directly if the target is pluginSpec-parseable๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return the target directly if the target is a URL๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return the target directly if the target is a directory๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should retrieve plugin version from package.json (if exists)๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should retrieve plugin version from package.json devDependencies (if exists)๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should retrieve plugin version from config.xml as a last resort๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return plugin version retrieved from package.json or config.xml if it is a URL๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return plugin version retrieved from package.json or config.xml if it is a directory๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return plugin version retrieved from package.json or config.xml if it has a scope๏ฟฝ[39m (0.001 sec)

      with no version inferred from config files or provided plugin target

        when searchpath or noregistry flag is provided
          ๏ฟฝ[32mโˆš should end up just returning the target passed in case of searchpath๏ฟฝ[39m (0.001 sec)
          ๏ฟฝ[32mโˆš should end up just returning the target passed in case of noregistry๏ฟฝ[39m (0.001 sec)

        when registry/npm is to be used (neither searchpath nor noregistry flag is provided)
          ๏ฟฝ[32mโˆš should retrieve plugin info via registry.info๏ฟฝ[39m (0.001 sec)
          ๏ฟฝ[32mโˆš should feed registry.info plugin information into getFetchVersion๏ฟฝ[39m (0 sec)
          ๏ฟฝ[32mโˆš should return the target as plugin-id@fetched-version๏ฟฝ[39m (0 sec)

    parseSource helper method
      ๏ฟฝ[32mโˆš should return target when url is passed๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should return target when local path is passed๏ฟฝ[39m (0.015 sec)
      ๏ฟฝ[32mโˆš should return null when target is not url or local path๏ฟฝ[39m (0 sec)

    getVersionFromConfigFile helper method
      ๏ฟฝ[32mโˆš should return spec๏ฟฝ[39m (0 sec)

    unit tests to replace integration-tests/plugin_fetch.spec.js

      getFetchVersion helper method
        ๏ฟฝ[32mโˆš should resolve with null if plugin info does not contain engines and engines.cordovaDependencies properties๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should retrieve installed plugins and installed platforms version and feed that information into determinePluginVersionToFetch๏ฟฝ[39m (0.001 sec)

      determinePluginVersionToFetch helper method
        ๏ฟฝ[32mโˆš should return null if no valid semver versions exist and no upperbound constraints were placed๏ฟฝ[39m (0.005 sec)
        ๏ฟฝ[32mโˆš should return null and fetching latest version of plugin๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should return highest version of plugin available based on constraints๏ฟฝ[39m (0.001 sec)

      getFailedRequirements helper method
        ๏ฟฝ[32mโˆš should remove prerelease version๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should return an empty array if no failed requirements๏ฟฝ[39m (0.014 sec)
        ๏ฟฝ[32mโˆš should return an empty array if invalid dependency constraint๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should return an array with failed plugin requirements ๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should return an array with failed cordova requirements ๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should return an array with failed platform requirements ๏ฟฝ[39m (0.002 sec)

      listUnmetRequirements helper method
        ๏ฟฝ[32mโˆš should emit warnings for failed requirements๏ฟฝ[39m (0.001 sec)

      findVersion helper method
        ๏ฟฝ[32mโˆš should return null if version is not in array๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should return the version if it is in the array๏ฟฝ[39m (0 sec)

  cordova/plugin

    error conditions
      ๏ฟฝ[32mโˆš should require at least one target for add and rm commands๏ฟฝ[39m (0.001 sec)

    handling/massaging of parameters
      ๏ฟฝ[32mโˆš should be able to handle an array of platform targets๏ฟฝ[39m (0.003 sec)
      ๏ฟฝ[32mโˆš should be able to handle a single string as a target๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš should transform targets that start with a dash into options๏ฟฝ[39m (0.011 sec)
      ๏ฟฝ[32mโˆš should also include targets into a plugins property on options๏ฟฝ[39m (0.001 sec)

    happy path
      ๏ฟฝ[32mโˆš should direct "add" command to the "add" submodule๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should direct "rm" and "remove" commands to the "remove" submodule๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should direct "save" command to the "save" submodule๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should direct "list", all other commands and no command at all to the "list" submodule๏ฟฝ[39m (0 sec)

  cordova/plugin/list
    ๏ฟฝ[32mโˆš should fire the before_plugin_ls hook๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should emit a "no plugins added" result if there are no installed plugins๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should warn if plugin list contains dependencies that are missing๏ฟฝ[39m (0 sec)
    ๏ฟฝ[33m* should warn if plugin list contains a plugin dependency that does not have a version satisfied๏ฟฝ[39m
    ๏ฟฝ[32mโˆš should emit a result containing a description of plugins installed๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should fire the after_plugin_ls hook๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš should resolve the promise by returning an array of plugin ids installed๏ฟฝ[39m (0.001 sec)

  methods for parsing npm plugin packages
    ๏ฟฝ[32mโˆš Test 001 : should handle package names with no scope or version๏ฟฝ[39m (0.014 sec)
    ๏ฟฝ[32mโˆš Test 002 : should handle package names with a version๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš Test 003 : should handle package names with a scope๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš Test 004 : should handle package names with a scope and a version๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš Test 005 : should handle invalid package specs๏ฟฝ[39m (0 sec)

  cordova/plugin/remove

    error/warning conditions
      ๏ฟฝ[32mโˆš should require that a plugin be provided๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš should require that a provided plugin be installed in the current project๏ฟฝ[39m (0.002 sec)

    happy path
      ๏ฟฝ[32mโˆš should fire the before_plugin_rm hook๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should call plugman.uninstall.uninstallPlatform for each platform installed in the project and for each provided plugin๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš should trigger a prepare if plugman.uninstall.uninstallPlatform returned something falsy๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should call plugman.uninstall.uninstallPlugin once plugin has been uninstalled for each platform๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should call uninstallPlugin in order and only finish once all plugins are done๏ฟฝ[39m (0.142 sec)

      when save option is provided or autosave config is on
        ๏ฟฝ[32mโˆš should remove provided plugins from config.xml๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should remove provided plugins from package.json (if exists)๏ฟฝ[39m (0.001 sec)

      ๏ฟฝ[32mโˆš should remove fetch metadata from fetch.json๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš should fire the after_plugin_rm hook๏ฟฝ[39m (0.001 sec)

  cordova/plugin/save

    error conditions
      ๏ฟฝ[32mโˆš should explode if there was an issue parsing or reading from fetch.json file๏ฟฝ[39m (0.001 sec)

    happy path
      ๏ฟฝ[32mโˆš check that existing plugins are getting removed๏ฟฝ[39m (0.021 sec)
      ๏ฟฝ[32mโˆš plugins are being removed first and then only top level plugins are being restored๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should write individual plugin specs to config.xml๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should write individual plugin variables to config.xml๏ฟฝ[39m (0.001 sec)

    getSpec helper method
      ๏ฟฝ[32mโˆš should return a plugin source's url or path property immediately๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš getSpec should return a version if a version was provided to plugin id๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return a version that includes scope if scope was part of plugin id๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should fall back to using PluginInfoProvider to retrieve a version as last resort๏ฟฝ[39m (0.001 sec)

    getPluginVariables helper method
      ๏ฟฝ[32mโˆš if no variables are passed in, should return empty๏ฟฝ[39m (0.014 sec)
      ๏ฟฝ[32mโˆš if variables are passed in, should return result & get added to name and value๏ฟฝ[39m (0 sec)

    versionString helper method
      ๏ฟฝ[32mโˆš if no version, should return null๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš return version passed in, if it is within the valid range๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should check and return a valid version๏ฟฝ[39m (0.001 sec)

  cordova/plugin/util

    getInstalledPlugins helper method
      ๏ฟฝ[32mโˆš should return result of PluginInfoProvider's getAllWithinSearchPath method๏ฟฝ[39m (0.001 sec)

    saveToConfigXmlOn helper method
      ๏ฟฝ[32mโˆš should return true if config.json's autosave option is truthy๏ฟฝ[39m (0.021 sec)
      ๏ฟฝ[32mโˆš should return true if options passed in have a truthy save property๏ฟฝ[39m (0 sec)

    mergeVariables happy path
      ๏ฟฝ[32mโˆš should return variable from cli๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should return empty object if there are no config and no cli variables๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš cli variable takes precedence over config.xml๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš use config.xml variable if no cli variable is passed in๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš should get missed variables๏ฟฝ[39m (0 sec)

  cordova/prepare

    main method

      failure
        ๏ฟฝ[32mโˆš should invoke util.preProcessOptions as preflight task checker, which, if fails, should trigger promise rejection and only fire the before_prepare hook๏ฟฝ[39m (0.003 sec)
        ๏ฟฝ[32mโˆš should invoke util.cdProjectRoot as a preflight task checker, which, if fails, should trigger a promise rejection and fire no hooks๏ฟฝ[39m (0.001 sec)

      success
        ๏ฟฝ[32mโˆš should fire the before_prepare hook and provide platform and path information as arguments๏ฟฝ[39m (0.013 sec)
        ๏ฟฝ[32mโˆš should invoke restore module's installPlatformsFromConfigXML method๏ฟฝ[39m (0 sec)
        ๏ฟฝ[32mโˆš should retrieve PlatformApi instances for each platform provided๏ฟฝ[39m (0.002 sec)
        ๏ฟฝ[32mโˆš should invoke restore module's installPluginsFromConfigXML method๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should invoke preparePlatforms method, providing the appropriate platforms๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš should fire the after_prepare hook and provide platform and path information as arguments๏ฟฝ[39m (0.001 sec)

    preparePlatforms helper method
      ๏ฟฝ[32mโˆš should call restoreMissingPluginsForPlatform๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš should retrieve the platform API via getPlatformApi per platform provided, and invoke the prepare method from that API๏ฟฝ[39m (0.003 sec)
      ๏ฟฝ[32mโˆš should handle config changes by invoking add_config_changes and save_all๏ฟฝ[39m (0 sec)

    restoreMissingPluginsForPlatform helper method
      ๏ฟฝ[32mโˆš should resolve quickly and not invoke getPlatformAPI in the easy case of there being no difference between old and new platform.json๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš should leverage platform API to remove and add any missing plugins identified๏ฟฝ[39m (0.001 sec)

  retrieval of project metadata
    ๏ฟฝ[32mโˆš Test 001 : retrieve platforms saved in config.xml๏ฟฝ[39m (0.002 sec)
    ๏ฟฝ[32mโˆš Test 002 : retrieve plugins saved in config.xml๏ฟฝ[39m (0.004 sec)

  cordova/restore-util

    installPlatformsFromConfigXML
      ๏ฟฝ[32mโˆš Test#000 : should change specs in config.xml from using ~ to using ^๏ฟฝ[39m (0.098 sec)
      ๏ฟฝ[32mโˆš Test#001 : should restore saved platform from package.json๏ฟฝ[39m (0.07 sec)
      ๏ฟฝ[32mโˆš Test#017 : should restore saved platform from package.json using an URL spec๏ฟฝ[39m (0.073 sec)
      ๏ฟฝ[32mโˆš Test#004 : should not modify either file if both have the same platforms๏ฟฝ[39m (0.059 sec)
      ๏ฟฝ[32mโˆš Test#005 : should update package.json to include platforms from config.xml๏ฟฝ[39m (0.053 sec)
      ๏ฟฝ[32mโˆš Test#006 : should update a package.json without `cordova` key to match platforms from config.xml๏ฟฝ[39m (0.047 sec)
      ๏ฟฝ[32mโˆš Test#007 : should update config.xml to include platforms from package.json๏ฟฝ[39m (0.066 sec)
      ๏ฟฝ[32mโˆš Test#016 : should restore platforms & plugins and create a missing package.json๏ฟฝ[39m (0.069 sec)

    installPluginsFromConfigXML
      ๏ฟฝ[32mโˆš Test#011 : updates config.xml to use the variable found in pkg.json๏ฟฝ[39m (0.097 sec)
      ๏ฟฝ[32mโˆš Test#012 : update pkg.json to include plugin and variable found in config.xml๏ฟฝ[39m (0.052 sec)
      ๏ฟฝ[32mโˆš Test#013 : update pkg.json AND config.xml to include all plugins and merge unique variables๏ฟฝ[39m (0.064 sec)
      ๏ฟฝ[32mโˆš Test#014 : update pkg.json AND config.xml to include all plugins and merge variables (no dupes)๏ฟฝ[39m (0.069 sec)
      ๏ฟฝ[32mโˆš Test#015 : update config.xml to include all plugins/variables from pkg.json๏ฟฝ[39m (0.055 sec)
      ๏ฟฝ[32mโˆš Test#018 : should restore saved plugin using an URL spec๏ฟฝ[39m (0.057 sec)

  run command

    failure
      ๏ฟฝ[32mโˆš Test 001 : should not run inside a Cordova-based project with no added platforms by calling util.listPlatforms๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 002 : should not run outside of a Cordova-based project๏ฟฝ[39m (0.015 sec)

    success
      ๏ฟฝ[32mโˆš Test 003 : should call prepare before actually run platform ๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 004 : should get PlatformApi instance for each platform and call its' run method๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 005 : should pass down parameters๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 007 : should call platform's build method๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 008 : should not call build if --nobuild option is passed๏ฟฝ[39m (0.001 sec)

      run parameters should not be altered by intermediate build command
        ๏ฟฝ[32mโˆš Test 009 : should leave parameters unchanged๏ฟฝ[39m (0.001 sec)

    hooks

      when platforms are added
        ๏ฟฝ[32mโˆš Test 010 : should fire before hooks through the hooker module๏ฟฝ[39m (0.001 sec)
        ๏ฟฝ[32mโˆš Test 011 : should fire after hooks through the hooker module๏ฟฝ[39m (0.001 sec)

      with no platforms added
        ๏ฟฝ[32mโˆš Test 012 : should not fire the hooker๏ฟฝ[39m (0.013 sec)

  serve command
    ๏ฟฝ[33m* Test 001 : should not run outside of a Cordova-based project๏ฟฝ[39m

    `serve`
      ๏ฟฝ[33m* should fall back to assets/www on Android๏ฟฝ[39m
      ๏ฟฝ[33m* should fall back to www on BlackBerry10๏ฟฝ[39m
      ๏ฟฝ[33m* should fall back to www on iOS๏ฟฝ[39m

  util module

    isCordova method
      ๏ฟฝ[32mโˆš Test 001 : should return false if it hits the home directory๏ฟฝ[39m (0.006 sec)
      ๏ฟฝ[32mโˆš Test 002 : should return false if it cannot find a .cordova directory up the directory tree๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 003 : should return the first directory it finds with a .cordova folder in it๏ฟฝ[39m (0.003 sec)
      ๏ฟฝ[32mโˆš Test 004 : should ignore PWD when its undefined๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 005 : should use PWD when available๏ฟฝ[39m (0.005 sec)
      ๏ฟฝ[32mโˆš Test 006 : should use cwd as a fallback when PWD is not a cordova dir๏ฟฝ[39m (0.005 sec)
      ๏ฟฝ[32mโˆš Test 007 : should ignore platform www/config.xml๏ฟฝ[39m (0.005 sec)

    deleteSvnFolders method
      ๏ฟฝ[32mโˆš Test 008 : should delete .svn folders in any subdirectory of specified dir๏ฟฝ[39m (0.01 sec)

    listPlatforms method
      ๏ฟฝ[32mโˆš Test 009 : should only return supported platform directories present in a cordova project dir๏ฟฝ[39m (0.015 sec)

    getInstalledPlatformsWithVersions method
      ๏ฟฝ[32mโˆš Test 010 : should get the supported platforms in the cordova project dir along with their reported versions๏ฟฝ[39m (0.505 sec)

    findPlugins method
      ๏ฟฝ[32mโˆš Test 011 : should only return plugin directories present in a cordova project dir๏ฟฝ[39m (0.01 sec)
      ๏ฟฝ[32mโˆš Test 012 : should not return ".svn" directories๏ฟฝ[39m (0.008 sec)
      ๏ฟฝ[32mโˆš Test 013 : should not return "CVS" directories๏ฟฝ[39m (0.008 sec)

    preprocessOptions method
      ๏ฟฝ[32mโˆš Test 014 : should throw if called outside of cordova project๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 015 : should throw when no platforms added to project๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 016 : should return default options when no arguments passed๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 017 : should accept single string argument as platform name๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 018 : should accept array of strings as platform names๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 019 : should fall back to installed platform if input doesn't contain platforms list๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 020 : should pick buildConfig if no option is provided, but buildConfig.json exists๏ฟฝ[39m (0.001 sec)

      getPlatformApiFunction
        ๏ฟฝ[32mโˆš Test 030 : successfully find platform Api๏ฟฝ[39m (0.002 sec)

  plugman/platform

    add
      ๏ฟฝ[32mโˆš Test 002 : should error on non existing plugin.xml๏ฟฝ[39m (0.001 sec)

    remove
      ๏ฟฝ[32mโˆš Test 003 : should error on non existing plugin.xml๏ฟฝ[39m (0.001 sec)

  plugman/create
    ๏ฟฝ[32mโˆš Test 002 : should be successful๏ฟฝ[39m (0.03 sec)
    ๏ฟฝ[32mโˆš Test 003 : should fail due to an existing plugin.xml๏ฟฝ[39m (0.001 sec)

  plugman/install

    success
      ๏ฟฝ[32mโˆš Test 002 : should emit a results event with platform-agnostic <info>๏ฟฝ[39m (0.009 sec)
      ๏ฟฝ[32mโˆš Test 003 : should emit a results event with platform-specific <info>๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 004 : should interpolate variables into <info> tags๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 005 : should call fetch if provided plugin cannot be resolved locally๏ฟฝ[39m (0.006 sec)

      engine versions
        ๏ฟฝ[32mโˆš Test 007 : should check version if plugin has engine tag๏ฟฝ[39m (0.011 sec)
        ๏ฟฝ[32mโˆš Test 008 : should check version and munge it a little if it has "rc" in it so it plays nice with semver (introduce a dash in it)๏ฟฝ[39m (0.011 sec)
        ๏ฟฝ[32mโˆš Test 009 : should check specific platform version over cordova version if specified๏ฟฝ[39m (0.012 sec)
        ๏ฟฝ[32mโˆš Test 010 : should check platform sdk version if specified๏ฟฝ[39m (0.012 sec)
        ๏ฟฝ[32mโˆš Test 011 : should check engine versions๏ฟฝ[39m (0.011 sec)
        ๏ฟฝ[32mโˆš Test 012 : should not check custom engine version that is not supported for platform๏ฟฝ[39m (0.011 sec)

      with dependencies
        ๏ฟฝ[32mโˆš Test 015 : should install specific version of dependency๏ฟฝ[39m (0.015 sec)
        ๏ฟฝ[32mโˆš Test 016 : should install any dependent plugins if missing๏ฟฝ[39m (0.018 sec)
        ๏ฟฝ[32mโˆš Test 017 : should install any dependent plugins from registry when url is not defined๏ฟฝ[39m (0.032 sec)
        ๏ฟฝ[32mโˆš Test 018 : should process all dependent plugins with alternate routes to the same plugin๏ฟฝ[39m (0.026 sec)
        ๏ฟฝ[32mโˆš Test 019 : should throw if there is a cyclic dependency๏ฟฝ[39m (0.007 sec)
        ๏ฟฝ[32mโˆš Test 020 : install subdir relative to top level plugin if no fetch meta๏ฟฝ[39m (0.017 sec)
        ๏ฟฝ[32mโˆš Test 021 : install uses meta data (if available) of top level plugin source๏ฟฝ[39m (0.023 sec)

    failure
      ๏ฟฝ[32mโˆš Test 023 : should throw if variables are missing๏ฟฝ[39m (0.012 sec)
      ๏ฟฝ[32mโˆš Test 025 :should not fail when trying to install plugin less than minimum version. Skip instead  ๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 026 : should throw if the engine scriptSrc escapes out of the plugin dir.๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 027 : should throw if a non-default cordova engine platform attribute is not defined.๏ฟฝ[39m (0.005 sec)
      ๏ฟฝ[32mโˆš Test 028 : should throw if a non-default cordova engine scriptSrc attribute is not defined.๏ฟฝ[39m (0.005 sec)

  common platform handler

    resolveSrcPath
      ๏ฟฝ[32mโˆš Test 001 : should not throw if path exists๏ฟฝ[39m (0.003 sec)

    resolveTargetPath
      ๏ฟฝ[32mโˆš Test 002 : should throw if path exists๏ฟฝ[39m (0.002 sec)
      ๏ฟฝ[32mโˆš Test 003 : should not throw if path cannot be resolved๏ฟฝ[39m (0.009 sec)

    copyFile
      ๏ฟฝ[32mโˆš Test 004 : should throw if source path not found๏ฟฝ[39m (0.001 sec)
      ๏ฟฝ[32mโˆš Test 005 : should throw if src not in plugin directory๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 006 : should allow symlink src, if inside plugin๏ฟฝ[39m (0.011 sec)
      ๏ฟฝ[32mโˆš Test 007 : should deeply symlink directory tree when src is a directory๏ฟฝ[39m (0.018 sec)
      ๏ฟฝ[32mโˆš Test 008 : should throw if symlink is linked to a file outside the plugin๏ฟฝ[39m (0.009 sec)
      ๏ฟฝ[32mโˆš Test 009 : should throw if dest is outside the project directory๏ฟฝ[39m (0.01 sec)
      ๏ฟฝ[32mโˆš Test 010 : should call mkdir -p on target path๏ฟฝ[39m (0.01 sec)
      ๏ฟฝ[32mโˆš Test 011 : should call cp source/dest paths๏ฟฝ[39m (0.01 sec)

    copyNewFile
      ๏ฟฝ[32mโˆš Test 012 : should throw if target path exists๏ฟฝ[39m (0.002 sec)

    deleteJava
      ๏ฟฝ[32mโˆš Test 013 : should call fs.unlinkSync on the provided paths๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 014 : should delete empty directories after removing source code in a java src path hierarchy๏ฟฝ[39m (0.004 sec)
      ๏ฟฝ[32mโˆš Test 015 : should never delete the top-level src directory, even if all plugins added were removed๏ฟฝ[39m (0.003 sec)

  dependency module

    generateDependencyInfo method
      ๏ฟฝ[32mโˆš Test 001 : should return a list of top-level plugins based on what is inside a platform.json file๏ฟฝ[39m (0 sec)
      ๏ฟฝ[32mโˆš Test 002 : should return a dependency graph for the plugins๏ฟฝ[39m (0.002 sec)

  mergeVariables
    ๏ฟฝ[32mโˆš use plugin.xml if no cli/config variables๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš cli & config variables take precedence over plugin.xml ๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš should return no variables๏ฟฝ[39m (0.001 sec)
    ๏ฟฝ[32mโˆš should throw error if variables are missing๏ฟฝ[39m (0 sec)

**************************************************
*                    Pending                     *
**************************************************

1) cordova/platform/addHelper happy path (success conditions) after platform api invocation when the restoring option is not provided should invoke preparePlatforms twice (?!?), once before installPluginsForNewPlatforms and once after... ?!
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

2) cordova/plugin/add main method happy path should invoke preparePlatforms if plugman.install returned a falsey value
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

3) cordova/plugin/list should warn if plugin list contains a plugin dependency that does not have a version satisfied
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

4) serve command Test 001 : should not run outside of a Cordova-based project
  ๏ฟฝ[33mNo reason given๏ฟฝ[39m

5) serve command `serve` should fall back to assets/www on Android
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

6) serve command `serve` should fall back to www on BlackBerry10
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

7) serve command `serve` should fall back to www on iOS
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

Executed 293 of 300 specs๏ฟฝ[33m INCOMPLETE๏ฟฝ[39m๏ฟฝ[33m (7 PENDING)๏ฟฝ[39m in 15 secs.

> [email protected] e2e-tests C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib
> jasmine JASMINE_CONFIG_PATH=integration-tests/jasmine.json

Jasmine started

  end-to-end plugin dependency tests
    ๏ฟฝ[31mร— Test 029 : should fail if dependency already installed is wrong version๏ฟฝ[39m (18 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mExpected 'EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-lGgynP\project\plugins\Test1'' to contain 'does not satisfy dependency plugin requirement'.๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 030 : should pass if dependency already installed is wrong version with --force๏ฟฝ[39m (18 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-3kDi9X\project\plugins\Test1'๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 031 : should pass if dependency already installed is same major version (if specific version is specified)๏ฟฝ[39m (16 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-tLhpim\project\plugins\Test1'๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 032 : should handle two plugins with same dependent plugin๏ฟฝ[39m (8 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mexpected C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-4uOc0u\project\plugins\Test2 to exist๏ฟฝ[39m
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mExpected 'EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-4uOc0u\project\plugins\Test1'' to contain 'does not satisfy dependency plugin requirement'.๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 033 : should use a dev version of a dependent plugin if it is already installed๏ฟฝ[39m (31 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-gR3yfn\project\plugins\Test4'๏ฟฝ[39m

  HooksRunner
    ๏ฟฝ[32mโˆš Test 001 : should throw if provided directory is not a cordova project๏ฟฝ[39m (0.338 sec)
    ๏ฟฝ[32mโˆš Test 002 : should not throw if provided directory is a cordova project๏ฟฝ[39m (0.564 sec)

    fire method

      application hooks
        ๏ฟฝ[32mโˆš Test 004 : should execute hook scripts serially๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 005 : should execute hook scripts serially from .cordova/hooks/hook_type and hooks/hook_type directories๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 006 : should execute hook scripts serially from config.xml๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 007 : should execute hook scripts serially from config.xml including platform scripts๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 008 : should filter hook scripts from config.xml by platform๏ฟฝ[39m (1 sec)

      plugin hooks
        ๏ฟฝ[32mโˆš Test 011 : should filter hook scripts from plugin.xml by platform๏ฟฝ[39m (2 secs)
        ๏ฟฝ[33m* Test 012 : should run before_plugin_uninstall, before_plugin_install, after_plugin_install hooks for a plugin being installed with correct opts.plugin context๏ฟฝ[39m

      plugin hooks
        ๏ฟฝ[32mโˆš Test 009 : should execute hook scripts serially from plugin.xml๏ฟฝ[39m (0.638 sec)
        ๏ฟฝ[32mโˆš Test 010 : should execute hook scripts serially from plugin.xml including platform scripts๏ฟฝ[39m (0.948 sec)
        ๏ฟฝ[32mโˆš Test 013 : should not execute the designated hook when --nohooks option specifies the exact hook name๏ฟฝ[39m (0.731 sec)
        ๏ฟฝ[32mโˆš Test 014 : should not execute a set of matched hooks when --nohooks option specifies the hook pattern.๏ฟฝ[39m (0.687 sec)
        ๏ฟฝ[32mโˆš Test 015 : should not execute all hooks when --nohooks option specifies .๏ฟฝ[39m (0.579 sec)

      module-level hooks (event handlers)
        ๏ฟฝ[32mโˆš Test 016 : should fire handlers using cordova.on๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 017 : should pass the project root folder as parameter into the module-level handlers๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 018 : should be able to stop listening to events using cordova.off๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 019 : should execute event listeners serially๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 021 : should pass data object that fire calls into async handlers๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 022 : should pass data object that fire calls into sync handlers๏ฟฝ[39m (1 sec)
        ๏ฟฝ[32mโˆš Test 023 : should error if any script exits with non-zero code๏ฟฝ[39m (0.655 sec)

      ๏ฟฝ[32mโˆš Test 024 : should not error if the hook is unrecognized๏ฟฝ[39m (0.449 sec)

    extractSheBangInterpreter
      ๏ฟฝ[32mโˆš Test 025 : should not read uninitialized buffer contents๏ฟฝ[39m (0.471 sec)

  pkgJson

    plugin end-to-end
      ๏ฟฝ[32mโˆš Test#001 : should successfully add and remove a plugin with save and correct spec๏ฟฝ[39m (13 secs)
      ๏ฟฝ[32mโˆš Test#002 : should NOT add a plugin to package.json if --save is not used๏ฟฝ[39m (30 secs)
      ๏ฟฝ[32mโˆš Test#003 : should NOT remove plugin from package.json if there is no --save๏ฟฝ[39m (15 secs)
      ๏ฟฝ[32mโˆš Test#004 : should successfully add and remove a plugin with variables and save to package.json๏ฟฝ[39m (15 secs)
      ๏ฟฝ[32mโˆš Test#005 : should successfully add and remove multiple plugins with save & fetch๏ฟฝ[39m (27 secs)
      ๏ฟฝ[32mโˆš Test#023 : use pinned/lastest version if there is no platform/plugin version passed in and no platform/plugin versions in pkg.json or config.xml๏ฟฝ[39m (34 secs)
      ๏ฟฝ[31mร— Test#025 : if you add a platform/plugin with local path, pkg.json gets updated๏ฟฝ[39m (23 secs)
        ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-pkgJson-hdlD23\project\plugins\cordova-lib-test-plugin'๏ฟฝ[39m

    platform end-to-end with --save
      ๏ฟฝ[32mโˆš Test#006 : platform is added and removed correctly with --save๏ฟฝ[39m (14 secs)
      ๏ฟฝ[32mโˆš Test#007 : should not remove platforms from package.json when removing without --save๏ฟฝ[39m (26 secs)
      ๏ฟฝ[32mโˆš Test#008 : should not add platform to package.json when adding without --save๏ฟฝ[39m (13 secs)
      ๏ฟฝ[32mโˆš Test#009 : should only add the platform to package.json with --save๏ฟฝ[39m (35 secs)
Subproject Path: CordovaLib
Subproject Path: app
      ๏ฟฝ[32mโˆš Test#010 : two platforms are added and removed correctly with --save --fetch๏ฟฝ[39m (54 secs)

    During add, if pkg.json has a platform/plugin spec, use that one.
      ๏ฟฝ[32mโˆš Test#020 : During add, if pkg.json has a spec, use that one.๏ฟฝ[39m (35 secs)

    During add, if config.xml has a platform/plugin spec and pkg.json does not, use config.
      ๏ฟฝ[32mโˆš Test#021 : If config.xml has a spec (and none was specified and pkg.json does not have one), use config.๏ฟฝ[39m (0.045 sec)

    During add, if add specifies a platform spec, use that one regardless of what is in pkg.json or config.xml
      ๏ฟฝ[32mโˆš Test#022 : when adding with a specific platform version, always use that one.๏ฟฝ[39m (34 secs)

    local path is added to config.xml without pkg.json
      ๏ฟฝ[32mโˆš Test#026 : if you add a platform with local path, config.xml gets updated๏ฟฝ[39m (26 secs)
      ๏ฟฝ[32mโˆš Test#027 : if you add a plugin with local path, config.xml gets updated๏ฟฝ[39m (7 secs)

  cordova/platform end-to-end
    ๏ฟฝ[32mโˆš Test 001 : should successfully run๏ฟฝ[39m (25 secs)
    ๏ฟฝ[31mร— Test 002 : should install plugins correctly while adding platform๏ฟฝ[39m (18 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-cordova-platform-e2e-test-i2drcW\project\plugins\com.phonegap.plugins.childbrowser'๏ฟฝ[39m
    ๏ฟฝ[32mโˆš Test 007 : should add and remove platform from node_modules directory๏ฟฝ[39m (34 secs)
    ๏ฟฝ[32mโˆš Test 008 : should remove dependency when removing parent plugin๏ฟฝ[39m (34 secs)
cp: no such file or directory: C:\Users\Jan\AppData\Local\Temp\cordova-lib-cordova-platform-e2e-test-mMAlto\project\node_modules\cordova-platform-test\node_modules

test-platform:Api:prepare
test-platform:Api:getPlatformInfo
test-platform:Api:prepare
test-platform:Api:getPlatformInfo
    ๏ฟฝ[32mโˆš Test 009 : should add and remove 3rd party platforms๏ฟฝ[39m (18 secs)

  plugin fetching version selection
    ๏ฟฝ[32mโˆš Test 001 : should handle a mix of upper bounds and single versions๏ฟฝ[39m (0.327 sec)
    ๏ฟฝ[32mโˆš Test 002 : should apply upper bound engine constraints when there are no unspecified constraints above the upper bound๏ฟฝ[39m (0.275 sec)
    ๏ฟฝ[32mโˆš Test 003 : should apply upper bound engine constraints when there are unspecified constraints above the upper bound๏ฟฝ[39m (0.272 sec)
    ๏ฟฝ[32mโˆš Test 004 : should handle the case where there are no constraints for earliest releases๏ฟฝ[39m (0.363 sec)
    ๏ฟฝ[32mโˆš Test 005 : should handle the case where the lowest version is unsatisfied๏ฟฝ[39m (0.29 sec)
    ๏ฟฝ[32mโˆš Test 006 : should handle upperbounds if no single version constraints are given๏ฟฝ[39m (0.27 sec)
    ๏ฟฝ[32mโˆš Test 007 : should apply upper bounds greater than highest version๏ฟฝ[39m (0.259 sec)
    ๏ฟฝ[32mโˆš Test 008 : should treat empty constraints as satisfied๏ฟฝ[39m (0.263 sec)
    ๏ฟฝ[32mโˆš Test 009 : should ignore an empty cordovaDependencies entry๏ฟฝ[39m (0.267 sec)
    ๏ฟฝ[32mโˆš Test 010 : should ignore a badly formatted semver range๏ฟฝ[39m (0.254 sec)
    ๏ฟฝ[32mโˆš Test 011 : should respect unreleased versions in constraints๏ฟฝ[39m (0.264 sec)
    ๏ฟฝ[32mโˆš Test 012 : should respect plugin constraints๏ฟฝ[39m (0.269 sec)
    ๏ฟฝ[32mโˆš Test 013 : should respect cordova constraints๏ฟฝ[39m (0.281 sec)
    ๏ฟฝ[32mโˆš Test 014 : should not include pre-release versions๏ฟฝ[39m (0.259 sec)
    ๏ฟฝ[32mโˆš Test 015 : should not fail if there is no engine in the npm info๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš Test 016 : should not fail if there is no cordovaDependencies in the engines๏ฟฝ[39m (0 sec)
    ๏ฟฝ[32mโˆš Test 017 : should handle extra whitespace๏ฟฝ[39m (0.263 sec)
    ๏ฟฝ[32mโˆš Test 018 : should ignore badly typed version requirement entries๏ฟฝ[39m (0.27 sec)
    ๏ฟฝ[32mโˆš Test 019 : should ignore badly typed constraint entries๏ฟฝ[39m (0.29 sec)
    ๏ฟฝ[32mโˆš Test 020 : should ignore bad semver versions๏ฟฝ[39m (0.257 sec)
    ๏ฟฝ[32mโˆš Test 021 : should not fail if there are bad semver versions๏ฟฝ[39m (0.269 sec)
    ๏ฟฝ[32mโˆš Test 022 : should properly warn about multiple unmet requirements๏ฟฝ[39m (0.26 sec)
    ๏ฟฝ[32mโˆš Test 023 : should properly warn about both unmet latest and upper bound requirements๏ฟฝ[39m (0.285 sec)
    ๏ฟฝ[32mโˆš Test 024 : should not warn about versions past latest๏ฟฝ[39m (0.274 sec)
    ๏ฟฝ[32mโˆš Test 025 : clean up after plugin fetch spec๏ฟฝ[39m (0.044 sec)

  plugin end-to-end
    ๏ฟฝ[31mร— Test 001 : should successfully add and remove a plugin with no options๏ฟฝ[39m (9 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 004 : should successfully add a plugin using relative path when running from subdir inside of project๏ฟฝ[39m (8 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 005 : should respect preference default values๏ฟฝ[39m (9 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'๏ฟฝ[39m
    ๏ฟฝ[31mร— Test 006 : should successfully add a plugin when specifying CLI variables๏ฟฝ[39m (9 secs)
      ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'๏ฟฝ[39m
    ๏ฟฝ[32mโˆš Test 007 : should not check npm info when using the searchpath flag๏ฟฝ[39m (2 secs)
    ๏ฟฝ[32mโˆš Test 008 : should not check npm info when using the noregistry flag๏ฟฝ[39m (2 secs)
    ๏ฟฝ[32mโˆš Test 009 : should not check npm info when fetching from a Git repository๏ฟฝ[39m (24 secs)
    ๏ฟฝ[32mโˆš Test 010 : should select the plugin version based on npm info when fetching from npm๏ฟฝ[39m (4 secs)
    ๏ฟฝ[32mโˆš Test 011 : should handle scoped npm packages๏ฟฝ[39m (2 secs)
    ๏ฟฝ[32mโˆš Test 012 : should handle scoped npm packages with given version tags๏ฟฝ[39m (2 secs)

  fetch

    plugin in a dir with spaces
      ๏ฟฝ[33m* should copy locally-available plugin to plugins directory when spaces in path๏ฟฝ[39m

    local plugins
      ๏ฟฝ[32mโˆš Test 001 : should copy locally-available plugin to plugins directory๏ฟฝ[39m (0.056 sec)
      ๏ฟฝ[32mโˆš Test 002 : should copy locally-available plugin to plugins directory when adding a plugin with searchpath argument๏ฟฝ[39m (0.106 sec)
      ๏ฟฝ[32mโˆš Test 003 : should create a symlink if used with `link` param๏ฟฝ[39m (0.016 sec)
      ๏ฟฝ[32mโˆš Test 004 : should fail when the expected ID doesn't match๏ฟฝ[39m (0.04 sec)
      ๏ฟฝ[32mโˆš Test 005 : should succeed when the expected ID is correct๏ฟฝ[39m (0.059 sec)
      ๏ฟฝ[32mโˆš Test 006 : should fail when the expected ID with version specified doesn't match๏ฟฝ[39m (0.065 sec)
      ๏ฟฝ[32mโˆš Test 007 : should succeed when the plugin version specified is correct๏ฟฝ[39m (0.056 sec)
      ๏ฟฝ[32mโˆš Test 027 : should copy locally-available plugin to plugins directory๏ฟฝ[39m (0.022 sec)
      ๏ฟฝ[32mโˆš Test 028 : should fail when locally-available plugin is missing pacakge.json๏ฟฝ[39m (0.003 sec)

    fetch recursive error CB-8809
      ๏ฟฝ[32mโˆš Test 021 : should skip copy to avoid recursive error๏ฟฝ[39m (0.005 sec)

  plugman/uninstall

    uninstallPlatform

      success
        ๏ฟฝ[32mโˆš Test 002 : should get PlatformApi instance for platform and invoke its' removePlugin method๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 003 : should return propagate value returned by PlatformApi removePlugin method๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 014 : should uninstall dependent plugins๏ฟฝ[39m (2 secs)

      failure 
        ๏ฟฝ[32mโˆš Test 004 : should throw if platform is unrecognized๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 005 : should throw if plugin is missing๏ฟฝ[39m (2 secs)

    uninstallPlugin

      with dependencies
        ๏ฟฝ[32mโˆš Test 006 : should delete all dependent plugins๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 007 : should fail if plugin is a required dependency๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 008 : allow forcefully removing a plugin๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 009 : never remove top level plugins if they are a dependency๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 010 : should not remove dependent plugin if it was installed after as top-level๏ฟฝ[39m (2 secs)

    uninstall

      failure
        ๏ฟฝ[32mโˆš Test 011 : should throw if platform is unrecognized๏ฟฝ[39m (2 secs)
        ๏ฟฝ[32mโˆš Test 012 : should throw if plugin is missing๏ฟฝ[39m (2 secs)

    end
      ๏ฟฝ[32mโˆš Test 013 : end๏ฟฝ[39m (3 secs)

**************************************************
*                    Failures                    *
**************************************************

1) end-to-end plugin dependency tests Test 029 : should fail if dependency already installed is wrong version
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mExpected 'EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-lGgynP\project\plugins\Test1'' to contain 'does not satisfy dependency plugin requirement'.๏ฟฝ[39m
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\integration-tests\fetch.spec.js:77:37
      at process._tickCallback (internal/process/next_tick.js:68:7)

2) end-to-end plugin dependency tests Test 030 : should pass if dependency already installed is wrong version with --force
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-3kDi9X\project\plugins\Test1'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-3kDi9X\project\plugins\Test1'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:883:30
      at Promise.promise.promiseDispatch (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:816:13)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:877:14
      at runSingle (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:137:13)
      at flush (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:125:13)

3) end-to-end plugin dependency tests Test 031 : should pass if dependency already installed is same major version (if specific version is specified)
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-tLhpim\project\plugins\Test1'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-tLhpim\project\plugins\Test1'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:883:30
      at Promise.promise.promiseDispatch (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:816:13)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:877:14
      at runSingle (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:137:13)
      at flush (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:125:13)

4) end-to-end plugin dependency tests Test 032 : should handle two plugins with same dependent plugin
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mexpected C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-4uOc0u\project\plugins\Test2 to exist๏ฟฝ[39m
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\integration-tests\fetch.spec.js:126:56
      at process._tickCallback (internal/process/next_tick.js:68:7)
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mExpected 'EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-4uOc0u\project\plugins\Test1'' to contain 'does not satisfy dependency plugin requirement'.๏ฟฝ[39m
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\integration-tests\fetch.spec.js:128:37
      at process._tickCallback (internal/process/next_tick.js:68:7)

5) end-to-end plugin dependency tests Test 033 : should use a dev version of a dependent plugin if it is already installed
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-gR3yfn\project\plugins\Test4'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_dependency_test-gR3yfn\project\plugins\Test4'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:883:30
      at Promise.promise.promiseDispatch (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:816:13)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:877:14
      at runSingle (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:137:13)
      at flush (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:125:13)

6) pkgJson plugin end-to-end Test#025 : if you add a platform/plugin with local path, pkg.json gets updated
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-pkgJson-hdlD23\project\plugins\cordova-lib-test-plugin'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-pkgJson-hdlD23\project\plugins\cordova-lib-test-plugin'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:883:30
      at Promise.promise.promiseDispatch (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:816:13)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:877:14
      at runSingle (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:137:13)
      at flush (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:125:13)

7) cordova/platform end-to-end Test 002 : should install plugins correctly while adding platform
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-cordova-platform-e2e-test-i2drcW\project\plugins\com.phonegap.plugins.childbrowser'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-cordova-platform-e2e-test-i2drcW\project\plugins\com.phonegap.plugins.childbrowser'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:883:30
      at Promise.promise.promiseDispatch (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:816:13)
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:877:14
      at runSingle (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:137:13)
      at flush (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:125:13)

8) plugin end-to-end Test 001 : should successfully add and remove a plugin with no options
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)

9) plugin end-to-end Test 004 : should successfully add a plugin using relative path when running from subdir inside of project
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.apache.cordova.fakeplugin1'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)

10) plugin end-to-end Test 005 : should respect preference default values
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)

11) plugin end-to-end Test 006 : should successfully add a plugin when specifying CLI variables
  ๏ฟฝ[31m- ๏ฟฝ[39m๏ฟฝ[31mError: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'๏ฟฝ[39m
  Error: EPERM: operation not permitted, stat 'C:\Users\Jan\AppData\Local\Temp\cordova-lib-plugin_test-v8zjBR\project\plugins\org.test.defaultvariables'
      at Object.realpathSync (fs.js:1453:9)
      at Object.convertToRealPathSafe (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\cordova\util.js:192:19)
      at Function.runInstall (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:263:30)
      at <Jasmine>
      at C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\src\plugman\install.js:78:35
      at _fulfilled (C:\Projects\experiments\cordova-cross-spawn-test\cordova-lib\node_modules\q\q.js:854:54)

**************************************************
*                    Pending                     *
**************************************************

1) HooksRunner fire method plugin hooks Test 012 : should run before_plugin_uninstall, before_plugin_install, after_plugin_install hooks for a plugin being installed with correct opts.plugin context
  ๏ฟฝ[33mTemporarily disabled with xit๏ฟฝ[39m

2) fetch plugin in a dir with spaces should copy locally-available plugin to plugins directory when spaces in path
  ๏ฟฝ[33mNo reason given๏ฟฝ[39m

Executed 107 of 109 specs๏ฟฝ[31m (11 FAILED)๏ฟฝ[39m๏ฟฝ[33m (2 PENDING)๏ฟฝ[39m in 12 mins 57 secs.

discovered via raphinesse/cordova-cross-spawn-test#2

`cordovaDependencies` check fails if installed dependency has a matching pre-release version

Bug Report

Problem

cordova plugin add ... errors and installs older plugin version even though the requirements of the plugin are met just fine.

What is expected to happen?

I can install the plugin.

What does actually happen?

E:\Projects\throwaway
ฮป cordova create cordovaLibRepro
Creating a new cordova project.

E:\Projects\throwaway
ฮป cd cordovaLibRepro\

E:\Projects\throwaway\cordovaLibRepro  (helloworld@1.0.0)
ฮป cordova platform add https://github.com/apache/cordova-windows
Using cordova-fetch for https://github.com/apache/cordova-windows
Warning: using prerelease platform windows@7.1.0-dev.
Use 'cordova platform add windows@latest' to add the latest published version instead.
Adding windows project...
Creating Cordova Windows Project:
        Path: platforms\windows
        Namespace: io.cordova.hellocordova
        Name: HelloCordova
Windows project created with cordova-windows@7.1.0-dev
Installing "cordova-plugin-whitelist" for windows

E:\Projects\throwaway\cordovaLibRepro  (helloworld@1.0.0)
ฮป cordova plugin add cordova-plugin-splashscreen
Unmet project requirements for latest version of cordova-plugin-splashscreen:
    cordova-windows (7.1.0-dev in project, >=4.4.0 required)
Fetching highest version of cordova-plugin-splashscreen that this project supports: 3.2.2 (latest is 5.0.3)
Installing "cordova-plugin-splashscreen" for windows
Adding cordova-plugin-splashscreen to package.json

The -dev suffix of cordova-windows master seems to confuse the comparison logic, but it shouldn't as this is valid semver for a prerelease version: https://semver.org/#spec-item-9

Information

Relevant bit of the plugin package.json:
https://github.com/apache/cordova-plugin-splashscreen/blob/be85a1b14e69696b6c0355c754181c8d57d0837f/package.json#L30-L44

Version information

9.0.0 ([email protected])

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Strange errors during HooksRunner.spec on Windows/Node 6

There's a strange recurring error that occurs on various tests of HooksRunner.spec only on AppVeyor/Node 6. The first error message is usually '๏ฟฝW@@H๏ฟฝ๏ฟฝ' is not recognized as an internal or external command, operable program or batch file. The first string varies.

It turns out this is caused by faulty shebang detection. The below part of extractSheBangInterpreter will try to read 4 KiB into an uninitialized buffer. It then disregards the number of bytes read and transforms the whole buffer contents to a string. If, for whatever reason, fs.readSync should return 0 and the first two bytes of the buffer happen to be #! then the code would detect a garbage shebang and above error would occur.

fileData = new Buffer(4096); // eslint-disable-line
octetsRead = fs.readSync(hookFd, fileData, 0, 4096, 0);
fileChunk = fileData.toString();

Side note: great example of why it is bad to ignore linter warnings.

fs related tests sometimes fail

Whenever I run the test suite of this module, I see random failures relating to somedir:

1) util module isCordova method Test 001 : should return false if it hits the home directory
  Message:
    Error: EPERM: operation not permitted, mkdir 'C:\Users\Oliver\somedir'
  Stack:
    error properties: Object({ errno: -4048, code: 'EPERM', syscall: 'mkdir', path: 'C:\Users\Oliver\somedir' })
    Error: EPERM: operation not permitted, mkdir 'C:\Users\Oliver\somedir'
        at Object.fs.mkdirSync (fs.js:885:18)
        at Object.mkdirsSync (P:\cordova-cross-spawn-test\cordova-lib\node_modules\fs-extra\lib\mkdirs\mkdirs-sync.js:31:9)
        at UserContext.<anonymous> (P:\cordova-cross-spawn-test\cordova-lib\spec\cordova\util.spec.js:43:16)
        at <Jasmine>
        at runCallback (timers.js:789:20)

I believe that this behavior is specific to Windows and happens when the directory is created and deleted repeatedly.

Ionic 2 build process output steps description is encrypted

Hi,
For a while now we have encounter a problem while running ionic build android.
Previously, the steps of the build process showed exactly what phase he was in.
Now, the steps are encrypted/Hexa.

Encrypted build

instead of:

regular build

For some reason the output is encrypted, and run for hours or getting stuck without ending. build goes forever.

Additionally, our network is behind a proxy server.

ionic Info:

ordova CLI: 8.1.1 ([email protected])
Ionic Framework Version: 2.0.0-rc.4
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.0.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 10
Node Version: v7.8.0
Xcode version: Not installed

Any suggetions?

add and run platform commands

Issue Type

  • Bug Report
  • Feature Request
  • Support Question

Description

  1. Trying to use "ionic cordova run ios" and receiving error
  2. Trying to use "ionic cordova platform add ios" and receiving error

Information

  1. Error received:
> cordova platform add ios --save
Using cordova-fetch for cordova-ios@^5.0.0
Adding ios project...
Creating Cordova project for the iOS platform:
        Path: platforms/ios
        Package: com.jft.whiskerpaws
        Name: Whisker+Paw
iOS project created with [email protected]
Cannot find plugin.xml for plugin "cordova-plugin-add-swift-support". Please try adding it again.
[ERROR] An error occurred while running subprocess cordova.
        
        cordova platform add ios --save exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.

Is this because of this commit?

  1. Error received:
Finding scripts for "before_plugin_install" hook from plugin cordova-plugin-filepicker on ios platform only.
No scripts found for hook "before_plugin_install".
Install start for "cordova-plugin-filepicker" on ios.
Beginning processing of action stack for ios project...
Action stack processing complete.
pods.json found in platforms/ios
Podfile found in platforms/ios
Install complete for cordova-plugin-filepicker on ios.
Finding scripts for "after_plugin_install" hook from plugin cordova-plugin-filepicker on ios platform only.
Executing script found in plugin cordova-plugin-filepicker for hook "after_plugin_install": plugins/cordova-plugin-filepicker/src/ios/hooks/install_entitlements.js
Running hook to add iCloud entitlements
Failed to install 'cordova-plugin-filepicker': CordovaError: Using "requireCordovaModule" to load non-cordova module "xcode" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
    at module.exports (/Users/dev/Documents/w+p/whisker-paw-mobile/plugins/cordova-plugin-filepicker/src/ios/hooks/install_entitlements.js:8:23)
    at runScriptViaModuleLoader (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at process._tickCallback (internal/process/next_tick.js:68:7)
CordovaError: Using "requireCordovaModule" to load non-cordova module "xcode" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
    at Context.requireCordovaModule (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/Context.js:57:15)
    at module.exports (/Users/dev/Documents/w+p/whisker-paw-mobile/plugins/cordova-plugin-filepicker/src/ios/hooks/install_entitlements.js:8:23)
    at runScriptViaModuleLoader (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /Users/dev/.npm-global/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at process._tickCallback (internal/process/next_tick.js:68:7)
Using "requireCordovaModule" to load non-cordova module "xcode" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
[ERROR] An error occurred while running subprocess cordova.
        
        cordova platform add ios --verbose --save exited with exit code 1.
        
        Re-running this command with the --verbose flag may provide more information.
  ionic:utils-process onBeforeExit handler: process.exit received +0ms
  ionic:utils-process onBeforeExit handler: running 1 functions +0ms
  ionic:utils-process onBeforeExit handler: exiting (exit code 1) +148ms

Command or Code

  1. ionic cordova run ios
  2. ionic cordova platform add ios

Environment, Platform, Device

macOS High Sierra
Version 10.13.6
Processor 2.2 GHz Intel Core i7

Version information

Full output from command cordova info here

Checklist

  • I searched for already existing GitHub issues about this
  • I updated all Cordova tooling to their most recent version
  • I included all the necessary information above

user specified override for config.xml

Version info is specified in config.xml. In our build process this is ephemeral data [based on git tags]. Config.xml however cannot be ephemeral as it also contains things such as tags.

It would be nice if we could provide explicit values for things such as android-versionCode on cordova prepare. Given that that particular field doesnt even have meaning beyond one platform I expect the cleanest way to do something would be to allow cordova prepare to specify the location of config.xml.

cordova prepare --config=config.tmp.xml

It looks like https://github.com/apache/cordova-lib/blob/master/src/cordova/util.js#L263 is the place that would have to be modified.

Version check broken on non-Windows-OS

Bug Report

Problem

Originally reported at apache/cordova#52

What is expected to happen?

No errors emitted during cordova prepare

What does actually happen?

Cordova throws an ENOENT error, most likely due to an invalid escaping strategy on a path.

Information

Installing "cordova-plugin-camera" for android
Running command: /builds/fairmanager/mobile2/platforms/android/cordova/version 
Command finished with error code 0: /builds/fairmanager/mobile2/platforms/android/cordova/version 
Running command: "/builds/fairmanager/mobile2/platforms/android/cordova/version" 
Command finished with error code ENOENT: "/builds/fairmanager/mobile2/platforms/android/cordova/version" 

I assume that this is caused by unconditionally wrapping the path in quotes here: https://github.com/apache/cordova-lib/blob/master/src/plugman/install.js#L168

I assume this is a leftover from when the shell was used to check for the path existence. It has no benefit here in any scenario that I can imagine.

Command or Code

cordova prepare --verbose

Environment, Platform, Device

Linux

Version information

[email protected]

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

symlink is used when adding local plugin in windows

When we add local plugin as

cordova plugin add /path/to/local_plugin/

in windows environment, a symlink is created.

I feel that a junction should be created. Becuase npm command creates a junction in windows.

My question is that symlink in windows is ok?

I checked this by using cordova-cli 8.1.x in github with [email protected] in npm.

> ..\cordova-cli\bin\cordova.cmd -v
8.0.1-dev ([email protected])
>  ..\cordova-cli\bin\cordova.cmd plugin add ..\..\plugins\cordova-plugin-camera

The result is following. (Here I add cordova-plugin-camera downloaded to my local PC)

> dir node_modules
2018/09/20  18:36    <DIR>          .
2018/09/20  18:36    <DIR>          ..
2018/09/20  18:36    <JUNCTION>     cordova-plugin-camera [C:\Users\knaito\Documents\work\cordova\plugins\cordova-plugin-camera]

The node_module is junction pointing to the original directory. (This is ok)

> dir plugins
2018/09/20  18:36    <DIR>          .
2018/09/20  18:36    <DIR>          ..
2018/09/20  18:36    <SYMLINK>      cordova-plugin-camera [C:\Users\knaito\Documents\work\cordova\plugins\cordova-plugin-camera\]
2018/09/20  18:36               241 fetch.json

The plugin is symlink pointing to the original directory. (Is this ok?)

cordova 9.0.0 plugin add not saving plugin in dependency list

Bug Report

Problem

What is expected to happen?

{
  "devDependencies": {
    "cordova-plugin-whitelist": "1.3.4"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {}
    },
    "platforms": [
      "ios",
      "android"
    ]
  },
  "dependencies": {
    "cordova-android": "8.0.0",
    "cordova-ios": "5.0.1",
    "cordova-plugin-device": "a.b.c" <<<<<<<<<<<<<<< I need this line
  }
}

What does actually happen?

  • add plugin
cordova plugins add cordova-plugin-device --save
  • open package.json
{
  "devDependencies": {
    "cordova-plugin-whitelist": "1.3.4"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-device": {}
    },
    "platforms": [
      "ios",
      "android"
    ]
  },
  "dependencies": {
    "cordova-android": "8.0.0",
    "cordova-ios": "5.0.1"  <<<<<<<<< missed  "cordova-plugin-device": "a.b.c"
  }
}

Information

[email protected] with:
  [email protected]
  [email protected]
  [email protected]
  [email protected]

Environment: 
  OS: darwin
  Node: v10.16.0
  npm: 6.9.0

plugin.xml <dependency> tag commit attribute doesn't work as documented for branches

Bug Report

Problem

The documentation on how to use plugin.xml dependency tag does not match usage.
Either there is a bug in cordova-lib or the documentation is incorrect.

Here is the documentation:
image

What is expected to happen?

When installing a plugin that has this dependency tag in plugin.xml:

<dependency id="cordova-plugin-ionic-webview" url="https://github.com/miloproductionsinc/cordova-plugin-ionic-webview.git" commit="2.x-custom" />

I expect that most recent version on branch 2.x-custom should be retrieved.

What does actually happen?

Instead it seems to ignore the commit attribute and fetches the master branch. Here is the log:

Plugin dependency "cordova-plugin-ionic-webview" not fetched, retrieving then installing.
fetch: Installing https://github.com/miloproductionsinc/cordova-plugin-ionic-webview.git to S:\Projects\MiloProductions\hello
Running command: npm install https://github.com/miloproductionsinc/cordova-plugin-ionic-webview.git --production --save

Information

Interestingly, this does produce the desired result:

<dependency id="cordova-plugin-ionic-webview" url="https://github.com/miloproductionsinc/cordova-plugin-ionic-webview.git#2.x-custom" />

Environment, Platform, Device

windows building android
mac building ios

Version information

cordova 9.0.0
cordova-lib 9.0.1

Any plugin with this type of dependancy should demonstrate this problem, but in this case, my examples are retrieving:

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Flaky tests

The tests have been unreliable, especially e2e-tests and especially on CI.

Since this issue is long-running, with no single point of failure or single fix, it should act as a meta-marker for related issues and PRs and a place to collect and document observed failures for later reference.

Related: #619, #623, #626, #628, #629, #633, #634, #635, #636, #639, #640, #641, #665

Open items

  • CI-1: Faulty promise handling in plugman.uninstall (#759)
  • CI-2: integration-tests/platform.spec.js:260:15 (assuming as fixed by switch to fs-extra)
  • CI-3: Timeout in integration-tests/platform.spec.js:263 (#679)
  • CI-4: Super strange failure in integration-tests/HooksRunner.spec.js (#653)
  • CI-5: Error while running npm in pkgJson test 025
  • Re-do fixes from #636 that are unrelated to Jasmine update (#677)
  • Investigate requireNoCache. I observed it failing to return fresh instances in combination with symlinks. We should use fs.readJsonSync where possible (#644)

Output Cordova CLI version in `cordova info`

Currently cordova info can only output the version of cordova-lib, not Cordova CLI:
#616 (review)

Although CLI and -lib are kept at the same version number (as I understood it), better make sure to also output the real CLI version in the output and add a cordova-lib entry below.

Limit `requireCordovaModule` to Cordova modules

The Context

The context provided to hooks has a method called requireCordovaModule.

/**
* Returns a required module
* @param {String} modulePath Module path
* @returns {Object} */
Context.prototype.requireCordovaModule = function (modulePath) {
// There is a very common mistake, when hook requires some cordova functionality
// using 'cordova-lib/...' path.
// This path will be resolved only when running cordova from 'normal' installation
// (without symlinked modules). If cordova-lib linked to cordova-cli this path is
// never resolved, so hook fails with 'Error: Cannot find module 'cordova-lib''
var resolvedPath = path.resolve(__dirname, modulePath.replace(/^cordova-lib/, '../../../cordova-lib'));
var relativePath = path.relative(__dirname, resolvedPath).replace(/\\/g, '/');
events.emit('verbose', 'Resolving module name for ' + modulePath + ' => ' + relativePath);
var compatRequire = compatMap[relativePath];
if (compatRequire) {
events.emit('warn', 'The module "' + path.basename(relativePath) + '" has been factored ' +
'into "cordova-common". Consider update your plugin hooks.');
return compatRequire();
}
return require(relativePath);
};

The apparent purpose of this method is to allow users to require modules of the exact version of Cordova that is running the hook. I guess that makes some sense, given how we currently use the Node module system to provide singletons.

The Problem

However, this method conceptually leaks all internals of cordova-lib, including any of its dependencies, to the hooks context. In fact, the only documentation on this method even encourages users to use it to require Q, which we could break, if we removed Q from our dependencies as part of #681. I can see how this might have seemed like a great idea when promises weren't available in native JS, but that has thankfully changed now.

The Solution

I suggest we limit the modules allowed to import using Context.prototype.requireCordovaModule to a fixed whitelist containing only cordova-* dependencies of cordova-lib and cordova-lib itself.

As a first step, we should only issue a deprecation warning if anything not on the whitelist is required.

As an additional safety measure, we might warn users about using private interfaces when they deep-require something (like require('cordova-lib/src/hooks/Context') for example).

What do you think? I'm looking forward to your feedback.

Unable to add platforms (npm: Command failed with exit code 1)

Bug Report

Problem

What is expected to happen?

The platform would be added.

What does actually happen?

gist

Information

The package is downloaded by npm successfully as far as I can tell, doing the npm command by hand goes fine without issues.

Command or Code

$ snap install node --channel=11 --classic
$ cordova create . com.example.helloworld "HelloWorld"
$ npx cordova platform add android --verbose

Environment, Platform, Device

Ubuntu 18.04.2, Linux, x86 Computer

Version information

cordova -v: 8.1.2 ([email protected])
npm -v: 8.6.0
node -v: v11.10.0 (snap nodesource/11)
Ubuntu 18.04.02

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Support Tizen operating system in Cordova CLI

Dear Cordova Community,
I am engineer working in Samsung R&D Center and developer of Web Device API of Tizen. I would like to encourage you to join the discussion about supporting Tizen as one of available platforms in Cordova CLI.

The main goal of such extension is to wider the market for Cordova application developers, who could easily deploy application to the next platform - Tizen. As I did some research that to support 'tizen' in CLI there is a need to update several packages on git e.g.:

  • cordova-lib
  • cordova-serve
  • cordova-tizen
    and the changes rather need to be done at the same time in all of them (the procedure of adding such related changes is not known to me, I did not find any clues about that).

The huge plan is also adding Tizen-specific implementation for most common Cordova plugins.

Unfortunately, I didn't find any detailed information about supporting new platform in Cordova (probably it is not very popular case), so I would like to discuss it here and gather all comments from you - more experienced Cordova developers.

Could you please share your thoughts and suggestions of the best ways of adding Tizen platform to Cordova?

Platform information in `cordova info`

Could there be a "Platforms:" section similar to "Plugins" or "Environment" (with version info) before the platform details (getPlatformInfo) are output that outputs just a list of installed platforms and the installed version?

e2e test of pkg.json update for local path fails on AppVeyor CI

Bug Report

Problem

The end-to-end test of pkg.json update for local path fails on AppVeyor CI on Node.js version 10. The failing test is in the following function:

// Test#025: has a pkg.json. Checks if local path is added to pkg.json for platform and plugin add.
it('Test#025 : if you add a platform/plugin with local path, pkg.json gets updated', function () {
const PLATFORM = 'browser';
const PLUGIN = 'cordova-lib-test-plugin';
const platformPath = copyFixture(`platforms/cordova-${PLATFORM}`);
const pluginPath = copyFixture(path.join('plugins', PLUGIN));
return cordova.platform('add', platformPath, { save: true })
.then(function () {
// Pkg.json has platform
expect(getPkgJson('cordova.platforms')).toEqual([PLATFORM]);
expect(getPkgJson(`dependencies.cordova-${PLATFORM}`)).toBeDefined();
}).then(function () {
// Run cordova plugin add local path --save --fetch.
return cordova.plugin('add', pluginPath, { save: true });
}).then(function () {
// Pkg.json has test plugin.
expect(getPkgJson(`cordova.plugins.${PLUGIN}`)).toBeDefined();
expect(getPkgJson(`dependencies.${PLUGIN}`)).toBeDefined();
});
});
});

The proposed workaround in PR #786 is to skip this test on Windows.

The correct solution is to investigate why this test fails on AppVeyor CI on Node.js 10 and resolve the underlying cause.

I am raising this issue as asked by @janpio in #786 (comment).

What is expected to happen?

This end-to-end test succeeds on AppVeyor CI on all supported Node.js versions.

What does actually happen?

This end-to-end test fails on AppVeyor CI on Node.js version 10.

Information

In https://github.com/apache/cordova-lib/commits/master we can see that the build failed on 268688a - the failure is on AppVeyor CI on Node.js version 10.

This build failure appeared when I raised and then merged PR #783. Unfortunately I did not see the failure before merging that PR.

I tried raising PR #785 to revert PR #783, but reverting PR #783 does not seem to resolve this test failure.

Command or Code

See appveyor.yml: the following command seems to reproduce this failure on AppVeyor CI: npm test

Environment, Platform, Device

Windows server on AppVeyor CI

Version information

See package.json:

  • cordova-common@3
  • cordova-create@2
  • cordova-fetch@2
  • cordova-serve@2

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

cordova prepare not resolving platform specification correctly for devDependency

Bug Report

Problem

when running cordova prepare for a project with a platform as a devDependency in the package.json, the version is not discovered correctly.

The manual moving of the platform from dependencies to devDependencies is suggested by the verbose logging of cordova-fetch and issues apache/cordova-fetch#64 and apache/cordova-electron#88.

And the changes from pull request apache/cordova-fetch#65 will result in the platforms being added to devDependencies by default.

What is expected to #happen?

With

"dependencies": {
},
"devDependencies": {
    "cordova-electron": "^1.1.1"
},

running cordova prepare after removing platforms, should fetch cordova-electron ^1.1.1
expected console log (this occurs if the platform is in dependencies):

Discovered platform "electron@^1.1.1" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-electron@^1.1.1

What does actually happen?

instead, this tries to fetch cordova-electron ^1.0.0
actual console log:

Discovered platform "electron" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-electron@^1.0.0

Information

This seems to be a result of an if else construct the addHelper.js
https://github.com/apache/cordova-lib/blob/master/src/cordova/platform/addHelper.js#L96-L108
It looks like this finds an empty dependencies object, and then does not subsequently check the devDependencies object contents at all.

Command or Code

reproduction method: (courtesy of @erisu )

cordova create electronTest
cd electronTest/
$ cordova platform add electron
Using cordova-fetch for cordova-electron@^1.0.0

$ cordova prepare
[Cordova Electron] The built package size may be larger than necessary. Please run with --verbose for more details.

rm -rf platforms

$ cordova prepare
Discovered platform "electron@^1.1.1" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-electron@^1.1.1

rm -rf platforms

vi package.json
/// HERE I am moving to devDependencies

$ cordova prepare
Discovered platform "electron" in config.xml or package.json. Adding it to the project
Using cordova-fetch for cordova-electron@^1.0.0

Environment, Platform, Device

Running on Windows 7

Version information

Cordova 9.0.0 ([email protected])

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Better support for local plugin development

Our app has a few local plugins, and I'm the app-backend developer for our team. I haven't found a great way for our team to keep our plugins up-to-date.

I've used hooks to remove and add these plugins automatically, but the plugin spec tends to get corrupted with this approach. For example, this call:
cordova plugin add --force file:local_plugins/com.rsginc.mobilesurvey
sets the plugin spec to
<plugin name="com.rsginc.mobilesurvey" spec="~1.0.0" />
which isn't a local file spec...

My current approach is to have everyone on my team use the --link option to add these plugins, which works for some changes, but breaks when new source files are added - they don't get copied over.

My thought was that adding versioning to the local file spec could fix this - new versions could be picked up when the source code is updated (and the version is updated in the plugin's package.json) without the need for workarounds like re-adding the plugins or linking them. Admittedly, I'm just a cordova user without a good view into everything that's available, so this might be a naive approach.

... and if there's already a way to handle what I'm trying to do, please let me know.

platformsConfig.json links to old/broken git repositories via `url`

"url": "https://git-wip-us.apache.org/repos/asf?p=cordova-ios.git",
"version": "~4.5.4",
"apiCompatibleSince": "4.0.0",
"deprecated": false
},
"osx": {
"hostos": ["darwin"],
"url": "https://git-wip-us.apache.org/repos/asf?p=cordova-osx.git",
"version": "~4.0.1",
"apiCompatibleSince": "4.0.1",
"deprecated": false
},
"android": {
"url": "https://git-wip-us.apache.org/repos/asf?p=cordova-android.git",
"version": "~7.1.1",
"apiCompatibleSince": "5.0.0",
"deprecated": false
},
"windows": {
"hostos": ["win32"],
"url": "https://git-wip-us.apache.org/repos/asf?p=cordova-windows.git",
"version": "~6.0.0",
"apiCompatibleSince": "4.3.0",
"deprecated": false
},
"browser": {
"parser_file": "../cordova/metadata/browser_parser",
"handler_file": "../plugman/platforms/browser",
"url": "https://git-wip-us.apache.org/repos/asf?p=cordova-browser.git",

these urls don't work any more.
Are they not needed or used anywhere and can be removed maybe?

Avoid and investigate requireNoCache

Investigate requireNoCache. I observed it failing to return fresh instances in combination with symlinks. We should use fs.readJsonSync where possible.

cordova 9.0.0 plugin add not saving to config.xml

Bug Report

Problem

What is expected to happen?

config.xml to be added <plugin name="cordova-plugin-whatever" spec="^1.0.0" />

What does actually happen?

config.xml not updated

Information

After doing cordova plugin add cordova-plugin-whatever the plugin is added to the project and builds properly but the config.xml at root of project is not updated (it is not plugin dependent, hence "whatever")

Command or Code

cordova plugin add cordova-plugin-whatever

Environment, Platform, Device

cordova-lib 9.0.0
cordova-android 7.1.4
windows 10

Checklist

  • [x ] I searched for existing GitHub issues
  • [x ] I updated all Cordova tooling to most recent version
  • [x ] I included all the necessary information above

Cordova does not support subfolders, when using semver

Bug Report

I get "Error: Cordova does not support subdirectories" when a plugin is installed.

Discovered saved plugin "project". Adding it to the project
Failed to restore plugin "project" from config.xml. You might need to try adding it again. Error: Cordova does not support subdirectories

Problem

The plugin is in package.json, according to correct syntax:

"dependencies": {
    "project": "https://bitbucket.org/project.git#semver:~0.1.1"
}

And in config.xml:

<plugin name="project" />

What does actually happen?

I get the subfolder error because cordova is confused by the ":".
The comment in src/plugman/fetch.js::57, seems to hit the nail on the head

// If the hash exists, it has the form from npm: http://foo.com/bar#git-ref[:subdir]

So the ":" implies that a subfolder should be used, but in this case it is indicating to npm to use semver to resolve.

What is expected to happen?

I was expecting cordova to understand semver

Funny detail

In plugins it is possible to use semver. That is, the plugin.xml depends on a module from npm that has a similar url with a ":", but in that context it works just fine.
Only visible difference is that one file is plugin.xml while the other is config.xml.

Information

Command or Code

NA

Environment, Platform, Device

NA

Version information

Cordova 9.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Use up-to-date fixtures in tests

Some of our automated tests use project fixtures. A lot of those are outdated. For example, some of those tests use project fixtures that have outdated cordova-android versions with bundled dependencies installed. Running our tests against these outdated fixtures does not reflect real-world usage.

Instead, a project as created by the currently running version of Cordova should be used.

CC @erisu

`npm test` fails on macOS

See https://dev.azure.com/apache-cordova/cordova-lib/_build/results?buildId=4&view=logs

โœ— Test 002 : should get PlatformApi instance for platform and invoke its' removePlugin method (0.623 sec)
- Expected spy getPlatformApi to have been called with [ 'android', '/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cordova-lib-plugman_uninstall_test-mCd81G/project' ] but actual calls were [ 'android', '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/cordova-lib-plugman_uninstall_test-mCd81G/project' ]

Remove `browserify` parameter/command

This was previously discussed that this parameter/command was never fully implemented or used, so it can safely be removed.

Side effect:
This will also remove the dependency to cordova-js in cordova-lib (if I didn't miss anything).

Remove `plugin save`

Feature Request

Motivation Behind Feature

As the platform save command have been deprecated and removed, the plugin save command is also no longer required for the same following reasons that were applied to the platform save deprecation.

Background: https://issues.apache.org/jira/browse/CB-13057

This ticket is the follow up of #778. This will contain the removal of code.

Feature Description

Removes plugin save

App Preferences Plugin Install Error

When installing the app-preferences plugin the following error occures:

Installing "cordova-plugin-app-preferences" for android
Failed to install 'cordova-plugin-app-preferences': CordovaError: Using "requireCordovaModule" to load non-cordova module "path" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
at Context.requireCordovaModule (C:\Users\Megapoort\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\Context.js:57:15)
at module.exports (P:\Projektkurs\Vertretungsplan\plugins\cordova-plugin-app-preferences\bin\before_plugin_install.js:6:14)
at runScriptViaModuleLoader (C:\Users\Megapoort\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:181:32)
at runScript (C:\Users\Megapoort\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:157:16)
at C:\Users\Megapoort\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:125:20
at
Using "requireCordovaModule" to load non-cordova module "path" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.
at process._tickCallback (internal/process/next_tick.js:160:7)

The error occured after using the command ionic cordova plugin add cordova-plugin-app-preferences

I've tested it out on Windows and Linux. The plattform was android both times.
Cordova and all other dependencies are up2date, so Cordova is on version 9.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Doesn't raise exit error code when hook executing failed

Bug Report

Problem

What is expected to happen?

Exit with error code

What does actually happen?

Just exit without error code

Information

I was building an app in Jenkins. When executing hook, it raised an error for 'Can't find module xxx', and then exit.

The Jenkins assert the build success for without nonzero exit code.

Error log:

Executing script found in config.xml for hook "before_compile": scripts/remove_redundant_permissions.js
Cannot find module '/xx/common-android'
Error: Cannot find module '/xx/plugins/xx/scripts/common-android'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
    at Function.Module._load (internal/modules/cjs/loader.js:508:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at module.exports (/xx/scripts/remove_redundant_permissions.js:15:16)
    at runScriptViaModuleLoader (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:181:32)
    at runScript (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:157:16)
    at /usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/hooks/HooksRunner.js:125:20
    at process._tickCallback (internal/process/next_tick.js:68:7)
    at Function.Module.runMain (internal/modules/cjs/loader.js:757:11)
clear android www content...
zip android www content finish...

Command or Code

Environment, Platform, Device

Version information

Mac osx 10.14.4

node v10.15.3

Cordova 9.0.0

Cordova-lib 9.0.1

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

requireCordovaModule + shelljs

Bug Report

Problem

I'm trying to make test app for windows platform with ionic but it returns this error

Information

Using "requireCordovaModule" to load non-cordova module "shelljs" is not supported. Instead, add this module to your dependencies and use regular "require" to load it.

Command or Code

ionic cordova build windows

Environment, Platform, Device

Windows 10

Version information

Ionic 5
Cordova 9.0.0 ([email protected])
VS 2019
VS Code

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Missing support for installing plugins from subdirectories

https://github.com/apache/cordova-lib/pull/624/files#diff-357b50ca17711373bcd14d32725ff069R69 removed support for installing things from subdirectories.

This broke the documented way to install plugin tests: https://github.com/apache/cordova-plugin-test-framework#tldr-try-it

The :subdir snytax is also still documented at https://github.com/apache/cordova-cli/blob/master/doc/readme.md#plugin-spec

Is this just not possible any more or was this usage overlooked?

Add Promise.try polyfill

There are a bunch of places that we're using a pattern like return Promise.resolve().then(...) which has a very slight async penalty and can make stacktraces a bit harder to read.

We should replace these with a Promise.try polyfill, like proposal-promise-try or p-try.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.