create-rstack 0.0.1 → 0.0.2

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 +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1409,7 +1409,9 @@ async function create({
1409
1409
  const pkgInfo = pkgFromUserAgent(process.env.npm_config_user_agent);
1410
1410
  const pkgManager = pkgInfo ? pkgInfo.name : "npm";
1411
1411
  const packageJsonPath = path2.join(root, "package.json");
1412
- const { version } = __require(packageJsonPath);
1412
+ const { version } = JSON.parse(
1413
+ await fs.promises.readFile(packageJsonPath, "utf-8")
1414
+ );
1413
1415
  const projectName = argv.dir ?? checkCancel(
1414
1416
  await te({
1415
1417
  message: "Project name or path",
@@ -1464,7 +1466,7 @@ async function create({
1464
1466
  if (!eslintTemplateName) {
1465
1467
  continue;
1466
1468
  }
1467
- let subFolder = path2.join(toolFolder, eslintTemplateName);
1469
+ const subFolder = path2.join(toolFolder, eslintTemplateName);
1468
1470
  copyFolder({
1469
1471
  from: subFolder,
1470
1472
  to: distFolder,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-rstack",
3
- "version": "0.0.1",
3
+ "version": "0.0.2",
4
4
  "description": "Create a new Rstack project",
5
5
  "repository": {
6
6
  "type": "git",