@rust-gear/glob 0.2.8 → 1.0.0

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.
Files changed (3) hide show
  1. package/README.md +12 -14
  2. package/index.d.ts +2 -0
  3. package/package.json +26 -14
package/README.md CHANGED
@@ -1,12 +1,10 @@
1
1
  # @rust-gear/glob
2
2
 
3
- A high-performance [napi-rs](https://napi.rs/) glob library powered by Rust's [globset](https://docs.rs/globset).
3
+ A fast glob alternative for Node.js powered by Rust.
4
4
 
5
- ## Performance
5
+ ## Performance
6
6
 
7
- Faster than Node.js built-in fs.globSync:
8
-
9
- - **3-9x faster** for typical glob patterns
7
+ - **3–10x faster** than traditional JavaScript glob implementations.
10
8
 
11
9
  ## Installation
12
10
 
@@ -19,8 +17,6 @@ npm install --save-dev @rust-gear/glob
19
17
  ```js
20
18
  import * as rs from "@rust-gear/glob";
21
19
 
22
- const files = rs.globSync("src/**/*.rs");
23
-
24
20
  const filesAsync = await rs.glob("src/**/*.rs");
25
21
 
26
22
  const files = rs.globSync("**/*.rs", {
@@ -29,16 +25,18 @@ const files = rs.globSync("**/*.rs", {
29
25
  });
30
26
  ```
31
27
 
32
- > **Return path type:**
33
- > Absolute patterns return absolute paths.
34
- > Relative patterns return paths relative to the specified `cwd`.
28
+ > **Return paths:**
29
+ > Absolute patterns absolute paths
30
+ > Relative patterns paths relative to `cwd`
35
31
 
36
32
  ## Options
37
33
 
38
- | Option | Type | Description |
39
- | :------ | :------- | :-------------------------------------- |
40
- | cwd | string | Current working directory for searching |
41
- | exclude | string[] | Array of glob patterns to exclude |
34
+ | Option | Type | Default | Description |
35
+ | :------ | :------- | :-------------- | :-------------------------------------- |
36
+ | cwd | string | `process.cwd()` | Current working directory for searching |
37
+ | exclude | string[] | `[]` | Glob patterns to exclude |
38
+ | dot | boolean | `false` | Include dot files and directories |
39
+ | sort | boolean | `false` | Return sorted results |
42
40
 
43
41
  ## License
44
42
 
package/index.d.ts CHANGED
@@ -6,6 +6,8 @@
6
6
  export interface GlobOptions {
7
7
  exclude?: Array<string>
8
8
  cwd?: string
9
+ dot?: boolean
10
+ sort?: boolean
9
11
  }
10
12
  export declare function globSync(patterns: string | Array<string>, options?: GlobOptions | undefined | null): Array<string>
11
13
  export declare function glob(patterns: string | Array<string>, options?: GlobOptions | undefined | null): Promise<Array<string>>
package/package.json CHANGED
@@ -1,12 +1,24 @@
1
1
  {
2
2
  "name": "@rust-gear/glob",
3
- "version": "0.2.8",
4
- "description": "Node.js bindings for Rust glob library",
3
+ "version": "1.0.0",
4
+ "description": "A fast glob alternative for Node.js powered by Rust.",
5
5
  "keywords": [
6
- "rust-gear",
7
6
  "glob",
8
- "napi",
9
- "napi-rs"
7
+ "globset",
8
+ "fast-glob",
9
+ "fast glob",
10
+ "glob alternative",
11
+ "file search",
12
+ "file matching",
13
+ "file system",
14
+ "directory traversal",
15
+ "rust",
16
+ "napi-rs",
17
+ "node",
18
+ "nodejs",
19
+ "native",
20
+ "high-performance",
21
+ "parallel"
10
22
  ],
11
23
  "repository": {
12
24
  "type": "git",
@@ -53,14 +65,14 @@
53
65
  "@napi-rs/cli": "^2.18.4"
54
66
  },
55
67
  "optionalDependencies": {
56
- "@rust-gear/glob-darwin-arm64": "0.2.8",
57
- "@rust-gear/glob-darwin-x64": "0.2.8",
58
- "@rust-gear/glob-linux-arm64-gnu": "0.2.8",
59
- "@rust-gear/glob-linux-arm64-musl": "0.2.8",
60
- "@rust-gear/glob-linux-x64-gnu": "0.2.8",
61
- "@rust-gear/glob-linux-x64-musl": "0.2.8",
62
- "@rust-gear/glob-win32-arm64-msvc": "0.2.8",
63
- "@rust-gear/glob-win32-ia32-msvc": "0.2.8",
64
- "@rust-gear/glob-win32-x64-msvc": "0.2.8"
68
+ "@rust-gear/glob-darwin-arm64": "1.0.0",
69
+ "@rust-gear/glob-darwin-x64": "1.0.0",
70
+ "@rust-gear/glob-linux-arm64-gnu": "1.0.0",
71
+ "@rust-gear/glob-linux-arm64-musl": "1.0.0",
72
+ "@rust-gear/glob-linux-x64-gnu": "1.0.0",
73
+ "@rust-gear/glob-linux-x64-musl": "1.0.0",
74
+ "@rust-gear/glob-win32-arm64-msvc": "1.0.0",
75
+ "@rust-gear/glob-win32-ia32-msvc": "1.0.0",
76
+ "@rust-gear/glob-win32-x64-msvc": "1.0.0"
65
77
  }
66
78
  }