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 — lib: fix checking syntax of esm module · nodejs/node@e457ec0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • lib/internal/main
    • check_syntax.js
  • test
    • fixtures/syntax
      • good_syntax.mjs
    • sequential
      • test-cli-syntax-good.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎lib/internal/main/check_syntax.js‎

Copy file name to clipboardExpand all lines: lib/internal/main/check_syntax.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ function checkSyntax(source, filename) {
5454
const { defaultResolve } = require('internal/modules/esm/resolve');
5555
const { defaultGetFormat } = require('internal/modules/esm/get_format');
5656
const { url } = defaultResolve(pathToFileURL(filename).toString());
57-
const { format } = defaultGetFormat(url);
57+
const format = defaultGetFormat(url);
5858
isModule = format === 'module';
5959
}
6060
if (isModule) {
Collapse file

‎test/fixtures/syntax/good_syntax.mjs‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export function testFunction(req, res) {
2+
return 'PASS';
3+
}
Collapse file

‎test/sequential/test-cli-syntax-good.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-cli-syntax-good.js
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const syntaxArgs = [
1717
[
1818
'syntax/good_syntax.js',
1919
'syntax/good_syntax',
20+
'syntax/good_syntax.mjs',
2021
'syntax/good_syntax_shebang.js',
2122
'syntax/good_syntax_shebang',
2223
'syntax/illegal_if_not_wrapped.js',

0 commit comments

Comments
0 (0)
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.