@tramvai/cli 2.10.2 → 2.11.0

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.
@@ -9,9 +9,9 @@ exports.shouldUseReactRoot = once_1.default(() => {
9
9
  var _a;
10
10
  // eslint-disable-next-line import/no-extraneous-dependencies
11
11
  const reactVersion = require('react').version;
12
- const isReactExperimental = Boolean(reactVersion && /0\.0\.0-experimental/.test(reactVersion));
13
- const hasReact18 = Boolean(reactVersion) &&
12
+ const isReactExperimental = reactVersion && /0\.0\.0-experimental/.test(reactVersion);
13
+ const hasReact18 = reactVersion &&
14
14
  (semver_1.default.gte(reactVersion, '18.0.0') || ((_a = semver_1.default.coerce(reactVersion)) === null || _a === void 0 ? void 0 : _a.version) === '18.0.0');
15
- return hasReact18 || isReactExperimental;
15
+ return Boolean(hasReact18 || isReactExperimental);
16
16
  });
17
17
  //# sourceMappingURL=shouldUseReactRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shouldUseReactRoot.js","sourceRoot":"","sources":["../../src/utils/shouldUseReactRoot.ts"],"names":[],"mappings":";;;;AAAA,gFAAgD;AAChD,4DAA4B;AAE5B,8FAA8F;AACjF,QAAA,kBAAkB,GAAG,cAAI,CAAC,GAAG,EAAE;;IAC1C,6DAA6D;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,mBAAmB,GAAG,OAAO,CAAC,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC/F,MAAM,UAAU,GACd,OAAO,CAAC,YAAY,CAAC;QACrB,CAAC,gBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA,MAAA,gBAAM,CAAC,MAAM,CAAC,YAAY,CAAC,0CAAE,OAAO,MAAK,QAAQ,CAAC,CAAC;IAE5F,OAAO,UAAU,IAAI,mBAAmB,CAAC;AAC3C,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"shouldUseReactRoot.js","sourceRoot":"","sources":["../../src/utils/shouldUseReactRoot.ts"],"names":[],"mappings":";;;;AAAA,gFAAgD;AAChD,4DAA4B;AAE5B,8FAA8F;AACjF,QAAA,kBAAkB,GAAG,cAAI,CAAC,GAAG,EAAE;;IAC1C,6DAA6D;IAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC;IAC9C,MAAM,mBAAmB,GAAG,YAAY,IAAI,sBAAsB,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACtF,MAAM,UAAU,GACd,YAAY;QACZ,CAAC,gBAAM,CAAC,GAAG,CAAC,YAAY,EAAE,QAAQ,CAAC,IAAI,CAAA,MAAA,gBAAM,CAAC,MAAM,CAAC,YAAY,CAAC,0CAAE,OAAO,MAAK,QAAQ,CAAC,CAAC;IAE5F,OAAO,OAAO,CAAC,UAAU,IAAI,mBAAmB,CAAC,CAAC;AACpD,CAAC,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/cli",
3
- "version": "2.10.2",
3
+ "version": "2.11.0",
4
4
  "description": "Cli инструмент для сборки и запуска приложений",
5
5
  "files": [
6
6
  "src",
@@ -5,10 +5,10 @@ import semver from 'semver';
5
5
  export const shouldUseReactRoot = once(() => {
6
6
  // eslint-disable-next-line import/no-extraneous-dependencies
7
7
  const reactVersion = require('react').version;
8
- const isReactExperimental = Boolean(reactVersion && /0\.0\.0-experimental/.test(reactVersion));
9
- const hasReact18: boolean =
10
- Boolean(reactVersion) &&
8
+ const isReactExperimental = reactVersion && /0\.0\.0-experimental/.test(reactVersion);
9
+ const hasReact18 =
10
+ reactVersion &&
11
11
  (semver.gte(reactVersion, '18.0.0') || semver.coerce(reactVersion)?.version === '18.0.0');
12
12
 
13
- return hasReact18 || isReactExperimental;
13
+ return Boolean(hasReact18 || isReactExperimental);
14
14
  });