polydup 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -7,8 +7,8 @@ Node.js bindings for PolyDup - a cross-language duplicate code detector powered
7
7
  - 🚀 **Fast**: Built in Rust with Tree-sitter for efficient parsing
8
8
  - 🔄 **Multi-language**: Supports Rust, Python, JavaScript/TypeScript
9
9
  - ⚡ **Non-blocking**: Async API runs on background threads
10
- - 🎯 **Type-2 clones**: Detects structurally similar code with different variable names
11
- - 📊 **Detailed reports**: Statistics and similarity scores
10
+ - **Type-2 clones**: Detects structurally similar code with different variable names
11
+ - **Detailed reports**: Statistics and similarity scores
12
12
 
13
13
  ## Installation
14
14
 
@@ -25,7 +25,7 @@ findDuplicates(['./src', './lib'], 50, 0.85)
25
25
  .then(report => {
26
26
  console.log(`Found ${report.duplicates.length} duplicates`);
27
27
  console.log(`Scanned ${report.filesScanned} files in ${report.stats.durationMs}ms`);
28
-
28
+
29
29
  report.duplicates.forEach(dup => {
30
30
  console.log(`${dup.file1} ↔️ ${dup.file2} (${(dup.similarity * 100).toFixed(1)}%)`);
31
31
  });
@@ -132,15 +132,15 @@ async function analyzeCrossProject() {
132
132
 
133
133
  console.log('Frontend duplicates:', frontend.duplicates.length);
134
134
  console.log('Backend duplicates:', backend.duplicates.length);
135
-
135
+
136
136
  // Find cross-project duplicates
137
137
  const allPaths = ['./frontend', './backend'];
138
138
  const crossProject = await findDuplicates(allPaths, 50, 0.95);
139
-
139
+
140
140
  const crossDuplicates = crossProject.duplicates.filter(d =>
141
141
  d.file1.includes('frontend') && d.file2.includes('backend')
142
142
  );
143
-
143
+
144
144
  console.log('Cross-project duplicates:', crossDuplicates.length);
145
145
  }
146
146
 
@@ -150,7 +150,7 @@ analyzeCrossProject();
150
150
  ## Building from Source
151
151
 
152
152
  ```bash
153
- cd crates/dupe-node
153
+ cd crates/polydup-node
154
154
  npm install
155
155
  npm run build
156
156
  npm test
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polydup",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Cross-language duplicate code detector - Node.js bindings",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -50,7 +50,8 @@
50
50
  "files": [
51
51
  "index.js",
52
52
  "index.d.ts",
53
- "README.md"
53
+ "README.md",
54
+ "npm/**/*.node"
54
55
  ],
55
56
  "optionalDependencies": {
56
57
  "polydup-win32-x64-msvc": "0.1.1",
@@ -59,4 +60,4 @@
59
60
  "polydup-darwin-arm64": "0.1.1",
60
61
  "polydup-linux-arm64-gnu": "0.1.1"
61
62
  }
62
- }
63
+ }