lupomontero / psl

JavaScript domain name parser based on the Public Suffix List
https://www.npmjs.org/package/psl
MIT License
387 stars 79 forks source link

Node 22 Warning #323

Closed ackava closed 1 week ago

ackava commented 4 months ago

DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

As per punnycode , https://www.npmjs.com/package/punycode , require("punnycode") should be replaced with require("punnycode/")

BenjaminAster commented 4 months ago

The issue has been fixed already in #298, but no new version of this package has been published since 2022. @lupomontero could you please update the version in package.json to 1.9.1 and publish to npm? Thanks a lot in advance! (This is relatively serious since jsdom indirectly depends on psl through the tough-cookie package and thus jsdom users currently get deprecation warnings.)

ackava commented 4 months ago

@BenjaminAster There is no 1.9.1 in npm, https://www.npmjs.com/package/psl?activeTab=versions history shows last published version was 1.9.0.

BenjaminAster commented 4 months ago

@ackava Sorry if I was unclear in my wording – this is exactly what I meant; @lupomontero should publish a new version to npm (1.9.0 is the current version, so 1.9.1 or possibly 1.10.0 would be the next one).

ackava commented 4 months ago

@BenjaminAster Sorry, I thought you were the author. I checked the builds and last build has failed and I hope authors publish. However I checked tough-cookie, they have pre release build in which they have removed psl dependency.

damiensawyer commented 3 months ago

Thanks for that @BenjaminAster. If anyone finds this you can force the temporary override with the pre-release tough-cookie with

{ "name": "your-project-name", "version": "1.0.0", "scripts": { "start": "node index.js" }, "devDependencies": { "@vitest/ui": "2.0.4", "vitest": "2.0.4" }, "pnpm": { "overrides": { "tough-cookie": "5.0.0-rc.4" } } }

... then pnpm install.

NullVoxPopuli commented 3 months ago

just ran in to this deprecation -- would love to see a new release

BlackCat1397 commented 2 months ago

Up

jycouet commented 2 months ago

Yeahhh, would love it too

mo commented 1 month ago

node 22 is very soon LTS... would be really nice with a new release of psl that doesn't use punycode

lupomontero commented 1 week ago

Hi there, many apologies for taking so long to address this... I have just released a new version that should include a fix for this issue: https://github.com/lupomontero/psl/releases/tag/v1.10.0

NullVoxPopuli commented 1 week ago

thank you!

mo commented 1 week ago

great! thanks for fixing it @lupomontero