@flex-development/mlly 1.0.0-beta.3 → 1.0.0-beta.4
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/CHANGELOG.md +19 -0
- package/README.md +10 -10
- package/dist/interfaces/read-file.d.mts +7 -8
- package/dist/interfaces/realpath.d.mts +6 -7
- package/dist/interfaces/stat.d.mts +7 -8
- package/dist/internal/fs.browser.mjs +4 -4
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## [1.0.0-beta.4](https://github.com/flex-development/mlly/compare/1.0.0-beta.3...1.0.0-beta.4) (2026-02-06)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
- **ts:** pass type parameters to fs methods
|
|
6
|
+
|
|
7
|
+
### :package: Build
|
|
8
|
+
|
|
9
|
+
- [[`77f0333`](https://github.com/flex-development/mlly/commit/77f0333d3f83eec60d0ee41270d36bd7ac5828a4)] **deps-dev:** Bump @faker-js/faker from 10.2.0 to 10.3.0 ([#966](https://github.com/flex-development/mlly/issues/966))
|
|
10
|
+
- [[`d71a814`](https://github.com/flex-development/mlly/commit/d71a8145cd3773743411d70e84742ec93838af16)] **deps-dev:** Bump cspell from 9.6.3 to 9.6.4 ([#965](https://github.com/flex-development/mlly/issues/965))
|
|
11
|
+
- [[`4f6f9c3`](https://github.com/flex-development/mlly/commit/4f6f9c3fb24a41ce22031a35345c8b85f16ef732)] **deps-dev:** Bump msw from 2.12.7 to 2.12.8 ([#964](https://github.com/flex-development/mlly/issues/964))
|
|
12
|
+
- [[`b08edac`](https://github.com/flex-development/mlly/commit/b08edac9f21e7c91ca554e8938bba0b814605e7d)] **deps-dev:** bump msw from 2.12.8 to 2.12.9
|
|
13
|
+
- [[`893c030`](https://github.com/flex-development/mlly/commit/893c030d8d438871ad94b29a786eb59fa144a571)] **deps:** Bump @isaacs/brace-expansion from 5.0.0 to 5.0.1 ([#963](https://github.com/flex-development/mlly/issues/963))
|
|
14
|
+
|
|
15
|
+
### :mechanical_arm: Refactors
|
|
16
|
+
|
|
17
|
+
- [[`cc5109c`](https://github.com/flex-development/mlly/commit/cc5109cc76949d287f1b53e54e47559ed1a902b3)] **ts:** pass type parameters to fs methods
|
|
18
|
+
|
|
1
19
|
## [1.0.0-beta.3](https://github.com/flex-development/mlly/compare/1.0.0-beta.2...1.0.0-beta.3) (2026-02-03)
|
|
2
20
|
|
|
3
21
|
### ⚠ BREAKING CHANGES
|
|
@@ -1278,3 +1296,4 @@
|
|
|
1278
1296
|
|
|
1279
1297
|
|
|
1280
1298
|
|
|
1299
|
+
|
package/README.md
CHANGED
|
@@ -87,11 +87,11 @@
|
|
|
87
87
|
- [`PatternMatch`](#patternmatch)
|
|
88
88
|
- [`ProtocolMap`](#protocolmap)
|
|
89
89
|
- [`Protocol`](#protocol)
|
|
90
|
-
- [`ReadFile
|
|
91
|
-
- [`Realpath
|
|
90
|
+
- [`ReadFile`](#readfile)
|
|
91
|
+
- [`Realpath`](#realpath)
|
|
92
92
|
- [`ResolveAliasOptions`](#resolvealiasoptions)
|
|
93
93
|
- [`ResolveModuleOptions`](#resolvemoduleoptions)
|
|
94
|
-
- [`Stat
|
|
94
|
+
- [`Stat`](#stat)
|
|
95
95
|
- [`Stats`](#stats)
|
|
96
96
|
- Additional Documentation
|
|
97
97
|
- [Resolution Algorithm](./docs/resolution-algorithm.md)
|
|
@@ -1174,11 +1174,11 @@ The file system API (`interface`).
|
|
|
1174
1174
|
|
|
1175
1175
|
#### Properties
|
|
1176
1176
|
|
|
1177
|
-
- `readFile` ([`ReadFile`](#
|
|
1177
|
+
- `readFile` ([`ReadFile`](#readfile))
|
|
1178
1178
|
— read the entire contents of a file
|
|
1179
|
-
- `realpath` ([`Realpath`](#
|
|
1179
|
+
- `realpath` ([`Realpath`](#realpath))
|
|
1180
1180
|
— compute a canonical pathname by resolving `.`, `..`, and symbolic links
|
|
1181
|
-
- `stat` ([`Stat`](#
|
|
1181
|
+
- `stat` ([`Stat`](#stat))
|
|
1182
1182
|
— get information about a directory or file
|
|
1183
1183
|
|
|
1184
1184
|
### `GetSourceContext`
|
|
@@ -1411,7 +1411,7 @@ They will be added to this union automatically.
|
|
|
1411
1411
|
type Protocol = ProtocolMap[keyof ProtocolMap]
|
|
1412
1412
|
```
|
|
1413
1413
|
|
|
1414
|
-
### `ReadFile
|
|
1414
|
+
### `ReadFile`
|
|
1415
1415
|
|
|
1416
1416
|
Read the entire contents of a file (`interface`).
|
|
1417
1417
|
|
|
@@ -1419,7 +1419,7 @@ Read the entire contents of a file (`interface`).
|
|
|
1419
1419
|
|
|
1420
1420
|
```ts
|
|
1421
1421
|
(id: ModuleId, encoding: BufferEncoding): Awaitable<string>
|
|
1422
|
-
(id: ModuleId, encoding?: BufferEncoding | null | undefined): T
|
|
1422
|
+
<T extends Awaitable<FileContent | null | undefined>>(id: ModuleId, encoding?: BufferEncoding | null | undefined): T
|
|
1423
1423
|
```
|
|
1424
1424
|
|
|
1425
1425
|
#### Type Parameters
|
|
@@ -1439,7 +1439,7 @@ Read the entire contents of a file (`interface`).
|
|
|
1439
1439
|
|
|
1440
1440
|
(`T`) The file contents
|
|
1441
1441
|
|
|
1442
|
-
### `Realpath
|
|
1442
|
+
### `Realpath`
|
|
1443
1443
|
|
|
1444
1444
|
Compute a canonical pathname by resolving `.`, `..`, and symbolic links (`interface`).
|
|
1445
1445
|
|
|
@@ -1510,7 +1510,7 @@ Options for path alias resolution (`interface`).
|
|
|
1510
1510
|
- `preserveSymlinks?` (`boolean` | `null` | `undefined`)
|
|
1511
1511
|
— whether to keep symlinks instead of resolving them
|
|
1512
1512
|
|
|
1513
|
-
### `Stat
|
|
1513
|
+
### `Stat`
|
|
1514
1514
|
|
|
1515
1515
|
Get information about a directory or file (`interface`).
|
|
1516
1516
|
|
|
@@ -5,14 +5,8 @@
|
|
|
5
5
|
import type { Awaitable, BufferEncoding, FileContent, ModuleId } from '@flex-development/mlly';
|
|
6
6
|
/**
|
|
7
7
|
* Read the entire contents of a file.
|
|
8
|
-
*
|
|
9
|
-
* @see {@linkcode Awaitable}
|
|
10
|
-
* @see {@linkcode Buffer}
|
|
11
|
-
*
|
|
12
|
-
* @template {Awaitable<FileContent | null | undefined>} [T]
|
|
13
|
-
* The file contents
|
|
14
8
|
*/
|
|
15
|
-
interface ReadFile
|
|
9
|
+
interface ReadFile {
|
|
16
10
|
/**
|
|
17
11
|
* @see {@linkcode ModuleId}
|
|
18
12
|
*
|
|
@@ -27,8 +21,13 @@ interface ReadFile<T extends Awaitable<FileContent | null | undefined> = Awaitab
|
|
|
27
21
|
*/
|
|
28
22
|
(id: ModuleId, encoding: BufferEncoding): Awaitable<string>;
|
|
29
23
|
/**
|
|
24
|
+
* @see {@linkcode Awaitable}
|
|
25
|
+
* @see {@linkcode FileContent}
|
|
30
26
|
* @see {@linkcode ModuleId}
|
|
31
27
|
*
|
|
28
|
+
* @template {Awaitable<FileContent | null | undefined>} T
|
|
29
|
+
* The file contents
|
|
30
|
+
*
|
|
32
31
|
* @this {unknown}
|
|
33
32
|
*
|
|
34
33
|
* @param {ModuleId} id
|
|
@@ -38,6 +37,6 @@ interface ReadFile<T extends Awaitable<FileContent | null | undefined> = Awaitab
|
|
|
38
37
|
* @return {T}
|
|
39
38
|
* The file contents
|
|
40
39
|
*/
|
|
41
|
-
(id: ModuleId, encoding?: BufferEncoding | null | undefined): T;
|
|
40
|
+
<T extends Awaitable<FileContent | null | undefined>>(id: ModuleId, encoding?: BufferEncoding | null | undefined): T;
|
|
42
41
|
}
|
|
43
42
|
export type { ReadFile as default };
|
|
@@ -8,16 +8,15 @@ import type { Awaitable, ModuleId } from '@flex-development/mlly';
|
|
|
8
8
|
*
|
|
9
9
|
* > 👉 **Note**: A canonical pathname is not necessarily unique.
|
|
10
10
|
* > Hard links and bind mounts can expose an entity through many pathnames.
|
|
11
|
-
*
|
|
12
|
-
* @see {@linkcode Awaitable}
|
|
13
|
-
*
|
|
14
|
-
* @template {Awaitable<string>} [T]
|
|
15
|
-
* The canonical pathname
|
|
16
11
|
*/
|
|
17
|
-
interface Realpath
|
|
12
|
+
interface Realpath {
|
|
18
13
|
/**
|
|
14
|
+
* @see {@linkcode Awaitable}
|
|
19
15
|
* @see {@linkcode ModuleId}
|
|
20
16
|
*
|
|
17
|
+
* @template {Awaitable<string>} T
|
|
18
|
+
* The canonical pathname
|
|
19
|
+
*
|
|
21
20
|
* @this {unknown}
|
|
22
21
|
*
|
|
23
22
|
* @param {ModuleId} id
|
|
@@ -25,6 +24,6 @@ interface Realpath<T extends Awaitable<string> = Awaitable<string>> {
|
|
|
25
24
|
* @return {T}
|
|
26
25
|
* The canonical pathname
|
|
27
26
|
*/
|
|
28
|
-
(id: ModuleId): T;
|
|
27
|
+
<T extends Awaitable<string>>(id: ModuleId): T;
|
|
29
28
|
}
|
|
30
29
|
export type { Realpath as default };
|
|
@@ -5,16 +5,15 @@
|
|
|
5
5
|
import type { Awaitable, ModuleId, Stats } from '@flex-development/mlly';
|
|
6
6
|
/**
|
|
7
7
|
* Get information about a directory or file.
|
|
8
|
-
*
|
|
9
|
-
* @see {@linkcode Awaitable}
|
|
10
|
-
* @see {@linkcode Stats}
|
|
11
|
-
*
|
|
12
|
-
* @template {Awaitable<Stats>} [T]
|
|
13
|
-
* The info
|
|
14
8
|
*/
|
|
15
|
-
interface Stat
|
|
9
|
+
interface Stat {
|
|
16
10
|
/**
|
|
11
|
+
* @see {@linkcode Awaitable}
|
|
17
12
|
* @see {@linkcode ModuleId}
|
|
13
|
+
* @see {@linkcode Stats}
|
|
14
|
+
*
|
|
15
|
+
* @template {Awaitable<Stats>} T
|
|
16
|
+
* The info
|
|
18
17
|
*
|
|
19
18
|
* @this {unknown}
|
|
20
19
|
*
|
|
@@ -23,6 +22,6 @@ interface Stat<T extends Awaitable<Stats> = Awaitable<Stats>> {
|
|
|
23
22
|
* @return {T}
|
|
24
23
|
* The info
|
|
25
24
|
*/
|
|
26
|
-
(id: ModuleId): T;
|
|
25
|
+
<T extends Awaitable<Stats>>(id: ModuleId): T;
|
|
27
26
|
}
|
|
28
27
|
export type { Stat as default };
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
const fs = {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Read the entire contents of a file.
|
|
13
13
|
*
|
|
14
14
|
* @return {never}
|
|
15
15
|
* Never; not implemented
|
|
@@ -19,17 +19,17 @@ const fs = {
|
|
|
19
19
|
throw new Error('[readFile] not implemented');
|
|
20
20
|
},
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Compute a canonical pathname by resolving `.`, `..`, and symbolic links.
|
|
23
23
|
*
|
|
24
24
|
* @return {never}
|
|
25
25
|
* Never; not implemented
|
|
26
26
|
* @throws {Error}
|
|
27
27
|
*/
|
|
28
28
|
realpath() {
|
|
29
|
-
throw new Error('[
|
|
29
|
+
throw new Error('[realpath] not implemented');
|
|
30
30
|
},
|
|
31
31
|
/**
|
|
32
|
-
* Get information about a file.
|
|
32
|
+
* Get information about a directory or file.
|
|
33
33
|
*
|
|
34
34
|
* @return {never}
|
|
35
35
|
* Never; not implemented
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flex-development/mlly",
|
|
3
3
|
"description": "ECMAScript module utilities",
|
|
4
|
-
"version": "1.0.0-beta.
|
|
4
|
+
"version": "1.0.0-beta.4",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ecmascript",
|
|
7
7
|
"esm",
|
|
@@ -158,7 +158,7 @@
|
|
|
158
158
|
"@arethetypeswrong/cli": "0.18.2",
|
|
159
159
|
"@commitlint/cli": "20.4.1",
|
|
160
160
|
"@commitlint/types": "20.4.0",
|
|
161
|
-
"@faker-js/faker": "10.
|
|
161
|
+
"@faker-js/faker": "10.3.0",
|
|
162
162
|
"@flex-development/commitlint-config": "1.0.1",
|
|
163
163
|
"@flex-development/eslint-config": "1.1.1",
|
|
164
164
|
"@flex-development/grease": "3.0.0-alpha.9",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"chai-string": "1.6.0",
|
|
181
181
|
"concat-stream": "2.0.0",
|
|
182
182
|
"cross-env": "10.1.0",
|
|
183
|
-
"cspell": "9.6.
|
|
183
|
+
"cspell": "9.6.4",
|
|
184
184
|
"dprint": "0.51.1",
|
|
185
185
|
"editorconfig": "3.0.1",
|
|
186
186
|
"eslint": "9.39.2",
|
|
@@ -188,7 +188,7 @@
|
|
|
188
188
|
"husky": "9.1.7",
|
|
189
189
|
"import-meta-resolve": "4.2.0",
|
|
190
190
|
"is-ci": "4.1.0",
|
|
191
|
-
"msw": "2.12.
|
|
191
|
+
"msw": "2.12.9",
|
|
192
192
|
"node-notifier": "10.0.1",
|
|
193
193
|
"remark": "15.0.1",
|
|
194
194
|
"remark-cli": "12.0.1",
|