One big reason we need this is that the text format doesn't work on Windows
because of line endings. We could just replace the line endings based on
platform, but this seemed better overall.
Also, make sure to escape entities in HTML error page
We attempted to set default values for cordova-plugin-statusbar at
runtime. Because the plugin may not have been loaded at that point,
this gave inconsistent results. Instead, we now set the default options
while building, so they will get added to config.xml.
Fixes#5098
Specific improvements:
- Parentheses are now stripped from commands that look like named classes
so that they will be treated as class declarations rather than as named
class expressions.
- When the `ecmascript` package is installed, `compileForShell` errors are
now exposed to the `evalCommand` callback.
- Instead of using `vm.runInThisContext` to parse and evaluate commands at
the same time, `evalCommand` now parses commands by creating a new
`vm.Script` and later evaluates them using `script.runInThisContext()`,
so that `SyntaxError`s can be reported immediately. Fixes#5131.
When Cordova plugins with old (pre-npm) IDs are installed, which
happens with older versions even when we have specified the new ID on
install, we need to convert these before checking whether to reinstall
all plugins.
When establishing the installed versions of Cordova platforms to check
whether we should remove the whole cordova-build directory to upgrade,
we make sure the platform has a version script and consider it outdated
if not.
This commit makes possible but but doesn't fully solve the problem of
using `meteor shell` within shell scripts. See #5055 for more
details.
Closes#5056
Since 87b11bd we were treating client-only refreshes of the initial
server build as if they were initial builds, and not resetting the
project context. This meant among other things that local packages
weren't being rebuilt, which led to #5074 (but also would have led to a
whole bunch of other problems).
Fixes#5074.
1. Add `addAssets` API to `package.js`
2. Rename `getSourcesFunc` to `getFiles` in internal code
3. Changed `PackageAPI#sources` to `PackageAPI#files` with a new structure that
has separate objects for assets and sources
4. Added some tests for different error conditions
5. The same file can now be a source and an asset
Although we remove the Cordova project directory when upgrading to
Meteor 1.2, this only happens once per project, and the
.meteor/local/cordova-build directory is usually ignored, and thus
preserved per machine. This means we can’t avoid checking for outdated
platforms on every run to make sure we remove the directory when needed.