-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
chore: v27 migration to ESM-only package (BREAKING) #9544
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
Open
mmaietta
wants to merge
66
commits into
master
Choose a base branch
from
chore/esm-migration
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
80a4ba3
updating all engines to node 22
mmaietta 5a5d2b7
tmp save for .js extension migration
mmaietta d26567f
tmp save
mmaietta c92b222
tmp save for .js extension migration
mmaietta c951258
tmp save
mmaietta 850646b
move the manual node module traversal to the root abstract class. Add…
mmaietta 5ad186e
Merge branch 'master' into chore/esm-migration
mmaietta e6dfaba
Merge commit '850646b29a49be6dd834957c05565f4cd1c4a797' into chore/es…
mmaietta 1235446
tmp save
mmaietta fa1ceb2
got it all compiling
mmaietta fb7cff6
esm complete on tests as well?
mmaietta c978ab4
tests run
mmaietta c8d975b
Merge branch 'master' into chore/esm-migration
mmaietta f315958
it builds
mmaietta 87d5cf7
cleanup
mmaietta 37c7b37
tmp save
mmaietta 0640b3c
tmp save
mmaietta ee370b1
tmp save
mmaietta 0abd6fa
compiles
mmaietta dd5618d
regenerating schema using updated/fixed schema generator script
mmaietta 05cfdd9
Merge commit 'ec9e2dbbd864f0858cf0d3b719ad75a84c59f29c' into chore/es…
mmaietta d77a294
pre-release cut
mmaietta 515fe9d
Merge commit '9418d2c0fb3608d7b348d18ab2a6b6393374fe75' into chore/re…
mmaietta 4a95a0d
chore: adding release/v27 release branch to github actions workflows
mmaietta a27e2f0
update branch naming system
mmaietta 896ddd4
Merge branch 'master' into release-cut-setup
mmaietta 4bc739c
Merge branch 'release-cut-setup' into chore/release-cut-v27
mmaietta f4c2963
Merge branch 'chore/release-cut-v27' into chore/esm-migration
mmaietta 094886f
tmp save
mmaietta 94441f1
Merge commit '0ea48ac284ec8f64e1a0e7d10481257460fe1919' into chore/es…
mmaietta a99f561
tmp save, catching up to master
mmaietta df7f6e9
tmp save
mmaietta 9269332
tmp save
mmaietta d4cb889
it compiles
mmaietta 3e3969b
fix runner
mmaietta 8a2e4e9
tmp save. migrating fs-extra to namespace import
mmaietta b73e1a4
LFG
mmaietta 7b9cdd6
tmp save
mmaietta d23239e
tmp save?
mmaietta 190222e
tmp save, more extension changes
mmaietta 14b4925
fix somethings
mmaietta c06801f
Merge commit 'a4f2d98a64087a0fc822e574d033b7770697b09e' into chore/es…
mmaietta eac8662
everything but tests compile
mmaietta 07858ca
attempt 1
mmaietta 2770f2d
claude helped
mmaietta 9c3b692
claude got tests running
mmaietta dfe80f8
tests run
mmaietta 93efaa1
add ignore
mmaietta 9a40713
adjust all imports to esm
mmaietta 6025002
use esm Proxy instead of eager initialization
mmaietta 140c734
got it working?
mmaietta c2ef699
fix imports
mmaietta 44e4009
fix ts-ignore's
mmaietta 19f52b9
NICE
mmaietta 5641a26
add retry to blackbox update test due to flakiness of e2e system inte…
mmaietta 6f2b0b7
add fuses to blackbox update test
mmaietta 3b38b0e
revert hoisted snapshot changes to see if we can reduce PR diff size
mmaietta 01b91f6
initial migration/creation of `/internal` package export for minimizi…
mmaietta 1b4dbdc
yesssss
mmaietta 18fdf69
Merge commit '99676722552714a97c2285b170230ef941d411c0' into chore/es…
mmaietta e27a88a
optimize dependencies/devDependencies list
mmaietta 76a42c1
fix all circular references
mmaietta e9f6762
fix import
mmaietta 634b1e4
Merge branch 'master' into chore/esm-migration
mmaietta b47b8bc
address imports
mmaietta 3ba131a
prettier
mmaietta File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| { | ||
| "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json", | ||
| "changelog": ["changesets-changelog-clean", { "repo": "electron-userland/electron-builder" }], | ||
| "commit": false, | ||
| "linked": [[ | ||
| "app-builder-lib", | ||
| "builder-util", | ||
| "dmg-builder", | ||
| "electron-builder", | ||
| "electron-builder-squirrel-windows", | ||
| "electron-publish" | ||
| ]], | ||
| "access": "public", | ||
| "baseBranch": "release/v27", | ||
| "updateInternalDependencies": "patch", | ||
| "ignore": [ | ||
| "electron-forge-maker-appimage", | ||
| "electron-forge-maker-nsis", | ||
| "electron-forge-maker-nsis-web", | ||
| "electron-forge-maker-snap", | ||
| "@electron-builder/test" | ||
| ] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| { | ||
| "mode": "pre", | ||
| "tag": "alpha", | ||
| "initialVersions": { | ||
| "app-builder-lib": "26.8.0", | ||
| "builder-util": "26.8.0", | ||
| "builder-util-runtime": "9.5.1", | ||
| "dmg-builder": "26.8.0", | ||
| "electron-builder": "26.8.0", | ||
| "electron-builder-squirrel-windows": "26.8.0", | ||
| "electron-forge-maker-appimage": "26.8.0", | ||
| "electron-forge-maker-nsis": "26.8.0", | ||
| "electron-forge-maker-nsis-web": "26.8.0", | ||
| "electron-forge-maker-snap": "26.8.0", | ||
| "electron-publish": "26.8.0", | ||
| "electron-updater": "6.8.3", | ||
| "@electron-builder/test": "0.0.0" | ||
| }, | ||
| "changesets": [] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| "electron-builder-squirrel-windows": major | ||
| "builder-util-runtime": major | ||
| "electron-builder": major | ||
| "electron-publish": major | ||
| "electron-updater": major | ||
| "app-builder-lib": major | ||
| "builder-util": major | ||
| "dmg-builder": major | ||
| --- | ||
|
|
||
| chore(node): migrating to ESM and updating all engines to node 22 to support latest versions of `electron/*` packages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| const url = require("url") | ||
| const fs = require("fs") | ||
|
|
||
| exports.dynamicImport = async function dynamicImport(path) { | ||
| try { | ||
| return await import(fs.existsSync(path) ? url.pathToFileURL(path).href : path) | ||
| } catch (error) { | ||
| return Promise.reject(error) | ||
| } | ||
| } | ||
|
|
||
| exports.dynamicImportMaybe = async function dynamicImportMaybe(path) { | ||
| try { | ||
| return require(path) | ||
| } catch (e1) { | ||
| try { | ||
| return await exports.dynamicImport(path) | ||
| } catch (e2) { | ||
| e1.message = "\n1. " + e1.message + "\n2. " + e2.message | ||
| throw e1 | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| if (!process.send) { | ||
| console.error("The remote rebuilder expects to be spawned with an IPC channel") | ||
| process.exit(1) | ||
| } | ||
|
|
||
| const rebuilder = rebuilder => { | ||
| rebuilder.lifecycle.on("module-found", moduleName => process.send?.({ msg: "module-found", moduleName })) | ||
| rebuilder.lifecycle.on("module-done", moduleName => process.send?.({ msg: "module-done", moduleName })) | ||
| rebuilder.lifecycle.on("module-skip", moduleName => process.send?.({ msg: "module-skip", moduleName })) | ||
|
|
||
| return rebuilder | ||
| .then(() => { | ||
| process.send?.({ msg: "rebuild-done" }) | ||
| return process.exit(0) | ||
| }) | ||
| .catch(err => { | ||
| process.send?.({ | ||
| msg: "rebuild-error", | ||
| err: { | ||
| message: err.message, | ||
| stack: err.stack, | ||
| }, | ||
| }) | ||
| process.exit(0) | ||
| }) | ||
| } | ||
|
|
||
| const main = async () => { | ||
| const options = JSON.parse(process.argv[2]) | ||
| return import("@electron/rebuild").then(module => { | ||
| const { rebuild } = module | ||
| return rebuilder(rebuild(options)) | ||
| }) | ||
| } | ||
|
|
||
| main() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
You can probably bump it to v11 In all
package.jsons