* chore: replace `js_str` with `js_string`
* chore: replace `boolean`'s `to_string` with literal
* chore: remove unnecessary `to_string`
* chore: fix lint and format
* chore: add feature gate to import `js_str`
* chore: change `get_typed_fn`'s name to `JsString`
* chore: replace js_str with js_string(cli)
* chore: replace js_str with js_string(`try_into_js`)
* chore: replace js_str with js_string(`Console`)
* chore: fix lint
* perf: use more efficient `LazyLock` on `RAW_STATICS_CACHE`
* chore: move `js_str` together with other imports
* `TryFromJs` from `JsMap` for `HashMap` & `BtreeMap`
* fix `clippy` warn
* use `IteratorResult` instead of `as_object`
* `JsMap` impl `rust_for_each`
* fix: initial `JsMap` can be changed in `for_each`
* better naming
* use with_capacity to reduce allocations
* Update to use const generics over runtime param
* add comment above with_capacity
* - move OWN_PROPS
- add profiling marks in more places
* use const in trait instead
* #3874: `TryIntoJs` impl for primitive types
* #3874: `#[derive(TryIntoJs)]`
is it ok to use `create_data_property_or_throw`?
in other words, am I create an object correctly?
* #3874: some (but not enough) tests
* #3874: fix `TryintoJs` derive bug in multi attr case
* #3874: `TryIntoJs` derive macro example
* fix paths in derive macro
* make lint happy
* Add TryFromJs for TypedJsFunction and more tests
Includes adding TryFromJs for "()".
* Fix clippies and fmt
* Prettier
* Add From<TypedJsFunction> for JsValue to allow conversion
* Implement comments
* clippies
* Allow dead code for code that is newly detected as unused
* Fix compile errors with nightly rust
* Add missing SAFETY section
* Increase safety of `FutexWaiters`
* Add an "iter()" method to Js*Array for convenience
It might be optimizable, and in either case it should be but this at
least let people use an easy API and enjoy future improvements.
* Fix clippies
---------
Co-authored-by: Theo Paris <theo@tinted.dev>
Co-authored-by: José Julián Espina <julian.espina@canonical.com>
* Allow dead code for code that is newly detected as unused
* Fix compile errors with nightly rust
* Add missing SAFETY section
* Increase safety of `FutexWaiters`
---------
Co-authored-by: Theo Paris <theo@tinted.dev>
Co-authored-by: José Julián Espina <julian.espina@canonical.com>
* Build out partial functionality and with methods
* Use temporal_rs's TinyAsciiStr
* Apply review feedback for specification comments
* Bump temporal-rs and add DateTime::with
* Remove leftover eprintln from JsPromise::await_blocking
* Add clippy for denying print and eprints
And remove usage of println or allow them.
* Address comment
* Add more utility functions around modules and exports
* Use import instead of path
* clippies and fmt
* clippies and fmt
* Add JsPromise::await_blocking and remove ell_and_run
* Fix documentation CI job
* Split default icu data into lazily deserialized parts
* FIx no_std compilation
* Lazily load more ICU tools
* Fix regressions and use more stable constructors
* lazy builtins
* Bump temporal_rs to latest commit
* Fix build
* Begining of plainYearMonth methods
* plainYearMonth: get_in_leap_year, get_months_in_year
* plain_year_month: implement add/subtract
* Addition of MonthDay methods
* toString implementations
* some changes to migrate to FiniteF64
* - bump the temporal version
- Move with implementation to to_temporal_month_day
- review comments
* switch to using as_inner() instead of from
Also use let _ to appease new clippy rules
* get the calendarID from the object
* update temporal ref
* Revert "lazy builtins"
This reverts commit a4e602d129.
* changes from review comments
---------
Co-authored-by: jedel1043 <jedel0124@gmail.com>
* feat: add a way to create `JsString` from ASCII literal
* chore: add todo comment to change `DUMMY_RAW_JS_STRING` to constant
* chore: make `ORIGINAL_JS_STR` a static reference to reduce binary size
* chore: replace `static` to `const` and simplify the code
* chore: add generic parameters to `transmute`
* chore: try to use union to represent
* chore: make miri happy
* Optimize const accesses for static strings
* perf: set LITERAL a constant reference to avoid duplication on data segment
* chore: add comments
* chore: add comments
* chore : fix `refcount` test
* chore: remove unnessnary assertion
* chore: modify definition of `JsString::is_static`
* chore: add more tests
* chore: mark `StaticJsString` as `repr[C]`
* chore: improve comment
* chore: Mark `TaggedLen` as `repr(transparent)`
---------
Co-authored-by: jedel1043 <jedel0124@gmail.com>
* Update length and builtin properties
* Split tags and names as two different statics
* Missed YearMonth and MonthDay length
* Fix length on some methods
* Missed one length
* cargo fmt
* Add a js_error! macro to create opaque errors
And as a bonus since I needed it, simplify comparison of strings
and add PartialEq<&str> for JsString.
* Add PartialEq<str> for JsStr. PartialEq<&str> uses the other
* Cargo clippy
* Remove conversion of non-string literals and remove From<String> for JsValue
* Updates to temporal_rs version and temporal methods
* Apply review feedback for relativeTo
* Forgot Date.prototype.toPlainDateTime
* Fix doc on toPlainDateTime