Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/js_lexer/js_lexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1713,7 +1713,7 @@ func (lexer *Lexer) scanIdentifierWithEscapes(kind identifierKind) (MaybeSubstri
// // This is an error (equivalent to "var foo;" except for this rule)
// \u0076\u0061\u0072 foo;
//
// // This is an fine (equivalent to "foo.var;")
// // This is a fine (equivalent to "foo.var;")
// foo.\u0076\u0061\u0072;
//
if Keywords[text] != 0 {
Expand Down
2 changes: 1 addition & 1 deletion internal/js_parser/js_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -18217,7 +18217,7 @@ const (
whyESMImportStatement
)

// Say why this the current file is being considered an ES module
// Say why the current file is being considered an ES module
func (p *parser) whyESModule() (whyESM, []logger.MsgData) {
because := "This file is considered to be an ECMAScript module because"
switch {
Expand Down
2 changes: 1 addition & 1 deletion internal/js_printer/js_printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -1759,7 +1759,7 @@ func (p *printer) guardAgainstBehaviorChangeDueToSubstitution(expr js_ast.Expr,

// Constant folding is already implemented once in the parser. A smaller form
// of constant folding (just for numbers) is implemented here to clean up cross-
// module numeric constants and bitwise operations. This is not an general-
// module numeric constants and bitwise operations. This is not a general-
// purpose/optimal approach and never will be. For example, we can't affect
// tree shaking at this stage because it has already happened.
func (p *printer) lateConstantFoldUnaryOrBinaryOrIfExpr(expr js_ast.Expr) js_ast.Expr {
Expand Down
4 changes: 2 additions & 2 deletions internal/linker/linker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5330,12 +5330,12 @@ func (c *linkerContext) renameSymbolsInChunk(chunk *chunkInfo, filesInOrder []ui
reservedNames := renamer.ComputeReservedNames(moduleScopes, c.graph.Symbols)

// Node contains code that scans CommonJS modules in an attempt to statically
// detect the set of export names that a module will use. However, it doesn't
// detect the set of export names that a module will use. However, it doesn't
// do any scope analysis so it can be fooled by local variables with the same
// name as the CommonJS module-scope variables "exports" and "module". Avoid
// using these names in this case even if there is not a risk of a name
// collision because there is still a risk of node incorrectly detecting
// something in a nested scope as an top-level export. Here's a case where
// something in a nested scope as a top-level export. Here's a case where
// this happened: https://github.com/evanw/esbuild/issues/3544
if c.options.OutputFormat == config.FormatCommonJS && c.options.Platform == config.PlatformNode {
reservedNames["exports"] = 1
Expand Down