electron-mksnapshot 23.0.0 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.circleci/config.yml +51 -8
- package/.github/workflows/release.yml +1 -2
- package/download-mksnapshot.js +3 -30
- package/package.json +2 -2
- package/script/publish.js +1 -2
package/.circleci/config.yml
CHANGED
|
@@ -6,10 +6,14 @@ orbs:
|
|
|
6
6
|
|
|
7
7
|
commands:
|
|
8
8
|
install:
|
|
9
|
+
parameters:
|
|
10
|
+
node-version:
|
|
11
|
+
description: Node.js version to install
|
|
12
|
+
type: string
|
|
9
13
|
steps:
|
|
10
14
|
- node/install:
|
|
11
|
-
node-version:
|
|
12
|
-
- run: nvm use
|
|
15
|
+
node-version: << parameters.node-version >>
|
|
16
|
+
- run: nvm use << parameters.node-version >>
|
|
13
17
|
- checkout
|
|
14
18
|
- restore_cache:
|
|
15
19
|
keys:
|
|
@@ -43,21 +47,36 @@ jobs:
|
|
|
43
47
|
test-linux:
|
|
44
48
|
docker:
|
|
45
49
|
- image: cimg/base:stable
|
|
50
|
+
parameters:
|
|
51
|
+
node-version:
|
|
52
|
+
description: Node.js version to install
|
|
53
|
+
type: string
|
|
46
54
|
steps:
|
|
47
|
-
- install
|
|
55
|
+
- install:
|
|
56
|
+
node-version: << parameters.node-version >>
|
|
48
57
|
- test
|
|
49
58
|
test-mac:
|
|
50
59
|
macos:
|
|
51
60
|
xcode: "13.3.0"
|
|
61
|
+
parameters:
|
|
62
|
+
node-version:
|
|
63
|
+
description: Node.js version to install
|
|
64
|
+
type: string
|
|
52
65
|
steps:
|
|
53
|
-
- install
|
|
66
|
+
- install:
|
|
67
|
+
node-version: << parameters.node-version >>
|
|
54
68
|
- test
|
|
55
69
|
test-windows:
|
|
56
70
|
executor:
|
|
57
71
|
name: win/default
|
|
58
72
|
shell: bash.exe
|
|
73
|
+
parameters:
|
|
74
|
+
node-version:
|
|
75
|
+
description: Node.js version to install
|
|
76
|
+
type: string
|
|
59
77
|
steps:
|
|
60
|
-
- install
|
|
78
|
+
- install:
|
|
79
|
+
node-version: << parameters.node-version >>
|
|
61
80
|
- test
|
|
62
81
|
release:
|
|
63
82
|
docker:
|
|
@@ -90,22 +109,46 @@ workflows:
|
|
|
90
109
|
test_and_release:
|
|
91
110
|
jobs:
|
|
92
111
|
- test-linux:
|
|
112
|
+
matrix:
|
|
113
|
+
parameters:
|
|
114
|
+
node-version:
|
|
115
|
+
- 18.14.0
|
|
116
|
+
- 16.19.0
|
|
117
|
+
- 14.19.0
|
|
93
118
|
filters:
|
|
94
119
|
tags:
|
|
95
120
|
only: /.*/
|
|
96
121
|
- test-mac:
|
|
122
|
+
matrix:
|
|
123
|
+
parameters:
|
|
124
|
+
node-version:
|
|
125
|
+
- 18.14.0
|
|
126
|
+
- 16.19.0
|
|
127
|
+
- 14.19.0
|
|
97
128
|
filters:
|
|
98
129
|
tags:
|
|
99
130
|
only: /.*/
|
|
100
131
|
- test-windows:
|
|
132
|
+
matrix:
|
|
133
|
+
parameters:
|
|
134
|
+
node-version:
|
|
135
|
+
- 18.14.0
|
|
136
|
+
- 16.19.0
|
|
137
|
+
- 14.19.0
|
|
101
138
|
filters:
|
|
102
139
|
tags:
|
|
103
140
|
only: /.*/
|
|
104
141
|
- release:
|
|
105
142
|
requires:
|
|
106
|
-
- test-linux
|
|
107
|
-
- test-
|
|
108
|
-
- test-
|
|
143
|
+
- test-linux-18.14.0
|
|
144
|
+
- test-linux-16.19.0
|
|
145
|
+
- test-linux-14.19.0
|
|
146
|
+
- test-mac-18.14.0
|
|
147
|
+
- test-mac-16.19.0
|
|
148
|
+
- test-mac-14.19.0
|
|
149
|
+
- test-windows-18.14.0
|
|
150
|
+
- test-windows-16.19.0
|
|
151
|
+
- test-windows-14.19.0
|
|
109
152
|
filters:
|
|
110
153
|
tags:
|
|
111
154
|
only: /^v.*/
|
|
@@ -35,7 +35,6 @@ jobs:
|
|
|
35
35
|
run: |
|
|
36
36
|
git tag ${{ github.event.inputs.version }}
|
|
37
37
|
git push origin ${{ github.event.inputs.version }}
|
|
38
|
-
# TODO - This creates a draft release at the moment
|
|
39
38
|
- name: Create Release
|
|
40
39
|
run: |
|
|
41
|
-
gh release create ${{ github.event.inputs.version }} -t ${{ github.event.inputs.version }}
|
|
40
|
+
gh release create ${{ github.event.inputs.version }} -t ${{ github.event.inputs.version }}
|
package/download-mksnapshot.js
CHANGED
|
@@ -5,33 +5,6 @@ const extractZip = require('extract-zip')
|
|
|
5
5
|
const versionToDownload = require('./package').version
|
|
6
6
|
let archToDownload = process.env.npm_config_arch
|
|
7
7
|
|
|
8
|
-
// Refs https://github.com/electron/fiddle-core/blob/1ee2d2737f23fd1012917a249a9444b6db89f1d8/src/versions.ts#L47-L57
|
|
9
|
-
function compareVersions (a, b) {
|
|
10
|
-
const l = a.compareMain(b)
|
|
11
|
-
if (l) return l
|
|
12
|
-
// Electron's approach is nightly -> other prerelease tags -> stable,
|
|
13
|
-
// so force `nightly` to sort before other prerelease tags.
|
|
14
|
-
const [prea] = a.prerelease
|
|
15
|
-
const [preb] = b.prerelease
|
|
16
|
-
if (prea === 'nightly' && preb !== 'nightly') return -1
|
|
17
|
-
if (prea !== 'nightly' && preb === 'nightly') return 1
|
|
18
|
-
return a.comparePre(b)
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// Refs https://github.com/electron/fiddle-core/blob/1ee2d2737f23fd1012917a249a9444b6db89f1d8/src/versions.ts#L152-L160
|
|
22
|
-
function getLatestStable (releases) {
|
|
23
|
-
const { parse: semverParse } = require('semver')
|
|
24
|
-
const semvers = releases.map(({ version }) => semverParse(version)).filter((sem) => Boolean(sem))
|
|
25
|
-
semvers.sort((a, b) => compareVersions(a, b))
|
|
26
|
-
let stable
|
|
27
|
-
for (const ver of semvers.values()) {
|
|
28
|
-
if (ver.prerelease.length === 0) {
|
|
29
|
-
stable = ver
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
return stable
|
|
33
|
-
}
|
|
34
|
-
|
|
35
8
|
function download (version) {
|
|
36
9
|
return downloadArtifact({
|
|
37
10
|
version: version,
|
|
@@ -51,9 +24,9 @@ async function attemptDownload (version) {
|
|
|
51
24
|
process.exit(1)
|
|
52
25
|
}
|
|
53
26
|
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
version =
|
|
27
|
+
const { ElectronVersions } = require('@electron/fiddle-core')
|
|
28
|
+
const versions = await ElectronVersions.create(undefined, { ignoreCache: true })
|
|
29
|
+
version = versions.latestStable.version
|
|
57
30
|
}
|
|
58
31
|
|
|
59
32
|
if (process.arch.indexOf('arm') === 0 && process.platform !== 'darwin') {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "electron-mksnapshot",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "25.0.0",
|
|
4
4
|
"description": "Electron version of the mksnapshot binary",
|
|
5
5
|
"repository": "https://github.com/electron/mksnapshot",
|
|
6
6
|
"bin": {
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@continuous-auth/client": "^2.2.2",
|
|
23
|
+
"@electron/fiddle-core": "^1.3.0",
|
|
23
24
|
"mocha": "^10.1.0",
|
|
24
|
-
"node-fetch": "^2.6.9",
|
|
25
25
|
"semver": "^7.3.8",
|
|
26
26
|
"standard": "^14.3.1"
|
|
27
27
|
},
|
package/script/publish.js
CHANGED
|
@@ -3,8 +3,7 @@ const { getOtp } = require('@continuous-auth/client')
|
|
|
3
3
|
const { spawnSync } = require('child_process')
|
|
4
4
|
|
|
5
5
|
async function publish () {
|
|
6
|
-
const { status
|
|
7
|
-
if (status !== 0) console.log(stdout)
|
|
6
|
+
const { status } = spawnSync('npm', ['publish', '--otp', await getOtp()])
|
|
8
7
|
process.exit(status)
|
|
9
8
|
}
|
|
10
9
|
|