@modern-js/utils 2.12.1-alpha.0 → 2.12.1-alpha.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,15 +93,15 @@ var import_recursive_readdir = __toESM(require("../compiled/recursive-readdir"))
93
93
  var import_commander = require("../compiled/commander");
94
94
  var import_signale2 = require("../compiled/signale");
95
95
  const mime = import_import.Import.lazy(
96
- "../compiled/mime-types",
96
+ "@compiled/mime-types",
97
97
  require
98
98
  );
99
99
  const chokidar = import_import.Import.lazy(
100
- "../compiled/chokidar",
100
+ "@compiled/chokidar",
101
101
  require
102
102
  );
103
103
  const inquirer = import_import.Import.lazy(
104
- "../compiled/inquirer",
104
+ "@compiled/inquirer",
105
105
  require
106
106
  );
107
107
  // Annotate the CommonJS export names for ESM import in node:
@@ -22,7 +22,7 @@ __export(import_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(import_exports);
24
24
  const lazy = (moduleName, requireFn) => {
25
- const importLazyLocal = require("../compiled/import-lazy")(requireFn);
25
+ const importLazyLocal = require("../@compiled/import-lazy")(requireFn);
26
26
  return importLazyLocal(moduleName);
27
27
  };
28
28
  const Import = { lazy };
@@ -28,7 +28,7 @@ import { default as default26 } from "../compiled/browserslist";
28
28
  import { default as default27 } from "../compiled/recursive-readdir";
29
29
  import { program, Command } from "../compiled/commander";
30
30
  import { Signale } from "../compiled/signale";
31
- var mime = Import.lazy("../compiled/mime-types", require);
32
- var chokidar = Import.lazy("../compiled/chokidar", require);
33
- var inquirer = Import.lazy("../compiled/inquirer", require);
31
+ var mime = Import.lazy("@compiled/mime-types", require);
32
+ var chokidar = Import.lazy("@compiled/chokidar", require);
33
+ var inquirer = Import.lazy("@compiled/inquirer", require);
34
34
  export { Command, Signale, default17 as address, default26 as browserslist, default6 as chalk, chokidar, default7 as debug, default14 as dotenv, default25 as dotenvExpand, default9 as execa, default21 as fastGlob, default22 as filesize, default2 as fs, default4 as glob, default16 as globby, default23 as gzipSize, inquirer, default10 as json5, default15 as lodash, mime, default20 as minimist, nanoid, default3 as ora, default12 as pkgUp, program, default27 as recursiveReaddir, default13 as semver, default18 as signale, default8 as slash, default24 as stripAnsi, default11 as upath, default19 as urlJoin, default5 as yaml };
@@ -1,5 +1,5 @@
1
1
  var lazy = function(moduleName, requireFn) {
2
- var importLazyLocal = require("../compiled/import-lazy")(requireFn);
2
+ var importLazyLocal = require("../@compiled/import-lazy")(requireFn);
3
3
  return importLazyLocal(moduleName);
4
4
  };
5
5
  var Import = {
@@ -29,15 +29,15 @@ import { default as default27 } from "../compiled/recursive-readdir";
29
29
  import { program, Command } from "../compiled/commander";
30
30
  import { Signale } from "../compiled/signale";
31
31
  const mime = Import.lazy(
32
- "../compiled/mime-types",
32
+ "@compiled/mime-types",
33
33
  require
34
34
  );
35
35
  const chokidar = Import.lazy(
36
- "../compiled/chokidar",
36
+ "@compiled/chokidar",
37
37
  require
38
38
  );
39
39
  const inquirer = Import.lazy(
40
- "../compiled/inquirer",
40
+ "@compiled/inquirer",
41
41
  require
42
42
  );
43
43
  export {
@@ -1,5 +1,5 @@
1
1
  const lazy = (moduleName, requireFn) => {
2
- const importLazyLocal = require("../compiled/import-lazy")(requireFn);
2
+ const importLazyLocal = require("../@compiled/import-lazy")(requireFn);
3
3
  return importLazyLocal(moduleName);
4
4
  };
5
5
  const Import = { lazy };
@@ -1,43 +1,43 @@
1
- export { default as fs } from '../compiled/fs-extra';
2
- export { default as ora } from '../compiled/ora';
3
- export { default as glob } from '../compiled/glob';
4
- export { default as yaml } from '../compiled/js-yaml';
5
- export { default as chalk } from '../compiled/chalk';
6
- export { default as debug } from '../compiled/debug';
7
- export { default as slash } from '../compiled/slash';
8
- export { default as execa } from '../compiled/execa';
9
- export { default as json5 } from '../compiled/json5';
10
- export { default as upath } from '../compiled/upath';
11
- export { default as pkgUp } from '../compiled/pkg-up';
12
- export { nanoid } from '../compiled/nanoid';
13
- export { default as semver } from '../compiled/semver';
14
- export { default as dotenv } from '../compiled/dotenv';
15
- export { default as lodash } from '../compiled/lodash';
16
- export { default as globby } from '../compiled/globby';
17
- export { default as address } from '../compiled/address';
18
- export { default as signale } from '../compiled/signale';
19
- export { default as urlJoin } from '../compiled/url-join';
20
- export { default as minimist } from '../compiled/minimist';
21
- export { default as fastGlob } from '../compiled/fast-glob';
22
- export { default as filesize } from '../compiled/filesize';
23
- export { default as gzipSize } from '../compiled/gzip-size';
24
- export { default as stripAnsi } from '../compiled/strip-ansi';
25
- export { default as dotenvExpand } from '../compiled/dotenv-expand';
26
- export { default as browserslist } from '../compiled/browserslist';
27
- export { default as recursiveReaddir } from '../compiled/recursive-readdir';
28
- export { program, Command } from '../compiled/commander';
29
- export { Signale } from '../compiled/signale';
30
- export type { SignaleOptions } from '../compiled/signale';
31
- export type { IOptions as GlobOptions } from '../compiled/glob';
32
- export type { GlobbyOptions } from '../compiled/globby';
33
- export type { FSWatcher, WatchOptions } from '../compiled/chokidar';
34
- export type { ExecaError } from '../compiled/execa';
35
- export type { default as WebpackChain } from '../compiled/webpack-chain';
1
+ export { default as fs } from '@compiled/fs-extra';
2
+ export { default as ora } from '@compiled/ora';
3
+ export { default as glob } from '@compiled/glob';
4
+ export { default as yaml } from '@compiled/js-yaml';
5
+ export { default as chalk } from '@compiled/chalk';
6
+ export { default as debug } from '@compiled/debug';
7
+ export { default as slash } from '@compiled/slash';
8
+ export { default as execa } from '@compiled/execa';
9
+ export { default as json5 } from '@compiled/json5';
10
+ export { default as upath } from '@compiled/upath';
11
+ export { default as pkgUp } from '@compiled/pkg-up';
12
+ export { nanoid } from '@compiled/nanoid';
13
+ export { default as semver } from '@compiled/semver';
14
+ export { default as dotenv } from '@compiled/dotenv';
15
+ export { default as lodash } from '@compiled/lodash';
16
+ export { default as globby } from '@compiled/globby';
17
+ export { default as address } from '@compiled/address';
18
+ export { default as signale } from '@compiled/signale';
19
+ export { default as urlJoin } from '@compiled/url-join';
20
+ export { default as minimist } from '@compiled/minimist';
21
+ export { default as fastGlob } from '@compiled/fast-glob';
22
+ export { default as filesize } from '@compiled/filesize';
23
+ export { default as gzipSize } from '@compiled/gzip-size';
24
+ export { default as stripAnsi } from '@compiled/strip-ansi';
25
+ export { default as dotenvExpand } from '@compiled/dotenv-expand';
26
+ export { default as browserslist } from '@compiled/browserslist';
27
+ export { default as recursiveReaddir } from '@compiled/recursive-readdir';
28
+ export { program, Command } from '@compiled/commander';
29
+ export { Signale } from '@compiled/signale';
30
+ export type { SignaleOptions } from '@compiled/signale';
31
+ export type { IOptions as GlobOptions } from '@compiled/glob';
32
+ export type { GlobbyOptions } from '@compiled/globby';
33
+ export type { FSWatcher, WatchOptions } from '@compiled/chokidar';
34
+ export type { ExecaError } from '@compiled/execa';
35
+ export type { default as WebpackChain } from '@compiled/webpack-chain';
36
36
  /**
37
37
  * Lazy import some expensive modules that will slow down startup speed.
38
38
  * Notice that `csmith-tools build` can not bundle lazy imported modules.
39
39
  */
40
40
 
41
- export declare const mime: typeof import('../compiled/mime-types');
42
- export declare const chokidar: typeof import('../compiled/chokidar');
43
- export declare const inquirer: typeof import('../compiled/inquirer');
41
+ export declare const mime: typeof import('@compiled/mime-types');
42
+ export declare const chokidar: typeof import('@compiled/chokidar');
43
+ export declare const inquirer: typeof import('@compiled/inquirer');
@@ -3,4 +3,4 @@
3
3
  * @param scope - Custom module name of your debug function.
4
4
  * @returns Debug function which namespace start with modern-js:.
5
5
  */
6
- export declare const createDebugger: (scope: string) => import("../compiled/debug").Debugger;
6
+ export declare const createDebugger: (scope: string) => import("@compiled/debug").Debugger;
@@ -1,4 +1,4 @@
1
- import { Color } from '../compiled/chalk';
1
+ import { Color } from '@compiled/chalk';
2
2
  type LogLevel = 'debug' | 'info' | 'warn' | 'error';
3
3
  type LogMsg = number | string | Error | null;
4
4
  interface LoggerConfiguration {
package/package.json CHANGED
@@ -11,19 +11,33 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "2.12.1-alpha.0",
14
+ "version": "2.12.1-alpha.1",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/index.d.ts",
17
17
  "main": "./dist/index.js",
18
18
  "module": "./dist/index.js",
19
19
  "_comment": "Provide ESM and CJS exports, ESM is used by runtime package, for treeshaking",
20
20
  "exports": {
21
- ".": "./dist/index.js",
22
- "./ssr": "./dist/ssr.js",
23
- "./babel": "./dist/babel.js",
24
- "./logger": "./dist/logger.js",
25
- "./chain-id": "./dist/chainId.js",
26
- "./constants": "./dist/constants.js",
21
+ ".": {
22
+ "import": "./dist/esm/index.js",
23
+ "default": "./dist/cjs/index.js"
24
+ },
25
+ "./ssr": {
26
+ "import": "./dist/esm/ssr.js",
27
+ "default": "./dist/cjs/ssr.js"
28
+ },
29
+ "./logger": {
30
+ "import": "./dist/esm/logger.js",
31
+ "default": "./dist/cjs/logger.js"
32
+ },
33
+ "./constants": {
34
+ "import": "./dist/esm/constants.js",
35
+ "default": "./dist/cjs/constants.js"
36
+ },
37
+ "./babel": {
38
+ "import": "./dist/esm/babel.js",
39
+ "default": "./dist/cjs/babel.js"
40
+ },
27
41
  "./ajv": "./compiled/ajv/index.js",
28
42
  "./glob": "./compiled/glob/index.js",
29
43
  "./chalk": "./compiled/chalk/index.js",
@@ -42,11 +56,29 @@
42
56
  "./tsconfig-paths": "./compiled/tsconfig-paths/index.js",
43
57
  "./better-ajv-errors": "./compiled/better-ajv-errors/index.js",
44
58
  "./webpack-dev-middleware": "./compiled/webpack-dev-middleware/index.js",
45
- "./universal/constants": "./dist/universal/constants.js",
46
- "./universal/serialize": "./dist/universal/serialize.js",
47
- "./universal/remix-router": "./dist/universal/remixRouter.js",
48
- "./universal/format-webpack": "./dist/universal/formatWebpack.js",
49
- "./universal/nestedRoutes": "./dist/universal/nestedRoutes.js"
59
+ "./chain-id": {
60
+ "default": "./dist/cjs/chainId.js"
61
+ },
62
+ "./universal/constants": {
63
+ "import": "./dist/esm/universal/constants.js",
64
+ "default": "./dist/cjs/universal/constants.js"
65
+ },
66
+ "./universal/serialize": {
67
+ "import": "./dist/esm/universal/serialize.js",
68
+ "default": "./dist/cjs/universal/serialize.js"
69
+ },
70
+ "./universal/remix-router": {
71
+ "import": "./dist/esm/universal/remixRouter.js",
72
+ "default": "./dist/cjs/universal/remixRouter.js"
73
+ },
74
+ "./universal/format-webpack": {
75
+ "import": "./dist/esm/universal/formatWebpack.js",
76
+ "default": "./dist/cjs/universal/formatWebpack.js"
77
+ },
78
+ "./universal/nestedRoutes": {
79
+ "import": "./dist/esm/universal/nestedRoutes.js",
80
+ "default": "./dist/cjs/universal/nestedRoutes.js"
81
+ }
50
82
  },
51
83
  "publishConfig": {
52
84
  "registry": "https://registry.npmjs.org/",
@@ -144,10 +176,10 @@
144
176
  }
145
177
  },
146
178
  "dependencies": {
179
+ "@remix-run/router": "^1.3.2",
147
180
  "caniuse-lite": "^1.0.30001451",
148
181
  "lodash": "^4.17.21",
149
- "serialize-javascript": "^6.0.0",
150
- "@remix-run/router": "^1.3.2"
182
+ "serialize-javascript": "^6.0.0"
151
183
  },
152
184
  "peerDependencies": {
153
185
  "react": ">=17.0.0",
@@ -166,24 +198,24 @@
166
198
  }
167
199
  },
168
200
  "devDependencies": {
169
- "react": ">=17.0.0",
170
- "react-dom": ">=17.0.0",
171
- "react-router-dom": "^6.8.1",
201
+ "@modern-js/module-tools": "^2.12.0",
172
202
  "@types/jest": "^29",
173
203
  "@types/node": "^14",
204
+ "@types/serialize-javascript": "^5.0.1",
174
205
  "jest": "^29",
206
+ "react": ">=17.0.0",
207
+ "react-dom": ">=17.0.0",
208
+ "react-router-dom": "^6.8.1",
175
209
  "typescript": "^4",
176
210
  "webpack": "^5.76.2",
177
- "@types/serialize-javascript": "^5.0.1",
178
- "@scripts/build": "2.12.0",
179
211
  "@modern-js/types": "2.12.0",
180
212
  "@scripts/jest-config": "2.12.0"
181
213
  },
182
214
  "sideEffects": false,
183
215
  "scripts": {
184
216
  "new": "modern-lib new",
185
- "dev": "modern-lib build --watch",
186
- "build": "modern-lib build",
217
+ "dev": "modern build --watch",
218
+ "build": "modern build",
187
219
  "test": "jest --passWithNoTests"
188
220
  }
189
221
  }