Skip to content

Replace deprecated querystring component with builtin URLSearchParams API #416

@foosbar

Description

@foosbar
  • Operating System: macOS 11.6.1
  • Node Version: 16.13.0
  • NPM Version: 8.1.0
  • webpack Version: 5.64.0
  • ${package} Version: 2.25.1

Expected Behavior / Situation

Installing dependencies (npm install) for my project produces a deprecation warning for the querystring dependency.

npm WARN deprecated querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.

Actual Behavior / Situation

Remove the warning by removing querystring as a dependency and using URLSearchParams API

Modification Proposal

  • Remove the querystring component from the project
  • Set the required minimum version of Node.js to >= 10.12.0 (picked this version since mocha has the same requirement - but Node.js 10 supports the full URLSearchParams API)
  • Update client.js to utilize this new API

The big question is can we limit webpack-hot-middleware to Node.js 10.12 or higher - webpack@5 requires 10.13 or higher.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions