@modern-js/utils 0.0.0-nightly-20231217170625 → 0.0.0-nightly-20231219170633

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.
@@ -94,7 +94,7 @@ const isBeyondReact17 = (cwd) => {
94
94
  }
95
95
  return import_compiled.semver.satisfies(import_compiled.semver.minVersion(deps.react), ">=17.0.0");
96
96
  };
97
- const isReact18 = (cwd) => {
97
+ const isReact18 = (cwd = process.cwd()) => {
98
98
  const pkgPath = import_path.default.join(cwd, "package.json");
99
99
  if (!import_compiled.fs.existsSync(pkgPath)) {
100
100
  return false;
@@ -93,7 +93,8 @@ var isBeyondReact17 = function(cwd) {
93
93
  }
94
94
  return semver.satisfies(semver.minVersion(deps.react), ">=17.0.0");
95
95
  };
96
- var isReact18 = function(cwd) {
96
+ var isReact18 = function() {
97
+ var cwd = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : process.cwd();
97
98
  var pkgPath = path.join(cwd, "package.json");
98
99
  if (!fs.existsSync(pkgPath)) {
99
100
  return false;
@@ -55,7 +55,7 @@ const isBeyondReact17 = (cwd) => {
55
55
  }
56
56
  return semver.satisfies(semver.minVersion(deps.react), ">=17.0.0");
57
57
  };
58
- const isReact18 = (cwd) => {
58
+ const isReact18 = (cwd = process.cwd()) => {
59
59
  const pkgPath = path.join(cwd, "package.json");
60
60
  if (!fs.existsSync(pkgPath)) {
61
61
  return false;
@@ -23,7 +23,7 @@ export declare const isPackageInstalled: (name: string, resolvePaths: string | s
23
23
  export declare const isApiOnly: (appDirectory: string, entryDir?: string, apiDir?: string) => Promise<boolean>;
24
24
  export declare const isWebOnly: () => Promise<boolean>;
25
25
  export declare const isBeyondReact17: (cwd: string) => boolean;
26
- export declare const isReact18: (cwd: string) => boolean;
26
+ export declare const isReact18: (cwd?: string) => boolean;
27
27
  /**
28
28
  * Is typescript project.
29
29
  *
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "0.0.0-nightly-20231217170625",
18
+ "version": "0.0.0-nightly-20231219170633",
19
19
  "jsnext:source": "./src/index.ts",
20
20
  "types": "./dist/types/index.d.ts",
21
21
  "main": "./dist/cjs/index.js",
@@ -154,9 +154,9 @@
154
154
  "jest": "^29",
155
155
  "typescript": "^5",
156
156
  "webpack": "^5.89.0",
157
- "@modern-js/types": "0.0.0-nightly-20231217170625",
158
- "@scripts/jest-config": "0.0.0-nightly-20231217170625",
159
- "@scripts/build": "0.0.0-nightly-20231217170625"
157
+ "@modern-js/types": "0.0.0-nightly-20231219170633",
158
+ "@scripts/jest-config": "0.0.0-nightly-20231219170633",
159
+ "@scripts/build": "0.0.0-nightly-20231219170633"
160
160
  },
161
161
  "sideEffects": false,
162
162
  "scripts": {