Skip to content

Conversation

SuperchupuDev
Copy link
Contributor

Backport of npm/package-json#150

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

Closes #242

References

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 force-pushed the refactor/no-deprecated-url-parse branch from 5a5764a to 26419a3 Compare July 22, 2025 10:10
@wraithgar
Copy link
Member

This package is in the process of being replaced and deprecated. It was moved into @npmcli/package-json here and removed from npm itself here. We are waiting some updates in npm's dependenies before we deprecate this. It should be very soon, so we're not updating this package anymore.

@wraithgar wraithgar closed this Jul 22, 2025
@SuperchupuDev SuperchupuDev deleted the refactor/no-deprecated-url-parse branch July 22, 2025 15:33
@wraithgar
Copy link
Member

Looks like we have an unreleased version ready to go so I'll open and land this. But just heads up this is imminently being deprecated.

@wraithgar
Copy link
Member

I can not reopen this cause of auto branch deletion :/

Sorry about that. I'll land this if you reopen it.

@SuperchupuDev SuperchupuDev restored the refactor/no-deprecated-url-parse branch July 22, 2025 15:37
@SuperchupuDev
Copy link
Contributor Author

i've restored the branch, it should be reopenable now i think?

@wraithgar wraithgar reopened this Jul 22, 2025
@wraithgar wraithgar merged commit 97fb20a into npm:main Jul 22, 2025
39 checks passed
@SuperchupuDev SuperchupuDev deleted the refactor/no-deprecated-url-parse branch July 22, 2025 15:56
@github-actions github-actions bot mentioned this pull request Jul 10, 2025
wraithgar pushed a commit that referenced this pull request Jul 22, 2025
🤖 I have created a release *beep* *boop*
---


##
[7.0.1](v7.0.0...v7.0.1)
(2025-07-22)
### Bug Fixes
*
[`97fb20a`](97fb20a)
[#247](#247) use
`URL.canParse` instead of runtime deprecated `url.parse` api (#247)
(@SuperchupuDev)
*
[`cc37f25`](cc37f25)
[#244](#244) use
`isBuiltin` instead of `builtinModules` (#244) (@SuperchupuDev)
### Chores
*
[`acafa71`](acafa71)
[#245](#245) bump
@npmcli/template-oss from 4.24.4 to 4.25.0 (#245) (@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.

[CHORE] Node 24 warns of urlParse use in fixHomepageField
2 participants