@visulima/fs 5.0.11 → 6.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.
- package/CHANGELOG.md +16 -0
- package/LICENSE.md +33 -22
- package/README.md +6 -6
- package/dist/glob.d.ts +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +1 -1
- package/dist/ini.d.ts +2 -2
- package/dist/ini.js +1 -1
- package/dist/json5.d.ts +2 -2
- package/dist/json5.js +1 -1
- package/dist/jsonc.d.ts +2 -2
- package/dist/jsonc.js +1 -1
- package/dist/packem_shared/{collect-B0S0bJoE.js → collect-Dbo3K4iq.js} +1 -1
- package/dist/packem_shared/{collectSync-0M1eoilI.js → collectSync-BLLtRqQ4.js} +1 -1
- package/dist/packem_shared/{findUp-Ylerv_a2.js → findUp-BHCEMf5y.js} +1 -1
- package/dist/packem_shared/{findUpSync-BWBPRzEq.js → findUpSync-BKJsHMQN.js} +1 -1
- package/dist/packem_shared/{glob-sync.d-DaAZHTsv.d.ts → glob-sync.d-SlQXhcIG.d.ts} +1 -1
- package/dist/packem_shared/indexToLineColumn-BfkIsWHQ-DQJmePiQ.js +6 -0
- package/dist/packem_shared/parseJson-lm3MUNdf.js +1 -0
- package/dist/packem_shared/{readJson-Q3T3RlSy.js → readJson-DV2KxaEJ.js} +1 -1
- package/dist/packem_shared/{readJsonSync-BnWiH5-R.js → readJsonSync-DweZd5ZA.js} +1 -1
- package/dist/packem_shared/readJsonc-Dqh-elUt.js +1 -0
- package/dist/packem_shared/{readJsoncSync-CLtlvFKV.js → readJsoncSync-Dy2PZG5g.js} +1 -1
- package/dist/packem_shared/readYaml-BT3HBFQv.js +1 -0
- package/dist/packem_shared/readYamlSync-Cx-zy2cS.js +1 -0
- package/dist/packem_shared/types.d-CgCO6qUp.d.ts +958 -0
- package/dist/packem_shared/walk-B211aFS7.js +1 -0
- package/dist/packem_shared/walk-include-2NQzWTCI.js +1 -0
- package/dist/packem_shared/walkSync-VeMvHYLk.js +1 -0
- package/dist/packem_shared/writeFile-Dnba9aVe.js +1 -0
- package/dist/packem_shared/writeFileSync-pW8o2DG1.js +1 -0
- package/dist/packem_shared/{writeIni-CKinbquM.js → writeIni-DgZ-0EUD.js} +1 -1
- package/dist/packem_shared/{writeIniSync-BISRFyg0.js → writeIniSync-Buz4Cove.js} +2 -2
- package/dist/packem_shared/{writeJson-DlCrFMXb.js → writeJson-vexC7dw2.js} +2 -2
- package/dist/packem_shared/{writeJson5-rSp3QAKP.js → writeJson5-DeW_smOs.js} +2 -2
- package/dist/packem_shared/{writeJson5Sync-tSBBKnaP.js → writeJson5Sync-Cz5pwaPh.js} +2 -2
- package/dist/packem_shared/{writeJsonSync-CKqVRz_9.js → writeJsonSync-DJLfN5iT.js} +2 -2
- package/dist/packem_shared/{writeJsonc-bxz1jdeU.js → writeJsonc-BqJQS0Mk.js} +2 -2
- package/dist/packem_shared/{writeJsoncSync-C-W0H9qP.js → writeJsoncSync-CchlR2KW.js} +2 -2
- package/dist/packem_shared/{writeToml-CrpfWNyK.js → writeToml-Bn-wQdaM.js} +1 -1
- package/dist/packem_shared/{writeTomlSync-DveRchLG.js → writeTomlSync-CTv4RXkJ.js} +1 -1
- package/dist/packem_shared/writeYaml-CpWDXOUF.js +1 -0
- package/dist/packem_shared/writeYamlSync-9MG5_lNI.js +1 -0
- package/dist/toml.d.ts +1 -1
- package/dist/toml.js +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -1
- package/dist/yaml.d.ts +2 -2
- package/dist/yaml.js +1 -1
- package/package.json +28 -28
- package/dist/packem_shared/parseJson-_OfIPruP.js +0 -1
- package/dist/packem_shared/readJsonc-DSoFyuDk.js +0 -1
- package/dist/packem_shared/readYaml-DcpUq11D.js +0 -1
- package/dist/packem_shared/readYamlSync-D5RVZwco.js +0 -1
- package/dist/packem_shared/renderError-DjesnVYT-pWsLqw-_.js +0 -6
- package/dist/packem_shared/types.d-D3Jo_iA-.d.ts +0 -1751
- package/dist/packem_shared/walk-BReeHTKb.js +0 -1
- package/dist/packem_shared/walk-include-BXhGSn6t.js +0 -1
- package/dist/packem_shared/walkSync-yHJUIJb9.js +0 -1
- package/dist/packem_shared/writeFile-srDcYaRC.js +0 -1
- package/dist/packem_shared/writeFileSync-Ddl_u4my.js +0 -1
- package/dist/packem_shared/writeYaml-DvSQ_Jbn.js +0 -1
- package/dist/packem_shared/writeYamlSync-CEf0PUGQ.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
## @visulima/fs [6.0.0](https://github.com/visulima/visulima/compare/%40visulima%2Ffs%405.1.0...%40visulima%2Ffs%406.0.0) (2026-08-08)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Dependencies
|
|
5
|
+
|
|
6
|
+
* **@visulima/path:** upgraded to 4.0.0
|
|
7
|
+
* **@visulima/yaml:** upgraded to 1.0.0
|
|
8
|
+
|
|
9
|
+
## @visulima/fs [5.1.0](https://github.com/visulima/visulima/compare/%40visulima%2Ffs%405.0.11...%40visulima%2Ffs%405.1.0) (2026-08-02)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Dependencies
|
|
13
|
+
|
|
14
|
+
* **@visulima/path:** upgraded to 3.1.0
|
|
15
|
+
* **@visulima/error:** upgraded to 6.1.0
|
|
16
|
+
|
|
1
17
|
## @visulima/fs [5.0.11](https://github.com/visulima/visulima/compare/%40visulima%2Ffs%405.0.10...%40visulima%2Ffs%405.0.11) (2026-07-27)
|
|
2
18
|
|
|
3
19
|
## @visulima/fs [5.0.10](https://github.com/visulima/visulima/compare/%40visulima%2Ffs%405.0.9...%40visulima%2Ffs%405.0.10) (2026-07-27)
|
package/LICENSE.md
CHANGED
|
@@ -312,9 +312,41 @@ Repository: git+https://github.com/SuperchupuDev/tinyglobby.git
|
|
|
312
312
|
|
|
313
313
|
# Licenses of bundled types
|
|
314
314
|
The published @visulima/fs artifact additionally contains code with the following licenses:
|
|
315
|
-
|
|
315
|
+
MIT
|
|
316
316
|
|
|
317
317
|
# Bundled types:
|
|
318
|
+
## @visulima/yaml
|
|
319
|
+
License: MIT
|
|
320
|
+
By: Daniel Bannert
|
|
321
|
+
Repository: git+https://github.com/visulima/visulima.git
|
|
322
|
+
|
|
323
|
+
> MIT License
|
|
324
|
+
>
|
|
325
|
+
> Copyright (c) 2026 visulima
|
|
326
|
+
>
|
|
327
|
+
> Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
328
|
+
> of this software and associated documentation files (the "Software"), to deal
|
|
329
|
+
> in the Software without restriction, including without limitation the rights
|
|
330
|
+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
331
|
+
> copies of the Software, and to permit persons to whom the Software is
|
|
332
|
+
> furnished to do so, subject to the following conditions:
|
|
333
|
+
>
|
|
334
|
+
> The above copyright notice and this permission notice shall be included in all
|
|
335
|
+
> copies or substantial portions of the Software.
|
|
336
|
+
>
|
|
337
|
+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
338
|
+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
339
|
+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
340
|
+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
341
|
+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
342
|
+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
343
|
+
> SOFTWARE.
|
|
344
|
+
>
|
|
345
|
+
> <!-- DEPENDENCIES -->
|
|
346
|
+
> <!-- /DEPENDENCIES -->
|
|
347
|
+
|
|
348
|
+
---------------------------------------
|
|
349
|
+
|
|
318
350
|
## is-fs-case-sensitive
|
|
319
351
|
License: MIT
|
|
320
352
|
By: Hiroki Osame
|
|
@@ -371,25 +403,4 @@ Repository: git+https://github.com/SuperchupuDev/tinyglobby.git
|
|
|
371
403
|
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
372
404
|
> SOFTWARE.
|
|
373
405
|
|
|
374
|
-
---------------------------------------
|
|
375
|
-
|
|
376
|
-
## yaml
|
|
377
|
-
License: ISC
|
|
378
|
-
By: Eemeli Aro
|
|
379
|
-
Repository: github:eemeli/yaml
|
|
380
|
-
|
|
381
|
-
> Copyright Eemeli Aro <eemeli@gmail.com>
|
|
382
|
-
>
|
|
383
|
-
> Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
384
|
-
> with or without fee is hereby granted, provided that the above copyright notice
|
|
385
|
-
> and this permission notice appear in all copies.
|
|
386
|
-
>
|
|
387
|
-
> THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
388
|
-
> REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
389
|
-
> FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
390
|
-
> INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
391
|
-
> OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
392
|
-
> TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
393
|
-
> THIS SOFTWARE.
|
|
394
|
-
|
|
395
406
|
<!-- /TYPE_DEPENDENCIES -->
|
package/README.md
CHANGED
|
@@ -48,28 +48,28 @@ yarn add @visulima/fs
|
|
|
48
48
|
pnpm add @visulima/fs
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
-
> **Note:** If you want to parse or write YAML, you'll need to install
|
|
51
|
+
> **Note:** If you want to parse or write YAML, you'll need to install `@visulima/yaml` as well.
|
|
52
52
|
|
|
53
53
|
```sh
|
|
54
|
-
npm install yaml
|
|
54
|
+
npm install @visulima/yaml
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
```sh
|
|
58
|
-
yarn add yaml
|
|
58
|
+
yarn add @visulima/yaml
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
```sh
|
|
62
|
-
pnpm add yaml
|
|
62
|
+
pnpm add @visulima/yaml
|
|
63
63
|
```
|
|
64
64
|
|
|
65
|
-
> After installing
|
|
65
|
+
> After installing `@visulima/yaml`, you can use the `readYaml`, `readYamlSync` and `writeYaml`, `writeYamlSync` functions from `@visulima/fs/yaml`.
|
|
66
66
|
|
|
67
67
|
## Usage
|
|
68
68
|
|
|
69
69
|
### Quickstart by subpath
|
|
70
70
|
|
|
71
71
|
`@visulima/fs` ships one entry per concern. Import from the narrowest subpath you
|
|
72
|
-
need so the optional parser peers (
|
|
72
|
+
need so the optional parser peers (`@visulima/yaml`, `smol-toml`, `jsonc-parser`, `json5`,
|
|
73
73
|
`ini`) stay tree-shaken.
|
|
74
74
|
|
|
75
75
|
```typescript
|
package/dist/glob.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { g as glob, a as globSync } from "./packem_shared/glob-sync.d-
|
|
2
|
-
export type { G as GlobOptions } from "./packem_shared/types.d-
|
|
1
|
+
export { g as glob, a as globSync } from "./packem_shared/glob-sync.d-SlQXhcIG.js";
|
|
2
|
+
export type { G as GlobOptions } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'fdir';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { q as WalkOptions, F as FindUpName, r as FindUpOptions, s as FindUpNameSync, t as WalkEntry, u as ReadFileOptions, v as ContentType, w as ReadJsonOptions, l as JsonReviver, x as RetryOptions, y as WriteFileOptions, z as WriteJsonOptions } from "./packem_shared/types.d-
|
|
2
|
-
export { type A as CodeFrameLocation, type k as CodeFrameOptions, B as FIND_UP_STOP, D as F_OK, type E as FindUpNameFnResult, type H as FindUpNameSyncFnResult, type G as GlobOptions, type o as JsonReplacer, K as R_OK, type L as ReadFileEncoding, M as W_OK, X as X_OK } from "./packem_shared/types.d-
|
|
1
|
+
import { q as WalkOptions, F as FindUpName, r as FindUpOptions, s as FindUpNameSync, t as WalkEntry, u as ReadFileOptions, v as ContentType, w as ReadJsonOptions, l as JsonReviver, x as RetryOptions, y as WriteFileOptions, z as WriteJsonOptions } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
2
|
+
export { type A as CodeFrameLocation, type k as CodeFrameOptions, B as FIND_UP_STOP, D as F_OK, type E as FindUpNameFnResult, type H as FindUpNameSyncFnResult, type G as GlobOptions, type o as JsonReplacer, K as R_OK, type L as ReadFileEncoding, M as W_OK, X as X_OK } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
3
3
|
import { symlink } from 'node:fs';
|
|
4
4
|
export { CRLF, EOL, LF, detect, format } from "./eol.js";
|
|
5
|
-
export { g as glob, a as globSync } from "./packem_shared/glob-sync.d-
|
|
5
|
+
export { g as glob, a as globSync } from "./packem_shared/glob-sync.d-SlQXhcIG.js";
|
|
6
6
|
export { type GlobParentOptions, default as globParent } from "./glob-parent.js";
|
|
7
7
|
export { type IsGlobOptions, default as isGlob } from "./is-glob.js";
|
|
8
8
|
export { type MatchOptions, match, matcher } from "./match.js";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as h}from"node:module";import{FIND_UP_STOP as R,F_OK as P,R_OK as $,W_OK as J,X_OK as K}from"./packem_shared/FIND_UP_STOP-CAwY1qU7.js";import{default as U}from"./packem_shared/copy-DiR5_5iA.js";import{default as B}from"./packem_shared/copySync-DffsYlhb.js";import{default as A}from"./packem_shared/ensureDir-BEiomfxz.js";import{default as N}from"./packem_shared/ensureDirSync-B0w9WMwE.js";import{default as G}from"./packem_shared/ensureFile-waD4hDO8.js";import{default as X}from"./packem_shared/ensureFileSync-CG07zjV7.js";import{default as Q}from"./packem_shared/ensureLink-Dz-PDWa5.js";import{default as Y}from"./packem_shared/ensureLinkSync-BZH7TaSQ.js";import{default as ee}from"./packem_shared/ensureSymlink-Byi6ajoE.js";import{default as te}from"./packem_shared/ensureSymlinkSync-D7OCsAd8.js";import{CRLF as se,EOL as ae,LF as ne,detect as ie,format as fe}from"./eol.js";import{default as le}from"./packem_shared/collect-
|
|
1
|
+
import{createRequire as h}from"node:module";import{FIND_UP_STOP as R,F_OK as P,R_OK as $,W_OK as J,X_OK as K}from"./packem_shared/FIND_UP_STOP-CAwY1qU7.js";import{default as U}from"./packem_shared/copy-DiR5_5iA.js";import{default as B}from"./packem_shared/copySync-DffsYlhb.js";import{default as A}from"./packem_shared/ensureDir-BEiomfxz.js";import{default as N}from"./packem_shared/ensureDirSync-B0w9WMwE.js";import{default as G}from"./packem_shared/ensureFile-waD4hDO8.js";import{default as X}from"./packem_shared/ensureFileSync-CG07zjV7.js";import{default as Q}from"./packem_shared/ensureLink-Dz-PDWa5.js";import{default as Y}from"./packem_shared/ensureLinkSync-BZH7TaSQ.js";import{default as ee}from"./packem_shared/ensureSymlink-Byi6ajoE.js";import{default as te}from"./packem_shared/ensureSymlinkSync-D7OCsAd8.js";import{CRLF as se,EOL as ae,LF as ne,detect as ie,format as fe}from"./eol.js";import{default as le}from"./packem_shared/collect-Dbo3K4iq.js";import{default as pe}from"./packem_shared/collectSync-BLLtRqQ4.js";import{default as de}from"./packem_shared/findUp-BHCEMf5y.js";import{default as ye}from"./packem_shared/findUpSync-BKJsHMQN.js";import{default as _e}from"./packem_shared/glob-BUjyjdE8.js";import{default as he}from"./packem_shared/globSync-Bk9TUV7x.js";import{default as be}from"./packem_shared/walk-B211aFS7.js";import{default as we}from"./packem_shared/walkSync-VeMvHYLk.js";import{default as Ce}from"./glob-parent.js";import{default as je}from"./packem_shared/isAccessible-B7guOm3k.js";import{default as Oe}from"./packem_shared/isAccessibleSync-XH4YleJW.js";import{default as Re}from"./is-glob.js";import{match as $e,matcher as Je}from"./match.js";import{move as Te,moveSync as Ue,rename as We,renameSync as Be}from"./packem_shared/move-KhPRvsRd.js";import{default as Ae}from"./packem_shared/readFile-VgxUDrNH.js";import{default as Ne}from"./packem_shared/readFileSync-CloFeQw8.js";import{default as Ge}from"./packem_shared/readJson-DV2KxaEJ.js";import{default as Xe}from"./packem_shared/readJsonSync-DweZd5ZA.js";import{default as Qe}from"./packem_shared/emptyDir-BlBeczk0.js";import{default as Ye}from"./packem_shared/emptyDirSync-DfUZ9Ejz.js";import{default as er}from"./packem_shared/remove-D_CUIlBL.js";import{default as tr}from"./packem_shared/removeSync-F4nKiwrU.js";import{sanitize as sr}from"./packem_shared/sanitize-aEqeyx4d.js";import{default as nr}from"./packem_shared/writeFile-Dnba9aVe.js";import{default as fr}from"./packem_shared/writeFileSync-pW8o2DG1.js";import{default as lr}from"./packem_shared/writeJson-vexC7dw2.js";import{default as pr}from"./packem_shared/writeJsonSync-DJLfN5iT.js";let F;const b=n=>(F??=h(import.meta.url))(n),i=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,u=n=>{if(typeof i<"u"&&i.versions&&i.versions.node){const[s,f]=i.versions.node.split(".").map(Number);if(s>22||s===22&&f>=3||s===20&&f>=16)return i.getBuiltinModule(n)}return b(n)},g=u("fs"),w=u("os"),k=u("path");var l={},x;function C(){if(x)return l;x=1;var n=Object.defineProperty,s=(o,e)=>n(o,"name",{value:e,configurable:!0}),f=g,y=w,S=k;const p=s(o=>{let e="";for(let r=0;r<o.length;r+=1){const t=o[r],a=t.toUpperCase();e+=t===a?t.toLowerCase():a}return e},"invertCase"),c=new Map,m=s((o,e)=>{const r=S.join(o,`.is-fs-case-sensitive-test-${process.pid}`);try{return e.writeFileSync(r,""),!e.existsSync(p(r))}finally{try{e.unlinkSync(r)}catch{}}},"checkDirectoryCaseWithWrite"),_=s((o,e,r)=>{try{return m(o,r)}catch(t){if(e===void 0)return m(y.tmpdir(),r);throw t}},"checkDirectoryCaseWithFallback"),v=s((o,e=f,r=!0)=>{const t=o??process.cwd();if(r&&c.has(t))return c.get(t);let a;const d=p(t);return d!==t&&e.existsSync(t)?a=!e.existsSync(d):a=_(t,o,e),r&&c.set(t,a),a},"isFsCaseSensitive");return l.isFsCaseSensitive=v,l}var D=C();const q=D.isFsCaseSensitive;export{se as CRLF,ae as EOL,R as FIND_UP_STOP,P as F_OK,ne as LF,$ as R_OK,J as W_OK,K as X_OK,le as collect,pe as collectSync,U as copy,B as copySync,ie as detect,Qe as emptyDir,Ye as emptyDirSync,A as ensureDir,N as ensureDirSync,G as ensureFile,X as ensureFileSync,Q as ensureLink,Y as ensureLinkSync,ee as ensureSymlink,te as ensureSymlinkSync,de as findUp,ye as findUpSync,fe as format,_e as glob,Ce as globParent,he as globSync,je as isAccessible,Oe as isAccessibleSync,q as isFsCaseSensitive,Re as isGlob,$e as match,Je as matcher,Te as move,Ue as moveSync,Ae as readFile,Ne as readFileSync,Ge as readJson,Xe as readJsonSync,er as remove,tr as removeSync,We as rename,Be as renameSync,sr as sanitize,be as walk,we as walkSync,nr as writeFile,fr as writeFileSync,lr as writeJson,pr as writeJsonSync};
|
package/dist/ini.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompressionType, R as ReadIniOptions, W as WriteIniOptions } from "./packem_shared/types.d-
|
|
2
|
-
export type { I as IniEncodeOptions, a as IniLineEnding } from "./packem_shared/types.d-
|
|
1
|
+
import { C as CompressionType, R as ReadIniOptions, W as WriteIniOptions } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
2
|
+
export type { I as IniEncodeOptions, a as IniLineEnding } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'fdir';
|
|
5
5
|
/**
|
package/dist/ini.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as a}from"./packem_shared/readIni-CEXHWn92.js";import{default as f}from"./packem_shared/readIniSync-DsxVHypc.js";import{default as d}from"./packem_shared/writeIni-
|
|
1
|
+
import{default as a}from"./packem_shared/readIni-CEXHWn92.js";import{default as f}from"./packem_shared/readIniSync-DsxVHypc.js";import{default as d}from"./packem_shared/writeIni-DgZ-0EUD.js";import{default as n}from"./packem_shared/writeIniSync-Buz4Cove.js";export{a as readIni,f as readIniSync,d as writeIni,n as writeIniSync};
|
package/dist/json5.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompressionType, b as ReadJson5Options, J as Json5Reviver, c as WriteJson5Options } from "./packem_shared/types.d-
|
|
2
|
-
export type { d as Json5Replacer } from "./packem_shared/types.d-
|
|
1
|
+
import { C as CompressionType, b as ReadJson5Options, J as Json5Reviver, c as WriteJson5Options } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
2
|
+
export type { d as Json5Replacer } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'fdir';
|
|
5
5
|
declare function readJson5<R = unknown>(path: URL | string, options?: ReadJson5Options<CompressionType>): Promise<R>;
|
package/dist/json5.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"./packem_shared/readJson5-S68aVros.js";import{default as t}from"./packem_shared/readJson5Sync-Bi9Rv46R.js";import{default as s}from"./packem_shared/writeJson5-
|
|
1
|
+
import{default as r}from"./packem_shared/readJson5-S68aVros.js";import{default as t}from"./packem_shared/readJson5Sync-Bi9Rv46R.js";import{default as s}from"./packem_shared/writeJson5-DeW_smOs.js";import{default as n}from"./packem_shared/writeJson5Sync-Cz5pwaPh.js";export{r as readJson5,t as readJson5Sync,s as writeJson5,n as writeJson5Sync};
|
package/dist/jsonc.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CompressionType, e as ReadJsoncOptions, f as WriteJsoncOptions } from "./packem_shared/types.d-
|
|
2
|
-
export type { g as JsoncFormattingOptions, h as JsoncParseOptions } from "./packem_shared/types.d-
|
|
1
|
+
import { C as CompressionType, e as ReadJsoncOptions, f as WriteJsoncOptions } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
2
|
+
export type { g as JsoncFormattingOptions, h as JsoncParseOptions } from "./packem_shared/types.d-CgCO6qUp.js";
|
|
3
3
|
import 'node:fs';
|
|
4
4
|
import 'fdir';
|
|
5
5
|
/**
|
package/dist/jsonc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{default as r}from"./packem_shared/readJsonc-
|
|
1
|
+
import{default as r}from"./packem_shared/readJsonc-Dqh-elUt.js";import{default as t}from"./packem_shared/readJsoncSync-Dy2PZG5g.js";import{default as s}from"./packem_shared/writeJsonc-BqJQS0Mk.js";import{default as d}from"./packem_shared/writeJsoncSync-CchlR2KW.js";export{r as readJsonc,t as readJsoncSync,s as writeJsonc,d as writeJsoncSync};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import n from"./walk-
|
|
1
|
+
import n from"./walk-B211aFS7.js";const e=async(r,s={})=>{Array.isArray(s.extensions)||(s.extensions=["js","mjs","cjs","ts"]);const o=[];for await(const t of n(r,s))o.push(t.path);return o};export{e as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"./walkSync-
|
|
1
|
+
import t from"./walkSync-VeMvHYLk.js";const a=(r,s={})=>{Array.isArray(s.extensions)||(s.extensions=["js","mjs","cjs","ts"]);const o=[];for(const n of t(r,s))o.push(n.path);return o};export{a as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as g}from"node:module";import{resolve as c,parse as T,isAbsolute as v,dirname as q}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import{FIND_UP_STOP as B}from"./FIND_UP_STOP-CAwY1qU7.js";let w;const h=t=>(w??=g(import.meta.url))(t),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,
|
|
1
|
+
import{createRequire as g}from"node:module";import{resolve as c,parse as T,isAbsolute as v,dirname as q}from"@visulima/path";import{toPath as f}from"@visulima/path/utils";import{FIND_UP_STOP as B}from"./FIND_UP_STOP-CAwY1qU7.js";let w;const h=t=>(w??=g(import.meta.url))(t),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=t=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,i]=s.versions.node.split(".").map(Number);if(o>22||o===22&&i>=3||o===20&&i>=16)return s.getBuiltinModule(t)}return h(t)},{stat:A,lstat:j}=b("node:fs/promises"),D=async(t,o={})=>{if(typeof t!="string"&&!Array.isArray(t)&&typeof t!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const i=o.cwd?f(o.cwd):process.cwd();let r=c(i);const{root:a}=T(r),y=f(o.stopAt??a),m=c(r,y),u=o.type??"file",d=async function(n){return typeof t=="function"?[await t(n)]:typeof t=="string"?[t]:Array.isArray(t)?t:[t]};o.allowSymlinks??=!0;const _=o.allowSymlinks?A:j;for(;r;){const n=await d(r);for(let e of n){if(e===B)return;if(e===void 0)continue;Buffer.isBuffer(e)?e=e.toString():e instanceof URL&&(e=f(e));const l=v(e)?e:c(r,e);try{const p=await _(l);if(u==="file"&&p.isFile()||u==="directory"&&p.isDirectory())return l}catch{}}if(r===m||r===a)break;r=q(r)}};export{D as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{createRequire as _}from"node:module";import{resolve as i,parse as A,isAbsolute as S,dirname as T}from"@visulima/path";import{toPath as c}from"@visulima/path/utils";import{FIND_UP_STOP as v}from"./FIND_UP_STOP-CAwY1qU7.js";let g;const h=e=>(g??=_(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,
|
|
1
|
+
import{createRequire as _}from"node:module";import{resolve as i,parse as A,isAbsolute as S,dirname as T}from"@visulima/path";import{toPath as c}from"@visulima/path/utils";import{FIND_UP_STOP as v}from"./FIND_UP_STOP-CAwY1qU7.js";let g;const h=e=>(g??=_(import.meta.url))(e),s=typeof globalThis<"u"&&typeof globalThis.process<"u"?globalThis.process:process,b=e=>{if(typeof s<"u"&&s.versions&&s.versions.node){const[o,n]=s.versions.node.split(".").map(Number);if(o>22||o===22&&n>=3||o===20&&n>=16)return s.getBuiltinModule(e)}return h(e)},{statSync:w,lstatSync:j}=b("node:fs"),k=(e,o={})=>{if(typeof e!="string"&&!Array.isArray(e)&&typeof e!="function")throw new TypeError("The `name` argument must be of type `string` or `string[]`");const n=o.cwd?c(o.cwd):process.cwd();let r=i(n);const{root:f}=A(r),p=c(o.stopAt??f),y=i(r,p),u=o.type??"file",d=function(t){return typeof e=="function"?[e(t)]:typeof e=="string"?[e]:Array.isArray(e)?e:[e]};o.allowSymlinks??=!0;const m=o.allowSymlinks?w:j;for(;r;){for(let t of d(r)){if(t===v)return;if(t===void 0)continue;Buffer.isBuffer(t)?t=t.toString():t instanceof URL&&(t=c(t));const a=S(t)?t:i(r,t);try{const l=m(a);if(u==="file"&&l.isFile()||u==="directory"&&l.isDirectory())return a}catch{}}if(r===y||r===f)break;r=T(r)}};export{k as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
const v=globalThis.process??Object.create(null),d={versions:{}},x=new Proxy(v,{get(e,t){if(t in e)return e[t];if(t in d)return d[t]}}),M=e=>e.replaceAll(/\r\n|\r(?!\n)|\n/gu,`
|
|
2
|
+
`),B=(e,t,l,n)=>{const s={column:0,line:-1,...e.start},a={...s,...e.end},c=s.line,i=s.column,f=a.line,p=a.column;let m=Math.max(c-(l+1),0),h=Math.min(t.length,f+n);c===-1&&(m=0),f===-1&&(h=t.length);const y=f-c,o={};if(y)for(let r=0;r<=y;r++){const u=r+c;if(!i)o[u]=!0;else if(r===0){const g=t[u-1]?.length;o[u]=[i,(g??0)-i+1]}else if(r===y)o[u]=[0,p];else{const g=t[u-r]?.length;o[u]=[0,g]}}else i===p?o[c]=i?[i,0]:!0:o[c]=[i,(p??0)-(i??0)];return{end:h,markerLines:o,start:m}},E=x.platform==="win32"&&!x.env?.WT_SESSION?">":"❯",O=(e,t,l)=>{const n={linesAbove:2,linesBelow:3,prefix:"",showGutter:!0,tabWidth:4,...l,color:{gutter:r=>r,marker:r=>r,message:r=>r,...l?.color}},s=typeof t.start.column=="number";let a=(e.includes("\r")?M(e):e).split(`
|
|
3
|
+
`);typeof n.tabWidth=="number"&&e.includes(" ")&&(a=a.map(r=>r.replaceAll(" "," ".repeat(n.tabWidth))));const{end:c,markerLines:i,start:f}=B(t,a,n.linesAbove,n.linesBelow),p=String(c).length,{gutter:m,marker:h,message:y}=n.color;let o=a.slice(f,c).map((r,u)=>{const g=f+1+u,A=i[g],S=String(g).padStart(p),k=!i[g+1],$=` ${S}${n.showGutter?" |":""}`;if(A){let b="";if(Array.isArray(A)){const j=r.replaceAll(/[^\t]/g," ").slice(0,Math.max(A[0]-1,0)),W=A[1]||1;b=[`
|
|
4
|
+
`,n.prefix+m($.replaceAll(/\d/g," "))," ",j,h("^").repeat(W)].join(""),k&&n.message&&(b+=` ${y(n.message)}`)}return[n.prefix+h(E),m($),r.length>0?` ${r}`:"",b].join("")}return`${n.prefix} ${m($)}${r.length>0?` ${r}`:""}`}).join(`
|
|
5
|
+
`);return n.message&&!s&&(o=`${n.prefix+" ".repeat(p+1)+n.message}
|
|
6
|
+
${o}`),o},w=(e,t)=>{let l=0,n=t.length-2;for(;l<n;){const s=l+(n-l>>1);if(e<t[s])n=s-1;else if(e>=t[s+1])l=s+1;else{l=s;break}}return l},G=/\n|\r(?!\n)/,L=e=>e.split(G).reduce((t,l)=>(t.push(t.at(-1)+l.length+1),t),[0]),T=(e,t,l)=>{if(!Array.isArray(e)&&typeof e!="string"||(typeof e=="string"||Array.isArray(e))&&e.length===0)return{column:0,line:0};if(typeof t!="number"||typeof e=="string"&&t>=e.length||Array.isArray(e)&&t+1>=e.at(-1))return{column:0,line:0};if(typeof e=="string"){const s=L(e),a=w(t,s);return{column:t-s[a]+1,line:a+1}}const n=w(t,e);return{column:t-e[n]+1,line:n+1}};export{O as W,T as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as s,W as l}from"./indexToLineColumn-BfkIsWHQ-DQJmePiQ.js";import u from"./JSONError-Cvp9ycba.js";const m=t=>String.raw`\u{${t.codePointAt(0).toString(16)}}`,p=(t,o,e)=>l(t,{start:o},{tabWidth:!1,...e}),f=/in JSON at position (\d+)(?: \(line (\d+) column (\d+)\))?$/,d=(t,o)=>{const e=f.exec(o);if(!e)return;const[,n,r,a]=e;if(r&&a)return{column:Number(a),line:Number(r)};let i=Number(n);return i===t.length&&(i=t.length-1),s(t,i)},g=/(?<=^Unexpected token )(?<quote>')?(.)\k<quote>/,h=t=>t.replace(g,(o,e,n)=>`"${n}"(${m(n)})`);function w(t,o,e,n){typeof o=="string"&&(typeof e=="object"&&(n=e),e=o,o=void 0);let r;try{return JSON.parse(t,o)}catch(c){r=c.message}let a;t?(a=d(t,r),r=h(r)):r+=" while parsing empty string";const i=new u(r);throw i.fileName=e,a&&(i.codeFrame=p(t,a,n)),i}export{w as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toPath as n}from"@visulima/path/utils";import a from"./parseJson-
|
|
1
|
+
import{toPath as n}from"@visulima/path/utils";import a from"./parseJson-lm3MUNdf.js";import d from"./readFile-VgxUDrNH.js";async function u(r,o,e){typeof o=="object"&&(e=o,o=void 0);const f=await d(r,{buffer:!0,encoding:void 0});let t=new TextDecoder().decode(f);const{beforeParse:c,color:i}=e??{};return typeof c=="function"&&(t=c(t)),a(t,o,n(r),{color:i})}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toPath as i}from"@visulima/path/utils";import d from"./parseJson-
|
|
1
|
+
import{toPath as i}from"@visulima/path/utils";import d from"./parseJson-lm3MUNdf.js";import p from"./readFileSync-CloFeQw8.js";function a(r,o,t){typeof o=="object"&&(t=o,o=void 0);const n=p(r,{buffer:!0,encoding:void 0});let e=new TextDecoder().decode(n);const{beforeParse:f,color:c}=t??{};return typeof f=="function"&&(e=f(e)),d(e,o,i(r),{color:c})}export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as u,W as C}from"./indexToLineColumn-BfkIsWHQ-DQJmePiQ.js";import{toPath as g}from"@visulima/path/utils";import{parse as h,printParseErrorCode as b}from"jsonc-parser";import y from"./JSONError-Cvp9ycba.js";import E from"./readFile-VgxUDrNH.js";const P=(r,e,a,f)=>{if(r.length===0)return;const o=r[0],n=u(e,o.offset),t=new y(`${b(o.error)} at offset ${o.offset}`);throw t.fileName=a,t.codeFrame=C(e,{start:n},{tabWidth:!1,...f}),t},J=async(r,e)=>{const{allowEmptyContent:a,allowTrailingComma:f=!0,beforeParse:o,buffer:n,color:t,compression:l,disallowComments:c,encoding:p="utf8",flag:w}=e??{},m=await E(r,{buffer:n,compression:l,encoding:p,flag:w}),s=typeof o=="function"?o(m):m,i=[],d=h(s,i,{allowEmptyContent:a,allowTrailingComma:f,disallowComments:c});return P(i,s,g(r),{color:t}),d};export{J as default,P as throwIfJsoncErrors};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{toPath as g}from"@visulima/path/utils";import{parse as C}from"jsonc-parser";import d from"./readFileSync-CloFeQw8.js";import{throwIfJsoncErrors as y}from"./readJsonc-
|
|
1
|
+
import{toPath as g}from"@visulima/path/utils";import{parse as C}from"jsonc-parser";import d from"./readFileSync-CloFeQw8.js";import{throwIfJsoncErrors as y}from"./readJsonc-Dqh-elUt.js";const T=(o,e)=>{const{allowEmptyContent:l,allowTrailingComma:a=!0,beforeParse:r,buffer:f,color:i,compression:s,disallowComments:p,encoding:c="utf8",flag:u}=e??{},t=d(o,{buffer:f,compression:s,encoding:c,flag:u}),m=typeof r=="function"?r(t):t,n=[],w=C(m,n,{allowEmptyContent:l,allowTrailingComma:a,disallowComments:p});return y(n,m,g(o),{color:i}),w};export{T as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as t}from"@visulima/yaml";import u from"./readFile-VgxUDrNH.js";async function g(n,o,f){const i=(typeof o=="function"?f:o??f)??{},{buffer:a,compression:c,encoding:p="utf8",flag:s,...e}=i,r=await u(n,{buffer:a,compression:c,encoding:p,flag:s});return typeof o=="function"?t(r,o,e):t(r,e)}export{g as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{parse as t}from"@visulima/yaml";import s from"./readFileSync-CloFeQw8.js";function g(n,o,f){const c=(typeof o=="function"?f:o??f)??{},{buffer:i,compression:p,encoding:u="utf8",flag:m,...e}=c,r=s(n,{buffer:i,compression:p,encoding:u,flag:m});return typeof o=="function"?t(r,o,e):t(r,e)}export{g as default};
|