-
-
Notifications
You must be signed in to change notification settings - Fork 359
chore(suite-desktop-core): bump @electron/fuses #20722
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,9 +7,9 @@ | |
| "homepage": "https://trezor.io/", | ||
| "main": "src/app.ts", | ||
| "scripts": { | ||
| "build:scripts": "yarn g:rimraf ./lib && yarn g:tsc --build tsconfig.scripts.json && find ./lib -name '*.js' -exec bash -c 'mv \"$0\" \"${0%.js}.mjs\"' {} \\;", | ||
| "build:scripts": "yarn g:rimraf ./lib && yarn g:tsc --build scripts/tsconfig.json && node scripts/rename-js-to-mjs.cjs", | ||
| "build:core": "yarn g:rimraf dist && TS_NODE_PROJECT=\"tsconfig.json\" yarn webpack --config ./webpack/core.webpack.config.ts", | ||
| "type-check": "yarn g:tsc --build tsconfig.json", | ||
| "type-check": "yarn g:tsc --build tsconfig.json && yarn g:tsc --build scripts/tsconfig.json", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before this PR, the |
||
| "test:unit": "yarn g:jest", | ||
| "test:e2e:desktop": "yarn xvfb-maybe -- playwright test --config=./e2e/playwright.config.ts --project=desktop", | ||
| "test:e2e:web": "yarn xvfb-maybe -- playwright test --config=./e2e/playwright.config.ts --project=web", | ||
|
|
@@ -54,7 +54,7 @@ | |
| }, | ||
| "devDependencies": { | ||
| "@currents/playwright": "^1.13.4", | ||
| "@electron/fuses": "^1.8.0", | ||
| "@electron/fuses": "^2.0.0", | ||
| "@electron/notarize": "3.0.2", | ||
| "@octokit/rest": "^21.1.1", | ||
| "@playwright/browser-chromium": "^1.52.0", | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| /** | ||
| * Electron-builder hooks in /scripts/*.ts are compiled to /lib/*.js | ||
| * They are built as ESM, as required by some of the libs, but the whole module is still CJS. | ||
| * Electron-builder needs to know that the hooks are ESM, so we rename the extension. | ||
| * This is an interim solution while electron-main is still built as CJS. | ||
| * TODO #14482 Delete this, update the filenames in electron-builder-config.js | ||
| */ | ||
|
|
||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
|
|
||
| const libDir = path.join(__dirname, '../lib'); | ||
|
|
||
| fs.readdirSync(libDir).forEach(file => { | ||
| if (file.endsWith('.js')) { | ||
| const oldPath = path.join(libDir, file); | ||
| const newPath = path.join(libDir, file.replace(/\.js$/, '.mjs')); | ||
| fs.renameSync(oldPath, newPath); | ||
| } | ||
| }); | ||
| console.log(`Renamed electron-builder hooks .js files to .mjs`); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| { | ||
| "extends": "../../../tsconfig.lib.json", | ||
| "compilerOptions": { | ||
| "module": "ESNext", | ||
| "moduleResolution": "bundler", | ||
| "declaration": false, | ||
| "sourceMap": false, | ||
| "declarationMap": false, | ||
| "outDir": "../lib" | ||
| }, | ||
| "include": ["."] | ||
| } |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have many simple bash scripts in-lined in
package.json, that's why "git bash for windows" is the only supported shell for native windows dev env.But
findbinary is not available in git bash for windows, so this was not working (files were not renamed, and then not found, and build crashed)