From f69653864d20813aebf83daf959341ca29e12595 Mon Sep 17 00:00:00 2001 From: valadaptive Date: Sat, 15 Jun 2024 22:36:43 -0400 Subject: [PATCH] Replace import assertions with import attributes These no longer build in Node 22 since import assertions were removed: https://github.com/nodejs/node/pull/52104 --- rollup.config.js | 2 +- tests/syntax.test.js | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/rollup.config.js b/rollup.config.js index 607b7919..90b0baea 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,6 +1,6 @@ import babel from "@rollup/plugin-babel" import json from "@rollup/plugin-json" -import pkg from "./package.json" assert { "type": "json" } +import pkg from "./package.json" with { "type": "json" } import serve from "rollup-plugin-serve" import license from "rollup-plugin-license" import terser from "@rollup/plugin-terser" diff --git a/tests/syntax.test.js b/tests/syntax.test.js index 0ff71258..cefd6afb 100644 --- a/tests/syntax.test.js +++ b/tests/syntax.test.js @@ -1,11 +1,11 @@ import { parse, loadLanguages, allLanguages } from "../syntax" -import de from "../locales/de.json" assert { "type": "json" } -import ja from "../locales/ja.json" assert { "type": "json" } -import ko from "../locales/ko.json" assert { "type": "json" } -import pt_br from "../locales/pt-br.json" assert { "type": "json" } -import rap from "../locales/rap.json" assert { "type": "json" } -import uz from "../locales/uz.json" assert { "type": "json" } +import de from "../locales/de.json" with { "type": "json" } +import ja from "../locales/ja.json" with { "type": "json" } +import ko from "../locales/ko.json" with { "type": "json" } +import pt_br from "../locales/pt-br.json" with { "type": "json" } +import rap from "../locales/rap.json" with { "type": "json" } +import uz from "../locales/uz.json" with { "type": "json" } loadLanguages({ de,