File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches : [main, master]
6+ pull_request :
7+ release :
8+ types : [published]
9+ workflow_dispatch :
10+ inputs :
11+ version :
12+ description : ' Version to publish (e.g., 1.0.0)'
13+ required : true
14+ type : string
15+
16+ jobs :
17+ build :
18+ runs-on : ubuntu-latest
19+ steps :
20+ - uses : actions/checkout@v4
21+ - uses : actions/setup-node@v4
22+ with :
23+ node-version : 8.x
24+ - run : yarn install
25+ - run : yarn build
26+
27+ publish :
28+ if : github.event_name == 'release' || github.event_name == 'workflow_dispatch'
29+ runs-on : ubuntu-latest
30+ steps :
31+ - uses : actions/checkout@v4
32+ - uses : actions/setup-node@v4
33+ with :
34+ node-version : 8.x
35+ - run : npm config set registry ${{ secrets.NPM_REGISTRY_URL }}
36+ - run : yarn install
37+ - name : Set version
38+ if : github.event_name == 'workflow_dispatch'
39+ run : npm version ${{ github.event.inputs.version }} --no-git-tag-version
40+ - run : yarn build
41+ - run : yarn publish --non-interactive
42+ env :
43+ NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
Original file line number Diff line number Diff line change @@ -36,8 +36,13 @@ function extractQueryParams(path) {
3636 * @return {String }
3737 */
3838function extractPath ( base , canonicalPath ) {
39- let path = canonicalPath ?. replace ( base , '' ) || '/'
40- let qsIndex = path . indexOf ( '?' )
39+ let path = '/' ;
40+
41+ if ( canonicalPath != null && typeof canonicalPath === 'string' ) {
42+ path = canonicalPath . replace ( base , '' ) || '/' ;
43+ }
44+
45+ let qsIndex = path . indexOf ( '?' ) ;
4146 return ( qsIndex > - 1 ) ? path . slice ( 0 , qsIndex ) : path
4247}
4348
You can’t perform that action at this time.
0 commit comments