@modern-js/core 1.8.0 → 1.9.2

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.
Files changed (127) hide show
  1. package/.eslintrc.js +1 -0
  2. package/CHANGELOG.md +22 -0
  3. package/bin/modern-js.js +1 -1
  4. package/compiled/ajv/codegen.js +1 -0
  5. package/compiled/ajv/dist/ajv.d.ts +16 -0
  6. package/compiled/ajv/dist/compile/codegen/code.d.ts +40 -0
  7. package/compiled/ajv/dist/compile/codegen/index.d.ts +79 -0
  8. package/compiled/ajv/dist/compile/codegen/scope.d.ts +79 -0
  9. package/compiled/ajv/dist/compile/errors.d.ts +13 -0
  10. package/compiled/ajv/dist/compile/index.d.ts +80 -0
  11. package/compiled/ajv/dist/compile/ref_error.d.ts +6 -0
  12. package/compiled/ajv/dist/compile/resolve.d.ts +12 -0
  13. package/compiled/ajv/dist/compile/rules.d.ts +28 -0
  14. package/compiled/ajv/dist/compile/util.d.ts +40 -0
  15. package/compiled/ajv/dist/compile/validate/index.d.ts +42 -0
  16. package/compiled/ajv/dist/compile/validate/subschema.d.ts +47 -0
  17. package/compiled/ajv/dist/core.d.ts +173 -0
  18. package/compiled/ajv/dist/runtime/validation_error.d.ts +7 -0
  19. package/compiled/ajv/dist/types/index.d.ts +183 -0
  20. package/compiled/ajv/dist/types/json-schema.d.ts +124 -0
  21. package/compiled/ajv/dist/types/jtd-schema.d.ts +169 -0
  22. package/compiled/ajv/index.js +9 -0
  23. package/compiled/ajv/license +22 -0
  24. package/compiled/ajv/package.json +1 -0
  25. package/compiled/ajv/uri-js/dist/es5/uri.all.d.ts +59 -0
  26. package/compiled/ajv-keywords/ajv/dist/ajv.d.ts +16 -0
  27. package/compiled/ajv-keywords/ajv/dist/compile/codegen/code.d.ts +40 -0
  28. package/compiled/ajv-keywords/ajv/dist/compile/codegen/index.d.ts +79 -0
  29. package/compiled/ajv-keywords/ajv/dist/compile/codegen/scope.d.ts +79 -0
  30. package/compiled/ajv-keywords/ajv/dist/compile/errors.d.ts +13 -0
  31. package/compiled/ajv-keywords/ajv/dist/compile/index.d.ts +80 -0
  32. package/compiled/ajv-keywords/ajv/dist/compile/ref_error.d.ts +6 -0
  33. package/compiled/ajv-keywords/ajv/dist/compile/resolve.d.ts +12 -0
  34. package/compiled/ajv-keywords/ajv/dist/compile/rules.d.ts +28 -0
  35. package/compiled/ajv-keywords/ajv/dist/compile/util.d.ts +40 -0
  36. package/compiled/ajv-keywords/ajv/dist/compile/validate/index.d.ts +42 -0
  37. package/compiled/ajv-keywords/ajv/dist/compile/validate/subschema.d.ts +47 -0
  38. package/compiled/ajv-keywords/ajv/dist/core.d.ts +173 -0
  39. package/compiled/ajv-keywords/ajv/dist/runtime/validation_error.d.ts +7 -0
  40. package/compiled/ajv-keywords/ajv/dist/types/index.d.ts +183 -0
  41. package/compiled/ajv-keywords/ajv/dist/types/json-schema.d.ts +124 -0
  42. package/compiled/ajv-keywords/ajv/dist/types/jtd-schema.d.ts +169 -0
  43. package/compiled/ajv-keywords/dist/index.d.ts +4 -0
  44. package/compiled/ajv-keywords/index.js +1 -0
  45. package/compiled/ajv-keywords/license +21 -0
  46. package/compiled/ajv-keywords/package.json +1 -0
  47. package/compiled/ajv-keywords/uri-js/dist/es5/uri.all.d.ts +59 -0
  48. package/compiled/better-ajv-errors/ajv/dist/ajv.d.ts +16 -0
  49. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/code.d.ts +40 -0
  50. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/index.d.ts +79 -0
  51. package/compiled/better-ajv-errors/ajv/dist/compile/codegen/scope.d.ts +79 -0
  52. package/compiled/better-ajv-errors/ajv/dist/compile/errors.d.ts +13 -0
  53. package/compiled/better-ajv-errors/ajv/dist/compile/index.d.ts +80 -0
  54. package/compiled/better-ajv-errors/ajv/dist/compile/ref_error.d.ts +6 -0
  55. package/compiled/better-ajv-errors/ajv/dist/compile/resolve.d.ts +12 -0
  56. package/compiled/better-ajv-errors/ajv/dist/compile/rules.d.ts +28 -0
  57. package/compiled/better-ajv-errors/ajv/dist/compile/util.d.ts +40 -0
  58. package/compiled/better-ajv-errors/ajv/dist/compile/validate/index.d.ts +42 -0
  59. package/compiled/better-ajv-errors/ajv/dist/compile/validate/subschema.d.ts +47 -0
  60. package/compiled/better-ajv-errors/ajv/dist/core.d.ts +173 -0
  61. package/compiled/better-ajv-errors/ajv/dist/runtime/validation_error.d.ts +7 -0
  62. package/compiled/better-ajv-errors/ajv/dist/types/index.d.ts +183 -0
  63. package/compiled/better-ajv-errors/ajv/dist/types/json-schema.d.ts +124 -0
  64. package/compiled/better-ajv-errors/ajv/dist/types/jtd-schema.d.ts +169 -0
  65. package/compiled/better-ajv-errors/index.js +1 -0
  66. package/compiled/better-ajv-errors/license +13 -0
  67. package/compiled/better-ajv-errors/package.json +1 -0
  68. package/compiled/better-ajv-errors/typings.d.ts +24 -0
  69. package/compiled/better-ajv-errors/uri-js/dist/es5/uri.all.d.ts +59 -0
  70. package/compiled/v8-compile-cache/index.js +1 -0
  71. package/compiled/v8-compile-cache/license +21 -0
  72. package/compiled/v8-compile-cache/package.json +1 -0
  73. package/dist/cli.d.ts +1 -0
  74. package/dist/cli.js +33 -0
  75. package/dist/config/defaults.d.ts +28 -0
  76. package/dist/config/defaults.js +98 -0
  77. package/dist/config/index.d.ts +12 -0
  78. package/dist/config/index.js +124 -0
  79. package/dist/config/mergeConfig.d.ts +30 -0
  80. package/dist/config/mergeConfig.js +26 -0
  81. package/dist/config/schema/deploy.d.ts +16 -0
  82. package/dist/config/schema/deploy.js +16 -0
  83. package/dist/config/schema/index.d.ts +466 -0
  84. package/dist/config/schema/index.js +94 -0
  85. package/dist/config/schema/output.d.ts +146 -0
  86. package/dist/config/schema/output.js +68 -0
  87. package/dist/config/schema/server.d.ts +182 -0
  88. package/dist/config/schema/server.js +107 -0
  89. package/dist/config/schema/source.d.ts +58 -0
  90. package/dist/config/schema/source.js +36 -0
  91. package/dist/config/schema/tools.d.ts +36 -0
  92. package/dist/config/schema/tools.js +19 -0
  93. package/dist/config/types/electron.d.ts +13 -0
  94. package/dist/config/types/electron.js +2 -0
  95. package/dist/config/types/index.d.ts +240 -0
  96. package/dist/config/types/index.js +2 -0
  97. package/dist/config/types/less.d.ts +10 -0
  98. package/dist/config/types/less.js +2 -0
  99. package/dist/config/types/sass.d.ts +8 -0
  100. package/dist/config/types/sass.js +2 -0
  101. package/dist/config/types/ssg.d.ts +13 -0
  102. package/dist/config/types/ssg.js +2 -0
  103. package/dist/config/types/test.d.ts +14 -0
  104. package/dist/config/types/test.js +2 -0
  105. package/dist/config/types/unbundle.d.ts +25 -0
  106. package/dist/config/types/unbundle.js +2 -0
  107. package/dist/context.d.ts +37 -0
  108. package/dist/context.js +59 -0
  109. package/dist/index.d.ts +64 -0
  110. package/dist/index.js +181 -0
  111. package/dist/initWatcher.d.ts +3 -0
  112. package/dist/initWatcher.js +75 -0
  113. package/dist/loadEnv.d.ts +1 -0
  114. package/dist/loadEnv.js +21 -0
  115. package/dist/loadPlugins.d.ts +41 -0
  116. package/dist/loadPlugins.js +109 -0
  117. package/dist/manager.d.ts +72 -0
  118. package/dist/manager.js +24 -0
  119. package/dist/pluginAPI.d.ts +12 -0
  120. package/dist/pluginAPI.js +16 -0
  121. package/dist/utils/commander.d.ts +4 -0
  122. package/dist/utils/commander.js +20 -0
  123. package/dist/utils/repeatKeyWarning.d.ts +3 -0
  124. package/dist/utils/repeatKeyWarning.js +22 -0
  125. package/package.json +16 -30
  126. package/tsconfig.json +3 -4
  127. package/modern.config.js +0 -6
package/package.json CHANGED
@@ -11,20 +11,20 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.8.0",
14
+ "version": "1.9.2",
15
15
  "jsnext:source": "./src/index.ts",
16
- "types": "./dist/types/index.d.ts",
17
- "main": "./dist/js/node/index.js",
18
- "module": "./dist/js/treeshaking/index.js",
19
- "jsnext:modern": "./dist/js/modern/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "main": "./dist/index.js",
18
+ "module": "./dist/index.js",
19
+ "jsnext:modern": "./dist/index.js",
20
20
  "exports": {
21
21
  ".": {
22
22
  "node": {
23
23
  "jsnext:source": "./src/index.ts",
24
- "import": "./dist/js/modern/index.js",
25
- "require": "./dist/js/node/index.js"
24
+ "import": "./dist/index.js",
25
+ "require": "./dist/index.js"
26
26
  },
27
- "default": "./dist/js/treeshaking/index.js"
27
+ "default": "./dist/index.js"
28
28
  },
29
29
  "./bin": {
30
30
  "jsnext:source": "./src/cli.ts",
@@ -34,28 +34,19 @@
34
34
  "typesVersions": {
35
35
  "*": {
36
36
  "config": [
37
- "./dist/types/config/index.d.ts"
37
+ "./dist/config/index.d.ts"
38
38
  ]
39
39
  }
40
40
  },
41
41
  "bin": "./bin/modern-js.js",
42
42
  "dependencies": {
43
- "@babel/code-frame": "^7.14.5",
44
- "@babel/runtime": "^7",
45
43
  "@modern-js/load-config": "^1.3.1",
46
44
  "@modern-js/plugin": "^1.3.3",
47
- "@modern-js/utils": "^1.5.0",
48
- "address": "^1.1.2",
49
- "ajv": "^8.6.2",
50
- "ajv-keywords": "^5.0.0",
51
- "better-ajv-errors": "1.2.0",
52
- "dotenv": "^10.0.0",
53
- "dotenv-expand": "^5.1.0",
54
- "v8-compile-cache": "^2.3.0"
45
+ "@modern-js/utils": "^1.6.0"
55
46
  },
56
47
  "devDependencies": {
57
48
  "@jest/types": "^27.0.6",
58
- "@modern-js/types": "^1.5.0",
49
+ "@modern-js/types": "1.5.1",
59
50
  "@scripts/build": "0.0.0",
60
51
  "@scripts/jest-config": "0.0.0",
61
52
  "@types/babel__code-frame": "^7.0.3",
@@ -76,20 +67,15 @@
76
67
  "webpack-chain": "^6.5.1"
77
68
  },
78
69
  "sideEffects": false,
79
- "modernConfig": {
80
- "output": {
81
- "packageMode": "node-js"
82
- }
83
- },
84
70
  "publishConfig": {
85
71
  "registry": "https://registry.npmjs.org/",
86
- "access": "public"
72
+ "access": "public",
73
+ "types": "./dist/index.d.ts"
87
74
  },
88
75
  "scripts": {
89
76
  "new": "modern new",
90
- "build": "modern build",
91
- "dev": "modern build --watch",
77
+ "build": "tsc",
78
+ "dev": "tsc --watch",
92
79
  "test": "jest"
93
- },
94
- "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
80
+ }
95
81
  }
package/tsconfig.json CHANGED
@@ -1,12 +1,11 @@
1
1
  {
2
2
  "extends": "@modern-js/tsconfig/base",
3
3
  "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
4
+ "declaration": true,
5
+ "outDir": "./dist",
6
6
  "baseUrl": "./",
7
7
  "isolatedModules": true,
8
- "esModuleInterop": true,
9
- "paths": {}
8
+ "esModuleInterop": true
10
9
  },
11
10
  "include": ["src"]
12
11
  }
package/modern.config.js DELETED
@@ -1,6 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {
3
- output: {
4
- disableSourceMap: true,
5
- },
6
- };