create-nextspark-app 0.1.0-beta.162 → 0.1.0-beta.164

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 +11 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -70,9 +70,17 @@ async function createProject(options) {
70
70
  const localCoreTarball = findLocalTarball("@nextsparkjs/core");
71
71
  const localCliTarball = findLocalTarball("@nextsparkjs/cli");
72
72
  const localUiTarball = findLocalTarball("@nextsparkjs/ui");
73
- let corePackage = "@nextsparkjs/core";
74
- let cliPackage = "@nextsparkjs/cli";
75
- let uiPackage = "@nextsparkjs/ui";
73
+ let ownVersion = "latest";
74
+ try {
75
+ const ownPkg = JSON.parse(
76
+ fs.readFileSync(new URL("../package.json", import.meta.url), "utf-8")
77
+ );
78
+ if (ownPkg.version) ownVersion = ownPkg.version;
79
+ } catch {
80
+ }
81
+ let corePackage = `@nextsparkjs/core@${ownVersion}`;
82
+ let cliPackage = `@nextsparkjs/cli@${ownVersion}`;
83
+ let uiPackage = `@nextsparkjs/ui@${ownVersion}`;
76
84
  if (localCoreTarball && localCliTarball) {
77
85
  corePackage = localCoreTarball;
78
86
  cliPackage = localCliTarball;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-nextspark-app",
3
- "version": "0.1.0-beta.162",
3
+ "version": "0.1.0-beta.164",
4
4
  "description": "Create a new NextSpark SaaS project",
5
5
  "type": "module",
6
6
  "bin": {