File tree Expand file tree Collapse file tree 5 files changed +34
-14
lines changed Expand file tree Collapse file tree 5 files changed +34
-14
lines changed Original file line number Diff line number Diff line change 1616 - minor
1717 - major
1818 - prerelease
19+ - from-package
20+ - from-git
1921 prerelease :
2022 type : choice
21- required : false
2223 description : Pre-release
2324 options :
2425 -
2526 - canary
2627 - beta
28+ dryrun :
29+ description : ' Dry-run'
30+ type : boolean
31+
32+ run-name : Deploy ${{ inputs.version }} ${{ inputs.dryrun && '--dry-run' || '' }} ${{ inputs.prerelease && format('--prerelease {0}', inputs.prerelease) || '' }}
2733
2834jobs :
2935 deploy :
@@ -38,11 +44,12 @@ jobs:
3844 CONVENTIONAL_GITHUB_RELEASER_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3945
4046 steps :
41- - uses : actions/checkout@v3
47+ - uses : actions/checkout@v4
4248 with :
4349 fetch-depth : 0 # Fetch all history for all tags and branches
44- - uses : actions/setup-node@v3
50+ - uses : actions/setup-node@v4
4551 with :
52+ node-version : 20
4653 # this line is required for the setup-node action to be able to run the npm publish below.
4754 registry-url : ' https://registry.npmjs.org'
4855 - uses : fregante/setup-git-user@v1
5360 - run : npm run build:demo
5461 - run : npm run build:dist
5562 - run : npm run build:standalone
56- - run : npx --yes wet-run@0.5.1 release ${{ inputs.version }} --prerelease "${{ inputs.prerelease }}" --provenance --changelog --github-release
63+ - run : npx --yes wet-run@1.0.1 release ${{ inputs.version }} ${{ inputs.dryrun && '--dry-run' || '' }} ${{ inputs.prerelease && format('--prerelease {0}', inputs.prerelease) || '' }} --provenance --changelog --github-release --verbose
64+ - name : Get NPM version
65+ id : npm-version
66+ uses : martinbeentjes/npm-get-version-action@v1.3.1
67+ - name : Released ${{ steps.npm-version.outputs.current-version}} ✨
68+ run : echo ${{ steps.npm-version.outputs.current-version}}
Original file line number Diff line number Diff line change 1111 node-version : [18.x]
1212
1313 steps :
14- - uses : actions/checkout@v3
14+ - uses : actions/checkout@v4
1515 - name : Use Node.js ${{ matrix.node-version }}
16- uses : actions/setup-node@v3
16+ uses : actions/setup-node@v4
1717 with :
1818 node-version : ${{ matrix.node-version }}
1919 cache : npm
2828 node-version : [18.x]
2929
3030 steps :
31- - uses : actions/checkout@v3
31+ - uses : actions/checkout@v4
3232 - name : Use Node.js ${{ matrix.node-version }}
33- uses : actions/setup-node@v3
33+ uses : actions/setup-node@v4
3434 with :
3535 node-version : ${{ matrix.node-version }}
3636 cache : npm
4545 node-version : [16.x, 18.x, 20.x]
4646
4747 steps :
48- - uses : actions/checkout@v3
48+ - uses : actions/checkout@v4
4949 - name : Use Node.js ${{ matrix.node-version }}
50- uses : actions/setup-node@v3
50+ uses : actions/setup-node@v4
5151 with :
5252 node-version : ${{ matrix.node-version }}
5353 cache : npm
Original file line number Diff line number Diff line change 1- import React , { Component , Suspense , lazy } from 'react'
1+ import React , { Component , Suspense } from 'react'
22import merge from 'deepmerge'
33import memoize from 'memoize-one'
44import isEqual from 'react-fast-compare'
55
66import { propTypes , defaultProps } from './props'
7- import { omit } from './utils'
7+ import { omit , lazy } from './utils'
88import Player from './Player'
99
1010const Preview = lazy ( ( ) => import ( /* webpackChunkName: 'reactPlayerPreview' */ './Preview' ) )
Original file line number Diff line number Diff line change 1- import { lazy } from 'react'
2- import { supportsWebKitPresentationMode } from '../utils'
1+ import { lazy , supportsWebKitPresentationMode } from '../utils'
32import { canPlay , AUDIO_EXTENSIONS } from '../patterns'
43
54export default [
Original file line number Diff line number Diff line change 1+ import React from 'react'
12import loadScript from 'load-script'
23import merge from 'deepmerge'
34
5+ /**
6+ * Dynamic import is supported in CJS modules but needs interop require default logic.
7+ */
8+ export const lazy = ( componentImportFn ) => React . lazy ( async ( ) => {
9+ const obj = await componentImportFn ( )
10+ return typeof obj . default === 'function' ? obj : obj . default
11+ } )
12+
413const MATCH_START_QUERY = / [ ? & # ] (?: s t a r t | t ) = ( [ 0 - 9 h m s ] + ) /
514const MATCH_END_QUERY = / [ ? & # ] e n d = ( [ 0 - 9 h m s ] + ) /
615const MATCH_START_STAMP = / ( \d + ) ( h | m | s ) / g
You can’t perform that action at this time.
0 commit comments