diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index e7ad9a4c..5d8d0b6e 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -14,7 +14,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-07-26 + toolchain: nightly-2024-08-26 components: rustfmt, clippy - name: Install ghp-import uses: actions/setup-python@v5 diff --git a/.github/workflows/test-js.yaml b/.github/workflows/test-js.yaml index 933892cd..1dc3e345 100644 --- a/.github/workflows/test-js.yaml +++ b/.github/workflows/test-js.yaml @@ -20,7 +20,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-07-26 + toolchain: nightly-2024-08-26 components: rustfmt, clippy - name: Check yarn version run: yarn --version @@ -46,7 +46,7 @@ jobs: - name: Install latest Rust nightly uses: dtolnay/rust-toolchain@stable with: - toolchain: nightly-2024-07-26 + toolchain: nightly-2024-08-26 components: rustfmt, clippy - name: Bun version uses: oven-sh/setup-bun@v1 diff --git a/Cargo.toml b/Cargo.toml index 3954e31f..539612f7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,9 +20,9 @@ napi = { version = "2.16.9", default-features = false, features = [ "serde-json", ] } napi-derive = { version = "2.16.11", default-features = false } -polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2", default-features = false } -polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2", default-features = false } -polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2", default-features = false } +polars-core = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } +polars-io = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } +polars-lazy = { git = "https://github.com/pola-rs/polars.git", rev = "54218e7e35e3defd4b0801e820c56eea6b91e525", default-features = false } thiserror = "1" smartstring = { version = "1" } serde_json = { version = "1" } @@ -162,7 +162,7 @@ features = [ "azure" ] git = "https://github.com/pola-rs/polars.git" -rev = "7686025ac7738607f2d4f6887e9a1313b7c8b1e2" +rev = "54218e7e35e3defd4b0801e820c56eea6b91e525" [build-dependencies] napi-build = "2.1.3" diff --git a/__tests__/dataframe.test.ts b/__tests__/dataframe.test.ts index 5934c84a..39e0c191 100644 --- a/__tests__/dataframe.test.ts +++ b/__tests__/dataframe.test.ts @@ -1862,8 +1862,8 @@ describe("create", () => { bool: pl.Bool, date: pl.Date, date_nulls: pl.Date, - datetime: pl.Datetime("ms"), - datetime_nulls: pl.Datetime("ms"), + datetime: pl.Datetime("ms", ""), + datetime_nulls: pl.Datetime("ms", ""), string: pl.String, string_nulls: pl.String, categorical: pl.Categorical, @@ -1983,7 +1983,7 @@ describe("create", () => { expect(df.toRecords()).toEqual(expected); expect(df.schema).toStrictEqual({ num: pl.Float64, - date: pl.Datetime("ms"), + date: pl.Datetime("ms", ""), string: pl.String, }); }); diff --git a/__tests__/expr.test.ts b/__tests__/expr.test.ts index 6d5f5abd..760f325f 100644 --- a/__tests__/expr.test.ts +++ b/__tests__/expr.test.ts @@ -239,9 +239,11 @@ describe("expr", () => { expect(actual).toFrameEqual(expected); }); test("exp", () => { - const df = pl.DataFrame({ a: [1.0] }); - const actual = df.select(pl.col("a").exp()); - const expected = pl.DataFrame({ a: [Math.E] }); + const df = pl.DataFrame({ a: [1] }); + const actual = df.select(pl.col("a").exp().round(6)); + const expected = pl.DataFrame({ + a: [Math.round(Math.E * 1_000_000) / 1_000_000], + }); expect(actual).toFrameEqual(expected); }); test("explode", () => { diff --git a/__tests__/series.test.ts b/__tests__/series.test.ts index bd457118..2af7df72 100644 --- a/__tests__/series.test.ts +++ b/__tests__/series.test.ts @@ -217,13 +217,13 @@ describe("series", () => { describe("create series", () => { it.each` - values | dtype | type - ${["foo", "bar", "baz"]} | ${pl.String} | ${"string"} - ${[1, 2, 3]} | ${pl.Float64} | ${"number"} - ${[1n, 2n, 3n]} | ${pl.UInt64} | ${"bigint"} - ${[true, false]} | ${pl.Bool} | ${"boolean"} - ${[]} | ${pl.Float64} | ${"empty"} - ${[new Date(Date.now())]} | ${pl.Datetime("ms")} | ${"Date"} + values | dtype | type + ${["foo", "bar", "baz"]} | ${pl.String} | ${"string"} + ${[1, 2, 3]} | ${pl.Float64} | ${"number"} + ${[1n, 2n, 3n]} | ${pl.UInt64} | ${"bigint"} + ${[true, false]} | ${pl.Bool} | ${"boolean"} + ${[]} | ${pl.Float64} | ${"empty"} + ${[new Date(Date.now())]} | ${pl.Datetime("ms", "")} | ${"Date"} `('defaults to $dtype for "$type"', ({ values, dtype }) => { const name = chance.string(); const s = pl.Series(name, values); @@ -588,12 +588,35 @@ describe("series", () => { expect(actual).toFrameEqual(expected); }); it("series:valueCounts", () => { - const actual = pl.Series("a", [1, 2, 2, 3]).valueCounts(true); - const expected = pl.DataFrame({ + let actual = pl.Series("a", [1, 2, 2, 3]).valueCounts(true); + let expected = pl.DataFrame({ a: [2, 1, 3], count: [2, 1, 1], }); expect(actual).toFrameEqual(expected); + + actual = pl + .Series("a", [1, 2, 2, 3]) + .valueCounts(true, true, undefined, true); + expected = pl.DataFrame({ + a: [2, 1, 3], + proportion: [0.5, 0.25, 0.25], + }); + expect(actual).toFrameEqual(expected); + + actual = pl.Series("a", [1, 2, 2, 3]).valueCounts(true, true, "foo", false); + expected = pl.DataFrame({ + a: [2, 1, 3], + foo: [2, 1, 1], + }); + expect(actual).toFrameEqual(expected); + + actual = pl.Series("a", [1, 2, 2, 3]).valueCounts(true, true, "foo", true); + expected = pl.DataFrame({ + a: [2, 1, 3], + foo: [0.5, 0.25, 0.25], + }); + expect(actual).toFrameEqual(expected); }); it("set: expected matches actual", () => { const expected = pl.Series([99, 2, 3]); diff --git a/package.json b/package.json index 8b7371a1..af326dd3 100644 --- a/package.json +++ b/package.json @@ -58,14 +58,14 @@ "@napi-rs/cli": "^2.18.4", "@types/chance": "^1.1.6", "@types/jest": "^29.5.12", - "@types/node": "^22.5.3", + "@types/node": "^22.5.4", "chance": "^1.1.12", "jest": "^29.7.0", "source-map-support": "^0.5.21", "ts-jest": "^29.2.5", "ts-node": "^10.9.2", - "typedoc": "^0.26.6", - "typescript": "5.5.4" + "typedoc": "^0.26.7", + "typescript": "5.6.2" }, "packageManager": "yarn@4.4.1", "workspaces": [ diff --git a/polars/series/index.ts b/polars/series/index.ts index 8f1eaeeb..4f49fb35 100644 --- a/polars/series/index.ts +++ b/polars/series/index.ts @@ -1801,7 +1801,7 @@ export function _Series(_s: any): Series { name?: string, normalize?: boolean, ) { - name = name ?? normalize ? "proportion" : "count"; + name = name ?? (normalize ? "proportion" : "count"); return _DataFrame( unwrap( "valueCounts", diff --git a/rust-toolchain b/rust-toolchain index d1c23fde..8a20f547 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -nightly-2024-07-26 \ No newline at end of file +nightly-2024-08-26 \ No newline at end of file diff --git a/src/conversion.rs b/src/conversion.rs index e91adeea..222a4460 100644 --- a/src/conversion.rs +++ b/src/conversion.rs @@ -9,8 +9,6 @@ use polars_io::RowIndex; use std::any::Any; use std::collections::HashMap; -use smartstring::alias::String as SmartString; - #[derive(Debug)] pub struct Wrap(pub T); @@ -50,7 +48,7 @@ impl ToSeries for Array { let av: Wrap = self.get(i).unwrap().unwrap_or(Wrap(AnyValue::Null)); v.push(av.0); } - Series::new("", v) + Series::new(PlSmallStr::EMPTY, v) } } @@ -64,7 +62,7 @@ impl ToSeries for JsUnknown { let av = AnyValue::from_js(unknown).unwrap(); v.push(av); } - Series::new("", v) + Series::new(PlSmallStr::EMPTY, v) } } @@ -174,7 +172,7 @@ impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { let arr = Array::from_napi_value(env, napi_val)?; let len = arr.len() as usize; - let mut builder = StringChunkedBuilder::new("", len); + let mut builder = StringChunkedBuilder::new(PlSmallStr::EMPTY, len); for i in 0..len { match arr.get::(i as u32) { Ok(val) => match val { @@ -192,7 +190,7 @@ impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { let arr = Array::from_napi_value(env, napi_val)?; let len = arr.len() as usize; - let mut builder = BooleanChunkedBuilder::new("", len); + let mut builder = BooleanChunkedBuilder::new(PlSmallStr::EMPTY, len); for i in 0..len { match arr.get::(i as u32) { Ok(val) => match val { @@ -211,7 +209,7 @@ impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { let arr = Array::from_napi_value(env, napi_val)?; let len = arr.len() as usize; - let mut builder = PrimitiveChunkedBuilder::::new("", len); + let mut builder = PrimitiveChunkedBuilder::::new(PlSmallStr::EMPTY, len); for i in 0..len { match arr.get::(i as u32) { Ok(val) => match val { @@ -234,7 +232,7 @@ macro_rules! impl_chunked { ) -> JsResult { let arr = Array::from_napi_value(env, napi_val)?; let len = arr.len() as usize; - let mut builder = PrimitiveChunkedBuilder::<$type>::new("", len); + let mut builder = PrimitiveChunkedBuilder::<$type>::new(PlSmallStr::EMPTY, len); for i in 0..len { match arr.get::<$native>(i as u32) { Ok(val) => match val { @@ -258,7 +256,7 @@ impl FromNapiValue for Wrap> { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { let arr = Array::from_napi_value(env, napi_val)?; let len = arr.len() as usize; - let mut builder = PrimitiveChunkedBuilder::::new("", len); + let mut builder = PrimitiveChunkedBuilder::::new(PlSmallStr::EMPTY, len); for i in 0..len { match arr.get::(i as u32) { Ok(val) => match val { @@ -631,11 +629,7 @@ impl FromNapiValue for Wrap { match ty { ValueType::Object => { let obj = Object::from_napi_value(env, napi_val)?; - let variant = if let Some(variant) = obj.get::<_, String>("variant")? { - variant - } else { - "".into() - }; + let variant = obj.get::<_, String>("variant")?.map_or("".into(), |v| v); let dtype = match variant.as_ref() { "Int8" => DataType::Int8, @@ -688,7 +682,7 @@ impl FromNapiValue for Wrap { let obj = Object::from_napi_value(env, napi_dt)?; let name = obj.get::<_, String>("name")?.unwrap(); let dt = obj.get::<_, Wrap>("dtype")?.unwrap(); - let fld = Field::new(&name, dt.0); + let fld = Field::new(name.into(), dt.0); fldvec.push(fld); } DataType::Struct(fldvec) @@ -725,7 +719,7 @@ impl FromNapiValue for Wrap { let napi_val = Object::to_napi_value(env, value)?; let dtype = Wrap::::from_napi_value(env, napi_val)?; - Ok(Field::new(key, dtype.0)) + Ok(Field::new(key.into(), dtype.0)) }) .collect::>()?, )) @@ -806,11 +800,7 @@ impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> napi::Result { let obj = Object::from_napi_value(env, napi_val)?; let descending = obj.get::<_, bool>("descending")?.unwrap(); - let nulls_last = if let Some(nulls_last) = obj.get::<_, bool>("nulls_last")? { - nulls_last - } else { - obj.get::<_, bool>("nullsLast")?.unwrap_or(false) - }; + let nulls_last = obj.get::<_, bool>("nulls_last")?.map_or(obj.get::<_, bool>("nullsLast")?.unwrap_or(false), |n| n); let multithreaded = obj.get::<_, bool>("multithreaded")?.unwrap(); let maintain_order: bool = obj.get::<_, bool>("maintain_order")?.unwrap(); let options = SortOptions { @@ -957,8 +947,7 @@ impl ToNapiValue for Wrap { let mut inner_arr = env_ctx.create_array(2)?; inner_arr.set(0, tu.to_ascii())?; - inner_arr.set(1, tz)?; - + inner_arr.set(1, tz.as_ref().map_or("", |s| s.as_str()))?; obj.set("variant", "Datetime")?; obj.set("inner", inner_arr)?; Object::to_napi_value(env, obj) @@ -974,7 +963,7 @@ impl ToNapiValue for Wrap { let mut js_flds = env_ctx.create_array(flds.len() as u32)?; for (idx, fld) in flds.iter().enumerate() { let name = fld.name().clone(); - let dtype = Wrap(fld.data_type().clone()); + let dtype = Wrap(fld.dtype().clone()); let mut fld_obj = env_ctx.create_object()?; fld_obj.set("name", name.to_string())?; fld_obj.set("dtype", dtype)?; @@ -1016,11 +1005,11 @@ impl ToNapiValue for Wrap { impl FromNapiValue for Wrap { unsafe fn from_napi_value(env: sys::napi_env, napi_val: sys::napi_value) -> JsResult { if let Ok(s) = String::from_napi_value(env, napi_val) { - Ok(Wrap(NullValues::AllColumnsSingle(s))) + Ok(Wrap(NullValues::AllColumnsSingle(s.into()))) } else if let Ok(s) = Vec::::from_napi_value(env, napi_val) { - Ok(Wrap(NullValues::AllColumns(s))) + Ok(Wrap(NullValues::AllColumns(s.into_iter().map(PlSmallStr::from_string).collect()))) } else if let Ok(s) = HashMap::::from_napi_value(env, napi_val) { - let null_values: Vec<(String, String)> = s.into_iter().collect(); + let null_values = s.into_iter().map(|a| (PlSmallStr::from_string(a.0), PlSmallStr::from_string(a.1))).collect::>(); Ok(Wrap(NullValues::Named(null_values))) } else { Err( @@ -1034,10 +1023,10 @@ impl FromNapiValue for Wrap { impl ToNapiValue for Wrap { unsafe fn to_napi_value(env: sys::napi_env, val: Self) -> napi::Result { match val.0 { - NullValues::AllColumnsSingle(s) => String::to_napi_value(env, s), - NullValues::AllColumns(arr) => Vec::::to_napi_value(env, arr), + NullValues::AllColumnsSingle(s) => String::to_napi_value(env, s.to_string()), + NullValues::AllColumns(arr) => Vec::::to_napi_value(env, arr.iter().map(|x| x.to_string()).collect()), NullValues::Named(obj) => { - let o: HashMap = obj.into_iter().collect(); + let o: HashMap = obj.into_iter().map(|s| (s.0.to_string(), s.1.to_string())).collect::>(); HashMap::::to_napi_value(env, o) } } @@ -1242,12 +1231,12 @@ pub(crate) fn parse_fill_null_strategy( Ok(parsed) } -pub(crate) fn strings_to_smartstrings(container: I) -> Vec +pub(crate) fn strings_to_pl_smallstr(container: I) -> Vec where I: IntoIterator, S: AsRef, { - container.into_iter().map(|s| s.as_ref().into()).collect() + container.into_iter().map(|s| PlSmallStr::from_str(s.as_ref())).collect() } pub(crate) fn strings_to_selector(container: I) -> Vec diff --git a/src/dataframe.rs b/src/dataframe.rs index 12deb6e2..445fe698 100644 --- a/src/dataframe.rs +++ b/src/dataframe.rs @@ -97,15 +97,7 @@ fn mmap_reader_to_df<'a>( .projection .map(|p: Vec| p.into_iter().map(|p| p as usize).collect()); - let quote_char = if let Some(s) = options.quote_char { - if s.is_empty() { - None - } else { - Some(s.as_bytes()[0]) - } - } else { - None - }; + let quote_char = options.quote_char.map_or(None, |q| if q.is_empty() { None } else { Some(q.as_bytes()[0]) } ); let encoding = match options.encoding.as_ref() { "utf8" => CsvEncoding::Utf8, @@ -118,7 +110,7 @@ fn mmap_reader_to_df<'a>( .iter() .map(|(name, dtype)| { let dtype = dtype.0.clone(); - Field::new(name, dtype) + Field::new((&**name).into(), dtype) }) .collect::() }); @@ -132,7 +124,7 @@ fn mmap_reader_to_df<'a>( .with_ignore_errors(options.ignore_errors) .with_rechunk(options.rechunk) .with_chunk_size(options.chunk_size as usize) - .with_columns(options.columns.map(|c| Arc::from(c))) + .with_columns(options.columns.map(|x| x.into_iter().map(PlSmallStr::from_string).collect())) .with_n_threads(options.num_threads.map(|i| i as usize)) .with_schema_overwrite(overwrite_dtype.map(Arc::new)) .with_schema(options.schema.map(|schema| Arc::new(schema.0))) @@ -454,7 +446,7 @@ pub fn from_rows( Row(schema .iter_fields() .map(|fld| { - let dtype = fld.data_type().clone(); + let dtype = fld.dtype().clone(); let key = fld.name(); if let Ok(unknown) = obj.get(key) { let av = match unknown { @@ -636,13 +628,14 @@ impl JsDataFrame { let df = self .df - .join( + .join + ( &other.df, left_on, right_on, JoinArgs { how: how, - suffix: suffix, + suffix: suffix.map_or(None, |s| Some(PlSmallStr::from_string(s))), ..Default::default() }, ) @@ -659,13 +652,13 @@ impl JsDataFrame { /// Get column names #[napi(getter, catch_unwind)] pub fn columns(&self) -> Vec<&str> { - self.df.get_column_names() + self.df.get_column_names_str() } #[napi(setter, js_name = "columns", catch_unwind)] pub fn set_columns(&mut self, names: Vec<&str>) -> napi::Result<()> { self.df - .set_column_names(&names) + .set_column_names(names) .map_err(JsPolarsErr::from)?; Ok(()) } @@ -773,7 +766,7 @@ impl JsDataFrame { } #[napi(catch_unwind)] pub fn select(&self, selection: Vec<&str>) -> napi::Result { - let df = self.df.select(&selection).map_err(JsPolarsErr::from)?; + let df = self.df.select(selection).map_err(JsPolarsErr::from)?; Ok(JsDataFrame::new(df)) } #[napi(catch_unwind)] @@ -790,7 +783,7 @@ impl JsDataFrame { } #[napi(catch_unwind)] pub fn take(&self, indices: Vec) -> napi::Result { - let indices = UInt32Chunked::from_vec("", indices); + let indices = UInt32Chunked::from_vec(PlSmallStr::EMPTY, indices); let df = self.df.take(&indices).map_err(JsPolarsErr::from)?; Ok(JsDataFrame::new(df)) } @@ -848,7 +841,7 @@ impl JsDataFrame { #[napi(catch_unwind)] pub fn rename(&mut self, column: String, new_col: String) -> napi::Result<()> { self.df - .rename(&column, &new_col) + .rename(&column, PlSmallStr::from_string(new_col)) .map_err(JsPolarsErr::from)?; Ok(()) } @@ -909,7 +902,7 @@ impl JsDataFrame { pub fn with_row_count(&self, name: String, offset: Option) -> napi::Result { let df = self .df - .with_row_index(&name, offset) + .with_row_index(PlSmallStr::from_string(name), offset) .map_err(JsPolarsErr::from)?; Ok(df.into()) } @@ -920,7 +913,7 @@ impl JsDataFrame { select: Option>, agg: String, ) -> napi::Result { - let gb = self.df.group_by(&by).map_err(JsPolarsErr::from)?; + let gb = self.df.group_by(by).map_err(JsPolarsErr::from)?; let selection = match select.as_ref() { Some(s) => gb.select(s), None => gb, @@ -968,8 +961,8 @@ impl JsDataFrame { value_name: Option ) -> napi::Result { let args = UnpivotArgsIR { - on: strings_to_smartstrings(value_vars), - index: strings_to_smartstrings(id_vars), + on: strings_to_pl_smallstr(value_vars), + index: strings_to_pl_smallstr(id_vars), variable_name: variable_name.map(|s| s.into()), value_name: value_name.map(|s| s.into()) }; @@ -1008,7 +1001,7 @@ impl JsDataFrame { keep: Wrap, slice: Option>, ) -> napi::Result { - let subset = subset.as_ref().map(|v| v.as_ref()); + let subset = subset.map(|v| v.iter().map(|x| PlSmallStr::from_str(x.as_str())).collect()); let df = self .df .unique_impl( @@ -1160,7 +1153,7 @@ impl JsDataFrame { } #[napi(catch_unwind)] pub fn to_struct(&self, name: String) -> JsSeries { - let s = self.df.clone().into_struct(&name); + let s = self.df.clone().into_struct(PlSmallStr::from_string(name)); s.into_series().into() } #[napi(catch_unwind)] diff --git a/src/datatypes.rs b/src/datatypes.rs index 4fb27f67..ad7884fb 100644 --- a/src/datatypes.rs +++ b/src/datatypes.rs @@ -171,7 +171,7 @@ impl<'a> FromNapiValue for Wrap> { ValueType::Object => { if let Ok(vals) = Vec::>::from_napi_value(env, napi_val) { let vals = std::mem::transmute::<_, Vec>(vals); - let s = Series::new("", vals); + let s = Series::new(PlSmallStr::EMPTY, vals); AnyValue::List(s) } else if let Ok(s) = <&JsSeries>::from_napi_value(env, napi_val) { AnyValue::List(s.series.clone()) diff --git a/src/lazy/dataframe.rs b/src/lazy/dataframe.rs index 3ecbbf4b..f7c2c538 100644 --- a/src/lazy/dataframe.rs +++ b/src/lazy/dataframe.rs @@ -321,8 +321,8 @@ impl JsLazyFrame { .force_parallel(force_parallel) .how(JoinType::AsOf(AsOfOptions { strategy, - left_by: left_by.map(strings_to_smartstrings), - right_by: right_by.map(strings_to_smartstrings), + left_by: left_by.map(strings_to_pl_smallstr), + right_by: right_by.map(strings_to_pl_smallstr), tolerance: tolerance.map(|t| t.0.into_static().unwrap()), tolerance_str: tolerance_str.map(|s| s.into()), })) @@ -478,7 +478,7 @@ impl JsLazyFrame { ) -> JsLazyFrame { let ldf = self.ldf.clone(); match maintain_order { - true => ldf.unique_stable(subset, keep.0), + true => ldf.unique_stable(subset.map(|x| x.into_iter().map(PlSmallStr::from_string).collect()), keep.0), false => ldf.unique(subset, keep.0), } .into() @@ -536,8 +536,7 @@ impl JsLazyFrame { #[napi(getter, js_name = "columns", catch_unwind)] pub fn columns(&mut self) -> napi::Result> { Ok(self - .ldf - .schema() + .ldf.collect_schema() .map_err(JsPolarsErr::from)? .iter_names() .map(|s| s.as_str().into()) @@ -656,22 +655,14 @@ pub fn scan_csv(path: String, options: ScanCsvOptions) -> napi::Result() }); @@ -693,7 +684,7 @@ pub fn scan_csv(path: String, options: ScanCsvOptions) -> napi::Result, pub rechunk: Option, pub row_count: Option, - pub memmap: Option, } #[napi(catch_unwind)] @@ -808,14 +798,12 @@ pub fn scan_ipc(path: String, options: ScanIPCOptions) -> napi::Result = options.row_count.map(|rc| rc.into()); let args = ScanArgsIpc { n_rows, cache, rechunk, row_index, - memory_map, cloud_options: Default::default(), hive_options: Default::default(), include_file_paths: None, diff --git a/src/lazy/dsl.rs b/src/lazy/dsl.rs index 52d0fe23..51db6a20 100644 --- a/src/lazy/dsl.rs +++ b/src/lazy/dsl.rs @@ -286,7 +286,7 @@ impl JsExpr { ) -> JsExpr { self.inner .clone() - .value_counts(sort, parallel, name, normalize) + .value_counts(sort, parallel, &name, normalize) .into() } @@ -635,7 +635,7 @@ impl JsExpr { cache: bool, ) -> JsExpr { let options = StrptimeOptions { - format, + format: format.map_or(None, |s| Some(PlSmallStr::from_string(s))), strict, exact, cache, @@ -649,14 +649,14 @@ impl JsExpr { &self, format: Option, time_unit: Option>, - time_zone: Option, + time_zone: Option, strict: bool, exact: bool, cache: bool, ambiguous: Option>, ) -> JsExpr { let options = StrptimeOptions { - format, + format: format.map_or(None, |s| Some(PlSmallStr::from_string(s))), strict, exact, cache, @@ -664,6 +664,7 @@ impl JsExpr { let ambiguous = ambiguous .map(|e| e.0) .unwrap_or(dsl::lit(String::from("raise"))); + let time_zone = time_zone.map_or(None, |x| Some(PlSmallStr::from_string(x))); self.inner .clone() .str() diff --git a/src/list_construction.rs b/src/list_construction.rs index 7f220460..012112fc 100644 --- a/src/list_construction.rs +++ b/src/list_construction.rs @@ -6,7 +6,7 @@ macro_rules! typed_to_chunked { let v: &[$type] = $arr.as_ref(); let mut buffer = Vec::<$type>::new(); buffer.extend_from_slice(v); - ChunkedArray::<$pl_type>::from_vec("", buffer) + ChunkedArray::<$pl_type>::from_vec(PlSmallStr::EMPTY, buffer) }}; } @@ -95,20 +95,20 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result let len = arr.len(); let s = match dtype { - DataType::Int8 => build_list_with_downcast!(name, arr, i8, DataType::Int8, Int8Type), - DataType::UInt8 => build_list_with_downcast!(name, arr, u8, DataType::UInt8, UInt8Type), - DataType::Int16 => build_list_with_downcast!(name, arr, i16, DataType::Int16, Int16Type), - DataType::UInt16 => build_list_with_downcast!(name, arr, u16, DataType::UInt16, UInt16Type), - DataType::Int32 => typed_option_or_null!(name, arr, i32, DataType::Int32, Int32Type), - DataType::UInt32 => typed_option_or_null!(name, arr, u32, DataType::UInt32, UInt32Type), + DataType::Int8 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, i8, DataType::Int8, Int8Type), + DataType::UInt8 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u8, DataType::UInt8, UInt8Type), + DataType::Int16 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, i16, DataType::Int16, Int16Type), + DataType::UInt16 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u16, DataType::UInt16, UInt16Type), + DataType::Int32 => typed_option_or_null!(PlSmallStr::from_str(name), arr, i32, DataType::Int32, Int32Type), + DataType::UInt32 => typed_option_or_null!(PlSmallStr::from_str(name), arr, u32, DataType::UInt32, UInt32Type), DataType::Float32 => { - build_list_with_downcast!(name, arr, f32, DataType::Float32, Float32Type) + build_list_with_downcast!(PlSmallStr::from_str(name), arr, f32, DataType::Float32, Float32Type) } - DataType::Int64 => typed_option_or_null!(name, arr, i64, DataType::Int64, Int64Type), - DataType::Float64 => typed_option_or_null!(name, arr, f64, DataType::Float64, Float64Type), - DataType::UInt64 => build_list_with_downcast!(name, arr, u64, DataType::UInt64, UInt64Type), + DataType::Int64 => typed_option_or_null!(PlSmallStr::from_str(name), arr, i64, DataType::Int64, Int64Type), + DataType::Float64 => typed_option_or_null!(PlSmallStr::from_str(name), arr, f64, DataType::Float64, Float64Type), + DataType::UInt64 => build_list_with_downcast!(PlSmallStr::from_str(name), arr, u64, DataType::UInt64, UInt64Type), DataType::String => { - let mut builder = ListStringChunkedBuilder::new(name, len as usize, (len as usize) * 5); + let mut builder = ListStringChunkedBuilder::new(PlSmallStr::from_str(name), len as usize, (len as usize) * 5); for idx in 0..len { let values: Either>, Null> = arr.get(idx)?.unwrap(); @@ -121,7 +121,7 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result } DataType::Boolean => { let mut builder = - ListBooleanChunkedBuilder::new(name, len as usize, (len as usize) * 5); + ListBooleanChunkedBuilder::new(PlSmallStr::from_str(name), len as usize, (len as usize) * 5); for idx in 0..len { let values: Either>, Null> = arr.get(idx)?.unwrap(); @@ -134,7 +134,7 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result } DataType::Datetime(_, _) => { let mut builder = ListPrimitiveChunkedBuilder::::new( - name, + PlSmallStr::from_str(name), len as usize, (len as usize) * 5, DataType::Datetime(TimeUnit::Milliseconds, None), @@ -145,7 +145,7 @@ pub fn js_arr_to_list(name: &str, arr: &Array, dtype: &DataType) -> napi::Result Either::A(inner_arr) => { let inner_len = inner_arr.len(); let mut inner_builder = - PrimitiveChunkedBuilder::::new(name, inner_len as usize); + PrimitiveChunkedBuilder::::new(PlSmallStr::from_str(name), inner_len as usize); for inner_idx in 0..inner_len { let item: Either = inner_arr.get(inner_idx)?.unwrap(); diff --git a/src/series.rs b/src/series.rs index 031fc700..66da7f49 100644 --- a/src/series.rs +++ b/src/series.rs @@ -65,95 +65,95 @@ impl JsSeries { // #[napi(factory, catch_unwind)] pub fn new_int_8_array(name: String, arr: Int8Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_uint8_array(name: String, arr: Uint8Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_uint8_clamped_array(name: String, arr: Uint8ClampedArray) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_int16_array(name: String, arr: Int16Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_uint16_array(name: String, arr: Uint16Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_int32_array(name: String, arr: Int32Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_uint32_array(name: String, arr: Uint32Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_float32_array(name: String, arr: Float32Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_float64_array(name: String, arr: Float64Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_bigint64_array(name: String, arr: BigInt64Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_biguint64_array(name: String, arr: BigUint64Array) -> JsSeries { - Series::new(&name, arr).into() + Series::new(PlSmallStr::from_string(name), arr).into() } #[napi(factory, catch_unwind)] pub fn new_opt_str(name: String, val: Wrap) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_bool(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_i32(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_i64(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_u64(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_u32(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_f32(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } #[napi(factory, catch_unwind)] pub fn new_opt_f64(name: String, val: Wrap, _strict: bool) -> JsSeries { let mut s = val.0.into_series(); - s.rename(&name); + s.rename(PlSmallStr::from_string(name)); JsSeries::new(s) } @@ -164,7 +164,7 @@ impl JsSeries { strict: Option, ) -> napi::Result { let len = values.len(); - let mut builder = PrimitiveChunkedBuilder::::new(&name, len); + let mut builder = PrimitiveChunkedBuilder::::new(PlSmallStr::from_string(name), len); for item in values.into_iter() { match item.get_type()? { ValueType::Object => { @@ -204,7 +204,7 @@ impl JsSeries { ) -> napi::Result { let values = values.into_iter().map(|v| v.0).collect::>(); - let s = Series::from_any_values_and_dtype(&name, &values, &dtype.0, strict) + let s = Series::from_any_values_and_dtype(PlSmallStr::from_string(name), &values, &dtype.0, strict) .map_err(JsPolarsErr::from)?; Ok(s.into()) @@ -229,7 +229,7 @@ impl JsSeries { if let AnyValue::StringOwned(v) = val.0 { let val = v.to_string(); let mut ca: StringChunked = (0..n).map(|_| val.clone()).collect_trusted(); - ca.rename(&name); + ca.rename(PlSmallStr::from_string(name)); ca.into_series().into() } else { return Err(napi::Error::from_reason( @@ -240,7 +240,7 @@ impl JsSeries { DataType::Int64 => { if let AnyValue::Int64(v) = val.0 { let mut ca: NoNull = (0..n).map(|_| v).collect_trusted(); - ca.rename(&name); + ca.rename(PlSmallStr::from_string(name)); ca.into_inner().into_series().into() } else { @@ -252,7 +252,7 @@ impl JsSeries { DataType::Float64 => { if let AnyValue::Float64(v) = val.0 { let mut ca: NoNull = (0..n).map(|_| v).collect_trusted(); - ca.rename(&name); + ca.rename(PlSmallStr::from_string(name)); ca.into_inner().into_series().into() } else { return Err(napi::Error::from_reason( @@ -288,7 +288,7 @@ impl JsSeries { } #[napi(getter, catch_unwind)] pub fn name(&self) -> String { - self.series.name().to_owned() + self.series.name().to_string() } #[napi(catch_unwind)] pub fn to_string(&self) -> String { @@ -391,7 +391,7 @@ impl JsSeries { #[napi(catch_unwind)] pub fn rename(&mut self, name: String) { - self.series.rename(&name); + self.series.rename(PlSmallStr::from_string(name)); } #[napi(catch_unwind)] @@ -561,7 +561,7 @@ impl JsSeries { ) -> napi::Result { let df = self .series - .value_counts(sort, parallel, name, normalize) + .value_counts(sort, parallel, PlSmallStr::from_string(name), normalize) .map_err(JsPolarsErr::from)?; Ok(df.into()) } @@ -581,7 +581,7 @@ impl JsSeries { } #[napi(catch_unwind)] pub fn take(&self, indices: Vec) -> napi::Result { - let indices = UInt32Chunked::from_vec("", indices); + let indices = UInt32Chunked::from_vec(PlSmallStr::EMPTY, indices); let take = self.series.take(&indices).map_err(JsPolarsErr::from)?; Ok(JsSeries::new(take)) } diff --git a/yarn.lock b/yarn.lock index 3d7d73ab..2c32336a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -866,12 +866,55 @@ __metadata: languageName: node linkType: hard -"@shikijs/core@npm:1.10.3": - version: 1.10.3 - resolution: "@shikijs/core@npm:1.10.3" +"@shikijs/core@npm:1.17.0": + version: 1.17.0 + resolution: "@shikijs/core@npm:1.17.0" + dependencies: + "@shikijs/engine-javascript": "npm:1.17.0" + "@shikijs/engine-oniguruma": "npm:1.17.0" + "@shikijs/types": "npm:1.17.0" + "@shikijs/vscode-textmate": "npm:^9.2.2" + "@types/hast": "npm:^3.0.4" + hast-util-to-html: "npm:^9.0.2" + checksum: 10/ba794a4c84ce86f00bcea82b4649de9caf31c40f322c6d417f68e2ddf0794c230846d98f65fbce0ea956c8492ab56dea3f19ff1395bb13d22ec9b52e797cf309 + languageName: node + linkType: hard + +"@shikijs/engine-javascript@npm:1.17.0": + version: 1.17.0 + resolution: "@shikijs/engine-javascript@npm:1.17.0" + dependencies: + "@shikijs/types": "npm:1.17.0" + oniguruma-to-js: "npm:0.3.3" + regex: "npm:4.3.2" + checksum: 10/534729577c3990d5f4ea80560084de8548a8daa2c1207c9226bc9b5c3566cc9493ba15a6afb9808372ce6be6d8009a5913447f0489965378a1f5e3fb4a339fe3 + languageName: node + linkType: hard + +"@shikijs/engine-oniguruma@npm:1.17.0": + version: 1.17.0 + resolution: "@shikijs/engine-oniguruma@npm:1.17.0" + dependencies: + "@shikijs/types": "npm:1.17.0" + "@shikijs/vscode-textmate": "npm:^9.2.2" + checksum: 10/aa094aa6d80e59150b31d5b820954acb98b712cb2cbd47b3972d2800343bc44150dbc2033760aafdef7b420402000961726ac46a4a1c52e65abfe9cf24299711 + languageName: node + linkType: hard + +"@shikijs/types@npm:1.17.0": + version: 1.17.0 + resolution: "@shikijs/types@npm:1.17.0" dependencies: + "@shikijs/vscode-textmate": "npm:^9.2.2" "@types/hast": "npm:^3.0.4" - checksum: 10/4f8ef8d972f6ee5ff451d300c39db17aea673a8071b92cb3ae0546064412e75df754d24e5726fb681ed35e06438e8184963990878e54cb0582a4b6569ba70a43 + checksum: 10/2b2600ac891ebbf315d4ac1a07773bc9b43ed82389adcc49d165b16fa0970e2878d2050267746e647ffcbb1bf5389f955cd4a1c58c0d2df7c4d3b2023e2198fd + languageName: node + linkType: hard + +"@shikijs/vscode-textmate@npm:^9.2.2": + version: 9.2.2 + resolution: "@shikijs/vscode-textmate@npm:9.2.2" + checksum: 10/2d283fe0eeccb0fbcd14518de240a5168647be552c07e3cb75692919d3b2be4038bbd5d959cc3e2c6466d10483d59194a1dcb6be24717403671dbd16f44409ab languageName: node linkType: hard @@ -985,7 +1028,7 @@ __metadata: languageName: node linkType: hard -"@types/hast@npm:^3.0.4": +"@types/hast@npm:^3.0.0, @types/hast@npm:^3.0.4": version: 3.0.4 resolution: "@types/hast@npm:3.0.4" dependencies: @@ -1029,6 +1072,15 @@ __metadata: languageName: node linkType: hard +"@types/mdast@npm:^4.0.0": + version: 4.0.4 + resolution: "@types/mdast@npm:4.0.4" + dependencies: + "@types/unist": "npm:*" + checksum: 10/efe3ec11b9ee0015a396c4fb4cd1b6f31b51b8ae9783c59560e6fc0bf6c2fa1dcc7fccaf45fa09a6c8b3397fab9dc8d431433935cae3835caa70a18f7fc775f8 + languageName: node + linkType: hard + "@types/node@npm:*": version: 20.14.10 resolution: "@types/node@npm:20.14.10" @@ -1038,12 +1090,12 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^22.5.3": - version: 22.5.3 - resolution: "@types/node@npm:22.5.3" +"@types/node@npm:^22.5.4": + version: 22.5.4 + resolution: "@types/node@npm:22.5.4" dependencies: undici-types: "npm:~6.19.2" - checksum: 10/a969c8df3becf326938ff17b0bd9114b0d1d3c5fe6292c8a9f3db1576a3567dc6db4e7b253830bbfcd92cb49e0d799592d56daf56d8a0c1446d0ea6658324450 + checksum: 10/d46e0abf437b36bdf89011287aa43873d68ea6f2521a11b5c9a033056fd0d07af36daf51439010e8d41c62c55d0b00e9b5e09ed00bb2617723f73f28a873903a languageName: node linkType: hard @@ -1061,6 +1113,13 @@ __metadata: languageName: node linkType: hard +"@types/unist@npm:^3.0.0": + version: 3.0.3 + resolution: "@types/unist@npm:3.0.3" + checksum: 10/96e6453da9e075aaef1dc22482463898198acdc1eeb99b465e65e34303e2ec1e3b1ed4469a9118275ec284dc98019f63c3f5d49422f0e4ac707e5ab90fb3b71a + languageName: node + linkType: hard + "@types/yargs-parser@npm:*": version: 21.0.3 resolution: "@types/yargs-parser@npm:21.0.3" @@ -1077,6 +1136,13 @@ __metadata: languageName: node linkType: hard +"@ungap/structured-clone@npm:^1.0.0": + version: 1.2.0 + resolution: "@ungap/structured-clone@npm:1.2.0" + checksum: 10/c6fe89a505e513a7592e1438280db1c075764793a2397877ff1351721fe8792a966a5359769e30242b3cd023f2efb9e63ca2ca88019d73b564488cc20e3eab12 + languageName: node + linkType: hard + "abbrev@npm:^2.0.0": version: 2.0.0 resolution: "abbrev@npm:2.0.0" @@ -1423,6 +1489,13 @@ __metadata: languageName: node linkType: hard +"ccount@npm:^2.0.0": + version: 2.0.1 + resolution: "ccount@npm:2.0.1" + checksum: 10/48193dada54c9e260e0acf57fc16171a225305548f9ad20d5471e0f7a8c026aedd8747091dccb0d900cde7df4e4ddbd235df0d8de4a64c71b12f0d3303eeafd4 + languageName: node + linkType: hard + "chalk@npm:^2.4.2": version: 2.4.2 resolution: "chalk@npm:2.4.2" @@ -1458,6 +1531,20 @@ __metadata: languageName: node linkType: hard +"character-entities-html4@npm:^2.0.0": + version: 2.1.0 + resolution: "character-entities-html4@npm:2.1.0" + checksum: 10/7034aa7c7fa90309667f6dd50499c8a760c3d3a6fb159adb4e0bada0107d194551cdbad0714302f62d06ce4ed68565c8c2e15fdef2e8f8764eb63fa92b34b11d + languageName: node + linkType: hard + +"character-entities-legacy@npm:^3.0.0": + version: 3.0.0 + resolution: "character-entities-legacy@npm:3.0.0" + checksum: 10/7582af055cb488b626d364b7d7a4e46b06abd526fb63c0e4eb35bcb9c9799cc4f76b39f34fdccef2d1174ac95e53e9ab355aae83227c1a2505877893fce77731 + languageName: node + linkType: hard + "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -1543,6 +1630,13 @@ __metadata: languageName: node linkType: hard +"comma-separated-tokens@npm:^2.0.0": + version: 2.0.3 + resolution: "comma-separated-tokens@npm:2.0.3" + checksum: 10/e3bf9e0332a5c45f49b90e79bcdb4a7a85f28d6a6f0876a94f1bb9b2bfbdbbb9292aac50e1e742d8c0db1e62a0229a106f57917e2d067fca951d81737651700d + languageName: node + linkType: hard + "concat-map@npm:0.0.1": version: 0.0.1 resolution: "concat-map@npm:0.0.1" @@ -1623,6 +1717,13 @@ __metadata: languageName: node linkType: hard +"dequal@npm:^2.0.0": + version: 2.0.3 + resolution: "dequal@npm:2.0.3" + checksum: 10/6ff05a7561f33603df87c45e389c9ac0a95e3c056be3da1a0c4702149e3a7f6fe5ffbb294478687ba51a9e95f3a60e8b6b9005993acd79c292c7d15f71964b6b + languageName: node + linkType: hard + "detect-newline@npm:^3.0.0": version: 3.1.0 resolution: "detect-newline@npm:3.1.0" @@ -1630,6 +1731,15 @@ __metadata: languageName: node linkType: hard +"devlop@npm:^1.0.0": + version: 1.1.0 + resolution: "devlop@npm:1.1.0" + dependencies: + dequal: "npm:^2.0.0" + checksum: 10/3cc5f903d02d279d6dc4aa71ab6ed9898b9f4d1f861cc5421ce7357893c21b9520de78afb203c92bd650a6977ad0ca98195453a0707a39958cf5fea3b0a8ddd8 + languageName: node + linkType: hard + "diff-sequences@npm:^29.6.3": version: 29.6.3 resolution: "diff-sequences@npm:29.6.3" @@ -2004,6 +2114,34 @@ __metadata: languageName: node linkType: hard +"hast-util-to-html@npm:^9.0.2": + version: 9.0.2 + resolution: "hast-util-to-html@npm:9.0.2" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/unist": "npm:^3.0.0" + ccount: "npm:^2.0.0" + comma-separated-tokens: "npm:^2.0.0" + hast-util-whitespace: "npm:^3.0.0" + html-void-elements: "npm:^3.0.0" + mdast-util-to-hast: "npm:^13.0.0" + property-information: "npm:^6.0.0" + space-separated-tokens: "npm:^2.0.0" + stringify-entities: "npm:^4.0.0" + zwitch: "npm:^2.0.4" + checksum: 10/b14a94d4f675136ba2df89246553b64af785324a6b4deb9b7b7f308e86021a9a3aa5cf16fea18124b92dfb1005277e0f76bb26548d9eb0617dc19c72c32366f4 + languageName: node + linkType: hard + +"hast-util-whitespace@npm:^3.0.0": + version: 3.0.0 + resolution: "hast-util-whitespace@npm:3.0.0" + dependencies: + "@types/hast": "npm:^3.0.0" + checksum: 10/8c7e9eeb8131fc18702f3a42623eb6b0b09d470347aa8badacac70e6d91f79657ab8c6b57c4c6fee3658cff405fac30e816d1cdfb3ed1fbf6045d0a4555cf4d4 + languageName: node + linkType: hard + "html-escaper@npm:^2.0.0": version: 2.0.2 resolution: "html-escaper@npm:2.0.2" @@ -2011,6 +2149,13 @@ __metadata: languageName: node linkType: hard +"html-void-elements@npm:^3.0.0": + version: 3.0.0 + resolution: "html-void-elements@npm:3.0.0" + checksum: 10/59be397525465a7489028afa064c55763d9cccd1d7d9f630cca47137317f0e897a9ca26cef7e745e7cff1abc44260cfa407742b243a54261dfacd42230e94fce + languageName: node + linkType: hard + "http-cache-semantics@npm:^4.1.1": version: 4.1.1 resolution: "http-cache-semantics@npm:4.1.1" @@ -2891,6 +3036,23 @@ __metadata: languageName: node linkType: hard +"mdast-util-to-hast@npm:^13.0.0": + version: 13.2.0 + resolution: "mdast-util-to-hast@npm:13.2.0" + dependencies: + "@types/hast": "npm:^3.0.0" + "@types/mdast": "npm:^4.0.0" + "@ungap/structured-clone": "npm:^1.0.0" + devlop: "npm:^1.0.0" + micromark-util-sanitize-uri: "npm:^2.0.0" + trim-lines: "npm:^3.0.0" + unist-util-position: "npm:^5.0.0" + unist-util-visit: "npm:^5.0.0" + vfile: "npm:^6.0.0" + checksum: 10/b17ee338f843af31a1c7a2ebf0df6f0b41c9380b7119a63ab521d271df665456578e1234bb7617883e8d860fe878038dcf2b76ab2f21e0f7451215a096d26cce + languageName: node + linkType: hard + "mdurl@npm:^2.0.0": version: 2.0.0 resolution: "mdurl@npm:2.0.0" @@ -2905,6 +3067,48 @@ __metadata: languageName: node linkType: hard +"micromark-util-character@npm:^2.0.0": + version: 2.1.0 + resolution: "micromark-util-character@npm:2.1.0" + dependencies: + micromark-util-symbol: "npm:^2.0.0" + micromark-util-types: "npm:^2.0.0" + checksum: 10/089fe853c2bede2a48fd73d977910fa657c3cf6649eddcd300557a975c6c7f1c73030d01724a483ff1dc69a0d3ac28b43b2ba4210f5ea6414807cdcd0c2fa63c + languageName: node + linkType: hard + +"micromark-util-encode@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-encode@npm:2.0.0" + checksum: 10/853a3f33fce72aaf4ffa60b7f2b6fcfca40b270b3466e1b96561b02185d2bd8c01dd7948bc31a24ac014f4cc854e545ca9a8e9cf7ea46262f9d24c9e88551c66 + languageName: node + linkType: hard + +"micromark-util-sanitize-uri@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-sanitize-uri@npm:2.0.0" + dependencies: + micromark-util-character: "npm:^2.0.0" + micromark-util-encode: "npm:^2.0.0" + micromark-util-symbol: "npm:^2.0.0" + checksum: 10/7d10622f5a2bb058dda6d2e95b2735c43fdf8daa4f88a0863bc90eef6598f8e10e3df98e034341fcbc090d8021c53501308c463c49d3fe91f41eb64b5bf2766e + languageName: node + linkType: hard + +"micromark-util-symbol@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-symbol@npm:2.0.0" + checksum: 10/8c662644c326b384f02a5269974d843d400930cf6f5d6a8e6db1743fc8933f5ecc125b4203ad4ebca25447f5d23eb7e5bf1f75af34570c3fdd925cb618752fcd + languageName: node + linkType: hard + +"micromark-util-types@npm:^2.0.0": + version: 2.0.0 + resolution: "micromark-util-types@npm:2.0.0" + checksum: 10/b88e0eefd4b7c8d86b54dbf4ed0094ef56a3b0c7774d040bd5c8146b8e4e05b1026bbf1cd9308c8fcd05ecdc0784507680c8cee9888a4d3c550e6e574f7aef62 + languageName: node + linkType: hard + "micromatch@npm:^4.0.4": version: 4.0.7 resolution: "micromatch@npm:4.0.7" @@ -3105,14 +3309,14 @@ __metadata: "@napi-rs/cli": "npm:^2.18.4" "@types/chance": "npm:^1.1.6" "@types/jest": "npm:^29.5.12" - "@types/node": "npm:^22.5.3" + "@types/node": "npm:^22.5.4" chance: "npm:^1.1.12" jest: "npm:^29.7.0" source-map-support: "npm:^0.5.21" ts-jest: "npm:^29.2.5" ts-node: "npm:^10.9.2" - typedoc: "npm:^0.26.6" - typescript: "npm:5.5.4" + typedoc: "npm:^0.26.7" + typescript: "npm:5.6.2" languageName: unknown linkType: soft @@ -3161,6 +3365,13 @@ __metadata: languageName: node linkType: hard +"oniguruma-to-js@npm:0.3.3": + version: 0.3.3 + resolution: "oniguruma-to-js@npm:0.3.3" + checksum: 10/1f71b7a8955734edf7eeae154f1bb4bba259874d5e927e068e3d61f071b29c45611fb14d106ee9333d06529e5c4709bb3154096263dd4c850a254ca4fec3a926 + languageName: node + linkType: hard + "p-limit@npm:^2.2.0": version: 2.3.0 resolution: "p-limit@npm:2.3.0" @@ -3329,6 +3540,13 @@ __metadata: languageName: node linkType: hard +"property-information@npm:^6.0.0": + version: 6.5.0 + resolution: "property-information@npm:6.5.0" + checksum: 10/fced94f3a09bf651ad1824d1bdc8980428e3e480e6d01e98df6babe2cc9d45a1c52eee9a7736d2006958f9b394eb5964dedd37e23038086ddc143fc2fd5e426c + languageName: node + linkType: hard + "punycode.js@npm:^2.3.1": version: 2.3.1 resolution: "punycode.js@npm:2.3.1" @@ -3357,6 +3575,13 @@ __metadata: languageName: node linkType: hard +"regex@npm:4.3.2": + version: 4.3.2 + resolution: "regex@npm:4.3.2" + checksum: 10/0e82f5639080a4d34831f7c37838958c238e1f8068f1c14777d220da47822b062510e8e4a84fc97e73e8b246cec8caf94f3130a8fd4ed3bf94aa1c9a4dbdf12a + languageName: node + linkType: hard + "require-directory@npm:^2.1.1": version: 2.1.1 resolution: "require-directory@npm:2.1.1" @@ -3470,13 +3695,15 @@ __metadata: languageName: node linkType: hard -"shiki@npm:^1.9.1": - version: 1.10.3 - resolution: "shiki@npm:1.10.3" +"shiki@npm:^1.16.2": + version: 1.17.0 + resolution: "shiki@npm:1.17.0" dependencies: - "@shikijs/core": "npm:1.10.3" + "@shikijs/core": "npm:1.17.0" + "@shikijs/types": "npm:1.17.0" + "@shikijs/vscode-textmate": "npm:^9.2.2" "@types/hast": "npm:^3.0.4" - checksum: 10/3ea852e944f4eced8d1df395f9ca24cd686d4f2fe00043a2450d89b878dc86f3ad8cb5f7d71fd31213228f58b1d8c618df26741bfd19676542072d1e12c9d05e + checksum: 10/923413f9e3cf070a2fcca1b89f2f18363fc393ea0b9438ea8d5da17900a19ba8a87c19c341b51bb788af6a8df541c845d779d4e7379f4509c67c40d65bc000b1 languageName: node linkType: hard @@ -3563,6 +3790,13 @@ __metadata: languageName: node linkType: hard +"space-separated-tokens@npm:^2.0.0": + version: 2.0.2 + resolution: "space-separated-tokens@npm:2.0.2" + checksum: 10/202e97d7ca1ba0758a0aa4fe226ff98142073bcceeff2da3aad037968878552c3bbce3b3231970025375bbba5aee00c5b8206eda408da837ab2dc9c0f26be990 + languageName: node + linkType: hard + "sprintf-js@npm:^1.1.3": version: 1.1.3 resolution: "sprintf-js@npm:1.1.3" @@ -3627,6 +3861,16 @@ __metadata: languageName: node linkType: hard +"stringify-entities@npm:^4.0.0": + version: 4.0.4 + resolution: "stringify-entities@npm:4.0.4" + dependencies: + character-entities-html4: "npm:^2.0.0" + character-entities-legacy: "npm:^3.0.0" + checksum: 10/42bd2f37528795a7b4386bd39dc4699515fb0f0b8c418a6bb29ae205ce66eaff9e8801a2bee65b8049c918c9475a71c7e5911f6a88c19f1d84ebdcba3d881a2d + languageName: node + linkType: hard + "strip-ansi-cjs@npm:strip-ansi@^6.0.1, strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": version: 6.0.1 resolution: "strip-ansi@npm:6.0.1" @@ -3748,6 +3992,13 @@ __metadata: languageName: node linkType: hard +"trim-lines@npm:^3.0.0": + version: 3.0.1 + resolution: "trim-lines@npm:3.0.1" + checksum: 10/7a1325e4ce8ff7e9e52007600e9c9862a166d0db1f1cf0c9357e359e410acab1278fcd91cc279dfa5123fc37b69f080de02f471e91dbbc61b155b9ca92597929 + languageName: node + linkType: hard + "ts-jest@npm:^29.2.5": version: 29.2.5 resolution: "ts-jest@npm:29.2.5" @@ -3837,40 +4088,40 @@ __metadata: languageName: node linkType: hard -"typedoc@npm:^0.26.6": - version: 0.26.6 - resolution: "typedoc@npm:0.26.6" +"typedoc@npm:^0.26.7": + version: 0.26.7 + resolution: "typedoc@npm:0.26.7" dependencies: lunr: "npm:^2.3.9" markdown-it: "npm:^14.1.0" minimatch: "npm:^9.0.5" - shiki: "npm:^1.9.1" - yaml: "npm:^2.4.5" + shiki: "npm:^1.16.2" + yaml: "npm:^2.5.1" peerDependencies: - typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x + typescript: 4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x bin: typedoc: bin/typedoc - checksum: 10/ae8dc99d2d1e45350d8117238e44a288a1b1272c499e14285f0778855139876325ff8f46ef8a9efac33356dee1853e467d4018edacad1e77cb2065294b9ab120 + checksum: 10/1b8ff53fa108fec664af5497c7a11d72074f6e58e7bac7e3e884a8ee9173b38efad50e67df7d961830e218af58429760bfe464739a9e26b03e1c0d3937d5424d languageName: node linkType: hard -"typescript@npm:5.5.4": - version: 5.5.4 - resolution: "typescript@npm:5.5.4" +"typescript@npm:5.6.2": + version: 5.6.2 + resolution: "typescript@npm:5.6.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/1689ccafef894825481fc3d856b4834ba3cc185a9c2878f3c76a9a1ef81af04194849840f3c69e7961e2312771471bb3b460ca92561e1d87599b26c37d0ffb6f + checksum: 10/f95365d4898f357823e93d334ecda9fcade54f009b397c7d05b7621cd9e865981033cf89ccde0f3e3a7b73b1fdbae18e92bc77db237b43e912f053fef0f9a53b languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.5.4#optional!builtin": - version: 5.5.4 - resolution: "typescript@patch:typescript@npm%3A5.5.4#optional!builtin::version=5.5.4&hash=379a07" +"typescript@patch:typescript@npm%3A5.6.2#optional!builtin": + version: 5.6.2 + resolution: "typescript@patch:typescript@npm%3A5.6.2#optional!builtin::version=5.6.2&hash=8c6c40" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 10/746fdd0865c5ce4f15e494c57ede03a9e12ede59cfdb40da3a281807853fe63b00ef1c912d7222143499aa82f18b8b472baa1830df8804746d09b55f6cf5b1cc + checksum: 10/8bfc7ca0d9feca4c3fcbd6c70741abfcd714197d6448e68225ae71e462447d904d3bfba49759a8fbe4956d87f054e2d346833c8349c222daa594a2626d4e1be8 languageName: node linkType: hard @@ -3913,6 +4164,54 @@ __metadata: languageName: node linkType: hard +"unist-util-is@npm:^6.0.0": + version: 6.0.0 + resolution: "unist-util-is@npm:6.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/edd6a93fb2255addf4b9eeb304c1da63c62179aef793169dd64ab955cf2f6814885fe25f95f8105893e3562dead348af535718d7a84333826e0491c04bf42511 + languageName: node + linkType: hard + +"unist-util-position@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-position@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/89d4da00e74618d7562ac7ac288961df9bcd4ccca6df3b5a90650f018eceb6b95de6e771e88bdbef46cc9d96861d456abe57b7ad1108921e0feb67c6292aa29d + languageName: node + linkType: hard + +"unist-util-stringify-position@npm:^4.0.0": + version: 4.0.0 + resolution: "unist-util-stringify-position@npm:4.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + checksum: 10/d15c88aca7a31902d95d5b5355bbe09583cf6f6ff6e59e134ef76c76d3c30bc1021f2d7ea5b7897c6d0858ed5f3770c1b19de9c78274f50d72f95a0d05f1af71 + languageName: node + linkType: hard + +"unist-util-visit-parents@npm:^6.0.0": + version: 6.0.1 + resolution: "unist-util-visit-parents@npm:6.0.1" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + checksum: 10/645b3cbc5e923bc692b1eb1a9ca17bffc5aabc25e6090ff3f1489bff8effd1890b28f7a09dc853cb6a7fa0da8581bfebc9b670a68b53c4c086cb9610dfd37701 + languageName: node + linkType: hard + +"unist-util-visit@npm:^5.0.0": + version: 5.0.0 + resolution: "unist-util-visit@npm:5.0.0" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-is: "npm:^6.0.0" + unist-util-visit-parents: "npm:^6.0.0" + checksum: 10/f2bbde23641e9ade7640358c06ddeec0f38342322eb8e7819d9ee380b0f859d25d084dde22bf63db0280b3b2f36575f15aa1d6c23acf276c91c2493cf799e3b0 + languageName: node + linkType: hard + "update-browserslist-db@npm:^1.1.0": version: 1.1.0 resolution: "update-browserslist-db@npm:1.1.0" @@ -3945,6 +4244,26 @@ __metadata: languageName: node linkType: hard +"vfile-message@npm:^4.0.0": + version: 4.0.2 + resolution: "vfile-message@npm:4.0.2" + dependencies: + "@types/unist": "npm:^3.0.0" + unist-util-stringify-position: "npm:^4.0.0" + checksum: 10/1a5a72bf4945a7103750a3001bd979088ce42f6a01efa8590e68b2425e1afc61ddc5c76f2d3c4a7053b40332b24c09982b68743223e99281158fe727135719fc + languageName: node + linkType: hard + +"vfile@npm:^6.0.0": + version: 6.0.3 + resolution: "vfile@npm:6.0.3" + dependencies: + "@types/unist": "npm:^3.0.0" + vfile-message: "npm:^4.0.0" + checksum: 10/a5a85293c9eb8787aa42e180edaef00c13199a493d6ed82fecf13ab29a68526850788e22434d77808ea6b17a74e03ff899b9b4711df5b9eee75afcddd7c2e1fb + languageName: node + linkType: hard + "walker@npm:^1.0.8": version: 1.0.8 resolution: "walker@npm:1.0.8" @@ -4036,12 +4355,12 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.4.5": - version: 2.4.5 - resolution: "yaml@npm:2.4.5" +"yaml@npm:^2.5.1": + version: 2.5.1 + resolution: "yaml@npm:2.5.1" bin: yaml: bin.mjs - checksum: 10/b09bf5a615a65276d433d76b8e34ad6b4c0320b85eb3f1a39da132c61ae6e2ff34eff4624e6458d96d49566c93cf43408ba5e568218293a8c6541a2006883f64 + checksum: 10/0eecb679db75ea6a989ad97715a9fa5d946972945aa6aa7d2175bca66c213b5564502ccb1cdd04b1bf816ee38b5c43e4e2fda3ff6f5e09da24dabb51ae92c57d languageName: node linkType: hard @@ -4080,3 +4399,10 @@ __metadata: checksum: 10/f77b3d8d00310def622123df93d4ee654fc6a0096182af8bd60679ddcdfb3474c56c6c7190817c84a2785648cdee9d721c0154eb45698c62176c322fb46fc700 languageName: node linkType: hard + +"zwitch@npm:^2.0.4": + version: 2.0.4 + resolution: "zwitch@npm:2.0.4" + checksum: 10/f22ec5fc2d5f02c423c93d35cdfa83573a3a3bd98c66b927c368ea4d0e7252a500df2a90a6b45522be536a96a73404393c958e945fdba95e6832c200791702b6 + languageName: node + linkType: hard