Re: baseline-browser-mapping not compatible with nodejs22

Hi folks

Karl, sorry for the slow response to this -  as Philip mentioned, I was on
parental leave.  I'm back online from this week.

I've switched to the createRequire import strategy mentioned in the
Stackoverflow post you shared, as this ensures broader Node
version compatibility.  I've published the changes to NPM, please do let me
know if you run into any further issues.

My plan is to make a PR on web-features rather than maintaining this in a
branch, but I ran out of time in December when I picked up childcare full
time.  PR is on my to-do list for this week, @François Daoust <fd@w3.org>
 and @Daniel Beck <daniel@ddbeck.com> I'll be in touch.

Cheers!

Tony Conway (he/him) | Web Ecosystem Consultant | conwayt@google.com


On Mon, 3 Feb 2025 at 09:33, Philip Jägenstedt <foolip@google.com> wrote:

> Hi Karl,
>
> This package is maintained by @Tony Conway <conwayt@google.com> who is
> out for a few weeks. Taking a peek at his GitHub repos, I think this NPM
> package is published from https://github.com/tonypconway/web-features.
> It's not possible to file an issue on that repo, so I'll leave it to Tony
> to respond here when he's back.
>
> Best regards,
> Philip
>
> On Mon, Feb 3, 2025 at 9:41 AM Karl Adler <adler@fudler.de> wrote:
>
>> Hey webdx members,
>> The module unfortunately does not work with nodejs 22:
>> https://www.npmjs.com/package/baseline-browser-mapping
>>
>> cause: /baseline-browser-mapping/dist/scripts/baseline-browser-versions.js
>>
>>
>> import bcdBrowsers from "@mdn/browser-compat-data" assert { type: "json"
>> };
>> import otherBrowsers from "../data/downstream-browsers.json" assert {
>> type: "json" };
>>
>>
>> This is due to support for "import assertions" being removed from Node in
>> favour of "import attributes", which are essentially the same thing except
>> you have to use the keyword with instead of assert:
>>
>> see: https://stackoverflow.com/a/78876692/1059828
>>
>> Unfortunately I wasn't able to find any public repository where to issue
>> a PR or bug report.
>>
>> Kind regards
>>
>> Karl Adler
>>
>> --
>> Karl Adler
>>
>> Tel. +49.151.50716666 <+49%201515%200716666>
>> adler@fudler.de
>> Karl Adler - Fudler - IT-Solutions
>>
>

Received on Monday, 24 February 2025 15:55:51 UTC