diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml new file mode 100644 index 000000000..79a026dbb --- /dev/null +++ b/.github/actions/setup/action.yml @@ -0,0 +1,27 @@ +name: Setup +description: Setup Node.js and install dependencies + +runs: + using: composite + steps: + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version-file: .nvmrc + + - name: Cache dependencies + id: yarn-cache + uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn- + + - name: Install dependencies + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: | + yarn install --frozen-lockfile + yarn patch-package + shell: bash diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 0b8c5762c..759fa52c6 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -23,11 +23,8 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-node@v3 - with: - node-version: '16' - cache: 'yarn' - - run: yarn + - name: Setup + uses: ./.github/actions/setup - name: Setup NPM auth token run: | diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..5397c87fa --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +16.18.1 diff --git a/ts/Renderer/RendererManager.ts b/ts/Renderer/RendererManager.ts index 4df54389d..3965bb8f5 100644 --- a/ts/Renderer/RendererManager.ts +++ b/ts/Renderer/RendererManager.ts @@ -79,7 +79,7 @@ export class RendererManager { * * @param mode The use mode of the audio frame. See RawAudioFrameOpModeType . */ - setRenderMode(mode: RENDER_MODE) { + public setRenderMode(mode: RENDER_MODE) { this.renderMode = mode; logInfo( 'setRenderMode: new render mode will take effect only if new view bind to render' @@ -270,7 +270,7 @@ export class RendererManager { renderMap.clear(); } - clear(): void { + public clear(): void { this.stopRender(); this.removeAllRenderer(); }