@modern-js/packages-generator 3.0.1 → 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 +5 -5
package/dist/index.js CHANGED
@@ -137960,7 +137960,8 @@ var require_chainId2 = __commonJS({
137960
137960
  ASSETS_RETRY: "ASSETS_RETRY",
137961
137961
  AUTO_SET_ROOT_SIZE: "auto-set-root-size",
137962
137962
  HTML_ASYNC_CHUNK: "html-async-chunk",
137963
- SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin"
137963
+ SWC_POLYFILL_CHECKER: "swc-polyfill-checker-plugin",
137964
+ HTML_TAGS: "html-tags"
137964
137965
  },
137965
137966
  MINIMIZER: {
137966
137967
  JS: "js",
@@ -138141,6 +138142,36 @@ var require_getCoreJsVersion = __commonJS({
138141
138142
  }
138142
138143
  });
138143
138144
 
138145
+ // ../../../toolkit/utils/dist/react.js
138146
+ var require_react = __commonJS({
138147
+ "../../../toolkit/utils/dist/react.js"(exports) {
138148
+ "use strict";
138149
+ var __importDefault = exports && exports.__importDefault || function(mod) {
138150
+ return mod && mod.__esModule ? mod : { "default": mod };
138151
+ };
138152
+ Object.defineProperty(exports, "__esModule", { value: true });
138153
+ exports.isBeyondReact17 = void 0;
138154
+ var path_1 = __importDefault(require("path"));
138155
+ var _1 = require_dist3();
138156
+ var isBeyondReact17 = (cwd) => {
138157
+ const pkgPath = path_1.default.join(cwd, "package.json");
138158
+ if (!_1.fs.existsSync(pkgPath)) {
138159
+ return false;
138160
+ }
138161
+ const pkgInfo = JSON.parse(_1.fs.readFileSync(pkgPath, "utf8"));
138162
+ const deps = {
138163
+ ...pkgInfo.devDependencies,
138164
+ ...pkgInfo.dependencies
138165
+ };
138166
+ if (typeof deps.react !== "string") {
138167
+ return false;
138168
+ }
138169
+ return _1.semver.satisfies(_1.semver.minVersion(deps.react), ">=17.0.0");
138170
+ };
138171
+ exports.isBeyondReact17 = isBeyondReact17;
138172
+ }
138173
+ });
138174
+
138144
138175
  // ../../../toolkit/utils/dist/index.js
138145
138176
  var require_dist3 = __commonJS({
138146
138177
  "../../../toolkit/utils/dist/index.js"(exports) {
@@ -138208,6 +138239,7 @@ var require_dist3 = __commonJS({
138208
138239
  __exportStar(require_routes(), exports);
138209
138240
  __exportStar(require_test_utils(), exports);
138210
138241
  __exportStar(require_getCoreJsVersion(), exports);
138242
+ __exportStar(require_react(), exports);
138211
138243
  }
138212
138244
  });
138213
138245
 
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "3.0.1",
14
+ "version": "3.0.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "main": "./dist/index.js",
17
17
  "files": [
@@ -27,10 +27,10 @@
27
27
  "@types/node": "^14",
28
28
  "jest": "^27",
29
29
  "typescript": "^4",
30
- "@modern-js/generator-utils": "3.0.1",
31
- "@modern-js/generator-common": "3.0.1",
32
- "@scripts/jest-config": "2.0.1",
33
- "@scripts/build": "2.0.1"
30
+ "@scripts/jest-config": "2.1.0",
31
+ "@modern-js/generator-common": "3.0.3",
32
+ "@modern-js/generator-utils": "3.0.3",
33
+ "@scripts/build": "2.1.0"
34
34
  },
35
35
  "sideEffects": false,
36
36
  "publishConfig": {