Skip to content

Commit

Permalink
(test) default use electron 31
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthijsBurgh committed Jul 8, 2024
1 parent e5b22ae commit ade02f9
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion __tests__/createProject.helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const createProject = async (projectName, useTS, customPlugins = {}) => {
// electron-builder requires that an exact version of electron is provided,
// unless electron is already installed
version: 'file:' + process.cwd(),
electronBuilder: { electronVersion: '29.0.0', addTests: true }
electronBuilder: { electronVersion: '31.0.0', addTests: true }
}
preset.plugins = { ...preset.plugins, ...customPlugins }
const projectPath = (p) =>
Expand Down
6 changes: 3 additions & 3 deletions __tests__/generator.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ beforeEach(() => {
if (path === 'apiResolve_./package.json') {
return JSON.stringify({
scripts: {},
devDependencies: { electron: '^29.0.0' }
devDependencies: { electron: '^31.0.0' }
})
}
// return mock content
Expand All @@ -34,7 +34,7 @@ beforeEach(() => {
jest.clearAllMocks()
})
const runGenerator = () =>
generator(mockApi, { electronBuilder: { electronVersion: '^29.0.0' } })
generator(mockApi, { electronBuilder: { electronVersion: '^31.0.0' } })

describe('.gitignore', () => {
test('extends gitignore if it exists', () => {
Expand Down Expand Up @@ -80,7 +80,7 @@ describe('.gitignore', () => {
if (path === 'apiResolve_./package.json') {
return JSON.stringify({
scripts: {},
devDependencies: { electron: '^29.0.0' }
devDependencies: { electron: '^31.0.0' }
})
}
// return mock content
Expand Down
2 changes: 1 addition & 1 deletion __tests__/mock_package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"isMock": true,
"devDependencies": {
"electron": "^29.0.0"
"electron": "^31.0.0"
}
}
12 changes: 11 additions & 1 deletion prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module.exports = [
name: 'electronBuilder.electronVersion',
type: 'list',
message: 'Choose Electron Version',
default: '^27.0.0',
default: '^31.0.0',
choices: [
{
name: '^17.0.0',
Expand Down Expand Up @@ -71,6 +71,16 @@ module.exports = [
name: '^29.0.0',
value: '^29.0.0',
short: '^29.0.0'
},
{
name: '^30.0.0',
value: '^30.0.0',
short: '^30.0.0'
},
{
name: '^31.0.0',
value: '^31.0.0',
short: '^31.0.0'
}
],
when: () => {
Expand Down

0 comments on commit ade02f9

Please sign in to comment.