Skip to content

Commit 6f3aa49

Browse files
committed
refactor: consolidate repo
1 parent 3a2a341 commit 6f3aa49

File tree

21 files changed

+1368
-3642
lines changed

21 files changed

+1368
-3642
lines changed

.github/renovate.json5

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99
"depTypeList": ["peerDependencies"],
1010
"enabled": false,
1111
},
12+
{
13+
"matchFileNames": ["**/react-18/**"],
14+
"ignoreDeps": ["react", "react-dom", "@types/react", "@types/react-dom"],
15+
},
1216
{
1317
"matchDepTypes": ["action"],
1418
"excludePackagePrefixes": ["actions/", "github/"],
@@ -19,6 +23,8 @@
1923
// manually bumping
2024
"node",
2125

26+
"generouted", // testing lib shipping JSX (new version ship transpiled JS)
27+
2228
// breaking changes
2329
"source-map", // `source-map:v0.7.0+` needs more investigation
2430
"kill-port", // `kill-port:^2.0.0 has perf issues (#8392)

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ jobs:
8484
- name: Test build
8585
run: pnpm run test-build
8686

87+
- name: Test SWC
88+
run: pnpm --filter packages/plugin-react-swc run test
89+
8790
lint:
8891
if: github.repository == 'vitejs/vite-plugin-react'
8992
timeout-minutes: 10

.github/workflows/publish.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,22 @@ jobs:
3535
env:
3636
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3737

38-
- uses: ArnaudBarre/github-release@v1
38+
- name: Get pkgName for tag
39+
id: tag
40+
run: |
41+
# skip if alpha
42+
if [[ $GITHUB_REF_NAME =~ alpha ]]; then
43+
exit 0
44+
fi
45+
46+
# `%@*` truncates @ and version number from the right side.
47+
# https://stackoverflow.com/questions/9532654/expression-after-last-specific-character
48+
pkgName=${GITHUB_REF_NAME%@*}
49+
50+
echo "pkgName=$pkgName" >> $GITHUB_OUTPUT
51+
52+
- # only run if tag is not alpha
53+
if: steps.tag.outputs.pkgName
54+
uses: ArnaudBarre/github-release@v1
3955
with:
40-
path: packages/plugin-react/CHANGELOG.md
56+
path: packages/${{ steps.tag.outputs.pkgName }}/CHANGELOG.md

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ dist-ssr
1010
explorations
1111
node_modules
1212
playground-temp
13+
packages/plugin-react-swc/playground-temp
1314
temp
1415
TODOs.md
1516
.eslintcache
17+
test-results/
18+
.swc/

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
hoist-pattern[]=@emotion/* # playground/react-emotion
22
hoist-pattern[]=*babel*
3+
hoist-pattern[]=@swc/* # packages/plugin-react-swc/playground/emotion-plugin, packages/plugin-react-swc/playground/styled-components
34
strict-peer-dependencies=false
45
shell-emulator=true
56
auto-install-peers=false

package.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,15 @@
7272
"playground/**/__tests__/**/*.ts": [
7373
"eslint --cache --fix"
7474
]
75+
},
76+
"pnpm": {
77+
"packageExtensions": {
78+
"generouted": {
79+
"peerDependencies": {
80+
"react": "*",
81+
"react-router-dom": "*"
82+
}
83+
}
84+
}
7585
}
7686
}

packages/plugin-react-swc/.github/renovate.json5

Lines changed: 0 additions & 21 deletions
This file was deleted.

packages/plugin-react-swc/.github/workflows/ci.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

packages/plugin-react-swc/.github/workflows/publish.yml

Lines changed: 0 additions & 29 deletions
This file was deleted.

packages/plugin-react-swc/.gitignore

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)