We are happy to announce that Apache Cordova 7.0.0 has been released!
Most notable changes include:
- cordova@7.0.0
- cordova-lib@7.0.0
- plugman@1.5.0
- cordova-app-hello-world@3.12.0
- cordova-common@2.0.3
- cordova-create@1.1.0
If a
package.jsondoes not exist in your project, it will be auto-created for you whencordova prepareis called.When adding a platform or plugin, the previous default behavior of not-saving has changed to saving. Now it will automatically save that platform or plugin to your
config.xmlandpackage.json. Details about platform and plugin versions are also automatically saved inconfig.xmlandpackage.json. The--saveflag is no longer required to save. Use--nosaveto prevent saving toconfig.xmlorpackage.json.Fetch is now the default method for fetching platforms. Fetch uses your system
npmtonpm installmodules into your project. The--fetchflag is no longer required. Use the--nofetchflag to revert to pre-Cordova@7.0behavior (npm installis not used to fetch modules).After
cordova prepareis run,package.jsonandconfig.xmlshould contain identical platforms and versions. In case of conflicts,package.jsonis given precedence overconfig.xml. For example, supposepackage.jsoncontainscordova-android@6.0.0andconfig.xmlcontainscordova-android@4.0.0. Aftercordova prepareis run,config.xmlandpackage.jsonwill each contain onlycordova-android@6.0.0.Platforms and plugins are now required to have a
package.jsonfile.We have added support for custom platforms. This will allow future custom platforms, and modified versions of existing platforms. Example:
cordova platform add custom-platform-nameA
cordova configcommand has been created toset,get,delete,edit, andlistglobal Cordova options. For example, you can use the following commandcordova config set <key> <value>to set the value ofautosaveorfetchtotrueorfalse.In the following case, you are turning off
autosaveas the default setting.autosaveis true by default in cordova. Example:cordova config set autosave falseIn the following case, you are turning off
fetchas the default setting.fetchistrueby default in cordova. Example:cordova config set fetch falseIn addition, the
cordova configcommand supports thebrowserifysetting, which allows the JavaScript of plugins to be loaded at build time compared to run time. For instance, if thebrowserifyvalue is not explicitly passed in by the user, thecordova configcommand will automatically set thebrowserifyvalue saved in~/.config/configstore/to be savedglobally. Users can get and setbrowserify.browserifyisfalseby deafult in cordova. Example:cordova config get browserify cordova config set browserify trueDropped support for node 0.x. Only node versions 4.0 and up are supported.
Dropped support for wp8 (windows phone 8).
cordova-windows: dropped support for any versions older than 4.0.0.cordova-android: dropped support for any versions older than 5.0.0.cordova-ios: dropped support for any versions older than 4.0.0.cordova-osx: dropped support for any versions older than 4.0.0.
To upgrade:
npm install -g cordova@latest
Please report any issues you find at issues.cordova.io!
Changes include:
cordova-lib
- CB-12747: updated pinned platforms
- CB-12705: Modified
(before|after)_plugin_(uninstall|install)to always expect existence of plugin field - CB-12705: Pass plugin info to project
*_plugin_installhooks - CB-11242: removed support for platforms that don't have a
package.json - CB-11242: updated tests and fixtures
- CB-11242: refactored out
getPlatformApiFunction - CB-11242: removed
parserandhandlerfiles for deprecated versions of platforms - CB-12683: improved error messaging for when a plugin doesn't have
package.json - CB-12674: Added deprecation notice for blackberry10 and ubuntu
- CB-11777: Restore plugins before preparing
- CB-12643: removed references to wp8
- CB-12645: removed references to firefoxos
- CB-12665: removed
engineStrictas it is no longer supported - CB-12612: removing old
amazon-fireoscode - CB-12425: autocreate a
package.jsonif it doesn't exist duringcordova prepare - CB-12517:
package.jsonnamefield isconfig.xmlidfield andpackage.jsondisplayNamefield isconfig.xmlnamefield - CB-12592: added
requireNoCachefunction and replaced instances ofdelete.require cache - CB-12606: Fix plugin dependency installation. Now it respects the
specspecified for dependencies of plugins inplugin.xml - CB-12016: removed
pluginMappercode from uninstall - CB-12337: Resolve symbolic links in project root
- CB-11346: Remove known platforms check
- CB-11977: removed support for
node 0.x - CB-12021: Added local path support to
--fetchand fixed failing tests for adding a relative path - CB-11960: Added support to
package.jsonfor platform/plugin add/rm - CB-12001: Added support for platform/plugin &
specrestore to syncconfig.xmlandpackage.json
cordova-cli
- CB-12570:
cordova-fetchis true by default. Use--nofetchflag to fetch platforms and plugins using old fetching logic. - CB-12665: removed
engineStrictas it is no longer supported - CB-11982: added
editandlstocordova config - CB-11982: added new
cordova configcommand thatsets,gets, anddeletesglobal environment variables. - CB-12008: updated docs to reflect new autosave changes and removed variables missed due to rebase
- CB-12008: made autosave the default for platform and plugin add/remove
- CB-11977: removed support for
node 0.x
cordova-fetch
- CB-12665: removed
enginestrictsince it is deprecated - added support for dealing with local path targets
cordova-common
- CB-8978: Add option to get
resource-filefromroot - CB-11908: Add tests for
edit-configinconfig.xml - CB-12665: removed
enginestrictsince it is deprecated
plugman
- CB-12747: Updated
cordova-libdependency to7.0.0
cordova-create
- CB-10681: templates will add
@latestwhen fetching from npm when no version is specified. This will ensure an older cached version of the template is not used - CB-12666: Remove
node 0.xsupport. - CB-12517:
package.jsondisplaynameshould equalconfig.xmlname field andpackage.jsonnamefield should equalconfig.xmlidfield.
cordova-app-hello-world
- CB-12684: added
package.jsonto default hello world app - Add GitHub pull request template
Pinned Platform Versions for Cordova CLI 7.0.0
- Cordova Android: ~6.2.2
- Cordova BlackBerry10: ~3.8.0
- Cordova Browser: ~4.1.0
- Cordova iOS: ~4.4.0
- Cordova OSX: ~4.0.1
- Cordova Ubuntu: ~4.3.4
- Cordova Windows: ~5.0.0
- Cordova WebOS: ~3.7.0
