@modern-js/utils 1.3.8-canary.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +49 -0
- package/compiled/address/index.js +1 -0
- package/compiled/address/lib/address.d.ts +28 -0
- package/compiled/address/package.json +1 -0
- package/compiled/browserslist/index.js +1 -1
- package/compiled/dotenv/index.js +1 -0
- package/compiled/dotenv/license +23 -0
- package/compiled/dotenv/package.json +1 -0
- package/compiled/dotenv/types/index.d.ts +59 -0
- package/compiled/dotenv-expand/index.d.ts +15 -0
- package/compiled/dotenv-expand/index.js +1 -0
- package/compiled/dotenv-expand/license +24 -0
- package/compiled/dotenv-expand/package.json +1 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/compiled/fast-glob/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/compiled/fast-glob/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/compiled/fast-glob/index.js +37 -0
- package/compiled/fast-glob/license +21 -0
- package/compiled/fast-glob/out/index.d.ts +27 -0
- package/compiled/fast-glob/out/managers/tasks.d.ts +22 -0
- package/compiled/fast-glob/out/settings.d.ts +164 -0
- package/compiled/fast-glob/out/types/index.d.ts +31 -0
- package/compiled/fast-glob/package.json +1 -0
- package/compiled/globby/@nodelib/fs.scandir/out/adapters/fs.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.scandir/out/index.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.scandir/out/providers/async.d.ts +7 -0
- package/compiled/globby/@nodelib/fs.scandir/out/settings.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.scandir/out/types/index.d.ts +20 -0
- package/compiled/globby/@nodelib/fs.stat/out/adapters/fs.d.ts +13 -0
- package/compiled/globby/@nodelib/fs.stat/out/index.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.stat/out/providers/async.d.ts +4 -0
- package/compiled/globby/@nodelib/fs.stat/out/settings.d.ts +16 -0
- package/compiled/globby/@nodelib/fs.stat/out/types/index.d.ts +4 -0
- package/compiled/globby/@nodelib/fs.walk/out/index.d.ts +14 -0
- package/compiled/globby/@nodelib/fs.walk/out/providers/async.d.ts +12 -0
- package/compiled/globby/@nodelib/fs.walk/out/readers/async.d.ts +30 -0
- package/compiled/globby/@nodelib/fs.walk/out/readers/reader.d.ts +6 -0
- package/compiled/globby/@nodelib/fs.walk/out/settings.d.ts +30 -0
- package/compiled/globby/@nodelib/fs.walk/out/types/index.d.ts +8 -0
- package/compiled/globby/fast-glob/index.d.ts +27 -0
- package/compiled/globby/fast-glob/managers/tasks.d.ts +22 -0
- package/compiled/globby/fast-glob/settings.d.ts +164 -0
- package/compiled/globby/fast-glob/types/index.d.ts +31 -0
- package/compiled/globby/index.d.ts +186 -0
- package/compiled/globby/index.js +1 -0
- package/compiled/globby/license +9 -0
- package/compiled/globby/package.json +1 -0
- package/compiled/inquirer/index.d.ts +997 -0
- package/compiled/inquirer/index.js +9 -0
- package/compiled/inquirer/lib/objects/choice.d.ts +65 -0
- package/compiled/inquirer/lib/objects/choices.d.ts +206 -0
- package/compiled/inquirer/lib/objects/separator.d.ts +37 -0
- package/compiled/inquirer/lib/ui/baseUI.d.ts +37 -0
- package/compiled/inquirer/lib/ui/bottom-bar.d.ts +65 -0
- package/compiled/inquirer/lib/ui/prompt.d.ts +104 -0
- package/compiled/inquirer/license +22 -0
- package/compiled/inquirer/package.json +1 -0
- package/compiled/inquirer/through/index.d.ts +25 -0
- package/compiled/json5/index.js +1 -0
- package/compiled/json5/lib/index.d.ts +4 -0
- package/compiled/json5/lib/parse.d.ts +15 -0
- package/compiled/json5/lib/stringify.d.ts +89 -0
- package/compiled/json5/package.json +1 -0
- package/compiled/mime-types/index.d.ts +14 -0
- package/compiled/mime-types/index.js +14 -0
- package/compiled/mime-types/license +23 -0
- package/compiled/mime-types/package.json +1 -0
- package/compiled/minimist/index.d.ts +95 -0
- package/compiled/minimist/index.js +1 -0
- package/compiled/minimist/license +18 -0
- package/compiled/minimist/package.json +1 -0
- package/compiled/ora/cli-spinners/index.d.ts +125 -0
- package/compiled/ora/index.d.ts +277 -0
- package/compiled/ora/index.js +3 -0
- package/compiled/ora/license +9 -0
- package/compiled/ora/package.json +1 -0
- package/compiled/slash/index.d.ts +25 -0
- package/compiled/slash/index.js +1 -0
- package/compiled/slash/license +9 -0
- package/compiled/slash/package.json +1 -0
- package/compiled/url-join/index.d.ts +17 -0
- package/compiled/url-join/index.js +1 -0
- package/compiled/url-join/license +21 -0
- package/compiled/url-join/package.json +1 -0
- package/dist/analyzeProject.d.ts +1 -0
- package/dist/analyzeProject.js +40 -0
- package/dist/compiled.d.ts +33 -17
- package/dist/compiled.js +57 -21
- package/dist/constants.d.ts +1 -1
- package/dist/constants.js +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/prettyInstructions.js +3 -3
- package/dist/{ssrHelpers.d.ts → ssr.d.ts} +3 -0
- package/dist/{ssrHelpers.js → ssr.js} +0 -0
- package/dist/storage.js +1 -1
- package/package.json +12 -30
- package/dist/getCacheIdentifier.d.ts +0 -7
- package/dist/getCacheIdentifier.js +0 -24
- package/dist/js/modern/monorepo.js +0 -83
- package/dist/js/node/monorepo.js +0 -116
- package/dist/js/treeshaking/monorepo.js +0 -96
- package/dist/pkgUp.d.ts +0 -2
- package/dist/pkgUp.js +0 -8
- package/dist/types/FileSizeReporter.d.ts +0 -16
- package/dist/types/alias.d.ts +0 -21
- package/dist/types/applyOptionsChain.d.ts +0 -6
- package/dist/types/clearConsole.d.ts +0 -1
- package/dist/types/compatRequire.d.ts +0 -8
- package/dist/types/compiled.d.ts +0 -17
- package/dist/types/constants.d.ts +0 -222
- package/dist/types/debug.d.ts +0 -6
- package/dist/types/emptyDir.d.ts +0 -1
- package/dist/types/ensureAbsolutePath.d.ts +0 -7
- package/dist/types/findExists.d.ts +0 -6
- package/dist/types/format.d.ts +0 -16
- package/dist/types/generateMetaTags.d.ts +0 -16
- package/dist/types/getBrowserslist.d.ts +0 -2
- package/dist/types/getCacheIdentifier.d.ts +0 -7
- package/dist/types/getEntryOptions.d.ts +0 -1
- package/dist/types/getPackageManager.d.ts +0 -1
- package/dist/types/getPort.d.ts +0 -7
- package/dist/types/getServerConfig.d.ts +0 -1
- package/dist/types/import.d.ts +0 -5
- package/dist/types/index.d.ts +0 -32
- package/dist/types/is/index.d.ts +0 -34
- package/dist/types/is/node-env.d.ts +0 -4
- package/dist/types/is/platform.d.ts +0 -2
- package/dist/types/is/type.d.ts +0 -8
- package/dist/types/logger.d.ts +0 -63
- package/dist/types/monorepo.d.ts +0 -11
- package/dist/types/nodeEnv.d.ts +0 -3
- package/dist/types/path.d.ts +0 -3
- package/dist/types/prettyInstructions.d.ts +0 -6
- package/dist/types/printBuildError.d.ts +0 -8
- package/dist/types/readTsConfig.d.ts +0 -2
- package/dist/types/removeSlash.d.ts +0 -3
- package/dist/types/runtimeExports.d.ts +0 -4
- package/dist/types/wait.d.ts +0 -2
- package/dist/types/watch.d.ts +0 -8
- package/modern.config.js +0 -6
- package/tests/.eslintrc.js +0 -6
- package/tests/__snapshots__/prettyInstructions.test.ts.snap +0 -19
- package/tests/applyOptionsChain.test.ts +0 -100
- package/tests/compatRequire.test.ts +0 -32
- package/tests/debug.test.ts +0 -25
- package/tests/ensureAbsolutePath.test.ts +0 -16
- package/tests/findExists.test.ts +0 -22
- package/tests/fixtures/browserlist/develop/package.json +0 -11
- package/tests/fixtures/browserlist/dotfile/.browserslistrc +0 -3
- package/tests/fixtures/browserlist/pkg/package.json +0 -7
- package/tests/fixtures/compat-require/cjs.js +0 -1
- package/tests/fixtures/compat-require/empty.js +0 -1
- package/tests/fixtures/compat-require/esm.js +0 -5
- package/tests/fixtures/compat-require/foo.js +0 -3
- package/tests/fixtures/file-exists/a.ejs +0 -0
- package/tests/fixtures/file-exists/a.js/.gitkeep +0 -0
- package/tests/fixtures/file-exists/a.mjs +0 -0
- package/tests/fixtures/file-exists/a.ts +0 -0
- package/tests/format.test.ts +0 -60
- package/tests/generateMetaTags.test.ts +0 -19
- package/tests/getBrowserslist.test.ts +0 -32
- package/tests/getCacheIdentifier.test.ts +0 -37
- package/tests/getEntryOptions.test.ts +0 -53
- package/tests/index.test.ts +0 -18
- package/tests/is.test.ts +0 -27
- package/tests/isPlatform.test.ts +0 -19
- package/tests/isType.test.ts +0 -85
- package/tests/logger.test.ts +0 -53
- package/tests/prettyInstructions.test.ts +0 -139
- package/tests/removeSlash.test.ts +0 -19
- package/tests/tsconfig.json +0 -11
- package/tests/wait.ts +0 -38
@@ -0,0 +1,89 @@
|
|
1
|
+
declare type StringifyOptions = {
|
2
|
+
/**
|
3
|
+
* A function that alters the behavior of the stringification process, or an
|
4
|
+
* array of String and Number objects that serve as a allowlist for
|
5
|
+
* selecting/filtering the properties of the value object to be included in
|
6
|
+
* the JSON5 string. If this value is null or not provided, all properties
|
7
|
+
* of the object are included in the resulting JSON5 string.
|
8
|
+
*/
|
9
|
+
replacer?:
|
10
|
+
| ((this: any, key: string, value: any) => any)
|
11
|
+
| (string | number)[]
|
12
|
+
| null
|
13
|
+
|
14
|
+
/**
|
15
|
+
* A String or Number object that's used to insert white space into the
|
16
|
+
* output JSON5 string for readability purposes. If this is a Number, it
|
17
|
+
* indicates the number of space characters to use as white space; this
|
18
|
+
* number is capped at 10 (if it is greater, the value is just 10). Values
|
19
|
+
* less than 1 indicate that no space should be used. If this is a String,
|
20
|
+
* the string (or the first 10 characters of the string, if it's longer than
|
21
|
+
* that) is used as white space. If this parameter is not provided (or is
|
22
|
+
* null), no white space is used. If white space is used, trailing commas
|
23
|
+
* will be used in objects and arrays.
|
24
|
+
*/
|
25
|
+
space?: string | number | null
|
26
|
+
|
27
|
+
/**
|
28
|
+
* A String representing the quote character to use when serializing
|
29
|
+
* strings.
|
30
|
+
*/
|
31
|
+
quote?: string | null
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Converts a JavaScript value to a JSON5 string.
|
36
|
+
* @param value The value to convert to a JSON5 string.
|
37
|
+
* @param replacer A function that alters the behavior of the stringification
|
38
|
+
* process. If this value is null or not provided, all properties of the object
|
39
|
+
* are included in the resulting JSON5 string.
|
40
|
+
* @param space A String or Number object that's used to insert white space into
|
41
|
+
* the output JSON5 string for readability purposes. If this is a Number, it
|
42
|
+
* indicates the number of space characters to use as white space; this number
|
43
|
+
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
|
44
|
+
* indicate that no space should be used. If this is a String, the string (or
|
45
|
+
* the first 10 characters of the string, if it's longer than that) is used as
|
46
|
+
* white space. If this parameter is not provided (or is null), no white space
|
47
|
+
* is used. If white space is used, trailing commas will be used in objects and
|
48
|
+
* arrays.
|
49
|
+
* @returns The JSON5 string converted from the JavaScript value.
|
50
|
+
*/
|
51
|
+
declare function stringify(
|
52
|
+
value: any,
|
53
|
+
replacer?: ((this: any, key: string, value: any) => any) | null,
|
54
|
+
space?: string | number | null,
|
55
|
+
): string
|
56
|
+
|
57
|
+
/**
|
58
|
+
* Converts a JavaScript value to a JSON5 string.
|
59
|
+
* @param value The value to convert to a JSON5 string.
|
60
|
+
* @param replacer An array of String and Number objects that serve as a
|
61
|
+
* allowlist for selecting/filtering the properties of the value object to be
|
62
|
+
* included in the JSON5 string. If this value is null or not provided, all
|
63
|
+
* properties of the object are included in the resulting JSON5 string.
|
64
|
+
* @param space A String or Number object that's used to insert white space into
|
65
|
+
* the output JSON5 string for readability purposes. If this is a Number, it
|
66
|
+
* indicates the number of space characters to use as white space; this number
|
67
|
+
* is capped at 10 (if it is greater, the value is just 10). Values less than 1
|
68
|
+
* indicate that no space should be used. If this is a String, the string (or
|
69
|
+
* the first 10 characters of the string, if it's longer than that) is used as
|
70
|
+
* white space. If this parameter is not provided (or is null), no white space
|
71
|
+
* is used. If white space is used, trailing commas will be used in objects and
|
72
|
+
* arrays.
|
73
|
+
* @returns The JSON5 string converted from the JavaScript value.
|
74
|
+
*/
|
75
|
+
declare function stringify(
|
76
|
+
value: any,
|
77
|
+
replacer: (string | number)[],
|
78
|
+
space?: string | number | null,
|
79
|
+
): string
|
80
|
+
|
81
|
+
/**
|
82
|
+
* Converts a JavaScript value to a JSON5 string.
|
83
|
+
* @param value The value to convert to a JSON5 string.
|
84
|
+
* @param options An object specifying options.
|
85
|
+
* @returns The JSON5 string converted from the JavaScript value.
|
86
|
+
*/
|
87
|
+
declare function stringify(value: any, options: StringifyOptions): string
|
88
|
+
|
89
|
+
export = stringify
|
@@ -0,0 +1 @@
|
|
1
|
+
{"name":"json5","author":"Aseem Kishore <aseem.kishore@gmail.com>","version":"2.2.0","license":"MIT","types":"lib/index.d.ts"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Type definitions for mime-types 2.1
|
2
|
+
// Project: https://github.com/jshttp/mime-types#readme
|
3
|
+
// Definitions by: Gyusun Yeom <https://github.com/Perlmint>
|
4
|
+
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
5
|
+
|
6
|
+
export function lookup(filenameOrExt: string): string | false;
|
7
|
+
export function contentType(filenameOrExt: string): string | false;
|
8
|
+
export function extension(typeString: string): string | false;
|
9
|
+
export function charset(typeString: string): string | false;
|
10
|
+
export namespace charsets {
|
11
|
+
const lookup: typeof charset;
|
12
|
+
}
|
13
|
+
export const types: {[key: string]: string};
|
14
|
+
export const extensions: {[key: string]: string[]};
|