Skip to content

Commit

Permalink
fix: put sources under a single TypeScript config (#1087)
Browse files Browse the repository at this point in the history
Internal imports should be resolve relatively (i.e. player should
not import from the package itself). The simplest way is to further
group all sources, and use a single TypeScript configuration.
With code-splitting enabled, the result is essentially the same.
  • Loading branch information
steabert authored Jan 13, 2025
1 parent 81baf84 commit 9b1be16
Show file tree
Hide file tree
Showing 160 changed files with 509 additions and 636 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Checks that proper housekeeping has been performed on a PR.
name: Housekeeping

on:
pull_request:
branches:
- main
merge_group:

jobs:
versioning:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout repository@main
uses: actions/checkout@v4
with:
ref: main
path: __ref-main

- name: Check if package.json version was updated
run: |
this_version=$(jq -r '.version' package.json)
if [[ "$this_version" == "null" ]]; then
continue
fi
if [[ ! -f "__ref-main/package.json" ]]; then
main_version=""
else
main_version=$(jq -r '.version' __ref-main/package.json)
fi
if [[ "$main_version" == "$this_version" ]]; then
echo "::error:: package.json version ($main_version) was not updated"
exit 1
elif ! grep -q "^## $this_version" CHANGELOG.md; then
echo "::error:: CHANGELOG.md was not updated with latest version"
exit 1
else
echo "::notice:: package.json updated: $main_version => $this_version"
fi
41 changes: 2 additions & 39 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,8 @@ jobs:
cache: yarn
- name: Install dependencies
run: just install
- name: Build
run: just build
- name: Lint
run: just lint .
- name: Unit tests
run: just test
- name: Check
run: just ci

chrome:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -109,36 +105,3 @@ jobs:
run: just build
- name: Test basic video functionality
run: scripts/ci-video-test.sh edge

housekeeping:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Checkout repository@main
uses: actions/checkout@v4
with:
ref: main
path: __ref-main

- name: Check if package.json version was updated
run: |
this_version=$(jq -r '.version' package.json)
if [[ "$this_version" == "null" ]]; then
continue
fi
if [[ ! -f "__ref-main/package.json" ]]; then
main_version=""
else
main_version=$(jq -r '.version' __ref-main/package.json)
fi
if [[ "$main_version" == "$this_version" ]]; then
echo "::error:: package.json version ($main_version) was not updated"
exit 1
elif ! grep -q "^## $this_version" CHANGELOG.md; then
echo "::error:: CHANGELOG.md was not updated with latest version"
exit 1
else
echo "::notice:: package.json updated: $main_version => $this_version"
fi
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 14.0.0-beta.1
## 14.0.0-beta.2

- Fixed player non-relative imports from within the package.
- Fixed next/latest tag selection in publish workflow.

## 14.0.0-beta.0
Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ If your changes cause problems with how the library was used before,
don't forget to write `BREAKING CHANGE:` inside the commit message body,
followed by a description of what has changed and how to adapt for it.

We use `node`, `npm`, and `just` for any development related things, so make sure you
We use `node`, `yarn`, and `just` for any development related things, so make sure you
have those installed. If you want to run the examples against a test RTSP server,
you'll need to have a working `docker` environment with access to docker hub.

### Testing

Make sure your changes pass linting and unit testing locally to save time with your PR,
by running `just test`.
by running `just lint` and just test`.
If you add a new feature, please write a new unit test to catch any future regressions.

Most components have unit tests, and basic proper behaviour is always
tested, but we don't have full coverage (yet) of all the component code.
tested, but we don't have full coverage of all the component code.
If you contribute a new component, please make sure it has appropriate
unit tests with sufficient coverage.

Expand Down
Loading

0 comments on commit 9b1be16

Please sign in to comment.