Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What:
This PR fixes a type error that is shown in CI. It previously had a
ts-expect-errorcomment above, but CI blocks you from being able to run the test or setup script following theREADME.mdfile.I would like to contribute to this package and ensure that the tests added going forward are working 🙂
Why:
Without this change, we are unable to run the tests or other scripts, at least not on the environment and node version I am using (v22.14)
How:
I looked at a couple of posts online regarding this issue, which seems to be notorious. The solution uses
Object.definePropertyto properly handle the getter-only navigator property, which seems to be the preferred JavaScript solution for this type of issue.Checklist:
I believe so, but happy to discuss what might be a better approach
Issue stack trace:
envinfo:
System: OS: macOS 15.1 CPU: (16) arm64 Apple M4 Max Memory: 7.58 GB / 48.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 22.14.0 - ~/.nvm/versions/node/v22.14.0/bin/node Yarn: 1.22.22 - /usr/local/bin/yarn npm: 10.9.2 - ~/.nvm/versions/node/v22.14.0/bin/npm pnpm: 10.7.0 - ~/.nvm/versions/node/v22.14.0/bin/pnpm bun: 1.1.7 - ~/.bun/bin/bun Managers: Cargo: 1.85.0 - ~/.cargo/bin/cargo Homebrew: 4.4.24 - /opt/homebrew/bin/brew pip3: 24.3.1 - /opt/homebrew/bin/pip3 RubyGems: 3.0.3.1 - /usr/bin/gem Utilities: Make: 3.81 - /usr/bin/make GCC: 16.0.0 - /usr/bin/gcc Git: 2.39.5 - /usr/bin/git Clang: 16.0.0 - /usr/bin/clang FFmpeg: 7.1 - /opt/homebrew/bin/ffmpeg Curl: 8.7.1 - /usr/bin/curl OpenSSL: 3.4.0 - /opt/homebrew/bin/openssl Servers: Apache: 2.4.62 - /usr/sbin/apachectl Virtualization: Docker: 28.0.1 - /opt/homebrew/bin/docker Docker Compose: 2.33.1 - /opt/homebrew/bin/docker-compose SDKs: iOS SDK: Platforms: DriverKit 24.2, iOS 18.2, macOS 15.2, tvOS 18.2, visionOS 2.2, watchOS 11.2 IDEs: Android Studio: 2024.2 AI-242.23339.11.2421.12700392 VSCode: 0.48.2 - /usr/local/bin/code Vim: 9.0 - /usr/bin/vim Xcode: 16.2/16C5032a - /usr/bin/xcodebuild Languages: Bash: 3.2.57 - /bin/bash Perl: 5.34.1 - /usr/bin/perl Python3: 3.13.1 - /opt/homebrew/bin/python3 Ruby: 2.6.10 - /usr/bin/ruby Rust: 1.85.0 - /Users/jackshelton/.cargo/bin/rustc Databases: SQLite: 3.43.2 - /usr/bin/sqlite3 Browsers: Brave Browser: 127.1.68.141 Chrome: 134.0.6998.166 Safari: 18.1