Skip to content

Commit

Permalink
bugfix: PackageSpec needs version (default is "0.1.0") and manifest t…
Browse files Browse the repository at this point in the history
…emplate references packageSpec not package
  • Loading branch information
dherman committed Mar 28, 2024
1 parent 88e8bb7 commit 74fe46a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

{
"name": "{{package.name}}",
"version": "{{package.version}}",
"name": "{{packageSpec.name}}",
"version": "{{packageSpec.version}}",
{{#eq packageSpec.library.module compare="esm"}}
"exports": {
".": {
Expand Down
1 change: 1 addition & 0 deletions pkgs/create-neon/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down
1 change: 1 addition & 0 deletions pkgs/create-neon/src/package.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export type LibrarySpec = {

export type PackageSpec = {
name: string;
version: string;
library: LibrarySpec | null;
cache?: Cache | undefined;
ci?: CI | undefined;
Expand Down

0 comments on commit 74fe46a

Please sign in to comment.