Skip to content

regex source property escaping value changed? #29888

@krohrsb

Description

@krohrsb
  • Version: 12.10.0 -> 12.11.0
  • Platform: Darwin mtvl1502b5c63 18.7.0 Darwin Kernel Version 18.7.0: Thu Jun 20 18:42:21 PDT 2019; root:xnu-4903.270.47~4/RELEASE_X86_64 x86_64
  • Subsystem: ?

It would appear the regex source property behavior changed between node versions 12.10.0 and 12.11.0

> process.versions.node
'12.10.0'
> /[\\/]node_modules[\\/]/.source
'[\\\\\\/]node_modules[\\\\\\/]'
> process.versions.node
'12.11.0'
> /[\\/]node_modules[\\/]/.source
'[\\\\/]node_modules[\\\\/]'

It would appear the generated string with escaped slashes differs.

Granted, the regex itself behaves the same (as far as I can tell) any tooling/logic depending on the value of source may be impacted (for example Jest snapshots).

If this was intended behavior and listed in a changelog, I could not locate it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    v8 engineIssues and PRs related to the V8 dependency.

    Type

    No type
    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