From 48f58788693ae664035862bdb7d120fead3732a1 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 14 Jun 2019 10:53:40 -0400 Subject: [PATCH] feat(snap): electron 5 support (part 2) feat(snap): electron 5 support (part 2) Close #3701, Close #3677, Close #3608, Close #3326, Close #2887 --- package.json | 2 +- packages/app-builder-lib/src/targets/snap.ts | 3 +++ test/out/linux/__snapshots__/snapTest.js.snap | 3 --- yarn.lock | 14 +++++++------- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index a0b79367469..ab536a1bd37 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "babel-preset-ts-node6-bluebird": "^3.0.2", "convert-source-map": "^1.6.0", "decompress-zip": "^0.3.1", - "depcheck": "^0.8.0", + "depcheck": "^0.8.1", "electron-builder-tslint-config": "^1.1.0", "globby": "^9.2.0", "jest-cli": "^24.8.0", diff --git a/packages/app-builder-lib/src/targets/snap.ts b/packages/app-builder-lib/src/targets/snap.ts index 8b376cfa521..ea8e07f128e 100644 --- a/packages/app-builder-lib/src/targets/snap.ts +++ b/packages/app-builder-lib/src/targets/snap.ts @@ -66,6 +66,9 @@ export default class SnapTarget extends Target { } const snap: any = safeLoad(await readFile(path.join(getTemplatePath("snap"), "snapcraft.yaml"), "utf-8")) + if (this.isUseTemplateApp) { + delete appDescriptor.adapter + } if (options.grade != null) { snap.grade = options.grade } diff --git a/test/out/linux/__snapshots__/snapTest.js.snap b/test/out/linux/__snapshots__/snapTest.js.snap index c097723aff4..da69652e893 100644 --- a/test/out/linux/__snapshots__/snapTest.js.snap +++ b/test/out/linux/__snapshots__/snapTest.js.snap @@ -216,7 +216,6 @@ exports[`custom after, no desktop 1`] = ` Object { "apps": Object { "sep": Object { - "adapter": "none", "command": "command.sh", "environment": Object { "LD_LIBRARY_PATH": "$SNAP_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu", @@ -283,7 +282,6 @@ exports[`custom env 1`] = ` Object { "apps": Object { "sep": Object { - "adapter": "none", "command": "command.sh", "environment": Object { "FOO": "bar", @@ -1119,7 +1117,6 @@ exports[`no desktop plugs 1`] = ` Object { "apps": Object { "sep": Object { - "adapter": "none", "command": "command.sh", "environment": Object { "LD_LIBRARY_PATH": "$SNAP_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu:$LD_LIBRARY_PATH:$SNAP/lib:$SNAP/usr/lib:$SNAP/lib/x86_64-linux-gnu:$SNAP/usr/lib/x86_64-linux-gnu", diff --git a/yarn.lock b/yarn.lock index 15e290be1f6..e36587e1266 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2249,10 +2249,10 @@ delegates@^1.0.0: resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" integrity sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o= -depcheck@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.8.0.tgz#2f6f0bd5ebdd65051e1df336feb9a601711c1bfd" - integrity sha512-ZCwp4SeB6JYMyd2/lFC4RwtAZ8CqPY5c4Yq2sQQI0q3ycCs9M4GVqbKqvtMFFbZaVVjNw9gVEIPELCQxR3HDpw== +depcheck@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.8.1.tgz#bb15dc13b9b312b8abd975a40b359680f502ed7e" + integrity sha512-d1z6xB6/hn9sJOmwTUi5EkuIXUV2L+7dErjfQwcr2vLjmUkQxxZTCoqqx9XgvLQicGHEE2qYsXZqOVU5u379IQ== dependencies: "@babel/parser" "^7.3.1" "@babel/traverse" "^7.2.3" @@ -2399,9 +2399,9 @@ electron-osx-sign@0.4.11: plist "^3.0.1" electron-to-chromium@^1.3.150: - version "1.3.158" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.158.tgz#5e16909dcfd25ab7cd1665114ee381083a3ee858" - integrity sha512-wJsJaWsViNQ129XPGmyO5gGs1jPMHr9vffjHAhUje1xZbEzQcqbENdvfyRD9q8UF0TgFQFCCUbaIpJarFbvsIg== + version "1.3.159" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.159.tgz#4292643c5cb77678821ce01557ba6dd0f562db5e" + integrity sha512-bhiEr8/A97GUBcUzNb9MFNhzQOjakbKmEKBEAa6UMY45zG2e8PM63LOgAPXEJE9bQiaQH6nOdYiYf8X821tZjQ== emoji-regex@^7.0.1: version "7.0.3"