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 — module: default to commonjs when format cannot be detected by avivkeller · Pull Request #52988 · nodejs/node

Conversation

@avivkeller

@avivkeller avivkeller commented May 14, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

When --experimental-detect-module is enabled, the default format will no longer be commonjs; instead, it will be null until the source is loaded. In this PR, the behavior is changed to default to commonjs, aligning with the non-experimental behavior.

Sorry, something went wrong.

Uh oh!

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

All reactions
@avivkeller
module: default to commonjs when format cannot be detected
ba3bf99
@nodejs-github-bot nodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels May 14, 2024
@GeoffreyBooth

GeoffreyBooth commented May 14, 2024

Copy link
Copy Markdown
Member

@nodejs/loaders

All reactions

Sorry, something went wrong.

Uh oh!

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

@GeoffreyBooth GeoffreyBooth added the module Issues and PRs related to the module subsystem. label May 14, 2024
@GeoffreyBooth

GeoffreyBooth commented May 14, 2024

Copy link
Copy Markdown
Member

This seems to undo part of #50314 but not necessarily incorrectly; @aduh95 can you please review?

All reactions

Sorry, something went wrong.

Uh oh!

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

GeoffreyBooth
GeoffreyBooth approved these changes May 14, 2024
View reviewed changes
@avivkeller
commonjs default
e3770a7
GeoffreyBooth
GeoffreyBooth approved these changes May 14, 2024
View reviewed changes
@avivkeller

avivkeller commented May 14, 2024 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member Author

This change, while it resolves one issue, it introduces several others (E.G. node --experimental-detect-module /xxx/test/fixtures/es-modules/package-without-type/module.js will not work now)

All reactions

Sorry, something went wrong.

Uh oh!

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

@avivkeller
avivkeller marked this pull request as draft May 14, 2024 20:31
@avivkeller

avivkeller commented May 14, 2024

Copy link
Copy Markdown
Member Author

Marking as draft, as some things need to worked out before this is ready

All reactions

Sorry, something went wrong.

Uh oh!

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

@avivkeller avivkeller closed this May 14, 2024
@avivkeller
avivkeller deleted the patch-28 branch May 14, 2024 20:46
@GeoffreyBooth GeoffreyBooth mentioned this pull request May 14, 2024
test: update ESM loader hooks to allow ambiguous format #52990
Closed
@avivkeller avivkeller mentioned this pull request May 17, 2024
module: prevent format from being set to null internaly #53015
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@GeoffreyBooth GeoffreyBooth GeoffreyBooth approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

esm Issues and PRs related to the ECMAScript Modules implementation. module Issues and PRs related to the module subsystem. needs-ci PRs that need a full CI run.

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.

3 participants

@avivkeller @GeoffreyBooth @nodejs-github-bot
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 01402503 — 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.