{ "build_script": "build", "build_workdir": ".", "bundle_artifact": "", "decision_relevant_fields": [ "adapter_state.newPropClassApplied", "adapter_state.legacyWarningEmitted", "adapter_state.legacyPropClassApplied" ], "execution_mode": "node", "expected_page_errors": [], "instance_id": "hacker0x01__react-datepicker-4643", "payload": {}, "predicate_description": "The new calendarIconClassName prop is applied to the calendar icon SVG and the legacy calendarIconClassname prop emits a deprecation warning.", "predicate_js": "(s) => s.adapter_state.newPropClassApplied === true && s.adapter_state.legacyWarningEmitted === true", "product_output_kind": "rendered_document", "program_js": "const fs = require('fs');\n\nconst input = JSON.parse(Buffer.from(process.argv[1], 'base64').toString('utf8'));\nconst outputPath = process.argv[2];\n\nconst esc = (v) => String(v).replace(/&/g, '&').replace(//g, '>');\n\nlet state;\nlet page;\n\ntry {\n const React = require('react');\n const ReactDOMServer = require('react-dom/server');\n const DatePicker = require('/testbed/dist/index.js').default;\n\n const warnings = [];\n const originalWarn = console.warn;\n console.warn = (...args) => {\n warnings.push(args.join(' '));\n };\n\n const newPropClass = 'new-prop-class';\n const legacyPropClass = 'legacy-prop-class';\n\n const newPropHtml = ReactDOMServer.renderToStaticMarkup(\n React.createElement(DatePicker, {\n selected: new Date('2023-12-17T00:00:00Z'),\n showIcon: true,\n calendarIconClassName: newPropClass,\n toggleCalendarOnIconClick: true,\n })\n );\n\n const legacyPropHtml = ReactDOMServer.renderToStaticMarkup(\n React.createElement(DatePicker, {\n selected: new Date('2023-12-17T00:00:00Z'),\n showIcon: true,\n calendarIconClassname: legacyPropClass,\n toggleCalendarOnIconClick: true,\n })\n );\n\n console.warn = originalWarn;\n\n const newHasClass = newPropHtml.includes(newPropClass);\n const legacyHasClass = legacyPropHtml.includes(legacyPropClass);\n const legacyWarning = warnings.some(\n (w) => w.includes('calendarIconClassname') && w.includes('deprecated')\n );\n\n state = {\n render_ok: true,\n newPropClassApplied: newHasClass,\n legacyPropClassApplied: legacyHasClass,\n legacyWarningEmitted: legacyWarning,\n warnings: warnings,\n };\n\n page = `\n\n
\n\n