1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
Description: import error message has changed in node 22
Last-Update: 2025-11-22
Author: Jérémy Lal <kapouer@melix.org>
Forwarded: no, dead upstream
--- coffeescript-2.7.0+dfsg1.orig/test/import_assertions.coffee
+++ coffeescript-2.7.0+dfsg1/test/import_assertions.coffee
@@ -5,7 +5,7 @@ test "dynamic import assertion", ->
eq secret.ofLife, 42
catch exception
# This parses on Node 16.14.x but throws an error because JSON modules aren’t unflagged there yet; remove this try/catch once the unflagging of `--experimental-json-modules` is backported (see https://github.com/nodejs/node/pull/41736#issuecomment-1086738670)
- unless exception.message is 'Invalid module "data:application/json,{"ofLife":42}" has an unsupported MIME type "application/json"'
+ unless exception.message is 'Module "data:application/json,{"ofLife":42}" needs an import attribute of "type: json"'
throw exception
test "assert keyword", ->
@@ -16,7 +16,7 @@ test "assert keyword", ->
eq assert.thatIAm, 42
catch exception
# This parses on Node 16.14.x but throws an error because JSON modules aren’t unflagged there yet; remove this try/catch once the unflagging of `--experimental-json-modules` is backported (see https://github.com/nodejs/node/pull/41736#issuecomment-1086738670)
- unless exception.message is 'Invalid module "data:application/json,{"thatIAm":42}" has an unsupported MIME type "application/json"'
+ unless exception.message is 'Module "data:application/json,{"thatIAm":42}" needs an import attribute of "type: json"'
throw exception
eqJS """
|