Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

SuperchupuDev
Copy link
Contributor

@SuperchupuDev SuperchupuDev commented Jul 22, 2025

url.parse is runtime deprecated. It looks like it's being used here to somewhat check if the string is a valid URL, so I've changed that to URL.canParse which is the compliant way of checking whether a string is a valid and parsable URL. URL.canParse was added in node 18.17.0 and 19.9.0

I've backported this to normalize-package-data: npm/normalize-package-data#247

References

npm/normalize-package-data#242
pnpm/pnpm#9529
https://developer.mozilla.org/en-US/docs/Web/API/URL/canParse_static
https://nodejs.org/api/url.html#urlcanparseinput-base

@SuperchupuDev SuperchupuDev requested a review from a team as a code owner July 22, 2025 09:17
@SuperchupuDev SuperchupuDev force-pushed the refactor/no-deprecated-url-parse branch from 9036160 to 3503682 Compare July 22, 2025 09:23
@wraithgar wraithgar merged commit 4695e87 into npm:main Jul 22, 2025
20 checks passed
@SuperchupuDev SuperchupuDev deleted the refactor/no-deprecated-url-parse branch July 22, 2025 15:40
@github-actions github-actions bot mentioned this pull request Jul 22, 2025
owlstronaut pushed a commit that referenced this pull request Aug 28, 2025
🤖 I have created a release *beep* *boop*
---


## [7.0.0](v6.2.0...v7.0.0)
(2025-07-25)
### ⚠️ BREAKING CHANGES
* `package-json` now supports node `^20.17.0 || >=22.9.0`
### Features
*
[`9dd0eb5`](9dd0eb5)
[#144](#144) add syncNormalize
(@wraithgar)
*
[`08eae47`](08eae47)
[#144](#144) add binDir step to
normalize function (@wraithgar)
### Bug Fixes
*
[`a5e4ac3`](a5e4ac3)
[#152](#152) align to npm 11
node engine range (@owlstronaut)
*
[`4695e87`](4695e87)
[#150](#150) use `URL.canParse`
instead of runtime deprecated `url.parse` api (#150) (@SuperchupuDev)
*
[`dbc9ef1`](dbc9ef1)
[#144](#144) require an object
in fromContent() (@wraithgar)
*
[`f06eb18`](f06eb18)
[#144](#144) remove unused
bundleDependenciesFalse (@wraithgar)
*
[`a8b1cc9`](a8b1cc9)
[#144](#144) secure and unixify
paths discovered via directories.bin (@wraithgar)
*
[`23c29a9`](23c29a9)
[#144](#144) remove erroneous
bundledDependencies log (@wraithgar)
### Documentation
*
[`14f8141`](14f8141)
[#147](#147) adding sort option
docs to README (#147) (@idhard)
### Dependencies
*
[`a0dcfde`](a0dcfde)
[#152](#152)
`[email protected]`
*
[`41128c1`](41128c1)
[#152](#152) `[email protected]`
### Chores
*
[`a179a87`](a179a87)
[#144](#144) fix tests to await
async normalize (@wraithgar)
*
[`203fec8`](203fec8)
[#144](#144) remove
read-package-json (@wraithgar)
*
[`7bde184`](7bde184)
[#144](#144) remove
read-package-json-fast (@wraithgar)
*
[`394192d`](394192d)
[#144](#144) remove backward
compatiblity tests (@wraithgar)
*
[`6e89e39`](6e89e39)
[#148](#148) bump
@npmcli/template-oss from 4.23.6 to 4.25.0 (#148) (@dependabot[bot],
@owlstronaut)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants