diff --git a/pkgs/create-neon/data/templates/manifest/base/default.json.hbs b/pkgs/create-neon/data/templates/manifest/base/default.json.hbs index 291c547d0..1da7e61da 100644 --- a/pkgs/create-neon/data/templates/manifest/base/default.json.hbs +++ b/pkgs/create-neon/data/templates/manifest/base/default.json.hbs @@ -1,11 +1,11 @@ { - "name": "{{package.name}}", - "version": "{{package.version}}", + "name": "{{packageSpec.name}}", + "version": "{{packageSpec.version}}", "main": "index.node", "scripts": {}, "devDependencies": { - "@neon-rs/cli": "{{versions.neonCLI}}"{{#eq package.library.lang compare="ts"}}, + "@neon-rs/cli": "{{versions.neonCLI}}"{{#eq packageSpec.library.lang compare="ts"}}, "@tsconfig/node{{versions.tsconfigNode.major}}": "^{{versions.tsconfigNode.semver}}", "@types/node": "^{{versions.typesNode}}", "typescript": "^{{versions.typescript}}"{{/eq}} diff --git a/pkgs/create-neon/data/templates/manifest/base/library.json.hbs b/pkgs/create-neon/data/templates/manifest/base/library.json.hbs index 701a2e71c..1a35fb4f1 100644 --- a/pkgs/create-neon/data/templates/manifest/base/library.json.hbs +++ b/pkgs/create-neon/data/templates/manifest/base/library.json.hbs @@ -1,7 +1,7 @@ { - "name": "{{package.name}}", - "version": "{{package.version}}", + "name": "{{packageSpec.name}}", + "version": "{{packageSpec.version}}", {{#eq packageSpec.library.module compare="esm"}} "exports": { ".": { diff --git a/pkgs/create-neon/src/index.ts b/pkgs/create-neon/src/index.ts index e246996be..fa28321cc 100644 --- a/pkgs/create-neon/src/index.ts +++ b/pkgs/create-neon/src/index.ts @@ -22,6 +22,7 @@ export type CreateNeonOptions = { export async function createNeon(name: string, options: CreateNeonOptions) { const packageSpec: PackageSpec = { name, + version: "0.1.0", library: options.library, yes: options.yes, }; diff --git a/pkgs/create-neon/src/package.ts b/pkgs/create-neon/src/package.ts index 726b7b983..1ff9fce68 100644 --- a/pkgs/create-neon/src/package.ts +++ b/pkgs/create-neon/src/package.ts @@ -39,6 +39,7 @@ export type LibrarySpec = { export type PackageSpec = { name: string; + version: string; library: LibrarySpec | null; cache?: Cache | undefined; ci?: CI | undefined;