fix: Bump to ESM and update all deps (#1851)

* chore: Bump various packages

* feat: Update everything to ESM

* fix: building and porting js to cjs
This commit is contained in:
Core 2024-05-18 16:29:24 +01:00 committed by GitHub
parent 89ee84b7e4
commit 05d32089dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
32 changed files with 5919 additions and 5879 deletions

35
resources/afterPack.cjs Normal file
View file

@ -0,0 +1,35 @@
exports.default = function (context) {
const { execSync } = require("child_process");
const fs = require("fs");
if (process.platform !== "darwin") return;
if (fs.existsSync("dist/mac-universal--x64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Electron Framework.sig"))
fs.unlinkSync("dist/mac-universal--x64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Electron Framework.sig");
if (fs.existsSync("dist/mac-universal--arm64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Electron Framework.sig"))
fs.unlinkSync("dist/mac-universal--arm64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Electron Framework.sig");
console.log('Castlabs-evs update start')
execSync('python3 -m pip install --upgrade castlabs-evs')
console.log('Castlabs-evs update complete')
// xcode 13
if (
fs.existsSync("dist/mac-universal--x64") &&
fs.existsSync("dist/mac-universal--arm64") &&
fs.existsSync("dist/mac-universal--x64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib")
)
execSync(
"cp 'dist/mac-universal--x64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib' 'dist/mac-universal--arm64/Cider.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/MainMenu.nib/keyedobjects-101300.nib'",
{ stdio: "inherit" }
);
console.log('VMP signing start')
if (fs.existsSync('dist/mac-universal'))
execSync('python3 -m castlabs_evs.vmp -n sign-pkg dist/mac-universal',{stdio: 'inherit'})
if (fs.existsSync('dist/mac'))
execSync('python3 -m castlabs_evs.vmp -n sign-pkg dist/mac',{stdio: 'inherit'})
if (fs.existsSync('dist/mac-arm64'))
execSync('python3 -m castlabs_evs.vmp -n sign-pkg dist/mac-arm64 -z',{stdio: 'inherit'})
console.log('VMP signing complete')
};