SIGN IN SIGN UP
facebook / react-native UNCLAIMED

A framework for building native applications using React

0 0 0 C++

fix(cli): replace `querystring` with `URLSearchParam` (#45125)

Summary:
[`querystring`](https://www.npmjs.com/package/querystring) package is deprecated. In this Pull Request I've replaced usage of `querystring` with `URLSearchParam` what is recommended by Node.js.

It's also causing a warning when installing dependencies inside a React Native app:
```
warning react-native > react-native/community-cli-plugin > querystring@0.2.1: The querystring API is considered Legacy. new code should use the URLSearchParams API instead.
```

## Changelog:

[INTERNAL] [FIXED] - Replace `querystring` package with `URLSearchParam`

Pull Request resolved: https://github.com/facebook/react-native/pull/45125

Test Plan:
Params should be parsed in the same way and warning shouldn't be presented.

js1 jest xplat/js/tools/metro/packages/metro/src/cli/__tests__/parseKeyValueParamArray-test.js

Reviewed By: cipolleschi

Differential Revision: D58948498

Pulled By: GijsWeterings

fbshipit-source-id: 79b1f7b3feae230d2d3641205c513b98b3fda511
S
szymonrybczak committed
d1bf828398f81c8bef6537004547a52260af76b4
Parent: b34b694
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com> on 7/4/2024, 3:04:56 PM