Skip to content

SyntaxError: Octal literals are not allowed in strict mode. #115

Description

@dipsylala

yarn-lock-file-generator-v3.js has the following issue:

key.x = s.charCodeAt(4) - 040;

    key.x = s.charCodeAt(4) - 040;
    key.y = s.charCodeAt(5) - 040;

A heads-up that this is causing a syntax error when running, due to the "use strict"; at the top.

Octal should be represented with 0o prefix:

    key.x = s.charCodeAt(4) - 0o40;
    key.y = s.charCodeAt(5) - 0o40;

This is also repeated in yarn-lock-file-generator-v2.js
https://github.com/GitHub-workflow-APP/veracode-31-mar-2026/blob/main/helper/yarn-lock-file-generator-v2.js#L13573

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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