create-rsbuild 1.0.0-alpha.0 → 1.0.0-alpha.1

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.
Files changed (2) hide show
  1. package/dist/index.js +7 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1358,9 +1358,15 @@ function copyFolder(src, dist, version, name) {
1358
1358
  }
1359
1359
  }
1360
1360
  }
1361
+ var isStableVersion = (version) => {
1362
+ return ["alpha", "beta", "rc", "canary", "nightly"].every(
1363
+ (tag) => !version.includes(tag)
1364
+ );
1365
+ };
1361
1366
  var updatePackageJson = (pkgJsonPath, version, name) => {
1362
1367
  let content = fs.readFileSync(pkgJsonPath, "utf-8");
1363
- content = content.replace(/workspace:\*/g, `^${version}`);
1368
+ const targetVersion = isStableVersion(version) ? `^${version}` : version;
1369
+ content = content.replace(/workspace:\*/g, targetVersion);
1364
1370
  const pkg = JSON.parse(content);
1365
1371
  if (name && name !== ".") {
1366
1372
  pkg.name = name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rsbuild",
3
- "version": "1.0.0-alpha.0",
3
+ "version": "1.0.0-alpha.1",
4
4
  "description": "Create a new Rsbuild project",
5
5
  "homepage": "https://rsbuild.dev",
6
6
  "repository": {