omrilotan / isbot

🤖/👨‍🦰 Detect bots/crawlers/spiders using the user agent string
https://isbot.js.org/
The Unlicense
876 stars 72 forks source link

[build] Adjust import attributes to new specification #252

Closed omrilotan closed 3 months ago

omrilotan commented 3 months ago

Issue

Import of JSON modules have changed

Old:

import patterns from "../../src/patterns.json" assert { type: "json" };

New (node 22):

import patterns from "../../src/patterns.json" with { type: "json" };

see https://nodejs.org/api/esm.html#import-attributes

Solution:

Use file load to bridge version gap