File tree Expand file tree Collapse file tree 6 files changed +58
-23
lines changed Expand file tree Collapse file tree 6 files changed +58
-23
lines changed Original file line number Diff line number Diff line change 30
30
env :
31
31
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD : " 1"
32
32
33
- - name : Publish package
34
- run : pnpm run ci-publish ${{ github.ref_name }}
35
- env :
36
- NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
37
-
38
33
- name : Get pkgName for tag
39
34
id : tag
40
35
run : |
49
44
50
45
echo "pkgName=$pkgName" >> $GITHUB_OUTPUT
51
46
47
+ - if : steps.tag.outputs.pkgName == 'plugin-react-swc'
48
+ working-directory : packages/plugin-react-swc
49
+ run : pnpm build
50
+
51
+ - name : Publish package
52
+ run : pnpm run ci-publish ${{ github.ref_name }}
53
+ env :
54
+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
55
+
52
56
- # only run if tag is not alpha
53
57
if : steps.tag.outputs.pkgName
54
58
uses : ArnaudBarre/github-release@e8d55cf5b215f7cf998ad2387044b9e7d5dd8112 # v1
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @vitejs/plugin-react-swc" ,
3
3
"version" : " 3.8.1" ,
4
+ "license" : " MIT" ,
5
+ "author" : " Arnaud Barré (https://github.com/ArnaudBarre)" ,
6
+ "description" : " Speed up your Vite dev server with SWC" ,
7
+ "keywords" : [
8
+ " vite" ,
9
+ " vite-plugin" ,
10
+ " react" ,
11
+ " swc" ,
12
+ " react-refresh" ,
13
+ " fast refresh"
14
+ ],
4
15
"type" : " module" ,
5
16
"private" : true ,
6
17
"scripts" : {
9
20
"test" : " playwright test" ,
10
21
"release" : " pnpm build && tsx scripts/release.ts"
11
22
},
12
- "packageManager" :
" [email protected] " ,
23
+ "repository" : {
24
+ "type" : " git" ,
25
+ "url" : " git+https://github.com/vitejs/vite-plugin-react.git" ,
26
+ "directory" : " packages/plugin-react-swc"
27
+ },
28
+ "bugs" : {
29
+ "url" : " https://github.com/vitejs/vite-plugin-react/issues"
30
+ },
31
+ "homepage" : " https://github.com/vitejs/vite-plugin-react/tree/main/packages/plugin-react-swc#readme" ,
13
32
"dependencies" : {
14
33
"@swc/core" : " ^1.11.11"
15
34
},
Original file line number Diff line number Diff line change @@ -65,13 +65,14 @@ module.exports.default = react;`,
65
65
'dist/package.json' ,
66
66
JSON . stringify (
67
67
{
68
- name : '@vitejs/plugin-react-swc' ,
69
- description : 'Speed up your Vite dev server with SWC' ,
70
- version : packageJSON . version ,
71
- author : 'Arnaud Barré (https://github.com/ArnaudBarre)' ,
72
- license : 'MIT' ,
73
- repository : 'github:vitejs/vite-plugin-react-swc' ,
74
- type : 'module' ,
68
+ ...Object . fromEntries (
69
+ Object . entries ( packageJSON ) . filter (
70
+ ( [ key , _val ] ) =>
71
+ key !== 'devDependencies' &&
72
+ key !== 'scripts' &&
73
+ key !== 'private' ,
74
+ ) ,
75
+ ) ,
75
76
main : 'index.cjs' ,
76
77
types : 'index.d.ts' ,
77
78
module : 'index.mjs' ,
@@ -82,16 +83,6 @@ module.exports.default = react;`,
82
83
import : './index.mjs' ,
83
84
} ,
84
85
} ,
85
- keywords : [
86
- 'vite' ,
87
- 'vite-plugin' ,
88
- 'react' ,
89
- 'swc' ,
90
- 'react-refresh' ,
91
- 'fast refresh' ,
92
- ] ,
93
- peerDependencies : packageJSON . peerDependencies ,
94
- dependencies : packageJSON . dependencies ,
95
86
} ,
96
87
null ,
97
88
2 ,
Original file line number Diff line number Diff line change 3
3
"version" : " 4.3.4" ,
4
4
"license" : " MIT" ,
5
5
"author" : " Evan You" ,
6
+ "description" : " The default Vite plugin for React projects" ,
7
+ "keywords" : [
8
+ " vite" ,
9
+ " vite-plugin" ,
10
+ " react" ,
11
+ " babel" ,
12
+ " react-refresh" ,
13
+ " fast refresh"
14
+ ],
6
15
"contributors" : [
7
16
" Alec Larson" ,
8
17
" Arnaud Barré"
Original file line number Diff line number Diff line change @@ -3,4 +3,10 @@ import { publish } from '@vitejs/release-scripts'
3
3
publish ( {
4
4
defaultPackage : 'plugin-react' ,
5
5
provenance : true ,
6
+ getPkgDir ( pkg ) {
7
+ if ( pkg === 'plugin-react-swc' ) {
8
+ return `packages/${ pkg } /dist`
9
+ }
10
+ return `packages/${ pkg } `
11
+ } ,
6
12
} )
Original file line number Diff line number Diff line change @@ -5,6 +5,12 @@ import colors from 'picocolors'
5
5
release ( {
6
6
repo : 'vite-plugin-react' ,
7
7
packages : [ 'plugin-react' , 'plugin-react-swc' ] ,
8
+ getPkgDir ( pkg ) {
9
+ if ( pkg === 'plugin-react-swc' ) {
10
+ return `packages/${ pkg } /dist`
11
+ }
12
+ return `packages/${ pkg } `
13
+ } ,
8
14
toTag : ( pkg , version ) => `${ pkg } @${ version } ` ,
9
15
logChangelog : async ( pkgName ) => {
10
16
const changelog = readFileSync ( `packages/${ pkgName } /CHANGELOG.md` , 'utf-8' )
You can’t perform that action at this time.
0 commit comments