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