Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(core): expose internals instead of unstable_derive (#2911)
* wip: expose internal functions * rename * tests following the change * separate internals entrypoint * fix entries * fix for umd, still wip * revert them * revert changes * rename readme * internals entry point * impl * fix store test * derive test * effect test * fix rollup config * hack types * fix workflow files * fix workflow files again * hack types again * fix rollup config * ts ignore * tried this? * test: rename * follow the change * I think this is unnecessary * fix AtomState type * do not enumerate secret methods * even better * refactor * another refactor * wip: building-block functions * give up scope tests for now * some more refactors * fix workflow file * use symbol instead of weakmap for cancelable promise * fix typo * expose util and tentative functions * does this fix? * catch error from f hook * only keeps one error * do we want to support falsy errors? * going back the circle * store hook for atoms util * does this help? * for ts3.9 * store hooks tweaks (#2969) * lazy assign store hooks internally * initializeStoreHooks * make it work with node 18 * refactor(internals): isolated mounted map in store (#2967) * refactor(internals): isolated mounted map in store * give up derive test * rev4 compatibility * a silly mistake * storeHooks minor improvement (#2970) * storeHooks: return delete function from add * Update src/vanilla/internals.ts --------- Co-authored-by: Daishi Kato <dai-shi@users.noreply.github.com> * refactor(internals): store state in store args (#2972) * refactor(internals): atomStateMap in storeState * store args for everything and create building blocks * createStoreArgs * refactor * refactor and type * export internal types * simplify types * prefer readonly modifier * expose building blocks * elminate store args * expose building blocks (#2974) * expose building blocks * elminate store args * move top-level functions to createBuildingBlocks and add some organization * tweak createBuildingBlocks * update store and tests invocation of INTERNAL_createBuildingBlocks * fix lint and decomposition * refactor(internals): simplify building blocks --------- Co-authored-by: daishi <daishi@axlight.com> * comments * customizable building blocks * ts hack * ts hack 2 * minor change * nice to remove ! * refactor * full building blocks (#2977) * return a complete building blocks array * return mutable building blocks * revert to default function argument style --------- Co-authored-by: daishi <daishi@axlight.com> --------- Co-authored-by: David Maskasky <dmaskasky@gmail.com>
- Loading branch information