Skip to content

Commit f48801d

Browse files
committed
Fix to compile again
1 parent 231514b commit f48801d

File tree

7 files changed

+92
-53
lines changed

7 files changed

+92
-53
lines changed

.github/CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,54 +16,54 @@ Fork, then clone the repo:
1616
git clone https://github.com/your-username/stylex.git
1717
```
1818

19-
Make sure you have npm@>=7 and node@>=16 installed. Then install the package
19+
Make sure you have [email protected] and node@>=16 installed. Then install the package
2020
dependencies:
2121

2222
```
23-
npm install
23+
yarn install
2424
```
2525

2626
## Automated tests
2727

2828
To run the linter:
2929

3030
```
31-
npm run lint
31+
yarn lint
3232
```
3333

3434
To run flow:
3535

3636
```
37-
npm run flow
37+
yarn flow
3838
```
3939

4040
## Compile and build
4141

4242
To compile the source code:
4343

4444
```
45-
npm run build
45+
yarn build
4646
```
4747

4848
To run all the tests (will build automatically):
4949

5050
```
51-
npm run test
51+
yarn test
5252
```
5353

5454
…in watch mode (will build only once):
5555

5656
```
57-
npm run test -- --watch
57+
yarn test --watch
5858
```
5959

6060
## Documentation
6161

62-
If necessary, first build the StyleX packages (`npm run build`), then start the
62+
If necessary, first build the StyleX packages (`yarn build`), then start the
6363
docs locally:
6464

6565
```
66-
npm run start -w docs
66+
yarn workspace docs start
6767
```
6868

6969
### New Features
@@ -81,7 +81,7 @@ want to accept.
8181
1. Fork the repository and create your branch from `main`.
8282
2. If you've added code that should be tested, add tests!
8383
3. If you've changed APIs, update the documentation.
84-
4. Ensure the tests pass (`npm run test`).
84+
4. Ensure the tests pass (`yarn test`).
8585

8686
You can now submit a pull request, referencing any issues it addresses.
8787

.github/workflows/benchmarks.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ jobs:
1212
- uses: actions/setup-node@v4
1313
with:
1414
node-version: '22.x'
15+
cache: 'yarn'
16+
cache-dependency-path: yarn.lock
17+
- run: corepack prepare [email protected] --activate
1518
- name: 'Setup temporary files'
1619
run: |
1720
echo "BASE_JSON=$(mktemp)" >> $GITHUB_ENV
@@ -20,8 +23,8 @@ jobs:
2023
run: |
2124
git checkout -f ${{ github.event.pull_request.base.sha }}
2225
git clean -fdx
23-
npm install --loglevel error
24-
if npm run perf -w benchmarks -- -o ${{ env.BASE_JSON }}; then
26+
yarn install --frozen-lockfile --silent
27+
if yarn workspace benchmarks run perf -- -o ${{ env.BASE_JSON }}; then
2528
echo "Ran successfully on base branch"
2629
else
2730
echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default
@@ -31,14 +34,14 @@ jobs:
3134
run: |
3235
git checkout -f ${{ github.event.pull_request.head.sha }}
3336
git clean -fdx
34-
npm install --loglevel error
35-
npm run perf -w benchmarks -- -o ${{ env.PATCH_JSON }}
37+
yarn install --frozen-lockfile --silent
38+
yarn workspace benchmarks run perf -- -o ${{ env.PATCH_JSON }}
3639
echo "Ran successfully on patch branch"
3740
- name: 'Collect results'
3841
id: collect
3942
run: |
4043
echo "table<<EOF" >> $GITHUB_OUTPUT
41-
npm run compare -w benchmarks -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
44+
yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
4245
cat markdown >> $GITHUB_OUTPUT
4346
echo "EOF" >> $GITHUB_OUTPUT
4447
- name: 'Post comment'
@@ -63,6 +66,9 @@ jobs:
6366
- uses: actions/setup-node@v4
6467
with:
6568
node-version: '22.x'
69+
cache: 'yarn'
70+
cache-dependency-path: yarn.lock
71+
- run: corepack prepare [email protected] --activate
6672
- name: 'Setup temporary files'
6773
run: |
6874
echo "BASE_JSON=$(mktemp)" >> $GITHUB_ENV
@@ -71,8 +77,8 @@ jobs:
7177
run: |
7278
git checkout -f ${{ github.event.pull_request.base.sha }}
7379
git clean -fdx
74-
npm install --loglevel error
75-
if npm run size -w benchmarks -- -o ${{ env.BASE_JSON }}; then
80+
yarn install --frozen-lockfile --silent
81+
if yarn workspace benchmarks run size -- -o ${{ env.BASE_JSON }}; then
7682
echo "Ran successfully on base branch"
7783
else
7884
echo "{}" > ${{ env.BASE_JSON }} # Empty JSON as default
@@ -82,14 +88,14 @@ jobs:
8288
run: |
8389
git checkout -f ${{ github.event.pull_request.head.sha }}
8490
git clean -fdx
85-
npm install --loglevel error
86-
npm run size -w benchmarks -- -o ${{ env.PATCH_JSON }}
91+
yarn install --frozen-lockfile --silent
92+
yarn workspace benchmarks run size -- -o ${{ env.PATCH_JSON }}
8793
echo "Ran successfully on patch branch"
8894
- name: 'Collect results'
8995
id: collect
9096
run: |
9197
echo "table<<EOF" >> $GITHUB_OUTPUT
92-
npm run compare -w benchmarks -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
98+
yarn workspace benchmarks run compare -- ${{ env.BASE_JSON }} ${{ env.PATCH_JSON }} >> markdown
9399
cat markdown >> $GITHUB_OUTPUT
94100
echo "EOF" >> $GITHUB_OUTPUT
95101
- name: 'Post comment'

.github/workflows/tests.yml

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ jobs:
1515
- uses: actions/setup-node@v4
1616
with:
1717
node-version: '22.x'
18-
- run: npm install
19-
- run: npm run flow
18+
cache: 'yarn'
19+
cache-dependency-path: yarn.lock
20+
- run: corepack prepare [email protected] --activate
21+
- run: yarn install --frozen-lockfile
22+
- run: yarn flow
2023

2124
packages:
2225
runs-on: ubuntu-latest
@@ -25,8 +28,11 @@ jobs:
2528
- uses: actions/setup-node@v4
2629
with:
2730
node-version: '22.x'
28-
- run: npm install
29-
- run: npm run test:packages
31+
cache: 'yarn'
32+
cache-dependency-path: yarn.lock
33+
- run: corepack prepare [email protected] --activate
34+
- run: yarn install --frozen-lockfile
35+
- run: yarn test:packages
3036

3137
prettier:
3238
runs-on: ubuntu-latest
@@ -35,8 +41,11 @@ jobs:
3541
- uses: actions/setup-node@v4
3642
with:
3743
node-version: '22.x'
38-
- run: npm install
39-
- run: npm run prettier:report
44+
cache: 'yarn'
45+
cache-dependency-path: yarn.lock
46+
- run: corepack prepare [email protected] --activate
47+
- run: yarn install --frozen-lockfile
48+
- run: yarn prettier:report
4049

4150
lint:
4251
runs-on: ubuntu-latest
@@ -45,8 +54,11 @@ jobs:
4554
- uses: actions/setup-node@v4
4655
with:
4756
node-version: '22.x'
48-
- run: npm install
49-
- run: npm run lint:report
57+
cache: 'yarn'
58+
cache-dependency-path: yarn.lock
59+
- run: corepack prepare [email protected] --activate
60+
- run: yarn install --frozen-lockfile
61+
- run: yarn lint:report
5062

5163
spelling:
5264
runs-on: ubuntu-latest

packages/docs/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"fumadocs-core": "16.0.11",
1818
"fumadocs-mdx": "13.0.8",
1919
"fumadocs-ui": "16.0.11",
20-
"react": "^19.2.0",
21-
"react-dom": "^19.2.0",
22-
"react-server-dom-webpack": "^19.2.0",
20+
"react": "^19.2.1",
21+
"react-dom": "^19.2.1",
22+
"react-server-dom-webpack": "^19.2.1",
2323
"waku": "^0.27.0",
2424
"zod": "^4.1.12",
2525
"next-themes":"^0.4.6",

packages/docs/src/components/navigation-menu.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ const commonStyles = stylex.create({
2525
overflow: 'auto',
2626
maxHeight: '80svh',
2727
'::-webkit-scrollbar': { width: 5, height: 5, },
28-
'::-webkit-scrollbar-thumb': { borderRadius: 5, background: 'var(--color-fd-border)' },
29-
'::-webkit-scrollbar-track': { background: 'transparent' },
28+
'::-webkit-scrollbar-thumb': { borderRadius: 5, backgroundColor: 'var(--color-fd-border)' },
29+
'::-webkit-scrollbar-track': { backgroundColor: 'transparent' },
3030
'::-webkit-scrollbar-corner': { display: 'none' },
31-
animation: {
32-
default: null,
33-
':where([data-motion=from-end])': 'var(--animate-fd-enterFromRight)',
34-
':where([data-motion=from-start])': 'var(--animate-fd-enterFromLeft)',
35-
':where([data-motion=to-end])': 'var(--animate-fd-exitToRight)',
36-
':where([data-motion=to-start])': 'var(--animate-fd-exitToLeft)',
37-
},
31+
// animation: {
32+
// default: null,
33+
// ':where([data-motion=from-end])': 'var(--animate-fd-enterFromRight)',
34+
// ':where([data-motion=from-start])': 'var(--animate-fd-enterFromLeft)',
35+
// ':where([data-motion=to-end])': 'var(--animate-fd-exitToRight)',
36+
// ':where([data-motion=to-start])': 'var(--animate-fd-exitToLeft)',
37+
// },
3838
},
3939
menuViewport: {
4040
// 'origin-[top_center] overflow-hidden transition-[width,height] duration-300 data-[state=closed]:animate-fd-nav-menu-out data-[state=open]:animate-fd-nav-menu-in'
@@ -45,11 +45,11 @@ const commonStyles = stylex.create({
4545
overflow: 'hidden',
4646
transitionProperty: 'width, height',
4747
transitionDuration: '300ms',
48-
animation: {
49-
default: null,
50-
':where([data-state=closed])': 'var(--animate-fd-nav-menu-out)',
51-
':where([data-state=open])': 'var(--animate-fd-nav-menu-in)',
52-
},
48+
// animation: {
49+
// default: null,
50+
// ':where([data-state=closed])': 'var(--animate-fd-nav-menu-out)',
51+
// ':where([data-state=open])': 'var(--animate-fd-nav-menu-in)',
52+
// },
5353
},
5454
menuViewportContainer: {
5555
display: 'flex',
@@ -81,7 +81,7 @@ const NavigationMenuTrigger = ({ xstyle, children, ref, ...props }: StyleXCompon
8181
>
8282
{children}
8383
</Primitive.Trigger>
84-
));
84+
);
8585

8686
const NavigationMenuContent = ({
8787
xstyle,
@@ -105,7 +105,7 @@ const NavigationMenuViewport = ({ xstyle, ref, ...props }: StyleXComponentProps<
105105
{...stylex.props(commonStyles.menuViewport, xstyle)}
106106
/>
107107
</div>
108-
));
108+
);
109109
NavigationMenuViewport.displayName = Primitive.Viewport.displayName;
110110

111111
export {

packages/docs/src/components/ui/popover.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,11 @@ const styles = stylex.create({
5050
boxShadow:
5151
'0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)',
5252
outline: 'none',
53-
animation: {
54-
default: null,
55-
':where([data-state=closed])': 'var(--animation-fd-popover-out)',
56-
':where([data-state=open])': 'var(--animation-fd-popover-in)',
57-
},
53+
// animation: {
54+
// default: null,
55+
// ':where([data-state=closed])': 'var(--animation-fd-popover-out)',
56+
// ':where([data-state=open])': 'var(--animation-fd-popover-in)',
57+
// },
5858
},
5959
});
6060

yarn.lock

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15635,6 +15635,13 @@ react-dom@^18.3.0, react-dom@^18.3.1:
1563515635
loose-envify "^1.1.0"
1563615636
scheduler "^0.23.2"
1563715637

15638+
react-dom@^19.2.1:
15639+
version "19.2.1"
15640+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-19.2.1.tgz#ce3527560bda4f997e47d10dab754825b3061f59"
15641+
integrity sha512-ibrK8llX2a4eOskq1mXKu/TGZj9qzomO+sNfO98M6d9zIPOEhlBkMkBUBLd1vgS0gQsLDBzA+8jJBVXDnfHmJg==
15642+
dependencies:
15643+
scheduler "^0.27.0"
15644+
1563815645
react-error-overlay@^6.0.11:
1563915646
version "6.1.0"
1564015647
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.1.0.tgz#22b86256beb1c5856f08a9a228adb8121dd985f2"
@@ -15776,7 +15783,7 @@ [email protected], react-router@^5.3.3:
1577615783
tiny-invariant "^1.0.2"
1577715784
tiny-warning "^1.0.0"
1577815785

15779-
[email protected], react-server-dom-webpack@^19.2.0:
15786+
1578015787
version "19.2.0"
1578115788
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.2.0.tgz#1999bc59b6cc85a6e217d631fa68419e0cf577e8"
1578215789
integrity sha512-ar2H1q9SvonShYYYszHx7gE3v9NF3K01AvrIvQMIRNXj+CiUDjI2C7XKexDSlOzqwSlxgDivaMdYwfEBYD6NjQ==
@@ -15794,6 +15801,15 @@ [email protected]:
1579415801
neo-async "^2.6.1"
1579515802
webpack-sources "^3.2.0"
1579615803

15804+
react-server-dom-webpack@^19.2.1:
15805+
version "19.2.1"
15806+
resolved "https://registry.yarnpkg.com/react-server-dom-webpack/-/react-server-dom-webpack-19.2.1.tgz#7c3699d8e2887dd460c8c0c36ed1cb50437e68ae"
15807+
integrity sha512-6z3FuEtZ7wVWyPYRhKKRo4TF7IyQ7XrQZRW1fTjzK2mLVmcv7xJtoANSixaUJ+EFjCh2ekNOaBSoI9spiMSnNA==
15808+
dependencies:
15809+
acorn-loose "^8.3.0"
15810+
neo-async "^2.6.1"
15811+
webpack-sources "^3.2.0"
15812+
1579715813
react-style-singleton@^2.2.2, react-style-singleton@^2.2.3:
1579815814
version "2.2.3"
1579915815
resolved "https://registry.yarnpkg.com/react-style-singleton/-/react-style-singleton-2.2.3.tgz#4265608be69a4d70cfe3047f2c6c88b2c3ace388"
@@ -15848,6 +15864,11 @@ react@^18.3.0, react@^18.3.1:
1584815864
dependencies:
1584915865
loose-envify "^1.1.0"
1585015866

15867+
react@^19.2.1:
15868+
version "19.2.1"
15869+
resolved "https://registry.yarnpkg.com/react/-/react-19.2.1.tgz#8600fa205e58e2e807f6ef431c9f6492591a2700"
15870+
integrity sha512-DGrYcCWK7tvYMnWh79yrPHt+vdx9tY+1gPZa7nJQtO/p8bLTDaHp4dzwEhQB7pZ4Xe3ok4XKuEPrVuc+wlpkmw==
15871+
1585115872
read-pkg-up@^7.0.1:
1585215873
version "7.0.1"
1585315874
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-7.0.1.tgz#f3a6135758459733ae2b95638056e1854e7ef507"

0 commit comments

Comments
 (0)