mirror of
https://github.com/hanzoai/swc.git
synced 2026-10-30 19:42:53 +00:00
**Description:** - Fix the Flow strip path so enum lowering does not panic on defaulted or opaque Flow enum members that do not have explicit initializers. - Close the parser and strip gaps exposed by the Hermes and React Native corpora, including static `constructor` class members, typed arrow object returns, `match` arm `=>` separators, computed class fields after typed fields, and JSX raw `>` handling. - Add a shared Flow strip regression helper, a `flow_strip_projects` integration test that runs `Compiler.process_js_file`, and pinned React Native / React Native Web Flow corpora with sync metadata and a refresh script.
21 lines
498 B
Bash
Executable File
21 lines
498 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
rm -rf /tmp/.swc
|
|
mkdir -p /tmp/.swc/fixtures
|
|
|
|
(cd fixtures && find . -depth -exec sh -c '
|
|
for source; do
|
|
case $source in ./*/*)
|
|
target="$(printf %sz "${source#./}" | tr / _)";
|
|
cp -r -- "$source" "/tmp/.swc/fixtures/${target%z}";;
|
|
esac
|
|
done
|
|
' _ {} +)
|
|
# (cd fixtures && for i in *-*;do mv $i ${i//"-"/"_"}; done)
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
|
|
|
(cd /tmp/.swc && node "$SCRIPT_DIR/fixtures.js")
|