{"record":{"id":"6b95984059b77bdb","repo":"swc-project/swc","slug":"targets","errorCode":null,"errorMessage":"Targets: {:?}","messagePattern":"Targets: (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/preset_env_base/src/query.rs","lineNumber":211,"sourceCode":"\n            let mut result = Versions::default();\n            for (k, v) in map.iter() {\n                match v {\n                    QueryOrVersion::Query(q) => {\n                        let (versions, is_unknown) = q.exec().context(\"failed to run query\")?;\n                        unknown_version = unknown_version || is_unknown;\n\n                        for (k, v) in versions.iter() {\n                            result.insert(k, *v);\n                        }\n                    }\n                    QueryOrVersion::Version(v) => {\n                        result.insert(k, Some(*v));\n                    }\n                }\n            }\n\n            unimplemented!(\"Targets: {:?}\", map)\n        }\n        _ => unimplemented!(\"Option<Targets>: {:?}\", v),\n    }\n}\n\n#[cfg(test)]\nmod tests {\n    use super::Query;\n\n    #[test]\n    fn test_empty() {\n        let (res, unknown_version) = Query::Single(\"\".into()).exec().unwrap();\n        assert!(\n            !res.is_any_target(),\n            \"empty query should return non-empty result\"\n        );\n        assert!(\n            !unknown_version,","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/swc-project/swc/blob/5176682b65416c6b5de6b47379ae1588ea3ecb3f/crates/preset_env_base/src/query.rs#L193-L229","documentation":"A todo!() in targets_to_versions (preset_env_base query.rs:211). While folding a browserlist targets map into a Versions struct, the loop expects every entry to be handled by the Query/Version arms; the todo fires for a targets map entry that reaches an unhandled spot in the iteration (an unexpected map shape/entry). The {:?} dump of the Targets value identifies the exact configuration that hit the stub.","triggerScenarios":"Thrown at crates/preset_env_base/src/query.rs:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the dumped Targets value and fix the configuration to use supported forms (version strings or browserlist queries)","Add the missing arm for the entry kind that reached the todo","Validate the targets input against the supported schema before running the query"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5176682b65416c6b5de6b47379ae1588ea3ecb3f","analyzedAt":"2026-08-17T16:16:52.067Z","contentChangedAt":"2026-08-17T16:16:52.067Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}