diff --git a/cli/package.json b/cli/package.json index b3a6627f..9afd82f8 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "@napi-rs/cli", - "version": "1.3.3", + "version": "2.0.0-alpha.0", "description": "Cli tools for napi-rs", "keywords": ["cli", "rust", "napi", "n-api", "neon"], "author": "LongYinan ", diff --git a/crates/backend/Cargo.toml b/crates/backend/Cargo.toml index 8a179940..9e2dff14 100644 --- a/crates/backend/Cargo.toml +++ b/crates/backend/Cargo.toml @@ -1,17 +1,22 @@ [package] -name = "napi-derive-backend" -version = "0.1.0" +description = "Codegen backend for napi procedural macro" edition = "2018" +homepage = "https://napi.rs" +license = "MIT" +name = "napi-derive-backend" +readme = "README.md" +repository = "https://github.com/napi-rs/napi-rs" +version = "1.0.0" [features] -type-def = ["regex", "once_cell"] strict = [] +type-def = ["regex", "once_cell"] [dependencies] -proc-macro2 = "1.0" -quote = "1.0" -syn = {version = "1.0", features = ["fold", "full"]} -convert_case = "0.4.0" +convert_case = "0.4" +proc-macro2 = "1" +quote = "1" +syn = {version = "1", features = ["fold", "full", "extra-traits"]} [dependencies.regex] optional = true diff --git a/crates/macro/Cargo.toml b/crates/macro/Cargo.toml index f102d40c..f1fb4e26 100644 --- a/crates/macro/Cargo.toml +++ b/crates/macro/Cargo.toml @@ -18,7 +18,7 @@ type-def = ["napi-derive-backend/type-def"] [dependencies] convert_case = "0.4" -napi-derive-backend = {path = "../backend"} +napi-derive-backend = {version = "1", path = "../backend"} proc-macro2 = "1.0" quote = "1.0" syn = {version = "1.0", features = ["fold", "full", "extra-traits"]} diff --git a/examples/napi/type.d.ts b/examples/napi/type.d.ts index a869439a..2e744c54 100644 --- a/examples/napi/type.d.ts +++ b/examples/napi/type.d.ts @@ -2,8 +2,21 @@ export function getWords(): Array export function getNums(): Array export function sumNums(nums: Array): number export function getCwd(callback: (arg0: string) => void): void -export enum Kind { Dog = 0, Cat = 1, Duck = 2 } -export enum CustomNumEnum { One = 1, Two = 2, Three = 3, Four = 4, Six = 6, Eight = 8, Nine = 9, Ten = 10 } +export enum Kind { + Dog = 0, + Cat = 1, + Duck = 2, +} +export enum CustomNumEnum { + One = 1, + Two = 2, + Three = 3, + Four = 4, + Six = 6, + Eight = 8, + Nine = 9, + Ten = 10, +} export function enumToI32(e: CustomNumEnum): number export function mapOption(val: number | undefined): number | undefined export function add(a: number, b: number): number