ReviewOS

also looking at this

craft-native/craft

fix(ci): unblock the three failing native lifecycle legs

#37
Merged glennmichael123 wants to merge fix/native-lifecycle-and-release into main
4 files +130 -20
packages/typescript/src/package.test.tsmodified+11-1
Changes to packages/typescript/src/package.test.ts
@@ -2,7 +2,7 @@ import { afterEach, describe, expect, it } from 'bun:test'
22import { chmodSync, existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs'
33import { tmpdir } from 'node:os'
44import { join } from 'node:path'
5import { codesignArguments, dmgCapacityMegabytes, dmgCreateArguments, formatPackagingCommandError, macOSInfoPlist, notarytoolArguments, packageApp, productbuildArguments, renderWixSource, shouldRetryHdiutil, windowsArchitecture, windowsExecutableName } from './package'
5import { candleArguments, codesignArguments, dmgCapacityMegabytes, dmgCreateArguments, formatPackagingCommandError, macOSInfoPlist, notarytoolArguments, packageApp, productbuildArguments, renderWixSource, shouldRetryHdiutil, windowsArchitecture, windowsExecutableName } from './package'
66
77describe('Windows MSI packaging', () => {
88 it('renders a deterministic major-upgrade installer without shell interpolation', () => {
@@ -29,6 +29,16 @@ describe('Windows MSI packaging', () => {
2929 expect(() => windowsExecutableName('CON')).toThrow('Reserved Windows application name')
3030 })
3131
32 it('compiles for the architecture the source declares', () => {
33 // Without -arch, candle defaults to x86 and quietly produces a 32-bit
34 // installer around a 64-bit payload — while the source it just compiled
35 // says Platform="x64", ProgramFiles64Folder and Win64="yes". ICE80 would
36 // catch the contradiction, but light runs with -sval.
37 expect(candleArguments('x64', 'out.wixobj', 'in.wxs')).toEqual(['-nologo', '-arch', 'x64', '-out', 'out.wixobj', 'in.wxs'])
38 expect(candleArguments('x86', 'out.wixobj', 'in.wxs')).toContain('x86')
39 expect(candleArguments('arm64', 'out.wixobj', 'in.wxs')).toContain('arm64')
40 })
41
3242 it('renders explicit 32-bit metadata only when requested', () => {
3343 const source = renderWixSource({ name: 'Craft', version: '1.2.3', manufacturer: 'Craft', architecture: 'x86' }, 'Craft.exe')
3444 expect(source).toContain('Platform="x86"')