Commit Graph

42 Commits

Author SHA1 Message Date
染陌同学 bbeeaf5d2b
fix: fix svg for transform (#6987)
* fix: fix svg for transform

* fix: modify transformProps

* fix: hasOwnProperty

* test: modify test

* fix: fix property transform

* feat: support svg for compat

* feat: remove need tranform

* Change the version type from patch to minor in the changeset file

---------

Co-authored-by: Keith <mrgitservice@outlook.com>
2025-03-13 15:57:31 +08:00
linbudu599 065e68d59c fix(rax-compat): fixup tests 2024-05-21 10:40:01 +08:00
linbudu599 fdcb3655ec feat(rax-compat): add test cases 2024-05-10 10:13:51 +08:00
linbudu599 d29ac1c042 feat: complete tests 2024-01-02 17:06:20 +08:00
ZeroLing b70bba1efd
Refactor/rax compat (#6493)
* refactor: rax compat

1. update @swc/helpers version to latest.
2. relplace create react class with simple impl.

* test: add specs for createReactClass

* chore: rename to createReactClass
2023-09-11 10:53:58 +08:00
Gao Yang 7a5cd06ceb
feat: shared (#6232)
* feat: shared

* style: optimise

* test: shared

* refactor: shared

* chore: changeset

* refactor: import statement

* fix: React not defined

---------

Co-authored-by: ZeroLing <i@zeroling.com>
2023-05-17 18:19:28 +08:00
水澜 41be75ff23
fix: rax compat state (#6166)
* fix: state not update error

* fix: forwardRef with defaultProps

* fix: get latest eagerState in useCallback

* fix: lint

* fix: lint

* chore: add changeset

* test: rax-compat useCallback

* fix: test

* fix: lint

---------

Co-authored-by: soar.gy <soar.gy@alibaba-inc.com>
2023-05-01 23:46:25 +08:00
染陌同学 2debc7f700
Fix/rax compat appear (#6076)
* fix: appear should not work on component

* test: add test for appear of component

* feat: modify Dom to DOM

* test: remove consol

* chore: modify major to minor
2023-03-20 14:08:06 +08:00
ZeroLing 8cfdfd96c3
fix: useState parameter initialState can be function, which should be… (#6033)
* fix: useState parameter initialState can be function, which should be self executed when initilzing

* test: useState can be function

---------

Co-authored-by: answershuto <answershuto@gmail.com>
2023-03-09 03:52:43 -08:00
ZeroLing f46241fe75
Fix/compat rax element (#5847)
* fix: dynamic import works in app.tsx

* fix: test case

* chore: update depenedency version of @ice/webpack-config

* refactor: rax-compat jsx-runtime

* chore: add CHANGELOG and update version of rax-compat

* chore: pnpm lock up-to-date

* fix: puppteer update
2023-02-01 23:12:21 -08:00
染陌同学 37b4df9efa
Fix/fix ref input compat (#5605)
* feat: use forwardRef to forwarding ref

* chore: update version

* test: add test for ref of inputCompat

* fix: forwardref should wrapped to InputCompat avoid to refresh dom
2022-11-22 04:02:04 -08:00
hzyhbk 4d55b983f4
fix: rax-compat usestate bug (#5567)
* fix: rax-compat usestate bug

* test: add test
2022-11-16 22:23:59 -08:00
染陌同学 36475937e8 Feat/define data loader (#643)
* feat: modify dataLoader

* feat: add type

* feat: add DataLoaderConfig

* feat: modify getData to defineDataLoader

* chore: remove defineDataLoader

* fix: fetcher shoule return promise

* fix: loader may be undefined

* fix: err loader config

* chore: modify example of pha

* feat: modify getData

* chore: modify type and mofiy options of init

* feat: modify fetcher to dataLoaderFetcher and add dataLoaderImport to entry

* chore: modify defaultDataLoaderFetcher

* chore: load data by route id

* feat: modify serverDataLoader and staticDataLoader

* feat: add fetcher when route change

* fix: deal with window undefined

* chore: modify type

* feat: try get data from cache

* feat: support useData

* feat: add defineStaticDataLoader and defineServerDataLoader

* chore: modify getData of example

* fix: should load data

* fix: fix ssg err

* fix: fix dataloader for ssg

* test: modify env of test

* fix: shoule clear cache when route changed

* fix: fix renderMode and add defult remder mode

* fix: add window

* test: add jsdom

* test: modify getData to dataLoader

* test: modify test of clientApp

* test: clear window after each test

* test: remove only

* test: remove only

* chore: modify appear

* fix: Try get data from cache when CSR

* chore: update lock

* chore: remove unused

* refactor: data loader (#685)

* refactor: set global fetcher

* refactor: set global fetcher

* fix: should not build react in data loader

* fix: test

* test: modify test

Co-authored-by: 水澜 <shuilan.cj@taobao.com>
Co-authored-by: ZeroLing <i@zeroling.com>
2022-11-15 10:33:11 +08:00
染陌同学 bb75385bdf Feat/compat props (#540)
* feat: add possibleStandardNames

* chore: remove transform maxlength from createElement

* chore: modify version of package

* feat: select part of possibleStandardNames

* test: add test for transfrom props

* chore: dealwith warning
2022-11-15 10:32:43 +08:00
染陌同学 147876fbec Fix/input onchange (#507)
* fix: fix input onchange is invalid

* fix: onChange event is SyntheticEvent in React but it is dom event in Rax

* fix: prevent INPUT from being created repeatedly

* fix: should update value when props update

* test: add test for input value

* chore: update version

* test: add test for inputElement should not recreate when update props

* feat: modify useCallback

* test: add test for onchange

* feat: modify useCallback

* fix: usecallback should not use in createElement

* chore: remove line

* chore: remove onChange

* chore: dealwith lint

* chore: modify transformPrototypes to transformPrototype
2022-11-15 10:30:56 +08:00
ClarkXia ad531405a8 test: improve test case (#497)
* test: improve test case

* test: compat win32

* test: test case

* test: add test case

* test: add test case

* test: test case for rax-compat

* test: test case for routes

* fix: types error

* fix: to strict equal

* chore: remove unused props

* fix: types

* test: test case for run client app

* chore: remove empty router

* test: test case of run server app

* chore: remove log

* chore: do not remove file by test case

* fix: remove document dependency when run client app

* chore: lint

* chore: remove config

* fix: lint

* chore: lint warning

* fix: test case

* chore: update unplugin
2022-11-15 10:30:52 +08:00
染陌同学 910c534f07 Feat/support event transform (#496)
* feat: add events to transform event

* feat: add events

* feat: support transform event

* chore: delete events file

* feat: modify transformPrototypes

* test: add test for onclick

* test: add test for events

* chore: update version

* chore: add CHANGELOG

* chore: update CHANGELOG
2022-11-15 10:30:37 +08:00
染陌同学 d2c502596b Feat/compat maxlength (#448)
* feat: compat maxlength

* test: add test for maxlength

* feat: move maxlength to createInputCompat
2022-11-15 10:27:18 +08:00
answershuto e9fb828c71 test: modify test 2022-11-15 10:22:42 +08:00
answershuto 6f97b5dd80 feat: compat value of rax 2022-11-15 10:22:42 +08:00
ClarkXia 48603cdf8f feat: support swc options for plugin-rax-compat and onappear on rax-compat (#349)
* feat: support swc options for plugin-rax-compat

* chore: example

* test: fix test case

* test: fix test case

* test: fix test case

* fix: outputdir

* fix: onappear for no ref cases

* fix: merge options

* fix: appear polyfill

* chore: remove appear polyfill dependency

* fix: add swc helpers

* fix: onappear on rax-compat

* refactor: format code and not to use react.frowardRef

Co-authored-by: ZeroLing <zhuoling.lcl@alibaba-inc.com>
2022-11-14 19:55:00 +08:00
answershuto 69d1f8c997 test: modify .only 2022-11-14 19:53:28 +08:00
answershuto 057d2e78ab test: add test for shared 2022-11-14 19:52:11 +08:00
answershuto c8b2fe9493 test: add test for useState 2022-11-14 19:51:45 +08:00
answershuto 7178a55935 test: add test for createElement 2022-11-14 19:47:43 +08:00
answershuto 8010566506 test: add test for onAppear 2022-11-14 19:47:43 +08:00
answershuto 9781b78148 chore: remove unuse import 2022-11-14 19:47:43 +08:00
answershuto aee7e1c6ef test: Children should be imported from rax-compat 2022-11-14 19:46:59 +08:00
answershuto 61c28f3f09 chore: remove unuse impoty 2022-11-14 19:45:58 +08:00
answershuto 5107129fd4 test: add test for isValidElement 2022-11-14 19:44:08 +08:00
answershuto 824388d3b0 test: add test to hooks 2022-11-14 19:44:08 +08:00
answershuto 75cd6e0add test: add test of fragment 2022-11-14 19:44:08 +08:00
answershuto b13352c0e2 test: add test of findDomNode 2022-11-14 19:44:08 +08:00
answershuto a56494012b test: modify test of createElement 2022-11-14 19:44:04 +08:00
answershuto 565e0c5d64 test: modify render test 2022-11-14 19:44:04 +08:00
answershuto 7fef1cd2f0 test: remove query 2022-11-14 19:44:04 +08:00
answershuto f895275c94 test: modify createPortal 2022-11-14 19:44:04 +08:00
answershuto ada3ffc530 test: add test for createElement 2022-11-14 19:44:04 +08:00
answershuto c354fab652 test: add toArray and only test for React.children 2022-11-14 19:44:04 +08:00
answershuto 22d2b5e4a6 test: add test for React.children 2022-11-14 19:44:04 +08:00
answershuto 008fa7ddae test: modify id 2022-11-14 19:43:16 +08:00
answershuto 748f450f6c test: add test for rax compat 2022-11-14 19:43:16 +08:00