Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
a5002c5
fix: resolve react-native-css styling and tooling regressions on Expo…
danstepanov Sep 13, 2026
eda2b28
perf: avoid calculating styles/rules twice on first mount (#466)
sammoore Oct 16, 2026
8e4c822
fix(native): share the :root variable registries across a dual-packag…
YevheniiKotyrlo Oct 21, 2026
2421ea7
fix(babel): normalize resolved paths to POSIX so Windows rewrites wor…
YevheniiKotyrlo Oct 21, 2026
47d8c9f
feat(metro): surface compiler warnings during a build (#430)
YevheniiKotyrlo Oct 31, 2026
dccf242
fix(native): a custom property with no value produces no key (#431)
YevheniiKotyrlo Oct 31, 2026
b154d8c
fix(compiler): keep a nested rule's parent selector in source order (…
YevheniiKotyrlo Oct 31, 2026
a37903f
fix(babel): leave code transformed without a filename unchanged (#479)
YevheniiKotyrlo Oct 31, 2026
f054083
ci: add RC publishing to the release workflow (#452)
danstepanov Nov 2, 2026
3648caa
chore(release): add react-native-css 3.1.0-rc.1 descriptor (#555)
danstepanov Nov 2, 2026
df32ce3
docs: update the Expo 57 RC guide for the published rc.1 pair (#556)
danstepanov Nov 2, 2026
811f357
fix: re-export AssetRegistry from the react-native components shim (#…
oJaqob Nov 6, 2026
0586daf
test: compile each Tailwind render afresh, and fail on a compile erro…
YevheniiKotyrlo Nov 11, 2026
16790bb
perf(compiler): return nothing from visitors that only read (#490)
YevheniiKotyrlo Nov 11, 2026
aaaf027
feat(native): honour inherits: false on registered custom properties …
sammoore Nov 11, 2026
0b4380e
fix, perf: key style cache by unique hash (#568)
sammoore Nov 11, 2026
7d41636
fix: keep a list's separator when read through variables or custom pr…
sammoore Nov 18, 2026
572b652
fix(transformers): resolve and cascade transform properties as browse…
sammoore Nov 18, 2026
1695e40
fix(native): keep class, inline and !important styles as layers inste…
sammoore Nov 19, 2026
2438829
fix(compiler): omit absent color-mix weights from serialized descript…
sammoore Nov 20, 2026
887ac1d
fix(native): apply className on SafeAreaView from the safe-area-conte…
nimbly1 Nov 20, 2026
90fdbb5
fix(compiler): compile padding-block/-inline to paddingVertical/Horiz…
sammoore Nov 20, 2026
0ef4ec8
fix(compiler): land border-x/border-y colours on border keys React Na…
sammoore Nov 20, 2026
2e152c9
chore(deps): batch dependabot bumps (#582)
sammoore Nov 21, 2026
d485bc8
chore: merge upstream react-native-css 3.1.0-rc.1 into zeta/main
kdwkr Nov 23, 2026
abf0dec
fix: drop the color interpolation method from gradients read from one…
kdwkr Nov 23, 2026
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
8 changes: 8 additions & 0 deletions .config/jest.setup.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
import { setUpTests } from "react-native-reanimated";

/* global jest */

// Worklets 0.10 requires its native implementation to be mocked in Jest.
jest.mock("react-native-worklets", () =>
// eslint-disable-next-line @typescript-eslint/no-unsafe-return -- Jest returns the untyped Worklets mock module.
jest.requireActual("react-native-worklets/src/mock"),
);

setUpTests();
23 changes: 20 additions & 3 deletions .github/actions/ios-dev-app/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@ description: Create IOS Development App
runs:
using: composite
steps:
- name: Verify Xcode
shell: bash
run: xcodebuild -version

- name: Cache iOS development build
id: ios-dev-cache
uses: actions/cache@v4
with:
path: |
example/ios/build/DerivedData
key: ios-dev-${{ runner.os }}-${{ hashFiles('example/ios/**', 'example/package.json', 'package.json') }}
key: ios-dev-${{ runner.os }}-${{ runner.arch }}-xcode26.6-${{ hashFiles('example/ios/**', 'example/package.json', 'package.json', 'yarn.lock') }}
restore-keys: |
ios-dev-${{ runner.os }}-
ios-dev-${{ runner.os }}-${{ runner.arch }}-xcode26.6-

- name: Check for cached build
shell: bash
Expand Down Expand Up @@ -55,9 +59,11 @@ runs:
-scheme example \
-configuration Release \
-sdk iphonesimulator \
-destination 'generic/platform=iOS Simulator' \
-derivedDataPath build/DerivedData \
-resultBundlePath "$RUNNER_TEMP/ios-build.xcresult" \
CODE_SIGNING_ALLOWED=NO \
build | xcpretty
build 2>&1 | tee "$RUNNER_TEMP/ios-build.log" | xcpretty

cd ..

Expand All @@ -78,6 +84,17 @@ runs:
# Create a tar for better caching (go back to example directory)
tar -czf ios-dev-build.tar.gz -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"

- name: Upload iOS build diagnostics
if: failure()
uses: actions/upload-artifact@v4
with:
name: ios-build-diagnostics
path: |
${{ runner.temp }}/ios-build.log
${{ runner.temp }}/ios-build.xcresult
if-no-files-found: ignore
retention-days: 7

- name: Upload development build
if: steps.ios-dev-cache.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
Expand Down
19 changes: 19 additions & 0 deletions .github/releases/3.1.0-rc.0.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "react-native-css",
"version": "3.1.0-rc.0",
"sourceCommit": "a5002c598dae6e58904613b07fb5e0ffb55fd732",
"archive": "react-native-css-3.1.0-rc.0.tgz",
"sha256": "a03235e206ef49e48fb960e59eebea14bbb69e623aa168250d8ccca2ff200072",
"integrity": "sha512-/wfPJ8pXiPxvHUs0QcocN3ViV4QJdnXpKukNirZJcJ/MeZKrStSEHm2rBq+KuZm8/2XDl4GfeuaVvJctYGtdgA==",
"consumerDependencies": {
"@babel/core": "7.29.7",
"@expo/metro-config": "57.0.12",
"expo": "57.0.22",
"lightningcss": "1.30.1",
"react": "19.2.3",
"react-native": "0.86.3",
"react-native-reanimated": "4.5.1",
"react-native-worklets": "0.10.1",
"typescript": "6.0.3"
}
}
19 changes: 19 additions & 0 deletions .github/releases/3.1.0-rc.1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "react-native-css",
"version": "3.1.0-rc.1",
"sourceCommit": "a37903f594905813517a17aac85adeadfe678762",
"archive": "react-native-css-3.1.0-rc.1.tgz",
"sha256": "f2d37969b9309c537ba810492ca9e3f1b56edd5afe00143324773f90badfc749",
"integrity": "sha512-TT5NnkSK1TRlzbZWeJCyjYwEj7IWOZkGR+e42+PU5X6TQM/wW3CPplI44EbWyNz8QN0WeFzrkQTh3EvhO4cEWA==",
"consumerDependencies": {
"@babel/core": "7.29.7",
"@expo/metro-config": "57.0.12",
"expo": "57.0.22",
"lightningcss": "1.30.1",
"react": "19.2.3",
"react-native": "0.86.3",
"react-native-reanimated": "4.5.1",
"react-native-worklets": "0.10.1",
"typescript": "6.0.3"
}
}
11 changes: 11 additions & 0 deletions .github/releases/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# RC publication

The existing Release & Publish to NPM workflow accepts `rc`, an exact RC version, and a publication checkbox. An unchecked publication checkbox runs authentication and archive preflight only. Stable and preview releases continue to use release-it.

Each RC has a reviewed JSON descriptor in this directory. It identifies the merged source commit, package version, archive checksums, and Expo consumer dependencies. The exact audited archive is attached to a draft GitHub prerelease whose tag is the package version and whose target is the recorded source commit.

The RC job verifies the descriptor and archive, then publishes the archive under `rc-staging` without rebuilding. An existing npm version is accepted only when its integrity matches. The job downloads the registry archive, verifies both checksums, installs the exact version in a fresh Expo consumer, and runs the engine Node tooling tests against that installation. It checks that only one engine runtime is installed.

After those checks pass, the job advances `rc`, verifies that `latest` is unchanged, and makes the GitHub prerelease public. A failed run retains its publication receipt. Retries accept an already published matching archive and repeat the registry checks before advancing `rc`.

The runner uses the existing `NPM_TOKEN` secret. Authentication is checked before the publication step. Registry authentication failures require fixing the repository's npm publishing credential.
174 changes: 174 additions & 0 deletions .github/scripts/release_rc.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
"""Publish a reviewed archive without rebuilding or changing the stable tag."""

import base64
import hashlib
import json
import os
from pathlib import Path
import re
import subprocess
import tarfile
import time
import urllib.error
import urllib.request


REGISTRY = "https://registry.npmjs.org"


def check(condition, message):
if not condition:
raise RuntimeError(message)


def validate_version(version):
check(re.fullmatch(r"\d+\.\d+\.\d+-rc\.\d+", version), "Invalid RC version")


def verify_archive(archive, descriptor):
data = archive.read_bytes()
check(hashlib.sha256(data).hexdigest() == descriptor["sha256"], "Archive SHA256 mismatch")
integrity = "sha512-" + base64.b64encode(hashlib.sha512(data).digest()).decode()
check(integrity == descriptor["integrity"], "Archive integrity mismatch")
with tarfile.open(archive) as tar:
package = json.load(tar.extractfile("package/package.json"))
check(package["name"] == descriptor["name"], "Wrong package")
check(package["version"] == descriptor["version"], "Wrong version")
for field in ("dependencies", "devDependencies", "peerDependencies", "optionalDependencies"):
check(not any(value.startswith(("file:", "link:", "workspace:"))
for value in package.get(field, {}).values()), "Local dependency in archive")


def verify_registry(metadata, descriptor):
check(metadata["name"] == descriptor["name"], "Registry package mismatch")
check(metadata["version"] == descriptor["version"], "Registry version mismatch")
check(metadata["dist"]["integrity"] == descriptor["integrity"], "Published version has different bytes")


def verify_latest(before, after):
check(before.get("latest") == after.get("latest"), "The stable latest tag changed")


def registry_json(route, missing_ok=False, attempts=1):
for attempt in range(attempts):
try:
request = urllib.request.Request(REGISTRY + route, headers={"Cache-Control": "no-cache"})
with urllib.request.urlopen(request, timeout=60) as response:
return json.load(response)
except urllib.error.HTTPError as error:
if error.code != 404:
raise
if attempt + 1 < attempts:
print("Waiting for npm registry visibility...", flush=True)
time.sleep(10)
continue
if missing_ok:
return None
raise


def wait_for_rc_tag(before, version, attempts=31):
for attempt in range(attempts):
after = registry_json("/-/package/react-native-css/dist-tags")
verify_latest(before, after)
if after.get("rc") == version:
return after
if attempt + 1 < attempts:
time.sleep(10)
raise RuntimeError("RC tag is not visible after waiting for the registry")


def run(*args, cwd=None, env=None):
subprocess.run(args, cwd=cwd, env=env, check=True)


def verify_consumer(root, work, descriptor):
consumer = work / "consumer"
consumer.mkdir()
dependencies = {**descriptor["consumerDependencies"], descriptor["name"]: descriptor["version"]}
(consumer / "package.json").write_text(json.dumps({"name": "rc-registry-check", "private": True,
"version": "0.0.0", "dependencies": dependencies}))
public_env = {key: value for key, value in os.environ.items()
if key not in ("GH_TOKEN", "GITHUB_TOKEN", "NPM_TOKEN", "NODE_AUTH_TOKEN")}
public_env["NODE_AUTH_TOKEN"] = ""
run("npm", "install", "--no-audit", "--no-fund", "--registry=" + REGISTRY, cwd=consumer, env=public_env)
lock = json.loads((consumer / "package-lock.json").read_text())
engines = {key: value for key, value in lock["packages"].items()
if key.endswith("node_modules/react-native-css")}
check(list(engines) == ["node_modules/react-native-css"], "Expected one engine runtime")
installed = engines["node_modules/react-native-css"]
check(installed["version"] == descriptor["version"], "Installed version mismatch")
check(installed["integrity"] == descriptor["integrity"], "Installed archive integrity mismatch")
check(installed["resolved"].startswith(REGISTRY + "/react-native-css/-/"), "Engine did not come from npm")
engine = consumer / "node_modules/react-native-css"
tests = consumer / "tests"
tests.mkdir()
for source in (root / "node/__tests__").glob("*.mjs"):
# Only relocate private helper entry paths; keep every assertion unchanged.
content = source.read_text().replace("../../dist/", str(engine / "dist") + "/")
(tests / source.name).write_text(content)
public_env["CSS_COMPONENT_REGISTRY_ROOT"] = str(engine)
public_env["CSS_TYPESCRIPT_SETUP_ENTRY"] = str(engine / "dist/commonjs/metro/typescript.js")
public_env["CSS_LOADER_UNDER_TEST"] = str(engine / "dist/commonjs/compiler/lightningcss-loader.js")
run("node", "--test", *map(str, sorted(tests.glob("*.mjs"))), cwd=consumer, env=public_env)


def main():
version = os.environ["RC_VERSION"]
validate_version(version)
root = Path(__file__).resolve().parents[2]
descriptor = json.loads((root / ".github/releases" / (version + ".json")).read_text())
check(descriptor["name"] == "react-native-css" and descriptor["version"] == version, "Invalid release descriptor")
check(descriptor["archive"] == "react-native-css-" + version + ".tgz", "Invalid archive name")
run("git", "merge-base", "--is-ancestor", descriptor["sourceCommit"], "HEAD", cwd=root)
release = json.loads(subprocess.check_output(
["gh", "release", "view", version, "--json", "isDraft,isPrerelease,targetCommitish"], text=True))
check(release["targetCommitish"] == descriptor["sourceCommit"], "Release targets different source")
check(release["isPrerelease"], "Expected a GitHub prerelease")
work = Path(os.environ["RUNNER_TEMP"]) / "rc-publication"
work.mkdir(exist_ok=True)
run("gh", "release", "download", version, "--pattern", descriptor["archive"], "--dir", str(work))
archive = work / descriptor["archive"]
verify_archive(archive, descriptor)
tag_route = "/-/package/react-native-css/dist-tags"
version_route = "/react-native-css/" + version
before = registry_json(tag_route)
existing = registry_json(version_route, missing_ok=True)
if existing is not None:
verify_registry(existing, descriptor)
receipt = {"descriptor": descriptor, "tagsBefore": before, "stage": "preflight-passed"}
receipt_file = work / "publication.json"

def save(stage):
receipt["stage"] = stage
receipt_file.write_text(json.dumps(receipt, indent=2) + "\n")

save("preflight-passed")
if os.environ.get("RC_PUBLISH") != "true":
print("RC preflight passed; publication was not requested.")
return
if existing is None:
run("npm", "publish", str(archive), "--tag", "rc-staging", "--access", "public",
"--ignore-scripts", "--registry=" + REGISTRY, "--loglevel=warn")
metadata = registry_json(version_route, attempts=31)
verify_registry(metadata, descriptor)
receipt["registry"] = metadata
save("registry-integrity-verified")
downloaded = work / "registry"
downloaded.mkdir()
run("npm", "pack", "react-native-css@" + version, "--ignore-scripts", "--pack-destination",
str(downloaded), "--registry=" + REGISTRY, "--loglevel=warn")
verify_archive(downloaded / descriptor["archive"], descriptor)
verify_consumer(root, work, descriptor)
save("registry-consumer-passed")
verify_latest(before, registry_json(tag_route))
run("npm", "dist-tag", "add", "react-native-css@" + version, "rc", "--registry=" + REGISTRY)
after = wait_for_rc_tag(before, version)
receipt["tagsAfter"] = after
save("rc-published")
run("gh", "release", "edit", version, "--draft=false", "--prerelease", "--latest=false")
save("complete")


if __name__ == "__main__":
main()
Loading