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.json
does not exist in your project, it will be auto-created for you whencordova prepare
is 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.xml
andpackage.json
. Details about platform and plugin versions are also automatically saved inconfig.xml
andpackage.json
. The--save
flag is no longer required to save. Use--nosave
to prevent saving toconfig.xml
orpackage.json
.Fetch is now the default method for fetching platforms. Fetch uses your system
npm
tonpm install
modules into your project. The--fetch
flag is no longer required. Use the--nofetch
flag to revert to pre-Cordova@7.0
behavior (npm install
is not used to fetch modules).After
cordova prepare
is run,package.json
andconfig.xml
should contain identical platforms and versions. In case of conflicts,package.json
is given precedence overconfig.xml
. For example, supposepackage.json
containscordova-android@6.0.0
andconfig.xml
containscordova-android@4.0.0
. Aftercordova prepare
is run,config.xml
andpackage.json
will each contain onlycordova-android@6.0.0
.Platforms and plugins are now required to have a
package.json
file.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-name
A
cordova config
command has been created toset
,get
,delete
,edit
, andlist
global Cordova options. For example, you can use the following commandcordova config set <key> <value>
to set the value ofautosave
orfetch
totrue
orfalse
.In the following case, you are turning off
autosave
as the default setting.autosave
is true by default in cordova. Example:cordova config set autosave false
In the following case, you are turning off
fetch
as the default setting.fetch
istrue
by default in cordova. Example:cordova config set fetch false
In addition, the
cordova config
command supports thebrowserify
setting, which allows the JavaScript of plugins to be loaded at build time compared to run time. For instance, if thebrowserify
value is not explicitly passed in by the user, thecordova config
command will automatically set thebrowserify
value saved in~/.config/configstore/
to be savedglobally
. Users can get and setbrowserify
.browserify
isfalse
by deafult in cordova. Example:cordova config get browserify cordova config set browserify true
Dropped 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_install
hooks - 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
parser
andhandler
files 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
engineStrict
as it is no longer supported - CB-12612: removing old
amazon-fireos
code - CB-12425: autocreate a
package.json
if it doesn't exist duringcordova prepare
- CB-12517:
package.json
name
field isconfig.xml
id
field andpackage.json
displayName
field isconfig.xml
name
field - CB-12592: added
requireNoCache
function and replaced instances ofdelete.require cache
- CB-12606: Fix plugin dependency installation. Now it respects the
spec
specified for dependencies of plugins inplugin.xml
- CB-12016: removed
pluginMapper
code 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
--fetch
and fixed failing tests for adding a relative path - CB-11960: Added support to
package.json
for platform/plugin add/rm - CB-12001: Added support for platform/plugin &
spec
restore to syncconfig.xml
andpackage.json
cordova-cli
- CB-12570:
cordova-fetch
is true by default. Use--nofetch
flag to fetch platforms and plugins using old fetching logic. - CB-12665: removed
engineStrict
as it is no longer supported - CB-11982: added
edit
andls
tocordova config
- CB-11982: added new
cordova config
command thatsets
,gets
, anddeletes
global 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
enginestrict
since it is deprecated - added support for dealing with local path targets
cordova-common
- CB-8978: Add option to get
resource-file
fromroot
- CB-11908: Add tests for
edit-config
inconfig.xml
- CB-12665: removed
enginestrict
since it is deprecated
plugman
- CB-12747: Updated
cordova-lib
dependency to7.0.0
cordova-create
- CB-10681: templates will add
@latest
when 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.x
support. - CB-12517:
package.json
displayname
should equalconfig.xml
name field andpackage.json
name
field should equalconfig.xml
id
field.
cordova-app-hello-world
- CB-12684: added
package.json
to 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