create-message-kit 1.1.7-beta.30 → 1.1.7-beta.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. package/index.js +4 -3
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -83,7 +83,7 @@ async function addPackagejson(destDir, name, pkgManager) {
83
83
  };
84
84
 
85
85
  if (pkgManager.startsWith("yarn")) {
86
- packageTemplate.packageManager = `${pkgManager}@${version}`;
86
+ packageTemplate.packageManager = `${pkgManager}`;
87
87
  // Add .yarnrc.yml to disable PnP mode
88
88
  fs.writeFileSync(
89
89
  resolve(destDir, ".yarnrc.yml"),
@@ -208,8 +208,9 @@ async function detectPackageManager() {
208
208
  pkgManager === "yarn" &&
209
209
  process.env.npm_config_user_agent?.includes("yarn/4")
210
210
  ) {
211
- console.log(process.env.npm_config_user_agent);
212
- return "yarn@4";
211
+ //yarn/4.5.1 npm/? node/v20.15.0 darwin arm64
212
+ const version = process.env.npm_config_user_agent?.split("/")[1];
213
+ return `yarn@${version}`;
213
214
  }
214
215
  return pkgManager;
215
216
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-message-kit",
3
- "version": "1.1.7-beta.30",
3
+ "version": "1.1.7-beta.31",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "main": "index.js",