Skip to content

Commit

Permalink
feat(snap): Use core20 as default base for snap target (#7902)
Browse files Browse the repository at this point in the history
* snap: Use `core20` as default base

`core18` is quite old base nowadays and it's better to use a newer base to
have more updated desktop libraries around to have better toolkit
integration and wayland support.

People relying on older bases can always explicitly use `core18` when
upgrading electron-builder.
  • Loading branch information
3v1n0 committed Dec 13, 2023
1 parent 664a09c commit 843d501
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 22 deletions.
5 changes: 5 additions & 0 deletions .changeset/great-teachers-camp.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"app-builder-lib": minor
---

feat(snap): Use core20 as default base
2 changes: 1 addition & 1 deletion docs/configuration/snap.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ The top-level [snap](configuration.md#Configuration-snap) key contains set of op
<!-- do not edit. start of generated block -->
<ul>
<li>
<p><code id="SnapOptions-base">base</code> String | “undefined” - A snap of type base to be used as the execution environment for this snap. Examples: <code>core</code>, <code>core18</code>, <code>core20</code>, <code>core22</code>. Defaults to <code>core18</code></p>
<p><code id="SnapOptions-base">base</code> String | “undefined” - A snap of type base to be used as the execution environment for this snap. Examples: <code>core</code>, <code>core18</code>, <code>core20</code>, <code>core22</code>. Defaults to <code>core20</code></p>
</li>
<li>
<p><code id="SnapOptions-confinement">confinement</code> = <code>strict</code> “devmode” | “strict” | “classic” | “undefined” - The type of <a href="https://snapcraft.io/docs/reference/confinement">confinement</a> supported by the snap.</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/scheme.json
Original file line number Diff line number Diff line change
Expand Up @@ -5687,7 +5687,7 @@
"type": "boolean"
},
"base": {
"description": "A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core18`",
"description": "A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core20`",
"type": [
"null",
"string"
Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/src/options/SnapOptions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CommonLinuxOptions } from "./linuxOptions"

export interface SnapOptions extends CommonLinuxOptions, TargetSpecificOptions {
/**
* A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core18`
* A snap of type base to be used as the execution environment for this snap. Examples: `core`, `core18`, `core20`, `core22`. Defaults to `core20`
*/
readonly base?: string | null

Expand Down
2 changes: 1 addition & 1 deletion packages/app-builder-lib/templates/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
base: core18
base: core20
grade: stable
confinement: strict
parts:
Expand Down
34 changes: 17 additions & 17 deletions test/snapshots/linux/snapTest.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -181,7 +181,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -404,7 +404,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"compression": "xz",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
Expand Down Expand Up @@ -611,7 +611,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -681,7 +681,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -750,7 +750,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -819,7 +819,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -869,7 +869,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "classic",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1034,7 +1034,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "classic",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1200,7 +1200,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "classic",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1366,7 +1366,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "classic",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1542,7 +1542,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1602,7 +1602,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -1803,7 +1803,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -2017,7 +2017,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -2090,7 +2090,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down Expand Up @@ -2176,7 +2176,7 @@ Object {
"architectures": Array [
"amd64",
],
"base": "core18",
"base": "core20",
"confinement": "strict",
"description": "Test Application (test quite “ #378)",
"grade": "stable",
Expand Down
2 changes: 1 addition & 1 deletion test/src/linux/snapTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ test.ifDevOrLinuxCi(
},
effectiveOptionComputed: async ({ snap }) => {
expect(snap).toMatchSnapshot()
expect(snap.base).toBe("core18")
expect(snap.base).toBe("core20")
return true
},
})
Expand Down

0 comments on commit 843d501

Please sign in to comment.