You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -201,6 +206,7 @@ impl fmt::Display for ModuleGraphError {
201
206
Self::InvalidSource(specifier,Some(filename)) => write!(f,"The source code is invalid, as it does not match the expected hash in the lock file.\n Specifier: {}\n Lock file: {}", specifier, filename),
202
207
Self::InvalidSource(specifier,None) => write!(f,"The source code is invalid, as it does not match the expected hash in the lock file.\n Specifier: {}", specifier),
203
208
Self::InvalidTypeAssertion{ specifier, actual_media_type, expected_media_type } => write!(f,"Expected a {} module, but identified a {} module.\n Specifier: {}", expected_media_type, actual_media_type, specifier),
209
+
Self::ConflictingAssertions(specifier) => write!(f,"Module \"{specifier}\" was imported with conflicting assertions."),
204
210
Self::UnsupportedMediaType(specifier,MediaType::Json) => write!(f,"Expected a JavaScript or TypeScript module, but identified a Json module. Consider importing Json modules with an import assertion with the type of \"json\".\n Specifier: {}", specifier),
205
211
Self::UnsupportedMediaType(specifier, media_type) => write!(f,"Expected a JavaScript or TypeScript module, but identified a {} module. Importing these types of modules is currently not supported.\n Specifier: {}", media_type, specifier),
206
212
Self::UnsupportedImportAssertionType(_, kind) => write!(f,"The import assertion type of \"{}\" is unsupported.", kind),
@@ -1171,7 +1177,7 @@ fn resolve(
1171
1177
pub(crate)fnparse_module(
1172
1178
specifier:&ModuleSpecifier,
1173
1179
maybe_headers:Option<&HashMap<String,String>>,
1174
-
content:Arc<String>,
1180
+
content:String,
1175
1181
maybe_assert_type:Option<&str>,
1176
1182
maybe_kind:Option<&ModuleKind>,
1177
1183
maybe_resolver:Option<&dynResolver>,
@@ -1181,6 +1187,8 @@ pub(crate) fn parse_module(
1181
1187
) -> ModuleSlot{
1182
1188
let media_type = get_media_type(specifier, maybe_headers);
1183
1189
1190
+
let content = content.into();
1191
+
1184
1192
// here we check any media types that should have assertions made against them
1185
1193
// if they aren't the root and add them to the graph, otherwise we continue
0 commit comments