diff --git a/pkgs/create-neon/data/templates/Cargo.toml.hbs b/pkgs/create-neon/data/templates/Cargo.toml.hbs index 68126b54c..fbb985e3a 100644 --- a/pkgs/create-neon/data/templates/Cargo.toml.hbs +++ b/pkgs/create-neon/data/templates/Cargo.toml.hbs @@ -19,8 +19,4 @@ crate-type = ["cdylib"] # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] - -[dependencies.neon] -version = "{{versions.neon}}" -default-features = false -features = ["napi-{{versions.napi}}"] +neon = "{{versions.neon}}" diff --git a/pkgs/create-neon/data/versions.json b/pkgs/create-neon/data/versions.json index 901698990..e3fba49aa 100644 --- a/pkgs/create-neon/data/versions.json +++ b/pkgs/create-neon/data/versions.json @@ -1,5 +1,4 @@ { - "neon": "1.0.0", - "napi": "8", + "neon": "1", "cargo-cp-artifact": "0.1" } diff --git a/pkgs/create-neon/package.json b/pkgs/create-neon/package.json index 46a56972a..11e240c0a 100644 --- a/pkgs/create-neon/package.json +++ b/pkgs/create-neon/package.json @@ -1,6 +1,6 @@ { "name": "create-neon", - "version": "0.2.0", + "version": "0.3.0", "description": "Create Neon projects with no build configuration.", "author": "Dave Herman ", "license": "MIT", diff --git a/pkgs/create-neon/src/bin/create-neon.ts b/pkgs/create-neon/src/bin/create-neon.ts index 18a123bf5..b8367469d 100644 --- a/pkgs/create-neon/src/bin/create-neon.ts +++ b/pkgs/create-neon/src/bin/create-neon.ts @@ -4,7 +4,7 @@ import { promises as fs } from "fs"; import * as path from "path"; import die from "../die"; import Package from "../package"; -import expand, { Versions } from "../expand"; +import expand from "../expand"; import versions from "../../data/versions.json"; const TEMPLATES: Record = { @@ -14,21 +14,6 @@ const TEMPLATES: Record = { "lib.rs.hbs": path.join("src", "lib.rs"), }; -function inferVersions(): Versions { - // Select the N-API version associated with the current - // running Node process. - let inferred = process.versions.napi; - - let napi = inferred - ? Math.min(Number(versions.napi), Number(inferred)) - : Number(versions.napi); - - return { - neon: versions.neon, - napi: napi, - }; -} - async function main(name: string) { let tmpFolderName: string = ""; @@ -56,7 +41,7 @@ async function main(name: string) { let target = path.join(tmpFolderName, TEMPLATES[source]); await expand(source, target, { package: pkg, - versions: inferVersions(), + versions, }); } } diff --git a/pkgs/create-neon/src/expand.ts b/pkgs/create-neon/src/expand.ts index 473f8a9da..4af0c6a49 100644 --- a/pkgs/create-neon/src/expand.ts +++ b/pkgs/create-neon/src/expand.ts @@ -7,7 +7,7 @@ const TEMPLATES_DIR = path.join(__dirname, "..", "data", "templates"); export interface Versions { neon: string; - napi: number; + "cargo-cp-artifact": string; } export interface Metadata {