@modern-js/server-generator 3.0.2 → 3.0.3

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 (2) hide show
  1. package/dist/index.js +33 -1
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -36566,7 +36566,8 @@ var require_chainId = __commonJS({
36566
36566
  ASSETS_RETRY: "ASSETS_RETRY",
36567
36567
  AUTO_SET_ROOT_SIZE: "auto-set-root-size",
36568
36568
  HTML_ASYNC_CHUNK: "html-async-chunk",
36569
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
36569
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
36570
+ HTML_TAGS: "html-tags"
36570
36571
  },
36571
36572
  MINIMIZER: {
36572
36573
  JS: "js",
@@ -36747,6 +36748,36 @@ var require_getCoreJsVersion = __commonJS({
36747
36748
  }
36748
36749
  });
36749
36750
 
36751
+ // ../../../toolkit/utils/dist/react.js
36752
+ var require_react = __commonJS({
36753
+ "../../../toolkit/utils/dist/react.js"(exports) {
36754
+ "use strict";
36755
+ var __importDefault = exports && exports.__importDefault || function(mod) {
36756
+ return mod && mod.__esModule ? mod : { "default": mod };
36757
+ };
36758
+ Object.defineProperty(exports, "__esModule", { value: true });
36759
+ exports.isBeyondReact17 = void 0;
36760
+ var path_1 = __importDefault(require("path"));
36761
+ var _1 = require_dist();
36762
+ var isBeyondReact17 = (cwd) => {
36763
+ const pkgPath = path_1.default.join(cwd, "package.json");
36764
+ if (!_1.fs.existsSync(pkgPath)) {
36765
+ return false;
36766
+ }
36767
+ const pkgInfo = JSON.parse(_1.fs.readFileSync(pkgPath, "utf8"));
36768
+ const deps = {
36769
+ ...pkgInfo.devDependencies,
36770
+ ...pkgInfo.dependencies
36771
+ };
36772
+ if (typeof deps.react !== "string") {
36773
+ return false;
36774
+ }
36775
+ return _1.semver.satisfies(_1.semver.minVersion(deps.react), ">=17.0.0");
36776
+ };
36777
+ exports.isBeyondReact17 = isBeyondReact17;
36778
+ }
36779
+ });
36780
+
36750
36781
  // ../../../toolkit/utils/dist/index.js
36751
36782
  var require_dist = __commonJS({
36752
36783
  "../../../toolkit/utils/dist/index.js"(exports) {
@@ -36814,6 +36845,7 @@ var require_dist = __commonJS({
36814
36845
  __exportStar(require_routes(), exports);
36815
36846
  __exportStar(require_test_utils(), exports);
36816
36847
  __exportStar(require_getCoreJsVersion(), exports);
36848
+ __exportStar(require_react(), exports);
36817
36849
  }
36818
36850
  });
36819
36851
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "3.0.2",
14
+ "version": "3.0.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./src/index.ts",
17
17
  "main": "./dist/index.js",
@@ -28,11 +28,11 @@
28
28
  "@types/node": "^14",
29
29
  "jest": "^27",
30
30
  "typescript": "^4",
31
- "@modern-js/generator-utils": "3.0.2",
32
- "@modern-js/generator-common": "3.0.2",
33
- "@modern-js/dependence-generator": "3.0.2",
34
- "@scripts/build": "2.0.2",
35
- "@scripts/jest-config": "2.0.2"
31
+ "@scripts/build": "2.1.0",
32
+ "@scripts/jest-config": "2.1.0",
33
+ "@modern-js/dependence-generator": "3.0.3",
34
+ "@modern-js/generator-utils": "3.0.3",
35
+ "@modern-js/generator-common": "3.0.3"
36
36
  },
37
37
  "sideEffects": false,
38
38
  "publishConfig": {