Skip to content

Commit

Permalink
Merge pull request #1017 from electron-userland/v14-develop
Browse files Browse the repository at this point in the history
Version 14
  • Loading branch information
malept committed Jun 20, 2019
2 parents 6ffa6a1 + a77eb2d commit fe05b3e
Show file tree
Hide file tree
Showing 75 changed files with 1,750 additions and 1,646 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -3,6 +3,8 @@
*.key
*.pem
node_modules
package-lock.json
yarn.lock
test/fixtures/basic/main-link.js
!test/fixtures/prune-is-module/node_modules
test/work
Expand Down
12 changes: 5 additions & 7 deletions .travis.yml
Expand Up @@ -3,21 +3,18 @@ os:
- osx
- windows
dist: xenial
osx_image: xcode8
osx_image: xcode10.1
language: node_js
node_js:
- '6'
- '8'
- '10'
cache:
- apt: true
- directories:
- "node_modules"
- "$HOME/.electron"
- npm: true
- yarn: true
before_install: test/ci/before_install.sh
install:
- npm install
- npm update
install: if [[ "$TRAVIS_OS_NAME" = "osx" ]]; then yarn; else npm install && npm update; fi
before_script: test/ci/_before_script.js
after_success: npm run codecov
branches:
Expand All @@ -26,6 +23,7 @@ branches:
- /^v\d+\.\d+\.\d+/
env:
global:
- YARN_GPG=no
# prevent wine popup dialogs about installing additional packages
- WINEDLLOVERRIDES="mscoree,mshtml="
- WINEDEBUG="-all"
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Expand Up @@ -26,10 +26,9 @@ calling electron-packager. This will print debug information from the specified
value of the environment variable is a comma-separated list of modules which support this logging
feature. Known modules include:

* `electron-download`
* `@electron/get:*`
* `electron-osx-sign`
* `electron-packager` (always use this one before filing an issue)
* `extract-zip`
* `get-package-info`

We use the [`debug`](https://www.npmjs.com/package/debug#usage) module for this functionality. It
Expand Down
24 changes: 24 additions & 0 deletions NEWS.md
Expand Up @@ -4,6 +4,30 @@

[Unreleased]: https://github.com/electron-userland/electron-packager/compare/v13.1.1...master

### Added

* Ignore system junk files by default (#1005)

### Fixed

* Handle inference when `electron-prebuilt-compile` points to a non-version (#978)

### Changed

* Replace `extract-zip` with `cross-zip` - on macOS/Linux, the `zip` binary is required; on Windows,
a relatively recent Powershell and .NET runtime is required, see `cross-zip` for details (#984)
* Convert from `electron-download` to `@electron/get` (#1002). Drops support for versions of Electron
< 1.3.2, plus all of the `download` options have changed, notably:
* `cache` is now `cacheRoot`
* `strictSSL` is now `rejectUnauthorized`
* The `mirror` URL string is now a set of options defined by `mirrorOptions`
* `quiet` is removed as the default downloader no longer has a progress bar
* Linux/ia32 support for Electron >= 4 is downgraded to a warning from `@electron/get` (#1016)

### Removed

* Node < 8 support (#973)

## [13.1.1] - 2019-03-04

[13.1.1]: https://github.com/electron-userland/electron-packager/compare/v13.1.0...v13.1.1
Expand Down
15 changes: 15 additions & 0 deletions bin/electron-packager.js
@@ -0,0 +1,15 @@
#!/usr/bin/env node

'use strict'

// Not consts so that this file can load in Node < 4.0
var packageJSON = require('../package.json')
var semver = require('semver')
if (!semver.satisfies(process.versions.node, packageJSON.engines.node)) {
console.error('CANNOT RUN WITH NODE ' + process.versions.node)
console.error('Electron Packager requires Node ' + packageJSON.engines.node + '.')
process.exit(1)
}

var cli = require('../src/cli')
cli.run(process.argv.slice(2))
57 changes: 0 additions & 57 deletions cli.js

This file was deleted.

41 changes: 23 additions & 18 deletions docs/api.md
@@ -1,18 +1,14 @@
# electron-packager API

Short `async`/`await` example:
Short example:

```javascript
const packager = require('electron-packager')
const appPaths = await packager(options)
```

Short Promise example:

```javascript
const packager = require('electron-packager')
packager(options)
.then(appPaths => { /**/ })
async function bundleElectronApp(options) {
const appPaths = await packager(options)
console.log(`Electron app bundles created:\n${appPaths.join("\n")}`)
}
```

`appPaths` is described in the [return value](#return-value) section.
Expand Down Expand Up @@ -186,7 +182,7 @@ Not required if the [`all`](#all) option is set.
If `arch` is set to `all`, all supported architectures for the target platforms specified by [`platform`](#platform) will be built.
Arbitrary combinations of individual architectures are also supported via a comma-delimited string or array of strings.
The non-`all` values correspond to the architecture names used by [Electron releases]. This value
is not restricted to the official set if [`download.mirror`](#download) is set.
is not restricted to the official set if [`download.mirrorOptions`](#download) is set.

##### `asar`

Expand Down Expand Up @@ -224,14 +220,13 @@ Whether symlinks should be dereferenced during the copying of the application so

*Object*

If present, passes custom options to [`electron-download`](https://www.npmjs.com/package/electron-download)
If present, passes custom options to [`@electron/get`](https://npm.im/@electron/get)
(see the link for more detailed option descriptions and the defaults). Supported parameters include,
but are not limited to:
- `cache` (*String*): The directory where prebuilt, pre-packaged Electron downloads are cached.
- `mirror` (*String*): The URL to override the default Electron download location.
- `quiet` (*Boolean* - default: `false`): Whether to show a progress bar when downloading Electron.
- `strictSSL` (*Boolean* - default: `true`): Whether SSL certificates are required to be valid when
downloading Electron.
- `cacheRoot` (*String*): The directory where prebuilt, pre-packaged Electron downloads are cached.
- `mirrorOptions` (*Object*): Options to override the default Electron download location.
- `rejectUnauthorized` (*Boolean* - default: `true`): Whether SSL certificates are required to be
valid when downloading Electron.


##### `electronVersion`
Expand Down Expand Up @@ -311,10 +306,19 @@ described after the list*):

Alternatively, this can be a predicate function that, given an absolute file path, returns `true` if
the file should be ignored, or `false` if the file should be kept. *This does not use any of the
default ignored directories listed above.*
default ignored files/directories listed above.*

**Note:** `ignore` will have no effect if [`prebuiltAsar`](#prebuiltasar) is set.

##### `junk`

*Boolean* (default: `true`)

Ignores [system junk files](https://github.com/sindresorhus/junk) when copying the Electron app,
regardless of the [`ignore`](#ignore) option.

**Note:** `junk` will have no effect if [`prebuiltAsar`](#prebuiltasar) is set.

##### `name`

*String*
Expand Down Expand Up @@ -347,7 +351,7 @@ Not required if the [`all`](#all) option is set.
If `platform` is set to `all`, all [supported target platforms](#supported-platforms) for the target architectures specified by [`arch`](#arch) will be built.
Arbitrary combinations of individual platforms are also supported via a comma-delimited string or array of strings.
The non-`all` values correspond to the platform names used by [Electron releases]. This value
is not restricted to the official set if [`download.mirror`](#download) is set.
is not restricted to the official set if [`download.mirrorOptions`](#download) is set.

##### `prebuiltAsar`

Expand All @@ -363,6 +367,7 @@ gets skipped over:
* [`afterPrune`](#afterprune)
* [`derefSymlinks`](#derefsymlinks)
* [`ignore`](#ignore)
* [`junk`](#junk)
* [`prune`](#prune)

##### `prune`
Expand Down
25 changes: 0 additions & 25 deletions hooks.js

This file was deleted.

0 comments on commit fe05b3e

Please sign in to comment.