Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: bump electronjs/node to 2.1.0 (main) #1605

Merged
merged 1 commit into from
Dec 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2.1

orbs:
cfa: continuousauth/npm@2.1.0
node: electronjs/node@1.4.1
node: electronjs/node@2.1.0

jobs:
test:
Expand Down
6 changes: 3 additions & 3 deletions test/asar.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,6 @@ test.serial('prebuilt asar', util.testSinglePlatform(async (t, opts) => {
await util.assertPathNotExists(t, path.join(resourcesPath, 'app'), 'app subdirectory should NOT exist when app.asar is built')
}))

test('prebuiltAsar: fail when set to directory', failedPrebuiltAsarTest({ prebuiltAsar: util.fixtureSubdir('asar-prebuilt') }, /must be an asar file/))
test('prebuiltAsar: fail when specifying afterCopy', incompatibleOptionWithPrebuiltAsarTest({ afterCopy: [] }))
test('prebuiltAsar: fail when specifying afterPrune', incompatibleOptionWithPrebuiltAsarTest({ afterPrune: [] }))
test.serial('prebuiltAsar: fail when set to directory', failedPrebuiltAsarTest({ prebuiltAsar: util.fixtureSubdir('asar-prebuilt') }, /must be an asar file/))
test.serial('prebuiltAsar: fail when specifying afterCopy', incompatibleOptionWithPrebuiltAsarTest({ afterCopy: [] }))
test.serial('prebuiltAsar: fail when specifying afterPrune', incompatibleOptionWithPrebuiltAsarTest({ afterPrune: [] }))
2 changes: 1 addition & 1 deletion test/config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"version": "1.4.13"
"version": "27.0.0"
}
8 changes: 5 additions & 3 deletions test/darwin.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async function assertHelper (t, prefix, appName, helperSuffix) {
}

async function helperAppPathsTest (t, baseOpts, extraOpts, expectedName) {
const opts = { ...baseOpts, ...extraOpts }
const opts = { ...baseOpts, ...extraOpts, electronVersion: '1.4.13' }

if (!expectedName) {
expectedName = opts.name
Expand Down Expand Up @@ -170,6 +170,8 @@ async function appBundleTest (t, opts, appBundleId) {
}

async function appHelpersBundleTest (t, opts, helperBundleId, appBundleId) {
opts.electronVersion = '1.4.13'

if (helperBundleId) {
opts.helperBundleId = helperBundleId
}
Expand Down Expand Up @@ -488,11 +490,11 @@ if (!(process.env.CI && process.platform === 'win32')) {
const finalPath = (await packager(opts))[0]
const plistObj = await parseInfoPlist(t, opts, finalPath)
t.is(typeof plistObj.ElectronAsarIntegrity, 'object')
// Note: If updating thr basic app fixture (used here in baseOpts), ths hash should also be updated.
// Note: If updating the basic app fixture (used here in baseOpts), ths hash should also be updated.
t.deepEqual(plistObj.ElectronAsarIntegrity, {
'Resources/app.asar': {
algorithm: 'SHA256',
hash: '4fcfc041675bfbad16cb6c3c4acfa339cd59e891944a27bc9e64076635f1825a'
hash: '2ec82b43414573ce1414a09859d6d30d1fc8bcbd0b33b404125f557e18d3b536'
}
})
}))
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/asar-prebuilt/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"description": "A prebuilt asar app",
"main": "main.js",
"devDependencies": {
"electron": "1.4.13"
"electron": "27.0.0"
}
}
2 changes: 1 addition & 1 deletion test/fixtures/basic/node_modules/electron/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/basic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"devDependencies": {
"ncp": "^2.0.0",
"run-waterfall": "^1.1.1",
"electron": "1.4.13",
"electron": "27.0.0",
"ffi-napi": "4.0.3"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/electron-in-dependencies/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"productName": "MainJS",
"description": "Removing electron from dependencies",
"dependencies": {
"electron": "1.4.13"
"electron": "27.0.0"
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/fixtures/infer-missing-version-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"main": "main.js",
"productName": "MainJS",
"devDependencies": {
"electron": "1.4.13"
"electron": "27.0.0"
}
}
2 changes: 1 addition & 1 deletion test/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const util = require('./_util')
async function hookTest (wantHookCalled, hookName, t, opts, validator) {
let hookCalled = false
opts.dir = util.fixtureSubdir('basic')
opts.electronVersion = config.version
opts.electronVersion = '1.4.13'
opts.arch = 'ia32'
opts.platform = 'all'

Expand Down
28 changes: 14 additions & 14 deletions test/targets.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ test('build for all available official targets',
testMultiTarget({ all: true, electronVersion: '1.8.2' }, util.allPlatformArchCombosCount - 5,
'Packages should be generated for all possible platforms (except win32/arm64)'))
test('build for all available official targets for a version without arm64 or mips64el support',
testMultiTarget({ all: true }, util.allPlatformArchCombosCount - 7,
testMultiTarget({ all: true, electronVersion: '1.4.13' }, util.allPlatformArchCombosCount - 7,
'Packages should be generated for all possible platforms (except linux/arm64, linux/mips64el, or win32/arm64)'))
test('platform=all (one arch)',
testMultiTarget({ arch: 'ia32', platform: 'all' }, 2, 'Packages should be generated for both 32-bit platforms'))
testMultiTarget({ arch: 'ia32', platform: 'all', electronVersion: '1.4.13' }, 2, 'Packages should be generated for both 32-bit platforms'))
test('arch=all (one platform)',
testMultiTarget({ arch: 'all', platform: 'linux' }, 3, 'Packages should be generated for all expected architectures'))

Expand All @@ -103,8 +103,8 @@ test('fails with invalid platform', util.invalidOptionTest({
test('invalid official combination', testMultiTarget({ arch: 'ia32', platform: 'darwin' }, 0, 'Package should not be generated for invalid official combination'))

test('platform=linux and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'linux', electronVersion: '1.8.0' }, 1, 'Package should be generated for linux/arm64'))
test('platform=linux and arch=arm64 with a supported official Electron version (11.0.0-beta.22)', testMultiTarget({ arch: 'arm64', platform: 'linux', electronVersion: '11.0.0-beta.22' }, 1, 'Package should be generated for linux/arm64'))
test('platform=linux and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'linux' }, 0, 'Package should not be generated for linux/arm64'))
test('platform=linux and arch=arm64 with a supported official Electron version (11.0.0-beta.22)', testMultiTarget({ arch: 'arm64', platform: 'linux' }, 1, 'Package should be generated for linux/arm64'))
test('platform=linux and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'linux', electronVersion: '1.4.13' }, 0, 'Package should not be generated for linux/arm64'))

test('platform=linux and arch=ia32 with a supported official Electron version', testMultiTarget({ arch: 'ia32', platform: 'linux', electronVersion: '10.0.0' }, 1, 'Package should be generated for linux/ia32'))
test('platform=linux and arch=ia32 with an unsupported official Electron version (19.0.0-beta.1)', testMultiTarget({ arch: 'ia32', platform: 'linux', electronVersion: '19.0.0-beta.1' }, 0, 'Package should not be generated for linux/ia32'))
Expand All @@ -114,20 +114,20 @@ test('platform=linux and arch=mips64el with a supported official Electron versio
test('platform=linux and arch=mips64el with an unsupported official Electron version', testMultiTarget({ arch: 'mips64el', platform: 'linux' }, 0, 'Package should not be generated for linux/mips64el'))
test('platform=linux and arch=mips64el with an unsupported official Electron version (2.0.0)', testMultiTarget({ arch: 'mips64el', platform: 'linux', electronVersion: '2.0.0' }, 0, 'Package should not be generated for linux/mips64el'))

test('platform=win32 and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'win32', electronVersion: '6.0.8' }, 1, 'Package should be generated for win32/arm64'))
test('platform=win32 and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'win32' }, 0, 'Package should not be generated for win32/arm64'))
test('platform=win32 and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'win32' }, 1, 'Package should be generated for win32/arm64'))
test('platform=win32 and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'win32', electronVersion: '1.4.13' }, 0, 'Package should not be generated for win32/arm64'))

test('platform=darwin and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'darwin', electronVersion: '11.0.0-beta.5' }, 1, 'Package should be generated for darwin/arm64'))
test('platform=darwin and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'darwin' }, 0, 'Package should not be generated for darwin/arm64'))
test('platform=darwin and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'darwin' }, 1, 'Package should be generated for darwin/arm64'))
test('platform=darwin and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'darwin', electronVersion: '1.4.13' }, 0, 'Package should not be generated for darwin/arm64'))

test('platform=mas and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'mas', electronVersion: '11.0.0-beta.5' }, 1, 'Package should be generated for mas/arm64'))
test('platform=mas and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'mas' }, 0, 'Package should not be generated for mas/arm64'))
test('platform=mas and arch=arm64 with a supported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'mas' }, 1, 'Package should be generated for mas/arm64'))
test('platform=mas and arch=arm64 with an unsupported official Electron version', testMultiTarget({ arch: 'arm64', platform: 'mas', electronVersion: '1.4.13' }, 0, 'Package should not be generated for mas/arm64'))

test('platform=darwin and arch=universal with a supported official Electron version', testMultiTarget({ arch: 'universal', platform: 'darwin', electronVersion: '11.0.0-beta.5' }, 1, 'Package should be generated for darwin/universal'))
test('platform=darwin and arch=universal with an unsupported official Electron version', testMultiTarget({ arch: 'universal', platform: 'darwin' }, 0, 'Package should not be generated for darwin/universal'))
test('platform=darwin and arch=universal with a supported official Electron version', testMultiTarget({ arch: 'universal', platform: 'darwin' }, 1, 'Package should be generated for darwin/universal'))
test('platform=darwin and arch=universal with an unsupported official Electron version', testMultiTarget({ arch: 'universal', platform: 'darwin', electronVersion: '1.4.13' }, 0, 'Package should not be generated for darwin/universal'))

test('platform=mas and arch=universal with a supported official Electron version', testMultiTarget({ arch: 'universal', platform: 'mas', electronVersion: '11.0.0-beta.5' }, 1, 'Package should be generated for mas/universal'))
test('platform=mas and arch=universal with an unsupported official Electron version', testMultiTarget({ arch: 'universal', platform: 'mas' }, 0, 'Package should not be generated for mas/universal'))
test('platform=mas and arch=universal with a supported official Electron version', testMultiTarget({ arch: 'universal', platform: 'mas' }, 1, 'Package should be generated for mas/universal'))
test('platform=mas and arch=universal with an unsupported official Electron version', testMultiTarget({ arch: 'universal', platform: 'mas', electronVersion: '1.4.13' }, 0, 'Package should not be generated for mas/universal'))

test('unofficial arch', testMultiTarget({ arch: 'z80', platform: 'linux', download: { mirrorOptions: { mirror: 'mirror' } } }, 1,
'Package should be generated for non-standard arch from non-official mirror'))
Expand Down