alibaba / react-intl-universal

Internationalize React apps. Not only for Component but also for Vanilla JS.
1.33k stars 153 forks source link

Drop querystring dependency #244

Closed Chevindu closed 6 months ago

Chevindu commented 6 months ago

Pull Request Template

Description

This change removes the dependency on querystring, which clears the following warning logged by NPM when installing react-intl-universal.

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

Type of change

How Has This Been Tested?

Using the existing test case: "Get locale from URL"

CLAassistant commented 6 months ago

CLA assistant check
All committers have signed the CLA.

Chevindu commented 6 months ago

Hi @cwtuan , please have a look at this if the time permits. I'm happy to do any tweaks if needed. Thank you.

cwtuan commented 6 months ago

@Chevindu please see the comment above

Chevindu commented 6 months ago

@Chevindu please see the comment above

Which one please? I only see the comment by CLAssistant which says "All committers have signed the CLA". I'm sorry if I misunderstood.

cwtuan commented 6 months ago

image

Chevindu commented 6 months ago

image

Thanks for the screenshot. I am unable to see your comment in my PR. Might be because the comment is still in Pending state.

I edited my PR according to your comment. However, jest, jest-cli and babel-jest had to be updated to v22 for jsdom to have access to URLSearchParams global.

cwtuan commented 6 months ago

Thanks for your awesome work! This PR is done. Version: react-intl-universal@2.11.1