@cedarjs/project-config 4.0.0-canary.13673 → 4.0.0-canary.13675
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.
- package/dist/cjs/index.js +11 -10
- package/dist/cjs/packageManager.d.ts +11 -0
- package/dist/cjs/packageManager.d.ts.map +1 -1
- package/dist/cjs/packageManager.js +11 -10
- package/dist/index.js +11 -10
- package/dist/packageManager.d.ts +11 -0
- package/dist/packageManager.d.ts.map +1 -1
- package/dist/packageManager.js +11 -10
- package/package.json +6 -3
package/dist/cjs/index.js
CHANGED
|
@@ -446,20 +446,21 @@ function getPackageManager() {
|
|
|
446
446
|
return packageManagerCache;
|
|
447
447
|
}
|
|
448
448
|
const base = getPaths().base;
|
|
449
|
-
|
|
449
|
+
packageManagerCache = "yarn";
|
|
450
|
+
const envPackageManager = process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];
|
|
451
|
+
if (isPackageManager(envPackageManager)) {
|
|
452
|
+
packageManagerCache = envPackageManager;
|
|
453
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "yarn.lock"))) {
|
|
450
454
|
packageManagerCache = "yarn";
|
|
451
|
-
|
|
452
|
-
}
|
|
453
|
-
if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "pnpm-lock.yaml"))) {
|
|
455
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "pnpm-lock.yaml"))) {
|
|
454
456
|
packageManagerCache = "pnpm";
|
|
455
|
-
|
|
456
|
-
}
|
|
457
|
-
if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "package-lock.json"))) {
|
|
457
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "package-lock.json"))) {
|
|
458
458
|
packageManagerCache = "npm";
|
|
459
|
-
return packageManagerCache;
|
|
460
459
|
}
|
|
461
|
-
packageManagerCache
|
|
462
|
-
|
|
460
|
+
return packageManagerCache;
|
|
461
|
+
}
|
|
462
|
+
function isPackageManager(pm) {
|
|
463
|
+
return pm === "yarn" || pm === "npm" || pm === "pnpm";
|
|
463
464
|
}
|
|
464
465
|
function prettyPrintCedarCommand(args) {
|
|
465
466
|
const packageManager = getPackageManager();
|
|
@@ -5,5 +5,16 @@ export type PackageManager = 'yarn' | 'npm' | 'pnpm';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function getPackageManager(): PackageManager;
|
|
7
7
|
export declare function resetPackageManagerCache(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Gets a string suitable for displaying to the user when telling them to run a
|
|
10
|
+
* Cedar bin command, like `yarn cedar upgrade` or
|
|
11
|
+
* `yarn cedar generate page home /`.
|
|
12
|
+
*
|
|
13
|
+
* This is a duplicate of what's in `cli-helpers/packageManager`. Please
|
|
14
|
+
* prefer the other one if you can. This one is only here for packages that
|
|
15
|
+
* can't import cli-helpers.
|
|
16
|
+
* TODO: Remove this one when we've fully moved to tree-shakable ESM sub-path
|
|
17
|
+
* imports
|
|
18
|
+
*/
|
|
8
19
|
export declare function prettyPrintCedarCommand(args: string[]): string;
|
|
9
20
|
//# sourceMappingURL=packageManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageManager.d.ts","sourceRoot":"","sources":["../../src/packageManager.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAIpD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,
|
|
1
|
+
{"version":3,"file":"packageManager.d.ts","sourceRoot":"","sources":["../../src/packageManager.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAIpD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAgClD;AAMD,wBAAgB,wBAAwB,SAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAM9D"}
|
|
@@ -296,20 +296,21 @@ function getPackageManager() {
|
|
|
296
296
|
return packageManagerCache;
|
|
297
297
|
}
|
|
298
298
|
const base = getPaths().base;
|
|
299
|
-
|
|
299
|
+
packageManagerCache = "yarn";
|
|
300
|
+
const envPackageManager = process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];
|
|
301
|
+
if (isPackageManager(envPackageManager)) {
|
|
302
|
+
packageManagerCache = envPackageManager;
|
|
303
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "yarn.lock"))) {
|
|
300
304
|
packageManagerCache = "yarn";
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "pnpm-lock.yaml"))) {
|
|
305
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "pnpm-lock.yaml"))) {
|
|
304
306
|
packageManagerCache = "pnpm";
|
|
305
|
-
|
|
306
|
-
}
|
|
307
|
-
if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "package-lock.json"))) {
|
|
307
|
+
} else if (import_node_fs4.default.existsSync(import_node_path.default.join(base, "package-lock.json"))) {
|
|
308
308
|
packageManagerCache = "npm";
|
|
309
|
-
return packageManagerCache;
|
|
310
309
|
}
|
|
311
|
-
packageManagerCache
|
|
312
|
-
|
|
310
|
+
return packageManagerCache;
|
|
311
|
+
}
|
|
312
|
+
function isPackageManager(pm) {
|
|
313
|
+
return pm === "yarn" || pm === "npm" || pm === "pnpm";
|
|
313
314
|
}
|
|
314
315
|
function resetPackageManagerCache() {
|
|
315
316
|
packageManagerCache = void 0;
|
package/dist/index.js
CHANGED
|
@@ -382,20 +382,21 @@ function getPackageManager() {
|
|
|
382
382
|
return packageManagerCache;
|
|
383
383
|
}
|
|
384
384
|
const base = getPaths().base;
|
|
385
|
-
|
|
385
|
+
packageManagerCache = "yarn";
|
|
386
|
+
const envPackageManager = process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];
|
|
387
|
+
if (isPackageManager(envPackageManager)) {
|
|
388
|
+
packageManagerCache = envPackageManager;
|
|
389
|
+
} else if (fs4.existsSync(path3.join(base, "yarn.lock"))) {
|
|
386
390
|
packageManagerCache = "yarn";
|
|
387
|
-
|
|
388
|
-
}
|
|
389
|
-
if (fs4.existsSync(path3.join(base, "pnpm-lock.yaml"))) {
|
|
391
|
+
} else if (fs4.existsSync(path3.join(base, "pnpm-lock.yaml"))) {
|
|
390
392
|
packageManagerCache = "pnpm";
|
|
391
|
-
|
|
392
|
-
}
|
|
393
|
-
if (fs4.existsSync(path3.join(base, "package-lock.json"))) {
|
|
393
|
+
} else if (fs4.existsSync(path3.join(base, "package-lock.json"))) {
|
|
394
394
|
packageManagerCache = "npm";
|
|
395
|
-
return packageManagerCache;
|
|
396
395
|
}
|
|
397
|
-
packageManagerCache
|
|
398
|
-
|
|
396
|
+
return packageManagerCache;
|
|
397
|
+
}
|
|
398
|
+
function isPackageManager(pm) {
|
|
399
|
+
return pm === "yarn" || pm === "npm" || pm === "pnpm";
|
|
399
400
|
}
|
|
400
401
|
function prettyPrintCedarCommand(args) {
|
|
401
402
|
const packageManager = getPackageManager();
|
package/dist/packageManager.d.ts
CHANGED
|
@@ -5,5 +5,16 @@ export type PackageManager = 'yarn' | 'npm' | 'pnpm';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function getPackageManager(): PackageManager;
|
|
7
7
|
export declare function resetPackageManagerCache(): void;
|
|
8
|
+
/**
|
|
9
|
+
* Gets a string suitable for displaying to the user when telling them to run a
|
|
10
|
+
* Cedar bin command, like `yarn cedar upgrade` or
|
|
11
|
+
* `yarn cedar generate page home /`.
|
|
12
|
+
*
|
|
13
|
+
* This is a duplicate of what's in `cli-helpers/packageManager`. Please
|
|
14
|
+
* prefer the other one if you can. This one is only here for packages that
|
|
15
|
+
* can't import cli-helpers.
|
|
16
|
+
* TODO: Remove this one when we've fully moved to tree-shakable ESM sub-path
|
|
17
|
+
* imports
|
|
18
|
+
*/
|
|
8
19
|
export declare function prettyPrintCedarCommand(args: string[]): string;
|
|
9
20
|
//# sourceMappingURL=packageManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"packageManager.d.ts","sourceRoot":"","sources":["../src/packageManager.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAIpD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,
|
|
1
|
+
{"version":3,"file":"packageManager.d.ts","sourceRoot":"","sources":["../src/packageManager.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,KAAK,GAAG,MAAM,CAAA;AAIpD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAgClD;AAMD,wBAAgB,wBAAwB,SAEvC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,CAM9D"}
|
package/dist/packageManager.js
CHANGED
|
@@ -260,20 +260,21 @@ function getPackageManager() {
|
|
|
260
260
|
return packageManagerCache;
|
|
261
261
|
}
|
|
262
262
|
const base = getPaths().base;
|
|
263
|
-
|
|
263
|
+
packageManagerCache = "yarn";
|
|
264
|
+
const envPackageManager = process.env.npm_config_user_agent?.split(" ")[0]?.split("/")[0];
|
|
265
|
+
if (isPackageManager(envPackageManager)) {
|
|
266
|
+
packageManagerCache = envPackageManager;
|
|
267
|
+
} else if (fs4.existsSync(path3.join(base, "yarn.lock"))) {
|
|
264
268
|
packageManagerCache = "yarn";
|
|
265
|
-
|
|
266
|
-
}
|
|
267
|
-
if (fs4.existsSync(path3.join(base, "pnpm-lock.yaml"))) {
|
|
269
|
+
} else if (fs4.existsSync(path3.join(base, "pnpm-lock.yaml"))) {
|
|
268
270
|
packageManagerCache = "pnpm";
|
|
269
|
-
|
|
270
|
-
}
|
|
271
|
-
if (fs4.existsSync(path3.join(base, "package-lock.json"))) {
|
|
271
|
+
} else if (fs4.existsSync(path3.join(base, "package-lock.json"))) {
|
|
272
272
|
packageManagerCache = "npm";
|
|
273
|
-
return packageManagerCache;
|
|
274
273
|
}
|
|
275
|
-
packageManagerCache
|
|
276
|
-
|
|
274
|
+
return packageManagerCache;
|
|
275
|
+
}
|
|
276
|
+
function isPackageManager(pm) {
|
|
277
|
+
return pm === "yarn" || pm === "npm" || pm === "pnpm";
|
|
277
278
|
}
|
|
278
279
|
function resetPackageManagerCache() {
|
|
279
280
|
packageManagerCache = void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cedarjs/project-config",
|
|
3
|
-
"version": "4.0.0-canary.
|
|
3
|
+
"version": "4.0.0-canary.13675+8262a8b2b",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/cedarjs/cedar.git",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@arethetypeswrong/cli": "0.18.2",
|
|
57
|
-
"@cedarjs/framework-tools": "4.0.0-canary.
|
|
57
|
+
"@cedarjs/framework-tools": "4.0.0-canary.13675",
|
|
58
58
|
"concurrently": "9.2.1",
|
|
59
59
|
"prisma": "7.5.0",
|
|
60
60
|
"publint": "0.3.18",
|
|
@@ -63,8 +63,11 @@
|
|
|
63
63
|
"typescript": "5.9.3",
|
|
64
64
|
"vitest": "3.2.4"
|
|
65
65
|
},
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=24"
|
|
68
|
+
},
|
|
66
69
|
"publishConfig": {
|
|
67
70
|
"access": "public"
|
|
68
71
|
},
|
|
69
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "8262a8b2baf0be63592cde7f6198d234cfd5698b"
|
|
70
73
|
}
|