[{"data":1,"prerenderedAt":1939},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-migration":129,"-getting-started-migration-surround":1934},[4,45,62,88,108],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":6},"Getting Started",false,"\u002Fgetting-started","1.getting-started",[10,15,20,25,30,35,40],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F3.installation","i-lucide-download",{"title":21,"path":22,"stem":23,"icon":24},"Configuration","\u002Fgetting-started\u002Fconfiguration","1.getting-started\u002F4.configuration","i-lucide-settings",{"title":26,"path":27,"stem":28,"icon":29},"Supported Formats","\u002Fgetting-started\u002Fsupported-formats","1.getting-started\u002F5.supported-formats","i-lucide-file-code",{"title":31,"path":32,"stem":33,"icon":34},"Agent Skill","\u002Fgetting-started\u002Fagent-skill","1.getting-started\u002F6.agent-skill","i-lucide-cpu",{"title":36,"path":37,"stem":38,"icon":39},"Changelog","\u002Fgetting-started\u002Fchangelog","1.getting-started\u002F7.changelog","i-lucide-scroll-text",{"title":41,"path":42,"stem":43,"icon":44},"Migrating from v4 to v5","\u002Fgetting-started\u002Fmigration","1.getting-started\u002F8.migration","i-lucide-arrow-right-left",{"title":46,"path":47,"stem":48,"children":49,"icon":6},"CI & Hooks","\u002Fci-and-hooks","2.ci-and-hooks\u002F1.index",[50,52,57],{"title":46,"path":47,"stem":48,"icon":51},"i-lucide-git-pull-request",{"title":53,"path":54,"stem":55,"icon":56},"Use jscpd in CI","\u002Fci-and-hooks\u002Fci","2.ci-and-hooks\u002F2.ci","i-lucide-github",{"title":58,"path":59,"stem":60,"icon":61},"Use jscpd in Pre-Commit Hook","\u002Fci-and-hooks\u002Fpre-commit","2.ci-and-hooks\u002F3.pre-commit","i-lucide-git-commit",{"title":63,"path":64,"stem":65,"children":66,"icon":68},"Reporters","\u002Freporters","3.reporters\u002F1.index",[67,69,73,78,83],{"title":63,"path":64,"stem":65,"icon":68},"i-lucide-file-chart-column",{"title":70,"path":71,"stem":72,"icon":29},"HTML Reporter","\u002Freporters\u002Fhtml","3.reporters\u002F2.html",{"title":74,"path":75,"stem":76,"icon":77},"JSON Reporter","\u002Freporters\u002Fjson","3.reporters\u002F3.json","i-lucide-braces",{"title":79,"path":80,"stem":81,"icon":82},"Badge Reporter","\u002Freporters\u002Fbadge","3.reporters\u002F4.badge","i-lucide-award",{"title":84,"path":85,"stem":86,"icon":87},"SARIF Reporter","\u002Freporters\u002Fsarif","3.reporters\u002F5.sarif","i-lucide-shield-check",{"title":89,"icon":6,"path":90,"stem":91,"children":92,"page":6},"Benchmarks","\u002Fbenchmarks","4.benchmarks",[93,98,103],{"title":94,"path":95,"stem":96,"icon":97},"Detection Speed","\u002Fbenchmarks\u002Fdetection-speed","4.benchmarks\u002F1.detection-speed","i-lucide-zap",{"title":99,"path":100,"stem":101,"icon":102},"Multi-Format Detection","\u002Fbenchmarks\u002Fcross-format","4.benchmarks\u002F2.cross-format","i-lucide-layers",{"title":104,"path":105,"stem":106,"icon":107},"AI Token Efficiency","\u002Fbenchmarks\u002Fai-token-efficiency","4.benchmarks\u002F3.ai-token-efficiency","i-lucide-sparkles",{"title":109,"path":110,"stem":111,"children":112,"icon":114},"API","\u002Fapi","5.api\u002F1.index",[113,115,120,125],{"title":109,"path":110,"stem":111,"icon":114},"i-lucide-code",{"title":116,"path":117,"stem":118,"icon":119},"Rust Crates (v5)","\u002Fapi\u002Fcore","5.api\u002F2.core","i-lucide-box",{"title":121,"path":122,"stem":123,"icon":124},"Server API","\u002Fapi\u002Fserver","5.api\u002F3.server","i-lucide-server",{"title":126,"path":127,"stem":128,"icon":119},"MCP Server","\u002Fapi\u002Fmcp-server","5.api\u002F4.mcp-server",{"id":130,"title":41,"body":131,"description":1926,"extension":1927,"links":1928,"meta":1929,"navigation":1930,"path":42,"seo":1931,"stem":43,"__hash__":1933},"docs\u002F1.getting-started\u002F8.migration.md",{"type":132,"value":133,"toc":1901},"minimark",[134,143,153,158,250,254,344,350,354,359,420,424,478,482,536,540,568,572,576,583,698,703,752,759,770,774,786,790,793,852,856,859,863,1130,1142,1149,1152,1271,1275,1278,1391,1394,1397,1401,1453,1456,1496,1527,1531,1592,1643,1647,1652,1787,1797,1801,1897],[135,136,137,138,142],"p",{},"jscpd v5 is a ",[139,140,141],"strong",{},"complete Rust rewrite"," that replaces the TypeScript engine with a native binary. This guide covers what changed, what's compatible, and how to run both versions side by side.",[144,145,146],"blockquote",{},[135,147,148,149,152],{},"For cross-tool benchmark comparisons (jscpd vs Duplo, Simian, PMD CPD, and more), see ",[150,151,94],"a",{"href":95},".",[154,155,157],"h2",{"id":156},"why-v5","Why v5?",[159,160,161,176],"table",{},[162,163,164],"thead",{},[165,166,167,170,173],"tr",{},[168,169],"th",{},[168,171,172],{},"v4 (TypeScript)",[168,174,175],{},"v5 (Rust)",[177,178,179,193,206,219,232],"tbody",{},[165,180,181,187,190],{},[182,183,184],"td",{},[139,185,186],{},"Speed",[182,188,189],{},"Baseline",[182,191,192],{},"24-37x faster",[165,194,195,200,203],{},[182,196,197],{},[139,198,199],{},"Runtime",[182,201,202],{},"Requires Node.js",[182,204,205],{},"Self-contained binary",[165,207,208,213,216],{},[182,209,210],{},[139,211,212],{},"Install size",[182,214,215],{},"~15 MB (node_modules)",[182,217,218],{},"~5 MB (single binary)",[165,220,221,226,229],{},[182,222,223],{},[139,224,225],{},"JS\u002FTS tokenizer",[182,227,228],{},"PrismJS",[182,230,231],{},"OXC parser",[165,233,234,239,242],{},[182,235,236],{},[139,237,238],{},"Parallel detection",[182,240,241],{},"No",[182,243,244,245,249],{},"Yes (",[246,247,248],"code",{},"--workers",")",[251,252,94],"h3",{"id":253},"detection-speed",[159,255,256,276],{},[162,257,258],{},[165,259,260,263,266,269,271,273],{},[168,261,262],{},"Target",[168,264,265],{},"Files",[168,267,268],{},"Size",[168,270,172],{},[168,272,175],{},[168,274,275],{},"Speedup",[177,277,278,300,322],{},[165,279,280,283,286,289,292,295],{},[182,281,282],{},"fixtures",[182,284,285],{},"548",[182,287,288],{},"1.5 MB",[182,290,291],{},"1.03s",[182,293,294],{},"0.03s",[182,296,297],{},[139,298,299],{},"34.3x",[165,301,302,305,308,311,314,317],{},[182,303,304],{},"Svelte",[182,306,307],{},"8,963",[182,309,310],{},"38 MB",[182,312,313],{},"15.80s",[182,315,316],{},"0.43s",[182,318,319],{},[139,320,321],{},"36.9x",[165,323,324,327,330,333,336,339],{},[182,325,326],{},"CopilotKit",[182,328,329],{},"17,092",[182,331,332],{},"159 MB",[182,334,335],{},"82.89s",[182,337,338],{},"3.44s",[182,340,341],{},[139,342,343],{},"24.1x",[135,345,346],{},[347,348,349],"em",{},"Benchmarked on macOS (Apple Silicon), 10 runs for fixtures\u002FSvelte, 3 for CopilotKit.",[251,351,353],{"id":352},"detailed-timing","Detailed Timing",[355,356,358],"h4",{"id":357},"fixtures-548-files-15-mb","fixtures (548 files, 1.5 MB)",[159,360,361,374],{},[162,362,363],{},[165,364,365,368,371],{},[168,366,367],{},"Metric",[168,369,370],{},"v4",[168,372,373],{},"v5",[177,375,376,387,398,409],{},[165,377,378,381,384],{},[182,379,380],{},"Mean real time",[182,382,383],{},"1.030s",[182,385,386],{},"0.030s",[165,388,389,392,395],{},[182,390,391],{},"Std dev",[182,393,394],{},"0.042s",[182,396,397],{},"0.000s",[165,399,400,403,406],{},[182,401,402],{},"Mean user time",[182,404,405],{},"1.174s",[182,407,408],{},"0.085s",[165,410,411,414,417],{},[182,412,413],{},"Mean sys time",[182,415,416],{},"0.074s",[182,418,419],{},"0.050s",[355,421,423],{"id":422},"svelte-8963-files-38-mb","Svelte (8,963 files, 38 MB)",[159,425,426,436],{},[162,427,428],{},[165,429,430,432,434],{},[168,431,367],{},[168,433,370],{},[168,435,373],{},[177,437,438,448,458,468],{},[165,439,440,442,445],{},[182,441,380],{},[182,443,444],{},"15.803s",[182,446,447],{},"0.428s",[165,449,450,452,455],{},[182,451,391],{},[182,453,454],{},"1.010s",[182,456,457],{},"0.021s",[165,459,460,462,465],{},[182,461,402],{},[182,463,464],{},"16.075s",[182,466,467],{},"0.553s",[165,469,470,472,475],{},[182,471,413],{},[182,473,474],{},"0.738s",[182,476,477],{},"1.110s",[355,479,481],{"id":480},"copilotkit-17092-files-159-mb","CopilotKit (17,092 files, 159 MB)",[159,483,484,494],{},[162,485,486],{},[165,487,488,490,492],{},[168,489,367],{},[168,491,370],{},[168,493,373],{},[177,495,496,506,516,526],{},[165,497,498,500,503],{},[182,499,380],{},[182,501,502],{},"82.890s",[182,504,505],{},"3.440s",[165,507,508,510,513],{},[182,509,391],{},[182,511,512],{},"4.086s",[182,514,515],{},"0.699s",[165,517,518,520,523],{},[182,519,402],{},[182,521,522],{},"100.020s",[182,524,525],{},"7.323s",[165,527,528,530,533],{},[182,529,413],{},[182,531,532],{},"18.263s",[182,534,535],{},"3.100s",[251,537,539],{"id":538},"key-observations","Key Observations",[541,542,543,550,556,562],"ol",{},[544,545,546,549],"li",{},[139,547,548],{},"Startup overhead",": v5's native binary has near-zero startup cost. v4's Node.js runtime adds ~1s even for tiny fixtures.",[544,551,552,555],{},[139,553,554],{},"Scaling",": CopilotKit (159 MB) takes only 3.4s with v5 vs 83s with v4.",[544,557,558,561],{},[139,559,560],{},"CPU utilization",": v5's higher user time relative to real time (e.g., CopilotKit: 7.3s user vs 3.4s real) shows effective multi-threading. v4 is single-threaded (user ≈ real).",[544,563,564,567],{},[139,565,566],{},"Consistency",": v5 has tighter variance across all runs.",[154,569,571],{"id":570},"breaking-changes","Breaking Changes",[251,573,575],{"id":574},"nodejs-api-removed","Node.js API Removed",[135,577,578,579,582],{},"The v4 programmatic API is ",[139,580,581],{},"not available in v5",":",[584,585,590],"pre",{"className":586,"code":587,"language":588,"meta":589,"style":589},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F ❌ v4 only — not available in v5\nimport { jscpd } from 'jscpd';\nconst clones = await jscpd(['', '', '.\u002Fsrc', '-r', 'json']);\n","typescript","",[246,591,592,601,635],{"__ignoreMap":589},[593,594,597],"span",{"class":595,"line":596},"line",1,[593,598,600],{"class":599},"sHwdD","\u002F\u002F ❌ v4 only — not available in v5\n",[593,602,604,608,612,616,619,622,625,629,632],{"class":595,"line":603},2,[593,605,607],{"class":606},"s7zQu","import",[593,609,611],{"class":610},"sMK4o"," {",[593,613,615],{"class":614},"sTEyZ"," jscpd",[593,617,618],{"class":610}," }",[593,620,621],{"class":606}," from",[593,623,624],{"class":610}," '",[593,626,628],{"class":627},"sfazB","jscpd",[593,630,631],{"class":610},"'",[593,633,634],{"class":610},";\n",[593,636,638,642,645,648,651,654,657,660,663,666,668,670,673,675,677,679,682,684,686,688,691,693,696],{"class":595,"line":637},3,[593,639,641],{"class":640},"spNyl","const",[593,643,644],{"class":614}," clones ",[593,646,647],{"class":610},"=",[593,649,650],{"class":606}," await",[593,652,615],{"class":653},"s2Zo4",[593,655,656],{"class":614},"([",[593,658,659],{"class":610},"''",[593,661,662],{"class":610},",",[593,664,665],{"class":610}," ''",[593,667,662],{"class":610},[593,669,624],{"class":610},[593,671,672],{"class":627},".\u002Fsrc",[593,674,631],{"class":610},[593,676,662],{"class":610},[593,678,624],{"class":610},[593,680,681],{"class":627},"-r",[593,683,631],{"class":610},[593,685,662],{"class":610},[593,687,624],{"class":610},[593,689,690],{"class":627},"json",[593,692,631],{"class":610},[593,694,695],{"class":614},"])",[593,697,634],{"class":610},[135,699,700],{},[139,701,702],{},"Alternatives:",[704,705,706,715,727,742],"ul",{},[544,707,708,711,712,714],{},[139,709,710],{},"CLI",": Use ",[246,713,628],{}," as a subprocess and parse JSON output",[544,716,717,711,720,726],{},[139,718,719],{},"Rust crate",[150,721,723],{"href":722},"\u002Fapi\u002Frust-crates",[246,724,725],{},"cpd-finder"," in Rust applications",[544,728,729,732,733,736,737,741],{},[139,730,731],{},"v4 package",": Install ",[246,734,735],{},"jscpd@4"," for the Node.js API (see ",[150,738,740],{"href":739},"#coexistence","coexistence"," below)",[544,743,744,747,748,751],{},[139,745,746],{},"Server",": Use the ",[150,749,750],{"href":122},"jscpd-server"," REST API",[251,753,755,758],{"id":754},"store-leveldb-removed",[246,756,757],{},"--store leveldb"," Removed",[135,760,761,762,765,766,769],{},"The external store backend (LevelDB\u002FRedis) is not supported in v5 — the Rust engine is fast enough that caching isn't needed. The ",[246,763,764],{},"--store"," and ",[246,767,768],{},"--store-path"," flags are accepted for compatibility but do nothing.",[251,771,773],{"id":772},"reporter-name-change","Reporter Name Change",[704,775,776],{},[544,777,778,779,782,783],{},"v4's ",[246,780,781],{},"full"," reporter → v5's ",[246,784,785],{},"consoleFull",[251,787,789],{"id":788},"output-filenames","Output Filenames",[135,791,792],{},"Some reporter output filenames changed:",[159,794,795,806],{},[162,796,797],{},[165,798,799,802,804],{},[168,800,801],{},"Reporter",[168,803,370],{},[168,805,373],{},[177,807,808,823,838],{},[165,809,810,813,818],{},[182,811,812],{},"HTML",[182,814,815],{},[246,816,817],{},"html\u002Findex.html",[182,819,820],{},[246,821,822],{},"jscpd-report.html",[165,824,825,828,833],{},[182,826,827],{},"JSON",[182,829,830],{},[246,831,832],{},"jscpd-report.json",[182,834,835,837],{},[246,836,832],{}," (unchanged)",[165,839,840,843,848],{},[182,841,842],{},"XML",[182,844,845],{},[246,846,847],{},"jscpd-report.xml",[182,849,850,837],{},[246,851,847],{},[251,853,855],{"id":854},"token-counts","Token Counts",[135,857,858],{},"Token counts may differ by 1-2% from v4 due to the OXC tokenizer handling JS\u002FTS\u002FJSX\u002FTSX differently than PrismJS.",[251,860,862],{"id":861},"cli-flag-changes","CLI Flag Changes",[159,864,865,876],{},[162,866,867],{},[165,868,869,871,873],{},[168,870,370],{},[168,872,373],{},[168,874,875],{},"Notes",[177,877,878,895,914,929,941,960,982,994,1004,1019,1031,1046,1060,1074,1088,1102,1116],{},[165,879,880,885,888],{},[182,881,882],{},[246,883,884],{},"--noSymlinks",[182,886,887],{},"(removed)",[182,889,890,891,894],{},"Symlinks are not followed by default; use ",[246,892,893],{},"--follow-symlinks"," to follow",[165,896,897,902,904],{},[182,898,899],{},[246,900,901],{},"--gitignore",[182,903,887],{},[182,905,906,909,910,913],{},[246,907,908],{},".gitignore"," is respected by default; use ",[246,911,912],{},"--no-gitignore"," to disable",[165,915,916,921,923],{},[182,917,918],{},[246,919,920],{},"-g",[182,922,887],{},[182,924,925,926,928],{},"Use ",[246,927,912],{}," to invert",[165,930,931,936,938],{},[182,932,933],{},[246,934,935],{},"-n",[182,937,887],{},[182,939,940],{},"Symlinks are not followed by default",[165,942,943,952,954],{},[182,944,945,948,949],{},[246,946,947],{},"-d"," \u002F ",[246,950,951],{},"--debug",[182,953,887],{},[182,955,925,956,959],{},[246,957,958],{},"--verbose"," instead",[165,961,962,966,973],{},[182,963,964],{},[246,965,958],{},[182,967,968,948,971],{},[246,969,970],{},"-v",[246,972,958],{},[182,974,975,976,978,979,981],{},"Short flag ",[246,977,970],{}," now shows version; use ",[246,980,958],{}," for verbose output",[165,983,984,988,991],{},[182,985,986],{},[246,987,757],{},[182,989,990],{},"accepted, ignored",[182,992,993],{},"No external store in v5",[165,995,996,1000,1002],{},[182,997,998],{},[246,999,768],{},[182,1001,990],{},[182,1003,993],{},[165,1005,1006,1009,1016],{},[182,1007,1008],{},"—",[182,1010,1011,948,1014],{},[246,1012,1013],{},"-w",[246,1015,248],{},[182,1017,1018],{},"New: control parallel detection threads",[165,1020,1021,1023,1028],{},[182,1022,1008],{},[182,1024,1025],{},[246,1026,1027],{},"--no-colors",[182,1029,1030],{},"New: disable ANSI color output",[165,1032,1033,1038,1043],{},[182,1034,1035],{},[246,1036,1037],{},"--skipComments",[182,1039,1040],{},[246,1041,1042],{},"--skip-comments",[182,1044,1045],{},"Kebab-case (camelCase still works in config)",[165,1047,1048,1053,1058],{},[182,1049,1050],{},[246,1051,1052],{},"--skipLocal",[182,1054,1055],{},[246,1056,1057],{},"--skip-local",[182,1059,1045],{},[165,1061,1062,1067,1072],{},[182,1063,1064],{},[246,1065,1066],{},"--noTips",[182,1068,1069],{},[246,1070,1071],{},"--no-tips",[182,1073,1045],{},[165,1075,1076,1081,1086],{},[182,1077,1078],{},[246,1079,1080],{},"--ignoreCase",[182,1082,1083],{},[246,1084,1085],{},"--ignore-case",[182,1087,1045],{},[165,1089,1090,1095,1100],{},[182,1091,1092],{},[246,1093,1094],{},"--formatsExts",[182,1096,1097],{},[246,1098,1099],{},"--formats-exts",[182,1101,1045],{},[165,1103,1104,1109,1114],{},[182,1105,1106],{},[246,1107,1108],{},"--formatsNames",[182,1110,1111],{},[246,1112,1113],{},"--formats-names",[182,1115,1045],{},[165,1117,1118,1123,1128],{},[182,1119,1120],{},[246,1121,1122],{},"--exitCode",[182,1124,1125],{},[246,1126,1127],{},"--exit-code",[182,1129,1045],{},[144,1131,1132],{},[135,1133,1134,1137,1138,1141],{},[139,1135,1136],{},"Note:"," CamelCase names still work in ",[246,1139,1140],{},".jscpd.json"," config files. The kebab-case change only affects CLI flags.",[251,1143,1145,1148],{"id":1144},"jscpd-packages",[246,1146,1147],{},"@jscpd\u002F*"," Packages",[135,1150,1151],{},"The v4 ecosystem packages are replaced by Rust crates:",[159,1153,1154,1164],{},[162,1155,1156],{},[165,1157,1158,1161],{},[168,1159,1160],{},"v4 Package",[168,1162,1163],{},"v5 Replacement",[177,1165,1166,1181,1194,1205,1217,1230,1241,1252,1262],{},[165,1167,1168,1172],{},[182,1169,1170],{},[246,1171,628],{},[182,1173,1174,1177,1178],{},[246,1175,1176],{},"jscpd@5"," (npm, installs native binary) or ",[246,1179,1180],{},"cargo install jscpd",[165,1182,1183,1188],{},[182,1184,1185],{},[246,1186,1187],{},"@jscpd\u002Fcore",[182,1189,1190,1193],{},[246,1191,1192],{},"cpd-core"," (Rust crate)",[165,1195,1196,1201],{},[182,1197,1198],{},[246,1199,1200],{},"@jscpd\u002Ffinder",[182,1202,1203,1193],{},[246,1204,725],{},[165,1206,1207,1212],{},[182,1208,1209],{},[246,1210,1211],{},"@jscpd\u002Ftokenizer",[182,1213,1214,1193],{},[246,1215,1216],{},"cpd-tokenizer",[165,1218,1219,1224],{},[182,1220,1221],{},[246,1222,1223],{},"@jscpd\u002Fhtml-reporter",[182,1225,1226,1227,1193],{},"Built into ",[246,1228,1229],{},"cpd-reporter",[165,1231,1232,1237],{},[182,1233,1234],{},[246,1235,1236],{},"@jscpd\u002Fbadge-reporter",[182,1238,1226,1239,1193],{},[246,1240,1229],{},[165,1242,1243,1248],{},[182,1244,1245],{},[246,1246,1247],{},"@jscpd\u002Fsarif-reporter",[182,1249,1226,1250,1193],{},[246,1251,1229],{},[165,1253,1254,1259],{},[182,1255,1256],{},[246,1257,1258],{},"@jscpd\u002Fleveldb-store",[182,1260,1261],{},"Removed (not needed)",[165,1263,1264,1268],{},[182,1265,1266],{},[246,1267,750],{},[182,1269,1270],{},"Still available (Node.js based, unchanged)",[154,1272,1274],{"id":1273},"compatible-features","Compatible Features",[135,1276,1277],{},"These work the same in both v4 and v5:",[704,1279,1280,1289,1300,1317,1323,1329,1366,1380],{},[544,1281,1282,1285,1286,1288],{},[139,1283,1284],{},"CLI interface",": Same command name (",[246,1287,628],{},"), same flags structure",[544,1290,1291,1296,1297,1299],{},[139,1292,1293,1295],{},[246,1294,1140],{}," config",": Fully compatible (uses ",[246,1298,628],{}," as the config key)",[544,1301,1302,1305,1306,1309,1310,1309,1313,1316],{},[139,1303,1304],{},"Detection modes",": ",[246,1307,1308],{},"strict",", ",[246,1311,1312],{},"mild",[246,1314,1315],{},"weak"," — identical behavior",[544,1318,1319,1322],{},[139,1320,1321],{},"Cross-format detection",": Vue SFC, Svelte, Astro, Markdown — same support",[544,1324,1325,1328],{},[139,1326,1327],{},"Shebang detection",": Same behavior",[544,1330,1331,1305,1333,1309,1336,1309,1338,1309,1341,1309,1344,1309,1347,1309,1350,1309,1353,1309,1356,1309,1359,1309,1362,1365],{},[139,1332,63],{},[246,1334,1335],{},"console",[246,1337,690],{},[246,1339,1340],{},"xml",[246,1342,1343],{},"csv",[246,1345,1346],{},"html",[246,1348,1349],{},"markdown",[246,1351,1352],{},"sarif",[246,1354,1355],{},"ai",[246,1357,1358],{},"badge",[246,1360,1361],{},"threshold",[246,1363,1364],{},"silent"," — all present in both versions",[544,1367,1368,1373,1374,948,1377,249],{},[139,1369,1370],{},[246,1371,1372],{},"--ignore-pattern",": Same inline ignore blocks (",[246,1375,1376],{},"jscpd:ignore-start",[246,1378,1379],{},"jscpd:ignore-end",[544,1381,1382,1305,1385,765,1388,1390],{},[139,1383,1384],{},"Exit codes",[246,1386,1387],{},"--threshold",[246,1389,1127],{}," work the same",[154,1392,1393],{"id":740},"Coexistence",[135,1395,1396],{},"You can run both v4 and v5 in the same project:",[251,1398,1400],{"id":1399},"install-v5-globally-v4-as-a-project-dependency","Install v5 globally, v4 as a project dependency",[584,1402,1406],{"className":1403,"code":1404,"language":1405,"meta":589,"style":589},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Global: v5 (Rust binary)\nnpm install -g jscpd\n\n# Project: v4 (Node.js API)\nnpm install --save-dev jscpd@4\n","bash",[246,1407,1408,1413,1428,1434,1440],{"__ignoreMap":589},[593,1409,1410],{"class":595,"line":596},[593,1411,1412],{"class":599},"# Global: v5 (Rust binary)\n",[593,1414,1415,1419,1422,1425],{"class":595,"line":603},[593,1416,1418],{"class":1417},"sBMFI","npm",[593,1420,1421],{"class":627}," install",[593,1423,1424],{"class":627}," -g",[593,1426,1427],{"class":627}," jscpd\n",[593,1429,1430],{"class":595,"line":637},[593,1431,1433],{"emptyLinePlaceholder":1432},true,"\n",[593,1435,1437],{"class":595,"line":1436},4,[593,1438,1439],{"class":599},"# Project: v4 (Node.js API)\n",[593,1441,1443,1445,1447,1450],{"class":595,"line":1442},5,[593,1444,1418],{"class":1417},[593,1446,1421],{"class":627},[593,1448,1449],{"class":627}," --save-dev",[593,1451,1452],{"class":627}," jscpd@4\n",[135,1454,1455],{},"Then use v5 from the CLI and v4 from Node.js scripts:",[584,1457,1459],{"className":1403,"code":1458,"language":1405,"meta":589,"style":589},"# CLI uses v5 (fast)\njscpd .\u002Fsrc --reporters json\n\n# Node.js script uses v4\nnode scripts\u002Fdetect.js\n",[246,1460,1461,1466,1479,1483,1488],{"__ignoreMap":589},[593,1462,1463],{"class":595,"line":596},[593,1464,1465],{"class":599},"# CLI uses v5 (fast)\n",[593,1467,1468,1470,1473,1476],{"class":595,"line":603},[593,1469,628],{"class":1417},[593,1471,1472],{"class":627}," .\u002Fsrc",[593,1474,1475],{"class":627}," --reporters",[593,1477,1478],{"class":627}," json\n",[593,1480,1481],{"class":595,"line":637},[593,1482,1433],{"emptyLinePlaceholder":1432},[593,1484,1485],{"class":595,"line":1436},[593,1486,1487],{"class":599},"# Node.js script uses v4\n",[593,1489,1490,1493],{"class":595,"line":1442},[593,1491,1492],{"class":1417},"node",[593,1494,1495],{"class":627}," scripts\u002Fdetect.js\n",[584,1497,1501],{"className":1498,"code":1499,"language":1500,"meta":589,"style":589},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F scripts\u002Fdetect.js — uses v4 Node.js API\nimport { jscpd } from 'jscpd';\n\nconst clones = await jscpd(['', '', '.\u002Fsrc', '-r', 'json']);\nconsole.log(clones);\n","javascript",[246,1502,1503,1508,1513,1517,1522],{"__ignoreMap":589},[593,1504,1505],{"class":595,"line":596},[593,1506,1507],{},"\u002F\u002F scripts\u002Fdetect.js — uses v4 Node.js API\n",[593,1509,1510],{"class":595,"line":603},[593,1511,1512],{},"import { jscpd } from 'jscpd';\n",[593,1514,1515],{"class":595,"line":637},[593,1516,1433],{"emptyLinePlaceholder":1432},[593,1518,1519],{"class":595,"line":1436},[593,1520,1521],{},"const clones = await jscpd(['', '', '.\u002Fsrc', '-r', 'json']);\n",[593,1523,1524],{"class":595,"line":1442},[593,1525,1526],{},"console.log(clones);\n",[251,1528,1530],{"id":1529},"cicd-pin-a-specific-version","CI\u002FCD: Pin a specific version",[584,1532,1536],{"className":1533,"code":1534,"language":1535,"meta":589,"style":589},"language-yaml shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# GitHub Actions — v5\n- name: Install jscpd\n  run: npm install -g jscpd@5\n\n- name: Check duplications\n  run: jscpd --threshold 5 .\u002Fsrc\n","yaml",[246,1537,1538,1543,1557,1567,1571,1582],{"__ignoreMap":589},[593,1539,1540],{"class":595,"line":596},[593,1541,1542],{"class":599},"# GitHub Actions — v5\n",[593,1544,1545,1548,1552,1554],{"class":595,"line":603},[593,1546,1547],{"class":610},"-",[593,1549,1551],{"class":1550},"swJcz"," name",[593,1553,582],{"class":610},[593,1555,1556],{"class":627}," Install jscpd\n",[593,1558,1559,1562,1564],{"class":595,"line":637},[593,1560,1561],{"class":1550},"  run",[593,1563,582],{"class":610},[593,1565,1566],{"class":627}," npm install -g jscpd@5\n",[593,1568,1569],{"class":595,"line":1436},[593,1570,1433],{"emptyLinePlaceholder":1432},[593,1572,1573,1575,1577,1579],{"class":595,"line":1442},[593,1574,1547],{"class":610},[593,1576,1551],{"class":1550},[593,1578,582],{"class":610},[593,1580,1581],{"class":627}," Check duplications\n",[593,1583,1585,1587,1589],{"class":595,"line":1584},6,[593,1586,1561],{"class":1550},[593,1588,582],{"class":610},[593,1590,1591],{"class":627}," jscpd --threshold 5 .\u002Fsrc\n",[584,1593,1595],{"className":1533,"code":1594,"language":1535,"meta":589,"style":589},"# GitHub Actions — v4 (if you need the Node.js API)\n- name: Install jscpd\n  run: npm install -g jscpd@4\n\n- name: Check duplications\n  run: jscpd --threshold 5 .\u002Fsrc\n",[246,1596,1597,1602,1612,1621,1625,1635],{"__ignoreMap":589},[593,1598,1599],{"class":595,"line":596},[593,1600,1601],{"class":599},"# GitHub Actions — v4 (if you need the Node.js API)\n",[593,1603,1604,1606,1608,1610],{"class":595,"line":603},[593,1605,1547],{"class":610},[593,1607,1551],{"class":1550},[593,1609,582],{"class":610},[593,1611,1556],{"class":627},[593,1613,1614,1616,1618],{"class":595,"line":637},[593,1615,1561],{"class":1550},[593,1617,582],{"class":610},[593,1619,1620],{"class":627}," npm install -g jscpd@4\n",[593,1622,1623],{"class":595,"line":1436},[593,1624,1433],{"emptyLinePlaceholder":1432},[593,1626,1627,1629,1631,1633],{"class":595,"line":1442},[593,1628,1547],{"class":610},[593,1630,1551],{"class":1550},[593,1632,582],{"class":610},[593,1634,1581],{"class":627},[593,1636,1637,1639,1641],{"class":595,"line":1584},[593,1638,1561],{"class":1550},[593,1640,582],{"class":610},[593,1642,1591],{"class":627},[154,1644,1646],{"id":1645},"configuration-compatibility","Configuration Compatibility",[135,1648,1649,1651],{},[246,1650,1140],{}," files work with both v4 and v5 without changes:",[584,1653,1656],{"className":1654,"code":1655,"filename":1140,"language":690,"meta":589,"style":589},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"threshold\": 0,\n  \"reporters\": [\"html\", \"console\"],\n  \"ignore\": [\"**\u002Fnode_modules\u002F**\"],\n  \"absolute\": true,\n  \"minLines\": 5,\n  \"minTokens\": 50\n}\n",[246,1657,1658,1663,1682,1714,1736,1750,1766,1781],{"__ignoreMap":589},[593,1659,1660],{"class":595,"line":596},[593,1661,1662],{"class":610},"{\n",[593,1664,1665,1668,1670,1673,1675,1679],{"class":595,"line":603},[593,1666,1667],{"class":610},"  \"",[593,1669,1361],{"class":640},[593,1671,1672],{"class":610},"\"",[593,1674,582],{"class":610},[593,1676,1678],{"class":1677},"sbssI"," 0",[593,1680,1681],{"class":610},",\n",[593,1683,1684,1686,1689,1691,1693,1696,1698,1700,1702,1704,1707,1709,1711],{"class":595,"line":637},[593,1685,1667],{"class":610},[593,1687,1688],{"class":640},"reporters",[593,1690,1672],{"class":610},[593,1692,582],{"class":610},[593,1694,1695],{"class":610}," [",[593,1697,1672],{"class":610},[593,1699,1346],{"class":627},[593,1701,1672],{"class":610},[593,1703,662],{"class":610},[593,1705,1706],{"class":610}," \"",[593,1708,1335],{"class":627},[593,1710,1672],{"class":610},[593,1712,1713],{"class":610},"],\n",[593,1715,1716,1718,1721,1723,1725,1727,1729,1732,1734],{"class":595,"line":1436},[593,1717,1667],{"class":610},[593,1719,1720],{"class":640},"ignore",[593,1722,1672],{"class":610},[593,1724,582],{"class":610},[593,1726,1695],{"class":610},[593,1728,1672],{"class":610},[593,1730,1731],{"class":627},"**\u002Fnode_modules\u002F**",[593,1733,1672],{"class":610},[593,1735,1713],{"class":610},[593,1737,1738,1740,1743,1745,1747],{"class":595,"line":1442},[593,1739,1667],{"class":610},[593,1741,1742],{"class":640},"absolute",[593,1744,1672],{"class":610},[593,1746,582],{"class":610},[593,1748,1749],{"class":610}," true,\n",[593,1751,1752,1754,1757,1759,1761,1764],{"class":595,"line":1584},[593,1753,1667],{"class":610},[593,1755,1756],{"class":640},"minLines",[593,1758,1672],{"class":610},[593,1760,582],{"class":610},[593,1762,1763],{"class":1677}," 5",[593,1765,1681],{"class":610},[593,1767,1769,1771,1774,1776,1778],{"class":595,"line":1768},7,[593,1770,1667],{"class":610},[593,1772,1773],{"class":640},"minTokens",[593,1775,1672],{"class":610},[593,1777,582],{"class":610},[593,1779,1780],{"class":1677}," 50\n",[593,1782,1784],{"class":595,"line":1783},8,[593,1785,1786],{"class":610},"}\n",[135,1788,1789,1790,765,1793,1796],{},"v5 ignores ",[246,1791,1792],{},"store",[246,1794,1795],{},"storePath"," fields if present (they're not needed with the Rust engine). Everything else maps directly.",[154,1798,1800],{"id":1799},"migration-checklist","Migration Checklist",[704,1802,1805,1820,1833,1844,1855,1865,1873,1882,1888],{"className":1803},[1804],"contains-task-list",[544,1806,1809,1813,1814,1817,1818],{"className":1807},[1808],"task-list-item",[1810,1811],"input",{"disabled":1432,"type":1812},"checkbox"," Install v5: ",[246,1815,1816],{},"npm install -g jscpd@5"," or ",[246,1819,1180],{},[544,1821,1823,1825,1826,1829,1830],{"className":1822},[1808],[1810,1824],{"disabled":1432,"type":1812}," Replace ",[246,1827,1828],{},"--reporters full"," with ",[246,1831,1832],{},"--reporters consoleFull",[544,1834,1836,1838,1839,1841,1842],{"className":1835},[1808],[1810,1837],{"disabled":1432,"type":1812}," Update HTML report output path from ",[246,1840,817],{}," to ",[246,1843,822],{},[544,1845,1847,1849,1850,948,1852,1854],{"className":1846},[1808],[1810,1848],{"disabled":1432,"type":1812}," Remove ",[246,1851,757],{},[246,1853,768],{}," flags (accepted but ignored)",[544,1856,1858,1825,1860,1829,1862,1864],{"className":1857},[1808],[1810,1859],{"disabled":1432,"type":1812},[246,1861,884],{},[246,1863,893],{}," (inverted behavior)",[544,1866,1868,1825,1870,1872],{"className":1867},[1808],[1810,1869],{"disabled":1432,"type":1812},[246,1871,901],{}," with default behavior (now automatic)",[544,1874,1876,1825,1878,1829,1880],{"className":1875},[1808],[1810,1877],{"disabled":1432,"type":1812},[246,1879,951],{},[246,1881,958],{},[544,1883,1885,1887],{"className":1884},[1808],[1810,1886],{"disabled":1432,"type":1812}," Update Node.js API calls to use CLI, Rust crates, or jscpd-server",[544,1889,1891,1893,1894,1896],{"className":1890},[1808],[1810,1892],{"disabled":1432,"type":1812}," Pin ",[246,1895,735],{}," as a project dependency if you need the Node.js API",[1898,1899,1900],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":589,"searchDepth":603,"depth":603,"links":1902},[1903,1908,1919,1920,1924,1925],{"id":156,"depth":603,"text":157,"children":1904},[1905,1906,1907],{"id":253,"depth":637,"text":94},{"id":352,"depth":637,"text":353},{"id":538,"depth":637,"text":539},{"id":570,"depth":603,"text":571,"children":1909},[1910,1911,1913,1914,1915,1916,1917],{"id":574,"depth":637,"text":575},{"id":754,"depth":637,"text":1912},"--store leveldb Removed",{"id":772,"depth":637,"text":773},{"id":788,"depth":637,"text":789},{"id":854,"depth":637,"text":855},{"id":861,"depth":637,"text":862},{"id":1144,"depth":637,"text":1918},"@jscpd\u002F* Packages",{"id":1273,"depth":603,"text":1274},{"id":740,"depth":603,"text":1393,"children":1921},[1922,1923],{"id":1399,"depth":637,"text":1400},{"id":1529,"depth":637,"text":1530},{"id":1645,"depth":603,"text":1646},{"id":1799,"depth":603,"text":1800},"Guide for upgrading from jscpd v4 (TypeScript) to v5 (Rust).","md",null,{},{"icon":44},{"title":41,"description":1932},"Upgrade guide for jscpd v4 to v5 — breaking changes, compatibility, and coexistence.","HO881Tdrb-hP0MrxibTmF8JjJoexRE7GEt4w69TyfdI",[1935,1937],{"title":36,"path":37,"stem":38,"description":1936,"icon":39,"children":-1},"Release history and what's new in jscpd.",{"title":46,"path":47,"stem":48,"description":1938,"icon":51,"children":-1},"Integrate jscpd into your CI pipeline and git hooks.",1783541126437]