Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): expose internals instead of unstable_derive #2911

Merged
merged 75 commits into from
Feb 11, 2025
Merged
Changes from 1 commit
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
3d9e9a1
wip: expose internal functions
dai-shi Jan 6, 2025
d55b6dd
rename
dai-shi Jan 6, 2025
9283afa
tests following the change
dai-shi Jan 6, 2025
ff4c781
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Jan 7, 2025
b213c26
separate internals entrypoint
dai-shi Jan 7, 2025
ac27625
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Jan 7, 2025
4a1df34
fix entries
dai-shi Jan 7, 2025
57f9118
fix for umd, still wip
dai-shi Jan 7, 2025
fbc8c00
revert them
dai-shi Jan 7, 2025
f130ff6
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Jan 7, 2025
9f2c365
revert changes
dai-shi Jan 31, 2025
70e4ce3
rename readme
dai-shi Jan 31, 2025
7ced5ee
internals entry point
dai-shi Jan 31, 2025
9a699e7
impl
dai-shi Jan 31, 2025
7fc5ab8
fix store test
dai-shi Jan 31, 2025
0bf127b
derive test
dai-shi Jan 31, 2025
b3de0f6
effect test
dai-shi Jan 31, 2025
c305032
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Jan 31, 2025
5d7a6e5
fix rollup config
dai-shi Jan 31, 2025
e2843c4
hack types
dai-shi Jan 31, 2025
9a5d858
fix workflow files
dai-shi Jan 31, 2025
9e2aa4e
fix workflow files again
dai-shi Jan 31, 2025
cc9e9a3
hack types again
dai-shi Jan 31, 2025
e91ad45
fix rollup config
dai-shi Jan 31, 2025
a1469ed
ts ignore
dai-shi Jan 31, 2025
864c729
tried this?
dai-shi Jan 31, 2025
bf415ca
test: rename
dai-shi Jan 31, 2025
a99c26a
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Feb 1, 2025
a260090
follow the change
dai-shi Feb 1, 2025
459d3b2
I think this is unnecessary
dai-shi Feb 1, 2025
d93e1d6
fix AtomState type
dai-shi Feb 1, 2025
7c24bf6
do not enumerate secret methods
dai-shi Feb 1, 2025
7ba841f
even better
dmaskasky Feb 1, 2025
5851f05
refactor
dai-shi Feb 1, 2025
efefa2b
another refactor
dai-shi Feb 1, 2025
48eb389
wip: building-block functions
dai-shi Feb 2, 2025
1ac1b06
give up scope tests for now
dai-shi Feb 2, 2025
d235a13
some more refactors
dai-shi Feb 2, 2025
a1ae1fe
fix workflow file
dai-shi Feb 2, 2025
3b8bd2d
use symbol instead of weakmap for cancelable promise
dai-shi Feb 2, 2025
bb832a4
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Feb 2, 2025
8083c4d
fix typo
dai-shi Feb 2, 2025
cf34f12
expose util and tentative functions
dai-shi Feb 2, 2025
0362b0d
does this fix?
dai-shi Feb 2, 2025
1c7a3e8
catch error from f hook
dai-shi Feb 2, 2025
485f359
only keeps one error
dai-shi Feb 2, 2025
f3a5726
do we want to support falsy errors?
dai-shi Feb 2, 2025
67a25c7
going back the circle
dai-shi Feb 2, 2025
5fe86d8
store hook for atoms util
dai-shi Feb 2, 2025
dbd7968
does this help?
dai-shi Feb 2, 2025
6de8f25
for ts3.9
dai-shi Feb 2, 2025
f314579
store hooks tweaks (#2969)
dmaskasky Feb 3, 2025
16cd2aa
make it work with node 18
dai-shi Feb 3, 2025
1136ba6
refactor(internals): isolated mounted map in store (#2967)
dai-shi Feb 3, 2025
4b7b579
rev4 compatibility
dai-shi Feb 3, 2025
74b5c9f
a silly mistake
dai-shi Feb 3, 2025
7aaf1a9
storeHooks minor improvement (#2970)
dmaskasky Feb 3, 2025
c967e7c
refactor(internals): store state in store args (#2972)
dai-shi Feb 4, 2025
40558a6
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Feb 4, 2025
014a377
export internal types
dai-shi Feb 4, 2025
78e5ed7
simplify types
dai-shi Feb 4, 2025
80f0472
prefer readonly modifier
dai-shi Feb 4, 2025
81ffc49
expose building blocks
dmaskasky Feb 4, 2025
b24ad70
elminate store args
dai-shi Feb 5, 2025
ca35233
expose building blocks (#2974)
dmaskasky Feb 5, 2025
46512c2
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Feb 5, 2025
67963d9
comments
dai-shi Feb 5, 2025
76b5422
customizable building blocks
dai-shi Feb 6, 2025
7c89ea0
ts hack
dai-shi Feb 6, 2025
9c1dfb9
ts hack 2
dai-shi Feb 6, 2025
3107164
Merge branch 'main' into feat/core/expose-internals-instead-of-derive
dai-shi Feb 6, 2025
a0b02fc
minor change
dai-shi Feb 6, 2025
62f50b8
nice to remove !
dai-shi Feb 6, 2025
242f6eb
refactor
dai-shi Feb 6, 2025
4bd935a
full building blocks (#2977)
dmaskasky Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix workflow files
  • Loading branch information
dai-shi committed Jan 31, 2025
commit 9a5d8582601af33744e2b0642d98883c9d0ce3ce
3 changes: 3 additions & 0 deletions .github/workflows/test-multiple-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ jobs:
sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\1.js')/" vitest.config.mts
sed -i~ "s/import { useResetAtom } from 'jotai\/react\/utils'/const { useResetAtom } = require('..\/..\/..\/dist\/react\/utils.js')/" tests/react/utils/useResetAtom.test.tsx
sed -i~ "s/import { RESET, atomWithReducer, atomWithReset } from 'jotai\/vanilla\/utils'/const { RESET, atomWithReducer, atomWithReset } = require('..\/..\/..\/dist\/vanilla\/utils.js')/" tests/react/utils/useResetAtom.test.tsx
perl -i~ -0777 -pe "s/import {[^}]+} from 'jotai\/vanilla\/internals'/const { INTERNAL_buildStore, INTERNAL_getSecretStoreMethods } = require('..\/..\/dist\/vanilla\/internals.js')/g" tests/vanilla/derive.test.tsx tests/vanilla/effect.test.ts
- name: Patch for ESM
if: ${{ matrix.build == 'esm' }}
run: |
Expand All @@ -55,6 +56,8 @@ jobs:
run: |
sed -i~ "s/resolve('\.\/src\(.*\)\.ts')/resolve('\.\/dist\/umd\1.${NODE_ENV}.js')/" vitest.config.mts
rm tests/react/utils/useResetAtom.test.tsx # FIXME we skip this for now. Actually I'm not sure if we really run tests with UMD build
rm tests/vanilla/derive.test.tsx # FIXME we skip this for now. Actually I'm not sure if we really run tests with UMD build
rm tests/vanilla/effect.test.ts # FIXME we skip this for now. Actually I'm not sure if we really run tests with UMD build
env:
NODE_ENV: ${{ matrix.env }}
- name: Patch for SystemJS
Expand Down
Loading