GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Lazy top-level initializations for module transforms by guybedford · Pull Request #16629 · babel/babel

Conversation

@guybedford

@guybedford guybedford commented Jul 11, 2024

Copy link
Copy Markdown
Contributor
Q                       A
Fixed Issues? N/A, can post one if needed
Patch: Bug Fix? Mostly a refactoring
Major: Breaking Change? No
Minor: New Feature? No
Tests Added + Pass? N/A
Documentation PR Link N/A
Any Dependency Changes? No
License MIT

There is a cyclic dependency between babel-helper-module-transforms and babel-core, which is not currently supported in jspm.io for running Babel when it is transpiled into ESM since CJS cycles behave differently to ESM cycles in allowing bindings defined before the require to be available.

With this minor refactoring in hoisting I've verified that this gets Babel to work correctly on jspm.io again.

There may be even be some minor top-level initialization performance benefits here as well in only initializing used features.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@guybedford
Lazy top-level initializations for module transforms
8b7b5ee
@babel-bot

babel-bot commented Jul 11, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57327

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@guybedford
fixup
9650a92
@nicolo-ribaudo nicolo-ribaudo added the PR: Internal 🏠 A type of pull request used for our changelog categories label Jul 11, 2024
@nicolo-ribaudo
Minor fixes
607b490
@nicolo-ribaudo
nicolo-ribaudo force-pushed the lazy-module-transforms branch from c4c1df0 to 607b490 Compare July 11, 2024 08:13
Guy Bedford and others added 2 commits July 11, 2024 18:45
Guy Bedford
lint fix
6b610dd
@guybedford
lint fix
3eb3d98
nicolo-ribaudo
nicolo-ribaudo approved these changes Jul 12, 2024
View reviewed changes

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

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.

Thanks! It's unfortunate that we cannot easily add a test for this, but hopefully once we release Babel 8 (as native ESM) this problem won't risk happening anymore.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
JLHwung
JLHwung approved these changes Jul 12, 2024
View reviewed changes
@nicolo-ribaudo
nicolo-ribaudo merged commit 7525e8a into babel:main Jul 12, 2024
@X-oss-byte X-oss-byte mentioned this pull request Aug 5, 2024
[Snyk] Upgrade @babel/core from 7.11.6 to 7.24.9 X-oss-byte/gatsby-1#801
Open
@Exkaleburx Exkaleburx mentioned this pull request Aug 5, 2024
[Snyk] Upgrade @babel/core from 7.9.0 to 7.24.9 Exkaleburx/plug-and-klay#12
Open
@ashly1111111 ashly1111111 mentioned this pull request Aug 5, 2024
[Snyk] Upgrade: , , , , ashly1111111/node#117
Open
This was referenced Aug 5, 2024
[Snyk] Upgrade: , tiff-es/js-looping-and-iteration-looping-code-along-dc-web-091619#206
Open
[Snyk] Upgrade: , tiff-es/fewpjs-class-extensions-super-lab-online-web-sp-000#200
Open
[Snyk] Upgrade: , tiff-es/fewpjs-fns-as-first-class-data-do-behavior-dc-web-091619#195
Open
[Snyk] Upgrade: , tiff-es/fewpjs-adding-behavior-with-methods-dc-web-091619#213
Open
[Snyk] Upgrade: , tiff-es/fewpjs-document-onload-dc-web-091619#202
Open
@davidbilling davidbilling mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @babel/core from 7.24.7 to 7.24.9 davidbilling/ember-cli-time-input#109
Closed
@tiff-es tiff-es mentioned this pull request Aug 6, 2024
[Snyk] Upgrade: , tiff-es/js-data-structures-objects-lab-dc-web-091619#195
Open
@hashim21223445 hashim21223445 mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @babel/core from 7.24.7 to 7.24.9 hashim21223445/async#5
Merged
This was referenced Aug 6, 2024
[Snyk] Upgrade: , tiff-es/fewpjs-getter-and-setter-methods-dc-web-091619#215
Open
[Snyk] Upgrade: , tiff-es/fewpjs-acting-on-events-dc-web-091619#198
Open
[Snyk] Upgrade: , tiff-es/fewpjs-fns-as-first-class-data-array-o-functions-dc-web-091619#204
Open
@jamesleesaunders jamesleesaunders mentioned this pull request Aug 6, 2024
[Snyk] Upgrade: , jamesleesaunders/d3-ez#201
Closed
@davidbilling davidbilling mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @babel/core from 7.24.7 to 7.24.9 davidbilling/ember-cli-cloudinary-light#120
Merged
@Mhmonicox Mhmonicox mentioned this pull request Aug 6, 2024
[Snyk] Upgrade: , , , , Mhmonicox/node#137
Open
@trabab trabab mentioned this pull request Aug 6, 2024
[Snyk] Upgrade @babel/core from 7.9.0 to 7.24.9 trabab/uppy#803
Open
@rish2497 rish2497 mentioned this pull request Aug 6, 2024
[Snyk] Upgrade: , i3-Market-V3-Public-Repository/Support---Deployment-Tools#33
Open
@Sonic269 Sonic269 mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.8.6 to 7.25.2 Sonic269/App6#140
Open
@anandgupta193 anandgupta193 mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.10.4 to 7.25.2 anandgupta193/sortNsuffle-react#1138
Open
@DadonStyle DadonStyle mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.17.8 to 7.25.2 DadonStyle/Crypto-Tower-FE#28
Open
@blackleadsu blackleadsu mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.9.0 to 7.25.2 blackleadsu/PowerBI-visuals-tools#70
Open
@richyhoopd richyhoopd mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.9.0 to 7.25.2 richyhoopd/Video-App#1230
Open
@AnushaSalian AnushaSalian mentioned this pull request Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.20.12 to 7.25.2 virtual-labs/ph3-lab-mgmt#547
Open
This was referenced Oct 4, 2024
[Snyk] Upgrade @babel/core from 7.18.2 to 7.25.2 nejidevelops/phase-0-intro-to-js-2-looping-code-along#94
Open
[Snyk] Upgrade @babel/core from 7.18.2 to 7.25.2 nejidevelops/phase-0-javascript-events-acting-on-events-lab#95
Open
[Snyk] Upgrade @babel/core from 7.18.2 to 7.25.2 nejidevelops/phase-0-intro-to-js-2-objects-lab#91
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 nejidevelops/phase-1-domcontentloaded#95
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 nejidevelops/phase-1-destructuring-assignment#93
Open
This was referenced Oct 5, 2024
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-class-extensions-super-lab-online-web-sp-000#242
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/js-data-structures-objects-lab-dc-web-091619#237
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-adding-behavior-with-methods-dc-web-091619#245
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-document-onload-dc-web-091619#247
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-acting-on-events-dc-web-091619#240
Open
[Snyk] Upgrade @babel/core from 7.6.4 to 7.25.2 tiff-es/js-looping-and-iteration-looping-code-along-dc-web-091619#244
Open
@rish2497 rish2497 mentioned this pull request Oct 5, 2024
[Snyk] Upgrade @babel/core from 7.14.3 to 7.25.2 i3-Market-V3-Public-Repository/Support---Deployment-Tools#70
Open
@rawdaymohamed rawdaymohamed mentioned this pull request Oct 5, 2024
[Snyk] Upgrade @babel/core from 7.18.13 to 7.25.2 rawdaymohamed/Hot-Todo#401
Closed
This was referenced Oct 5, 2024
[Snyk] Upgrade @babel/generator from 7.1.3 to 7.25.6 NOUIY/node#490
Open
[Snyk] Upgrade @babel/types from 7.1.3 to 7.25.6 NOUIY/node#491
Open
@richyhoopd richyhoopd mentioned this pull request Oct 6, 2024
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 richyhoopd/RichyFlix#936
Open
@tiff-es tiff-es mentioned this pull request Oct 6, 2024
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-getter-and-setter-methods-dc-web-091619#261
Open
@nejidevelops nejidevelops mentioned this pull request Oct 8, 2024
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 nejidevelops/phase-1-domcontentloaded#97
Open
This was referenced Oct 8, 2024
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-class-extensions-super-lab-online-web-sp-000#244
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-fns-as-first-class-data-array-o-functions-dc-web-091619#246
Open
[Snyk] Upgrade @babel/core from 7.4.5 to 7.25.2 tiff-es/fewpjs-document-onload-dc-web-091619#248
Open
@AnushaSalian AnushaSalian mentioned this pull request Oct 8, 2024
[Snyk] Upgrade @babel/core from 7.20.12 to 7.25.2 virtual-labs/ph3-lab-mgmt#549
Open
@github-actions github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Oct 13, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@JLHwung JLHwung JLHwung approved these changes
@nicolo-ribaudo nicolo-ribaudo nicolo-ribaudo approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue PR: Internal 🏠 A type of pull request used for our changelog categories

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@guybedford @babel-bot @JLHwung @nicolo-ribaudo
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.