Skip to content

Invalid use of syntax ?? and ||= #8120

Description

@catamphetamine

Checkboxes for prior research

Describe the bug

In Node.js 10, 12:

/home/runner/work/node-unzipper/node-unzipper/node_modules/@aws-sdk/client-s3/dist-cjs/index.js:25
        useFipsEndpoint: options.useFipsEndpoint ?? false,
                                                  ^

SyntaxError: Unexpected token ?

In Node.js 14:

/home/runner/work/node-unzipper/node-unzipper/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js:71
Retry.v2026 ||= typeof process === "object" && process.env?.AWS_NEW_RETRIES_2026 === "true";
            ^^^

SyntaxError: Unexpected token '||='

Regression Issue

  • Select this option if this issue appears to be a regression.

SDK version number

@aws-sdk/client-s3@3.1074.0

Which JavaScript Runtime is this issue in?

Node.js

Details of the browser/Node.js/ReactNative version

10, 12, 14

Reproduction Steps

import or require() @aws-sdk/client-s3 package

Observed Behavior

Throws the errors

Expected Behavior

Not throws the errors

Possible Solution

No response

Additional Information/Context

No response

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.p3This is a minor priority issueresponse-requestedWaiting on additional info and feedback. Will move to \"closing-soon\" in 7 days.

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions