[{"data":1,"prerenderedAt":870},["ShallowReactive",2],{"navigation_docs":3,"-getting-started-changelog":129,"-getting-started-changelog-surround":865},[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":36,"body":131,"description":857,"extension":858,"links":859,"meta":860,"navigation":861,"path":37,"seo":862,"stem":38,"__hash__":864},"docs\u002F1.getting-started\u002F7.changelog.md",{"type":132,"value":133,"toc":831},"minimark",[134,139,151,155,160,172,176,274,280,284,296,334,337,344,348,445,449,509,513,530,534,548,552,563,567,575,579,584,588,599,603,611,615,622,626,629,712,716,764,768,773,777,819,823],[135,136,138],"h2",{"id":137},"overview","Overview",[140,141,142,143,150],"p",{},"For the full, up-to-date changelog, see the ",[144,145,149],"a",{"href":146,"rel":147},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fblob\u002Fmaster\u002Fapps\u002Fjscpd\u002FCHANGELOG.md",[148],"nofollow","jscpd GitHub repository",".",[135,152,154],{"id":153},"v504-latest","v5.0.4 (Latest)",[156,157,159],"h3",{"id":158},"the-rust-rewrite","The Rust Rewrite",[140,161,162,163,167,168,171],{},"jscpd v5 is a ",[164,165,166],"strong",{},"complete Rust rewrite"," — a self-contained native binary that delivers ",[164,169,170],{},"24-37x faster"," detection with zero Node.js dependency.",[173,174,94],"h4",{"id":175},"detection-speed",[177,178,179,204],"table",{},[180,181,182],"thead",{},[183,184,185,189,192,195,198,201],"tr",{},[186,187,188],"th",{},"Target",[186,190,191],{},"Files",[186,193,194],{},"Size",[186,196,197],{},"v4 (Node.js)",[186,199,200],{},"v5 (Rust)",[186,202,203],{},"Speedup",[205,206,207,230,252],"tbody",{},[183,208,209,213,216,219,222,225],{},[210,211,212],"td",{},"fixtures",[210,214,215],{},"548",[210,217,218],{},"1.5 MB",[210,220,221],{},"1.03s",[210,223,224],{},"0.03s",[210,226,227],{},[164,228,229],{},"34.3x",[183,231,232,235,238,241,244,247],{},[210,233,234],{},"Svelte",[210,236,237],{},"8,963",[210,239,240],{},"38 MB",[210,242,243],{},"15.80s",[210,245,246],{},"0.43s",[210,248,249],{},[164,250,251],{},"36.9x",[183,253,254,257,260,263,266,269],{},[210,255,256],{},"CopilotKit",[210,258,259],{},"17,092",[210,261,262],{},"159 MB",[210,264,265],{},"82.89s",[210,267,268],{},"3.44s",[210,270,271],{},[164,272,273],{},"24.1x",[140,275,276],{},[277,278,279],"em",{},"Benchmarked on macOS (Apple Silicon), 10 runs for fixtures\u002FSvelte, 3 for CopilotKit.",[173,281,283],{"id":282},"git-blame-speed","Git Blame Speed",[140,285,286,287,291,292,295],{},"The ",[288,289,290],"code",{},"--blame"," flag enriches clones with git author data. v5 uses gitoxide for in-process blame instead of shelling out to ",[288,293,294],{},"git"," per file.",[177,297,298,316],{},[180,299,300],{},[183,301,302,304,309,314],{},[186,303,188],{},[186,305,306,307],{},"v4 ",[288,308,290],{},[186,310,311,312],{},"v5 ",[288,313,290],{},[186,315,203],{},[205,317,318],{},[183,319,320,323,326,329],{},[210,321,322],{},"fixtures (548 files)",[210,324,325],{},"3.57s",[210,327,328],{},"0.13s",[210,330,331],{},[164,332,333],{},"27.5x",[140,335,336],{},"v4's blame mode is 3.5x slower than its own non-blame mode (3.57s vs 1.03s). v5's blame adds only ~0.10s (0.13s vs 0.03s).",[140,338,339,340,343],{},"See the ",[144,341,342],{"href":42},"Migration Guide"," for the full benchmark details.",[156,345,347],{"id":346},"new-features","New Features",[349,350,351,366,372,378,388,414,422,432],"ul",{},[352,353,354,357,358,361,362,365],"li",{},[164,355,356],{},"Native binary"," — no Node.js runtime required. Install via ",[288,359,360],{},"npm install -g jscpd",", ",[288,363,364],{},"cargo install jscpd",", or direct download.",[352,367,368,371],{},[164,369,370],{},"13 reporters"," — console, console-full, json, xml, csv, html, markdown, sarif, ai, badge, xcode, threshold, silent.",[352,373,374,377],{},[164,375,376],{},"OXC-based JS\u002FTS tokenization"," — JavaScript\u002FTypeScript\u002FJSX\u002FTSX tokenization now uses the OXC parser instead of PrismJS for better accuracy and speed.",[352,379,380,383,384,387],{},[164,381,382],{},"Parallel detection"," — ",[288,385,386],{},"--workers N"," controls thread count. Detection runs in parallel across format groups.",[352,389,390,393,394,361,397,361,400,361,403,406,407,410,411,150],{},[164,391,392],{},"CLI alignment"," — new ",[288,395,396],{},"--absolute",[288,398,399],{},"--ignore-case",[288,401,402],{},"--formats-exts",[288,404,405],{},"--formats-names"," flags; fixed ",[288,408,409],{},"--threshold","; improved ",[288,412,413],{},"--max-size",[352,415,416,419,420,150],{},[164,417,418],{},"Side-by-side blame"," — console-full reporter shows side-by-side blame comparison with ",[288,421,290],{},[352,423,424,427,428,431],{},[164,425,426],{},"In-process git blame"," — uses gitoxide instead of shelling out to ",[288,429,430],{},"git blame"," per file; 27.5x faster blame on typical projects.",[352,433,434,383,437,440,441,444],{},[164,435,436],{},"Dual npm package",[288,438,439],{},"jscpd@5"," and ",[288,442,443],{},"cpd"," both install the same Rust binary via platform-specific optional dependencies.",[156,446,448],{"id":447},"breaking-changes-from-v4","Breaking Changes from v4",[349,450,451,464,473,487,497,503],{},[352,452,453,383,456,459,460,463],{},[164,454,455],{},"No Node.js API",[288,457,458],{},"import { jscpd } from 'jscpd'"," is not available in v5. Use the CLI, Rust crate, or ",[288,461,462],{},"jscpd-server"," REST API instead.",[352,465,466,472],{},[164,467,468,469],{},"No ",[288,470,471],{},"--store leveldb"," — external store backends are not supported in v5 (detection is fast enough without caching).",[352,474,475,478,479,482,483,486],{},[164,476,477],{},"Reporter name change"," — v4's ",[288,480,481],{},"full"," reporter is now ",[288,484,485],{},"console-full"," in v5.",[352,488,489,492,493,496],{},[164,490,491],{},"Output filenames"," — HTML reporter outputs ",[288,494,495],{},"jscpd-report.html"," at the output directory root.",[352,498,499,502],{},[164,500,501],{},"Token counts"," — may differ by 1-2% due to the Rust tokenizer using OXC for JS\u002FTS.",[352,504,505,508],{},[164,506,507],{},"Format count"," — 223 formats (vs. v4's 224).",[156,510,512],{"id":511},"v503","v5.0.3",[349,514,515,518,521,524,527],{},[352,516,517],{},"Full Rust CLI feature parity with TypeScript jscpd",[352,519,520],{},"Cross-platform binary distribution via npm platform packages",[352,522,523],{},"CLI short-form aliases matching TypeScript jscpd conventions",[352,525,526],{},"Time reporter for execution timing",[352,528,529],{},"ReportContext struct for extensible reporter signatures",[156,531,533],{"id":532},"v502","v5.0.2",[349,535,536,539,542,545],{},[352,537,538],{},"Fixed Vue SFC tokenization (each block dispatched to its own sub-format)",[352,540,541],{},"Fixed entire-file duplicates silently dropped by RabinKarp store flush logic",[352,543,544],{},"Fixed ReDoS hang on Lisp\u002FElisp files",[352,546,547],{},"Fixed crash on malformed package.json when reading config",[156,549,551],{"id":550},"v501","v5.0.1",[349,553,554,557,560],{},[352,555,556],{},"Initial Rust workspace with cpd-core, cpd-tokenizer, cpd-finder, cpd-reporter, and jscpd crates",[352,558,559],{},"Cross-format detection for Vue SFC, Svelte, Astro, and Markdown",[352,561,562],{},"Shebang detection for extensionless scripts",[156,564,566],{"id":565},"v500","v5.0.0",[349,568,569,572],{},[352,570,571],{},"First stable Rust release — replaces the TypeScript CLI with a native binary",[352,573,574],{},"Reporter trait signature changed to use ReportContext instead of Statistics directly",[135,576,578],{"id":577},"v425","v4.2.5",[349,580,581],{},[352,582,583],{},"JSON reporter token count fix, gitignore parent-directory walk, Commander v15, Vitest 4.1.0",[135,585,587],{"id":586},"v423","v4.2.3",[349,589,590,596],{},[352,591,592,595],{},[164,593,594],{},"fix(finder):"," resolve relative ignore patterns against scan dirs (#611)",[352,597,598],{},"Dependency bumps across all packages",[135,600,602],{"id":601},"v422","v4.2.2",[349,604,605],{},[352,606,607,610],{},[164,608,609],{},"fix(tokenizer):"," resolve quadratic bash tokenization hang",[135,612,614],{"id":613},"v421","v4.2.1",[349,616,617],{},[352,618,619,621],{},[164,620,609],{}," fix tokenization issue for cross-format detection",[135,623,625],{"id":624},"v420","v4.2.0",[156,627,347],{"id":628},"new-features-1",[349,630,631,640,658,668,678,686,698],{},[352,632,633,383,636,639],{},[164,634,635],{},"Custom tokenizer backend",[288,637,638],{},"@jscpd\u002Ftokenizer"," now uses a self-contained reprism-based engine. ~11.5% faster tokenization on real projects (avg 1126 ms → 997 ms on a 548-file, 223-format scan).",[352,641,642,645,646,649,650,653,654,657],{},[164,643,644],{},"Cross-format detection"," — Vue SFC (",[288,647,648],{},".vue","), Svelte (",[288,651,652],{},".svelte","), Astro (",[288,655,656],{},".astro","), and Markdown files are tokenized per-block\u002Fper-section, enabling duplicate detection between embedded blocks and standalone source files.",[352,659,660,663,664,667],{},[164,661,662],{},"223 supported formats"," — Apex, CFML\u002FColdFusion, GDScript, Svelte, Astro, and 70+ additional languages (up from 152). Run ",[288,665,666],{},"jscpd --list"," to see the full list.",[352,669,670,673,674,677],{},[164,671,672],{},"Shebang detection"," — extensionless executable scripts are auto-detected via their ",[288,675,676],{},"#!"," shebang line.",[352,679,680,685],{},[164,681,682],{},[288,683,684],{},"--store-path"," — specify a custom directory for the LevelDB token cache, eliminating collisions when multiple jscpd processes run concurrently.",[352,687,688,693,694,697],{},[164,689,690],{},[288,691,692],{},"--skipComments"," — shorthand for ",[288,695,696],{},"--mode weak",". Strips comments before tokenization.",[352,699,700,704,705,361,708,711],{},[164,701,702],{},[288,703,405],{}," — map specific filenames (e.g. ",[288,706,707],{},"Makefile",[288,709,710],{},"Dockerfile",") to a detection format.",[156,713,715],{"id":714},"bug-fixes","Bug Fixes",[349,717,718,727,735,744,750,758],{},[352,719,720,723,724,150],{},[164,721,722],{},"Entire-file duplicates silently dropped"," (#728) — fixed RabinKarp end-of-file flush bug in ",[288,725,726],{},"@jscpd\u002Fcore",[352,728,729,732,733,150],{},[164,730,731],{},"ReDoS hang on Lisp\u002FElisp files"," (#737) — replaced catastrophic backtracking with a linear regex in ",[288,734,638],{},[352,736,737,743],{},[164,738,739,740],{},"Process crash on malformed ",[288,741,742],{},"package.json"," (#739) — now emits a warning and continues.",[352,745,746,749],{},[164,747,748],{},"Vue SFC cross-file detection broken"," — blocks now use resolved sub-format namespace.",[352,751,752,755,756,150],{},[164,753,754],{},"Vue SFC incorrect column numbers"," — fixed in ",[288,757,638],{},[352,759,760,763],{},[164,761,762],{},"50 dependency security vulnerabilities"," remediated.",[135,765,767],{"id":766},"v411","v4.1.1",[349,769,770],{},[352,771,772],{},"Update hash function, improve performance and keep browser support.",[135,774,776],{"id":775},"v410","v4.1.0",[349,778,779,789,798,804,810,816],{},[352,780,781,784,785,788],{},[164,782,783],{},"AI reporter"," (",[288,786,787],{},"--reporters ai",") — compact, token-efficient output for LLMs.",[352,790,791,797],{},[164,792,793,796],{},[288,794,795],{},"--noTips"," flag"," — suppress usage-tip messages after detection.",[352,799,800,803],{},[164,801,802],{},"Execution timer"," — timing summary shown after detection completes.",[352,805,806,809],{},[164,807,808],{},"Tokenizer speed"," — lazy Prism grammar loading, O(1) extension lookup, native MD5 hashing.",[352,811,812,815],{},[164,813,814],{},"New languages:"," Apex and CFML (ColdFusion).",[352,817,818],{},"Test coverage raised to 98%+.",[135,820,822],{"id":821},"earlier-releases-v1x-v40x","Earlier releases (v1.x – v4.0.x)",[140,824,339,825,830],{},[144,826,829],{"href":827,"rel":828},"https:\u002F\u002Fgithub.com\u002Fkucherenko\u002Fjscpd\u002Fblob\u002Fmaster\u002FCHANGELOG.md",[148],"root CHANGELOG"," for the full history of jscpd versions 1.0.0 through 4.0.9, covering the tool's origins, the TypeScript rewrite, LevelDB store, pluggable reporters, monorepo extraction, and all the improvements made from 2018 through 2024.",{"title":832,"searchDepth":833,"depth":833,"links":834},"",2,[835,836,846,847,848,849,850,854,855,856],{"id":137,"depth":833,"text":138},{"id":153,"depth":833,"text":154,"children":837},[838,840,841,842,843,844,845],{"id":158,"depth":839,"text":159},3,{"id":346,"depth":839,"text":347},{"id":447,"depth":839,"text":448},{"id":511,"depth":839,"text":512},{"id":532,"depth":839,"text":533},{"id":550,"depth":839,"text":551},{"id":565,"depth":839,"text":566},{"id":577,"depth":833,"text":578},{"id":586,"depth":833,"text":587},{"id":601,"depth":833,"text":602},{"id":613,"depth":833,"text":614},{"id":624,"depth":833,"text":625,"children":851},[852,853],{"id":628,"depth":839,"text":347},{"id":714,"depth":839,"text":715},{"id":766,"depth":833,"text":767},{"id":775,"depth":833,"text":776},{"id":821,"depth":833,"text":822},"Release history and what's new in jscpd.","md",null,{},{"icon":39},{"title":36,"description":863},"jscpd release notes and version history.","GixtwUGiIIYkRlRHxf03QHQozRvyqMeiI2IvNaEBnGI",[866,868],{"title":31,"path":32,"stem":33,"description":867,"icon":34,"children":-1},"Use jscpd with AI coding assistants to automatically detect and refactor code duplications.",{"title":41,"path":42,"stem":43,"description":869,"icon":44,"children":-1},"Guide for upgrading from jscpd v4 (TypeScript) to v5 (Rust).",1783541128497]