Merge pull request #24 from hexedtech/release/0.7.1

Release/0.7.1
This commit is contained in:
zaaarf 2024-09-25 23:23:29 +02:00 committed by GitHub
commit 03cb9a5acf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 20 additions and 21 deletions

2
Cargo.lock generated
View file

@ -231,7 +231,7 @@ dependencies = [
[[package]] [[package]]
name = "codemp" name = "codemp"
version = "0.7.0" version = "0.7.1"
dependencies = [ dependencies = [
"async-trait", "async-trait",
"codemp-proto", "codemp-proto",

View file

@ -11,7 +11,7 @@ authors = [
] ]
license = "GPL-3.0-only" license = "GPL-3.0-only"
edition = "2021" edition = "2021"
version = "0.7.0" version = "0.7.1"
exclude = ["dist/*"] exclude = ["dist/*"]
[lib] [lib]

View file

@ -5,7 +5,7 @@ plugins {
} }
group = 'mp.code' group = 'mp.code'
version = '0.7.0' version = '0.7.1'
java { java {
sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11 sourceCompatibility = targetCompatibility = JavaVersion.VERSION_11

View file

@ -1,6 +1,6 @@
{ {
"name": "@codemp/native", "name": "@codemp/native",
"version": "0.7.0", "version": "0.7.1",
"description": "code multiplexer -- javascript bindings", "description": "code multiplexer -- javascript bindings",
"keywords": [ "keywords": [
"codemp", "codemp",
@ -35,8 +35,8 @@
} }
}, },
"optionalDependencies": { "optionalDependencies": {
"@codemp/native-win32-x64-msvc": "0.7.0", "@codemp/native-win32-x64-msvc": "0.7.1",
"@codemp/native-darwin-arm64": "0.7.0", "@codemp/native-darwin-arm64": "0.7.1",
"@codemp/native-linux-x64-gnu": "0.7.0" "@codemp/native-linux-x64-gnu": "0.7.1"
} }
} }

View file

@ -1,9 +1,9 @@
package = "codemp" package = "codemp"
version = "0.7.0-1" version = "0.7.1-1"
source = { source = {
url = "git+https://github.com/hexedtech/codemp", url = "git+https://github.com/hexedtech/codemp",
tag = "v0.7.0", tag = "v0.7.1",
} }
dependencies = { dependencies = {

View file

@ -20,7 +20,7 @@
/// To delete a the fourth character we should send a. /// To delete a the fourth character we should send a.
/// `TextChange { start: 3, end: 4, content: "".into(), hash: None }` /// `TextChange { start: 3, end: 4, content: "".into(), hash: None }`
/// ///
/// ``` /// ```no_run
/// let change = codemp::api::TextChange { /// let change = codemp::api::TextChange {
/// start: 6, end: 11, /// start: 6, end: 11,
/// content: "mom".to_string(), hash: None /// content: "mom".to_string(), hash: None

View file

@ -27,15 +27,14 @@ impl BufferController {
} }
#[napi(js_name = "clear_callback")] #[napi(js_name = "clear_callback")]
pub fn js_clear_callback(&self) -> napi::Result<()> { pub fn js_clear_callback(&self) -> () {
self.clear_callback(); self.clear_callback();
Ok(())
} }
#[napi(js_name = "get_path")] #[napi(js_name = "get_path")]
pub fn js_path(&self) -> napi::Result<&str> { pub fn js_path(&self) -> &str {
Ok(self.path()) self.path()
} }
#[napi(js_name = "poll")] #[napi(js_name = "poll")]

View file

@ -41,8 +41,8 @@ impl Client {
#[napi(js_name = "leave_workspace")] #[napi(js_name = "leave_workspace")]
/// leave workspace and disconnect, returns true if workspace was active /// leave workspace and disconnect, returns true if workspace was active
pub async fn js_leave_workspace(&self, workspace: String) -> napi::Result<bool> { pub async fn js_leave_workspace(&self, workspace: String) -> bool {
Ok(self.leave_workspace(&workspace)) self.leave_workspace(&workspace)
} }
#[napi(js_name = "get_workspace")] #[napi(js_name = "get_workspace")]

View file

@ -2,11 +2,11 @@ use napi_derive::napi;
#[napi(js_name = "hash")] #[napi(js_name = "hash")]
pub fn js_hash(str : String) -> napi::Result<i64>{ pub fn js_hash(data: String) -> i64 {
Ok(crate::ext::hash(str)) crate::ext::hash(data)
} }
#[napi(js_name = "version")] #[napi(js_name = "version")]
pub fn js_version(str : String) -> napi::Result<String>{ pub fn js_version() -> String {
Ok(crate::version()) crate::version()
} }