Skip to content

Commit 91d489e

Browse files
authored
Merge branch 'muxinc:main' into main
2 parents b6ef874 + a6d9213 commit 91d489e

File tree

198 files changed

+38933
-20134
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

198 files changed

+38933
-20134
lines changed

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: 'npm'
4+
directories:
5+
- '/packages/*'
6+
schedule:
7+
interval: 'daily'
8+
commit-message:
9+
prefix: 'fix'
10+
prefix-development: 'chore'
11+
groups:
12+
prod-dependencies:
13+
patterns:
14+
- 'media-chrome'
15+
- 'player.style'
16+
- 'castable-video'
17+
- 'custom-media-element'
18+
- 'media-tracks'
19+
allow:
20+
- dependency-name: 'media-chrome'
21+
- dependency-name: 'player.style'
22+
- dependency-name: 'castable-video'
23+
- dependency-name: 'custom-media-element'
24+
- dependency-name: 'media-tracks'
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"packages/mux-active-viewer-count": "0.2.0-alpha.13",
3+
"packages/mux-audio": "0.15.4",
4+
"packages/mux-audio-react": "0.15.4",
5+
"packages/mux-elements-codemod": "1.1.11",
6+
"packages/mux-player": "3.3.1",
7+
"packages/mux-player-react": "3.3.1",
8+
"packages/mux-uploader": "1.2.0",
9+
"packages/mux-uploader-react": "1.2.0",
10+
"packages/mux-video": "0.24.4",
11+
"packages/mux-video-react": "0.24.4",
12+
"packages/playback-core": "0.28.4"
13+
}
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"bump-minor-pre-major": true,
3+
"bump-patch-for-minor-pre-major": false,
4+
"tag-separator": "@",
5+
"include-component-in-tag": true,
6+
"include-v-in-tag": false,
7+
"plugins": [
8+
{
9+
"type": "node-workspace",
10+
"merge": false
11+
},
12+
{
13+
"type": "linked-versions",
14+
"groupName": "player",
15+
"components": ["@mux/mux-player", "@mux/mux-player-react"]
16+
},
17+
{
18+
"type": "linked-versions",
19+
"groupName": "audio",
20+
"components": ["@mux/mux-audio", "@mux/mux-audio-react"]
21+
},
22+
{
23+
"type": "linked-versions",
24+
"groupName": "video",
25+
"components": ["@mux/mux-video", "@mux/mux-video-react"]
26+
},
27+
{
28+
"type": "linked-versions",
29+
"groupName": "uploader",
30+
"components": ["@mux/mux-uploader", "@mux/mux-uploader-react"]
31+
}
32+
],
33+
"packages": {
34+
"packages/mux-active-viewer-count": {
35+
"component": "@mux/mux-active-viewer-count",
36+
"prerelease": true,
37+
"versioning": "prerelease"
38+
},
39+
"packages/mux-audio": {
40+
"component": "@mux/mux-audio"
41+
},
42+
"packages/mux-audio-react": {
43+
"component": "@mux/mux-audio-react"
44+
},
45+
"packages/mux-elements-codemod": {
46+
"component": "@mux/mux-elements-codemod"
47+
},
48+
"packages/mux-player": {
49+
"component": "@mux/mux-player"
50+
},
51+
"packages/mux-player-react": {
52+
"component": "@mux/mux-player-react"
53+
},
54+
"packages/mux-uploader": {
55+
"component": "@mux/mux-uploader"
56+
},
57+
"packages/mux-uploader-react": {
58+
"component": "@mux/mux-uploader-react"
59+
},
60+
"packages/mux-video": {
61+
"component": "@mux/mux-video"
62+
},
63+
"packages/mux-video-react": {
64+
"component": "@mux/mux-video-react"
65+
},
66+
"packages/playback-core": {
67+
"component": "@mux/playback-core"
68+
}
69+
}
70+
}

.github/workflows/cd.yml

Lines changed: 36 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,73 @@ name: Deployment
33
concurrency: production
44

55
on:
6-
# Allows you to run this workflow manually from the Actions tab
7-
workflow_dispatch:
6+
push:
7+
branches:
8+
- main
89

910
jobs:
10-
deploy:
11+
release:
1112
runs-on: ubuntu-latest
1213
environment: production
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
id-token: write
18+
1319
steps:
20+
- uses: googleapis/release-please-action@v4
21+
id: release
22+
with:
23+
config-file: .github/release-please/release-please-config.json
24+
manifest-file: .github/release-please/.release-please-manifest.json
25+
1426
- uses: actions/checkout@v4
27+
# these if statements ensure that a publication only occurs when
28+
# a new release is created:
29+
if: ${{ steps.release.outputs.releases_created == 'true' }}
1530
with:
1631
fetch-depth: 0 # Fetch all history for all tags and branches
1732
- name: read node version from the .nvmrc file
33+
if: ${{ steps.release.outputs.releases_created == 'true' }}
1834
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)
1935
shell: bash
2036
id: nvmrc
2137
- uses: actions/setup-node@v4
38+
if: ${{ steps.release.outputs.releases_created == 'true' }}
2239
with:
2340
node-version: ${{steps.nvmrc.outputs.NODE_VERSION}}
2441
# this line is required for the setup-node action to be able to run the npm publish below.
2542
registry-url: 'https://registry.npmjs.org'
43+
2644
- name: Install
27-
run: yarn install --frozen-lockfile
45+
if: ${{ steps.release.outputs.releases_created == 'true' }}
46+
run: npm ci
2847
- name: Clean
29-
run: yarn clean
48+
if: ${{ steps.release.outputs.releases_created == 'true' }}
49+
run: npm run clean
3050
- name: Test
31-
run: yarn test
51+
if: ${{ steps.release.outputs.releases_created == 'true' }}
52+
run: npm test
3253
- name: Clean
33-
run: yarn clean
54+
if: ${{ steps.release.outputs.releases_created == 'true' }}
55+
run: npm run clean
3456
- name: Build
35-
run: yarn build:packages
57+
if: ${{ steps.release.outputs.releases_created == 'true' }}
58+
run: npm run build:packages
3659
- name: Publish
37-
run: yarn deploy --yes
60+
if: ${{ steps.release.outputs.releases_created == 'true' }}
61+
run: npm exec -c publish-packages
3862
env:
3963
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
40-
- name: Create Release Notes
41-
run: yarn create-release-notes
42-
env:
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
4465
- name: 'Get message'
66+
if: ${{ steps.release.outputs.releases_created == 'true' }}
4567
id: 'deploy_message'
4668
run: |
4769
echo "::set-output name=commit_msg::$(git log -1 --format=%B)"
4870
echo "::set-output name=commit_sha::$(git log -1 --format=%H)"
4971
- name: Slack Notify
72+
if: ${{ steps.release.outputs.releases_created == 'true' }}
5073
uses: rtCamp/action-slack-notify@v2.2.0
5174
env:
5275
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

.github/workflows/ci.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,13 @@ env:
99

1010
jobs:
1111
build:
12+
# Don't run if the CI is triggered by Release Please
13+
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }}
14+
1215
runs-on: ubuntu-latest
1316
timeout-minutes: 15
17+
permissions:
18+
id-token: write
1419

1520
steps:
1621
- uses: actions/checkout@v4
@@ -23,16 +28,19 @@ jobs:
2328
node-version: ${{steps.nvmrc.outputs.NODE_VERSION}}
2429
# this line is required for the setup-node action to be able to run the npm publish below.
2530
registry-url: 'https://registry.npmjs.org'
26-
cache: yarn
27-
- run: yarn install --frozen-lockfile
28-
- run: yarn clean
29-
- run: yarn build:packages
30-
- run: npm run publish-release -- canary
31+
cache: npm
32+
- run: npm ci
33+
- run: npm run clean
34+
- run: npm run build:packages
35+
- run: npx --yes -w packages wet-run@1.2.5 release prerelease --prerelease canary --provenance --log-level verbose
3136
if: ${{ github.ref == 'refs/heads/main' }}
3237
env:
3338
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3439

3540
lint:
41+
# Don't run if the CI is triggered by Release Please
42+
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }}
43+
3644
runs-on: ubuntu-latest
3745

3846
steps:
@@ -44,26 +52,34 @@ jobs:
4452
- uses: actions/setup-node@v4
4553
with:
4654
node-version: ${{steps.nvmrc.outputs.NODE_VERSION}}
47-
cache: yarn
48-
- run: yarn install --frozen-lockfile
49-
- run: yarn lint
55+
cache: npm
56+
- run: npm ci
57+
- run: npm run lint
5058

5159
test:
60+
# Don't run if the CI is triggered by Release Please
61+
if: ${{ github.event.commits[0].author.name != 'github-actions[bot]' }}
62+
5263
runs-on: ubuntu-latest
5364

5465
steps:
5566
- uses: actions/checkout@v4
5667
- uses: actions/setup-node@v4
5768
with:
5869
node-version: 20
59-
cache: yarn
70+
cache: npm
6071
# esbuild requires --ignore-scripts to NOT be added here.
61-
- run: yarn install --frozen-lockfile
62-
- run: yarn clean
72+
- run: npm ci
73+
- run: npm run clean
6374
- name: Install playwright browsers
6475
run: npx playwright install --with-deps
65-
# run yarn and pass through `-- --all` to turborepo
66-
- run: yarn test -- -- --all
76+
# Retry the test command up to 3 times with a timeout of 10 minutes
77+
- uses: nick-fields/retry@v3
78+
with:
79+
timeout_minutes: 10
80+
max_attempts: 3
81+
# run npm test and pass through `-- --all` to turborepo
82+
command: npm run test -- -- --all
6783
- name: Upload coverage to Codecov
6884
uses: codecov/codecov-action@v2.1.0
6985
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,3 +131,4 @@ dist
131131
packages/*/src/polyfills
132132

133133
.turbo
134+
examples/astro/.vercel/

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ Elements are written to make it easy to work in a variety of web frameworks. If
2222
| [mux-video-react](packages/mux-video-react) | Mux React video component | React | Public Beta |
2323
| [mux-audio](packages/mux-audio) | Mux HTML5 audio element | Web Component | Public Beta |
2424
| [mux-audio-react](packages/mux-audio-react) | Mux HTML5 audio component | React | Public Beta |
25-
| [mux-player](packages/mux-player) | Mux HTML5 media player component | Web Component | 2.x.x 🎉 |
26-
| [mux-player-react](packages/mux-player-react) | Mux React media player component | React | 2.x.x 🎉 |
25+
| [mux-player](packages/mux-player) | Mux HTML5 media player component | Web Component | 3.x.x 🎉 |
26+
| [mux-player-react](packages/mux-player-react) | Mux React media player component | React | 3.x.x 🎉 |
2727
| [mux-uploader](packages/mux-uploader) | Mux HTML5 media uploader component | Web Component | 1.x.x 🎉 |
2828
| [mux-uploader-react](packages/mux-uploader-react) | Mux React media uploader component | React | 1.x.x 🎉 |
2929
| [mux-active-viewer-count](packages/mux-active-viewer-count) | Mux HTML5 viewer count component | Web Component | Public Alpha |

0 commit comments

Comments
 (0)