@visulima/package 1.10.3 → 2.0.1

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.
@@ -0,0 +1,786 @@
1
+ import { WriteJsonOptions } from '@visulima/fs';
2
+ import { Package } from 'normalize-package-data';
3
+
4
+ /**
5
+ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
6
+
7
+ @category Type
8
+ */
9
+ type Primitive =
10
+ | null
11
+ | undefined
12
+ | string
13
+ | number
14
+ | boolean
15
+ | symbol
16
+ | bigint;
17
+
18
+ /**
19
+ Matches a JSON object.
20
+
21
+ This type can be useful to enforce some input to be JSON-compatible or as a super-type to be extended from. Don't use this as a direct return type as the user would have to double-cast it: `jsonObject as unknown as CustomResponse`. Instead, you could extend your CustomResponse type from it to ensure your type only uses JSON-compatible types: `interface CustomResponse extends JsonObject { … }`.
22
+
23
+ @category JSON
24
+ */
25
+ type JsonObject = {[Key in string]: JsonValue} & {[Key in string]?: JsonValue | undefined};
26
+
27
+ /**
28
+ Matches a JSON array.
29
+
30
+ @category JSON
31
+ */
32
+ type JsonArray = JsonValue[] | readonly JsonValue[];
33
+
34
+ /**
35
+ Matches any valid JSON primitive value.
36
+
37
+ @category JSON
38
+ */
39
+ type JsonPrimitive = string | number | boolean | null;
40
+
41
+ /**
42
+ Matches any valid JSON value.
43
+
44
+ @see `Jsonify` if you need to transform a type to one that is assignable to `JsonValue`.
45
+
46
+ @category JSON
47
+ */
48
+ type JsonValue = JsonPrimitive | JsonObject | JsonArray;
49
+
50
+ declare global {
51
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions -- It has to be an `interface` so that it can be merged.
52
+ interface SymbolConstructor {
53
+ readonly observable: symbol;
54
+ }
55
+ }
56
+
57
+ /**
58
+ Allows creating a union type by combining primitive types and literal types without sacrificing auto-completion in IDEs for the literal type part of the union.
59
+
60
+ Currently, when a union type of a primitive type is combined with literal types, TypeScript loses all information about the combined literals. Thus, when such type is used in an IDE with autocompletion, no suggestions are made for the declared literals.
61
+
62
+ This type is a workaround for [Microsoft/TypeScript#29729](https://github.com/Microsoft/TypeScript/issues/29729). It will be removed as soon as it's not needed anymore.
63
+
64
+ @example
65
+ ```
66
+ import type {LiteralUnion} from 'type-fest';
67
+
68
+ // Before
69
+
70
+ type Pet = 'dog' | 'cat' | string;
71
+
72
+ const pet: Pet = '';
73
+ // Start typing in your TypeScript-enabled IDE.
74
+ // You **will not** get auto-completion for `dog` and `cat` literals.
75
+
76
+ // After
77
+
78
+ type Pet2 = LiteralUnion<'dog' | 'cat', string>;
79
+
80
+ const pet: Pet2 = '';
81
+ // You **will** get auto-completion for `dog` and `cat` literals.
82
+ ```
83
+
84
+ @category Type
85
+ */
86
+ type LiteralUnion<
87
+ LiteralType,
88
+ BaseType extends Primitive,
89
+ > = LiteralType | (BaseType & Record<never, never>);
90
+
91
+ declare namespace PackageJson$1 {
92
+ /**
93
+ A person who has been involved in creating or maintaining the package.
94
+ */
95
+ export type Person =
96
+ | string
97
+ | {
98
+ name: string;
99
+ url?: string;
100
+ email?: string;
101
+ };
102
+
103
+ export type BugsLocation =
104
+ | string
105
+ | {
106
+ /**
107
+ The URL to the package's issue tracker.
108
+ */
109
+ url?: string;
110
+
111
+ /**
112
+ The email address to which issues should be reported.
113
+ */
114
+ email?: string;
115
+ };
116
+
117
+ export type DirectoryLocations = {
118
+ [directoryType: string]: JsonValue | undefined;
119
+
120
+ /**
121
+ Location for executable scripts. Sugar to generate entries in the `bin` property by walking the folder.
122
+ */
123
+ bin?: string;
124
+
125
+ /**
126
+ Location for Markdown files.
127
+ */
128
+ doc?: string;
129
+
130
+ /**
131
+ Location for example scripts.
132
+ */
133
+ example?: string;
134
+
135
+ /**
136
+ Location for the bulk of the library.
137
+ */
138
+ lib?: string;
139
+
140
+ /**
141
+ Location for man pages. Sugar to generate a `man` array by walking the folder.
142
+ */
143
+ man?: string;
144
+
145
+ /**
146
+ Location for test files.
147
+ */
148
+ test?: string;
149
+ };
150
+
151
+ export type Scripts = {
152
+ /**
153
+ Run **before** the package is published (Also run on local `npm install` without any arguments).
154
+ */
155
+ prepublish?: string;
156
+
157
+ /**
158
+ Run both **before** the package is packed and published, and on local `npm install` without any arguments. This is run **after** `prepublish`, but **before** `prepublishOnly`.
159
+ */
160
+ prepare?: string;
161
+
162
+ /**
163
+ Run **before** the package is prepared and packed, **only** on `npm publish`.
164
+ */
165
+ prepublishOnly?: string;
166
+
167
+ /**
168
+ Run **before** a tarball is packed (on `npm pack`, `npm publish`, and when installing git dependencies).
169
+ */
170
+ prepack?: string;
171
+
172
+ /**
173
+ Run **after** the tarball has been generated and moved to its final destination.
174
+ */
175
+ postpack?: string;
176
+
177
+ /**
178
+ Run **after** the package is published.
179
+ */
180
+ publish?: string;
181
+
182
+ /**
183
+ Run **after** the package is published.
184
+ */
185
+ postpublish?: string;
186
+
187
+ /**
188
+ Run **before** the package is installed.
189
+ */
190
+ preinstall?: string;
191
+
192
+ /**
193
+ Run **after** the package is installed.
194
+ */
195
+ install?: string;
196
+
197
+ /**
198
+ Run **after** the package is installed and after `install`.
199
+ */
200
+ postinstall?: string;
201
+
202
+ /**
203
+ Run **before** the package is uninstalled and before `uninstall`.
204
+ */
205
+ preuninstall?: string;
206
+
207
+ /**
208
+ Run **before** the package is uninstalled.
209
+ */
210
+ uninstall?: string;
211
+
212
+ /**
213
+ Run **after** the package is uninstalled.
214
+ */
215
+ postuninstall?: string;
216
+
217
+ /**
218
+ Run **before** bump the package version and before `version`.
219
+ */
220
+ preversion?: string;
221
+
222
+ /**
223
+ Run **before** bump the package version.
224
+ */
225
+ version?: string;
226
+
227
+ /**
228
+ Run **after** bump the package version.
229
+ */
230
+ postversion?: string;
231
+
232
+ /**
233
+ Run with the `npm test` command, before `test`.
234
+ */
235
+ pretest?: string;
236
+
237
+ /**
238
+ Run with the `npm test` command.
239
+ */
240
+ test?: string;
241
+
242
+ /**
243
+ Run with the `npm test` command, after `test`.
244
+ */
245
+ posttest?: string;
246
+
247
+ /**
248
+ Run with the `npm stop` command, before `stop`.
249
+ */
250
+ prestop?: string;
251
+
252
+ /**
253
+ Run with the `npm stop` command.
254
+ */
255
+ stop?: string;
256
+
257
+ /**
258
+ Run with the `npm stop` command, after `stop`.
259
+ */
260
+ poststop?: string;
261
+
262
+ /**
263
+ Run with the `npm start` command, before `start`.
264
+ */
265
+ prestart?: string;
266
+
267
+ /**
268
+ Run with the `npm start` command.
269
+ */
270
+ start?: string;
271
+
272
+ /**
273
+ Run with the `npm start` command, after `start`.
274
+ */
275
+ poststart?: string;
276
+
277
+ /**
278
+ Run with the `npm restart` command, before `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
279
+ */
280
+ prerestart?: string;
281
+
282
+ /**
283
+ Run with the `npm restart` command. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
284
+ */
285
+ restart?: string;
286
+
287
+ /**
288
+ Run with the `npm restart` command, after `restart`. Note: `npm restart` will run the `stop` and `start` scripts if no `restart` script is provided.
289
+ */
290
+ postrestart?: string;
291
+ } & Partial<Record<string, string>>;
292
+
293
+ /**
294
+ Dependencies of the package. The version range is a string which has one or more space-separated descriptors. Dependencies can also be identified with a tarball or Git URL.
295
+ */
296
+ export type Dependency = Partial<Record<string, string>>;
297
+
298
+ /**
299
+ A mapping of conditions and the paths to which they resolve.
300
+ */
301
+ type ExportConditions = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
302
+ [condition: string]: Exports;
303
+ };
304
+
305
+ /**
306
+ Entry points of a module, optionally with conditions and subpath exports.
307
+ */
308
+ export type Exports =
309
+ | null
310
+ | string
311
+ | Array<string | ExportConditions>
312
+ | ExportConditions;
313
+
314
+ /**
315
+ Import map entries of a module, optionally with conditions and subpath imports.
316
+ */
317
+ export type Imports = { // eslint-disable-line @typescript-eslint/consistent-indexed-object-style
318
+ [key: `#${string}`]: Exports;
319
+ };
320
+
321
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
322
+ export interface NonStandardEntryPoints {
323
+ /**
324
+ An ECMAScript module ID that is the primary entry point to the program.
325
+ */
326
+ module?: string;
327
+
328
+ /**
329
+ A module ID with untranspiled code that is the primary entry point to the program.
330
+ */
331
+ esnext?:
332
+ | string
333
+ | {
334
+ [moduleName: string]: string | undefined;
335
+ main?: string;
336
+ browser?: string;
337
+ };
338
+
339
+ /**
340
+ A hint to JavaScript bundlers or component tools when packaging modules for client side use.
341
+ */
342
+ browser?:
343
+ | string
344
+ | Partial<Record<string, string | false>>;
345
+
346
+ /**
347
+ Denote which files in your project are "pure" and therefore safe for Webpack to prune if unused.
348
+
349
+ [Read more.](https://webpack.js.org/guides/tree-shaking/)
350
+ */
351
+ sideEffects?: boolean | string[];
352
+ }
353
+
354
+ export type TypeScriptConfiguration = {
355
+ /**
356
+ Location of the bundled TypeScript declaration file.
357
+ */
358
+ types?: string;
359
+
360
+ /**
361
+ Version selection map of TypeScript.
362
+ */
363
+ typesVersions?: Partial<Record<string, Partial<Record<string, string[]>>>>;
364
+
365
+ /**
366
+ Location of the bundled TypeScript declaration file. Alias of `types`.
367
+ */
368
+ typings?: string;
369
+ };
370
+
371
+ /**
372
+ An alternative configuration for workspaces.
373
+ */
374
+ export type WorkspaceConfig = {
375
+ /**
376
+ An array of workspace pattern strings which contain the workspace packages.
377
+ */
378
+ packages?: WorkspacePattern[];
379
+
380
+ /**
381
+ Designed to solve the problem of packages which break when their `node_modules` are moved to the root workspace directory - a process known as hoisting. For these packages, both within your workspace, and also some that have been installed via `node_modules`, it is important to have a mechanism for preventing the default Yarn workspace behavior. By adding workspace pattern strings here, Yarn will resume non-workspace behavior for any package which matches the defined patterns.
382
+
383
+ [Supported](https://classic.yarnpkg.com/blog/2018/02/15/nohoist/) by Yarn.
384
+ [Not supported](https://github.com/npm/rfcs/issues/287) by npm.
385
+ */
386
+ nohoist?: WorkspacePattern[];
387
+ };
388
+
389
+ /**
390
+ A workspace pattern points to a directory or group of directories which contain packages that should be included in the workspace installation process.
391
+
392
+ The patterns are handled with [minimatch](https://github.com/isaacs/minimatch).
393
+
394
+ @example
395
+ `docs` → Include the docs directory and install its dependencies.
396
+ `packages/*` → Include all nested directories within the packages directory, like `packages/cli` and `packages/core`.
397
+ */
398
+ type WorkspacePattern = string;
399
+
400
+ export type YarnConfiguration = {
401
+ /**
402
+ If your package only allows one version of a given dependency, and you’d like to enforce the same behavior as `yarn install --flat` on the command-line, set this to `true`.
403
+
404
+ Note that if your `package.json` contains `"flat": true` and other packages depend on yours (e.g. you are building a library rather than an app), those other packages will also need `"flat": true` in their `package.json` or be installed with `yarn install --flat` on the command-line.
405
+ */
406
+ flat?: boolean;
407
+
408
+ /**
409
+ Selective version resolutions. Allows the definition of custom package versions inside dependencies without manual edits in the `yarn.lock` file.
410
+ */
411
+ resolutions?: Dependency;
412
+ };
413
+
414
+ export type JSPMConfiguration = {
415
+ /**
416
+ JSPM configuration.
417
+ */
418
+ jspm?: PackageJson$1;
419
+ };
420
+
421
+ /**
422
+ Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Containing standard npm properties.
423
+ */
424
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
425
+ export interface PackageJsonStandard {
426
+ /**
427
+ The name of the package.
428
+ */
429
+ name?: string;
430
+
431
+ /**
432
+ Package version, parseable by [`node-semver`](https://github.com/npm/node-semver).
433
+ */
434
+ version?: string;
435
+
436
+ /**
437
+ Package description, listed in `npm search`.
438
+ */
439
+ description?: string;
440
+
441
+ /**
442
+ Keywords associated with package, listed in `npm search`.
443
+ */
444
+ keywords?: string[];
445
+
446
+ /**
447
+ The URL to the package's homepage.
448
+ */
449
+ homepage?: LiteralUnion<'.', string>;
450
+
451
+ /**
452
+ The URL to the package's issue tracker and/or the email address to which issues should be reported.
453
+ */
454
+ bugs?: BugsLocation;
455
+
456
+ /**
457
+ The license for the package.
458
+ */
459
+ license?: string;
460
+
461
+ /**
462
+ The licenses for the package.
463
+ */
464
+ licenses?: Array<{
465
+ type?: string;
466
+ url?: string;
467
+ }>;
468
+
469
+ author?: Person;
470
+
471
+ /**
472
+ A list of people who contributed to the package.
473
+ */
474
+ contributors?: Person[];
475
+
476
+ /**
477
+ A list of people who maintain the package.
478
+ */
479
+ maintainers?: Person[];
480
+
481
+ /**
482
+ The files included in the package.
483
+ */
484
+ files?: string[];
485
+
486
+ /**
487
+ Resolution algorithm for importing ".js" files from the package's scope.
488
+
489
+ [Read more.](https://nodejs.org/api/esm.html#esm_package_json_type_field)
490
+ */
491
+ type?: 'module' | 'commonjs';
492
+
493
+ /**
494
+ The module ID that is the primary entry point to the program.
495
+ */
496
+ main?: string;
497
+
498
+ /**
499
+ Subpath exports to define entry points of the package.
500
+
501
+ [Read more.](https://nodejs.org/api/packages.html#subpath-exports)
502
+ */
503
+ exports?: Exports;
504
+
505
+ /**
506
+ Subpath imports to define internal package import maps that only apply to import specifiers from within the package itself.
507
+
508
+ [Read more.](https://nodejs.org/api/packages.html#subpath-imports)
509
+ */
510
+ imports?: Imports;
511
+
512
+ /**
513
+ The executable files that should be installed into the `PATH`.
514
+ */
515
+ bin?:
516
+ | string
517
+ | Partial<Record<string, string>>;
518
+
519
+ /**
520
+ Filenames to put in place for the `man` program to find.
521
+ */
522
+ man?: string | string[];
523
+
524
+ /**
525
+ Indicates the structure of the package.
526
+ */
527
+ directories?: DirectoryLocations;
528
+
529
+ /**
530
+ Location for the code repository.
531
+ */
532
+ repository?:
533
+ | string
534
+ | {
535
+ type: string;
536
+ url: string;
537
+
538
+ /**
539
+ Relative path to package.json if it is placed in non-root directory (for example if it is part of a monorepo).
540
+
541
+ [Read more.](https://github.com/npm/rfcs/blob/latest/implemented/0010-monorepo-subdirectory-declaration.md)
542
+ */
543
+ directory?: string;
544
+ };
545
+
546
+ /**
547
+ Script commands that are run at various times in the lifecycle of the package. The key is the lifecycle event, and the value is the command to run at that point.
548
+ */
549
+ scripts?: Scripts;
550
+
551
+ /**
552
+ Is used to set configuration parameters used in package scripts that persist across upgrades.
553
+ */
554
+ config?: JsonObject;
555
+
556
+ /**
557
+ The dependencies of the package.
558
+ */
559
+ dependencies?: Dependency;
560
+
561
+ /**
562
+ Additional tooling dependencies that are not required for the package to work. Usually test, build, or documentation tooling.
563
+ */
564
+ devDependencies?: Dependency;
565
+
566
+ /**
567
+ Dependencies that are skipped if they fail to install.
568
+ */
569
+ optionalDependencies?: Dependency;
570
+
571
+ /**
572
+ Dependencies that will usually be required by the package user directly or via another dependency.
573
+ */
574
+ peerDependencies?: Dependency;
575
+
576
+ /**
577
+ Indicate peer dependencies that are optional.
578
+ */
579
+ peerDependenciesMeta?: Partial<Record<string, {optional: true}>>;
580
+
581
+ /**
582
+ Package names that are bundled when the package is published.
583
+ */
584
+ bundledDependencies?: string[];
585
+
586
+ /**
587
+ Alias of `bundledDependencies`.
588
+ */
589
+ bundleDependencies?: string[];
590
+
591
+ /**
592
+ Engines that this package runs on.
593
+ */
594
+ engines?: {
595
+ [EngineName in 'npm' | 'node' | string]?: string;
596
+ };
597
+
598
+ /**
599
+ @deprecated
600
+ */
601
+ engineStrict?: boolean;
602
+
603
+ /**
604
+ Operating systems the module runs on.
605
+ */
606
+ os?: Array<LiteralUnion<
607
+ | 'aix'
608
+ | 'darwin'
609
+ | 'freebsd'
610
+ | 'linux'
611
+ | 'openbsd'
612
+ | 'sunos'
613
+ | 'win32'
614
+ | '!aix'
615
+ | '!darwin'
616
+ | '!freebsd'
617
+ | '!linux'
618
+ | '!openbsd'
619
+ | '!sunos'
620
+ | '!win32',
621
+ string
622
+ >>;
623
+
624
+ /**
625
+ CPU architectures the module runs on.
626
+ */
627
+ cpu?: Array<LiteralUnion<
628
+ | 'arm'
629
+ | 'arm64'
630
+ | 'ia32'
631
+ | 'mips'
632
+ | 'mipsel'
633
+ | 'ppc'
634
+ | 'ppc64'
635
+ | 's390'
636
+ | 's390x'
637
+ | 'x32'
638
+ | 'x64'
639
+ | '!arm'
640
+ | '!arm64'
641
+ | '!ia32'
642
+ | '!mips'
643
+ | '!mipsel'
644
+ | '!ppc'
645
+ | '!ppc64'
646
+ | '!s390'
647
+ | '!s390x'
648
+ | '!x32'
649
+ | '!x64',
650
+ string
651
+ >>;
652
+
653
+ /**
654
+ If set to `true`, a warning will be shown if package is installed locally. Useful if the package is primarily a command-line application that should be installed globally.
655
+
656
+ @deprecated
657
+ */
658
+ preferGlobal?: boolean;
659
+
660
+ /**
661
+ If set to `true`, then npm will refuse to publish it.
662
+ */
663
+ private?: boolean;
664
+
665
+ /**
666
+ A set of config values that will be used at publish-time. It's especially handy to set the tag, registry or access, to ensure that a given package is not tagged with 'latest', published to the global public registry or that a scoped module is private by default.
667
+ */
668
+ publishConfig?: PublishConfig;
669
+
670
+ /**
671
+ Describes and notifies consumers of a package's monetary support information.
672
+
673
+ [Read more.](https://github.com/npm/rfcs/blob/latest/accepted/0017-add-funding-support.md)
674
+ */
675
+ funding?: string | {
676
+ /**
677
+ The type of funding.
678
+ */
679
+ type?: LiteralUnion<
680
+ | 'github'
681
+ | 'opencollective'
682
+ | 'patreon'
683
+ | 'individual'
684
+ | 'foundation'
685
+ | 'corporation',
686
+ string
687
+ >;
688
+
689
+ /**
690
+ The URL to the funding page.
691
+ */
692
+ url: string;
693
+ };
694
+
695
+ /**
696
+ Used to configure [npm workspaces](https://docs.npmjs.com/cli/using-npm/workspaces) / [Yarn workspaces](https://classic.yarnpkg.com/docs/workspaces/).
697
+
698
+ Workspaces allow you to manage multiple packages within the same repository in such a way that you only need to run your install command once in order to install all of them in a single pass.
699
+
700
+ Please note that the top-level `private` property of `package.json` **must** be set to `true` in order to use workspaces.
701
+ */
702
+ workspaces?: WorkspacePattern[] | WorkspaceConfig;
703
+ }
704
+
705
+ /**
706
+ Type for [`package.json` file used by the Node.js runtime](https://nodejs.org/api/packages.html#nodejs-packagejson-field-definitions).
707
+ */
708
+ export type NodeJsStandard = {
709
+ /**
710
+ Defines which package manager is expected to be used when working on the current project. It can set to any of the [supported package managers](https://nodejs.org/api/corepack.html#supported-package-managers), and will ensure that your teams use the exact same package manager versions without having to install anything else than Node.js.
711
+
712
+ __This field is currently experimental and needs to be opted-in; check the [Corepack](https://nodejs.org/api/corepack.html) page for details about the procedure.__
713
+
714
+ @example
715
+ ```json
716
+ {
717
+ "packageManager": "<package manager name>@<version>"
718
+ }
719
+ ```
720
+ */
721
+ packageManager?: string;
722
+ };
723
+
724
+ export type PublishConfig = {
725
+ /**
726
+ Additional, less common properties from the [npm docs on `publishConfig`](https://docs.npmjs.com/cli/v7/configuring-npm/package-json#publishconfig).
727
+ */
728
+ [additionalProperties: string]: JsonValue | undefined;
729
+
730
+ /**
731
+ When publishing scoped packages, the access level defaults to restricted. If you want your scoped package to be publicly viewable (and installable) set `--access=public`. The only valid values for access are public and restricted. Unscoped packages always have an access level of public.
732
+ */
733
+ access?: 'public' | 'restricted';
734
+
735
+ /**
736
+ The base URL of the npm registry.
737
+
738
+ Default: `'https://registry.npmjs.org/'`
739
+ */
740
+ registry?: string;
741
+
742
+ /**
743
+ The tag to publish the package under.
744
+
745
+ Default: `'latest'`
746
+ */
747
+ tag?: string;
748
+ };
749
+ }
750
+
751
+ /**
752
+ Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-json-file). Also includes types for fields used by other popular projects, like TypeScript and Yarn.
753
+
754
+ @category File
755
+ */
756
+ type PackageJson$1 =
757
+ JsonObject &
758
+ PackageJson$1.NodeJsStandard &
759
+ PackageJson$1.PackageJsonStandard &
760
+ PackageJson$1.NonStandardEntryPoints &
761
+ PackageJson$1.TypeScriptConfiguration &
762
+ PackageJson$1.YarnConfiguration &
763
+ PackageJson$1.JSPMConfiguration;
764
+
765
+ type NormalizedPackageJson = Package & PackageJson;
766
+ type PackageJson = PackageJson$1;
767
+ type Cache<T = any> = Map<string, T>;
768
+
769
+ type ReadOptions = {
770
+ cache?: Cache<NormalizedReadResult> | boolean;
771
+ };
772
+ type NormalizedReadResult = {
773
+ packageJson: NormalizedPackageJson;
774
+ path: string;
775
+ };
776
+ declare const findPackageJson: (cwd?: URL | string, options?: ReadOptions) => Promise<NormalizedReadResult>;
777
+ declare const findPackageJsonSync: (cwd?: URL | string, options?: ReadOptions) => NormalizedReadResult;
778
+ declare const writePackageJson: <T = PackageJson$1>(data: T, options?: WriteJsonOptions & {
779
+ cwd?: URL | string;
780
+ }) => Promise<void>;
781
+ declare const writePackageJsonSync: <T = PackageJson$1>(data: T, options?: WriteJsonOptions & {
782
+ cwd?: URL | string;
783
+ }) => void;
784
+ declare const parsePackageJson: (packageFile: JsonObject | string) => NormalizedPackageJson;
785
+
786
+ export { type NormalizedReadResult as N, type PackageJson as P, findPackageJsonSync as a, writePackageJsonSync as b, type NormalizedPackageJson as c, findPackageJson as f, parsePackageJson as p, writePackageJson as w };