@modern-js/utils 2.42.2 → 2.44.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -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(
|
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
|
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": "2.
|
18
|
+
"version": "2.44.0",
|
19
19
|
"jsnext:source": "./src/index.ts",
|
20
20
|
"types": "./dist/types/index.d.ts",
|
21
21
|
"main": "./dist/cjs/index.js",
|
@@ -153,10 +153,10 @@
|
|
153
153
|
"@types/node": "^14",
|
154
154
|
"jest": "^29",
|
155
155
|
"typescript": "^5",
|
156
|
-
"webpack": "^5.
|
157
|
-
"@modern-js/types": "2.
|
158
|
-
"@scripts/build": "2.
|
159
|
-
"@scripts/jest-config": "2.
|
156
|
+
"webpack": "^5.89.0",
|
157
|
+
"@modern-js/types": "2.44.0",
|
158
|
+
"@scripts/build": "2.44.0",
|
159
|
+
"@scripts/jest-config": "2.44.0"
|
160
160
|
},
|
161
161
|
"sideEffects": false,
|
162
162
|
"scripts": {
|