Unverified 提交 82017d1d authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo 提交者: GitHub

Improvements ro Prettier and ESLint (#1305)

上级 eb5e204a
# NOTE: This file and .eslintignore must contain same paths.
/.cache
/art
/coverage
/doc
/node/lib
/node/src/fbs /node/src/fbs
/rust
/target
/worker/deps
/worker/fbs
/worker/fuzzer
/worker/include
/worker/prebuild
/worker/pip_invoke
/worker/src
/worker/subprojects
/worker/test
/worker/out
/NO_GIT
...@@ -16,7 +16,6 @@ If you got a crash in mediasoup, please try to provide a core dump into the issu ...@@ -16,7 +16,6 @@ If you got a crash in mediasoup, please try to provide a core dump into the issu
https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump
### Your environment ### Your environment
- Operating system: - Operating system:
...@@ -26,5 +25,4 @@ https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump ...@@ -26,5 +25,4 @@ https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump
- mediasoup version: - mediasoup version:
- mediasoup-client version: - mediasoup-client version:
### Issue description ### Issue description
...@@ -9,4 +9,4 @@ https://mediasoup.discourse.group ...@@ -9,4 +9,4 @@ https://mediasoup.discourse.group
Before asking any questions, please check the mediasoup official documentation: Before asking any questions, please check the mediasoup official documentation:
https://mediasoup.org/documentation/ https://mediasoup.org/documentation
...@@ -32,51 +32,55 @@ jobs: ...@@ -32,51 +32,55 @@ jobs:
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
language: [ 'c-cpp', 'javascript-typescript', 'python' ] language: ['c-cpp', 'javascript-typescript', 'python']
# CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ]
# Use only 'java-kotlin' to analyze code written in Java, Kotlin or both # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both.
# Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both # Use only 'javascript-typescript' to analyze code written in JavaScript,
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support # TypeScript or both.
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support.
env: env:
MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true' MEDIASOUP_SKIP_WORKER_PREBUILT_DOWNLOAD: 'true'
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v4 uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v3
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file. # If you wish to specify custom queries, you can do so here or in a
# By default, queries listed here will override any specified in a config file. # config file. By default, queries listed here will override any
# Prefix the list here with "+" to use these queries and those in the config file. # specified in a config file. Prefix the list here with "+" to use
# these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs #
# queries: security-extended,security-and-quality # Details on CodeQL's query packs refer to:
# https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
# We need to install pip invoke library. # We need to install pip invoke library.
- name: pip3 install invoke - name: pip3 install invoke
run: pip3 install invoke run: pip3 install invoke
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# ℹ️ Command-line programs to run using the OS shell. # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun # If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
# If the Autobuild fails above, remove it and uncomment the following three lines. # ℹ️ Command-line programs to run using the OS shell.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
# - run: | # If the Autobuild fails above, remove it and uncomment the following
# echo "Run, Build Application using script" # three lines. Modify them (or add more) to build your code if your
# ./location_of_script_within_repo/buildscript.sh # project, please refer to the EXAMPLE below for guidance.
- name: Perform CodeQL Analysis # - run: |
uses: github/codeql-action/analyze@v3 # echo "Run, Build Application using script"
with: # ./location_of_script_within_repo/buildscript.sh
category: '/language:${{matrix.language}}'
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: '/language:${{matrix.language}}'
...@@ -52,4 +52,3 @@ jobs: ...@@ -52,4 +52,3 @@ jobs:
env: env:
DOCS_RS: '1' DOCS_RS: '1'
RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links' RUSTDOCFLAGS: '-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links'
# NOTE: This file and .prettierignore must contain same paths.
/.cache /.cache
/art /art
/coverage /coverage
...@@ -16,3 +18,4 @@ ...@@ -16,3 +18,4 @@
/worker/subprojects /worker/subprojects
/worker/test /worker/test
/worker/out /worker/out
/NO_GIT
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -2,72 +2,73 @@ ...@@ -2,72 +2,73 @@
Thanks for taking the time to contribute to mediasoup! 🎉👍 Thanks for taking the time to contribute to mediasoup! 🎉👍
## License ## License
By contributing to mediasoup, you agree that your contributions will be licensed under its ISC License. By contributing to mediasoup, you agree that your contributions will be licensed under its ISC License.
## Reporting Bugs ## Reporting Bugs
We primarily use GitHub as an issue tracker. Just open an issue in GitHub if you have encountered a bug in mediasoup. We primarily use GitHub as an issue tracker. Just open an issue in GitHub if you have encountered a bug in mediasoup.
If you have questions or doubts about mediasoup or need support, please use the mediasoup Discourse Group instead: If you have questions or doubts about mediasoup or need support, please use the mediasoup Discourse Group instead:
* https://mediasoup.discourse.group - https://mediasoup.discourse.group
If you got a crash in mediasoup, please try to provide a core dump into the issue report: If you got a crash in mediasoup, please try to provide a core dump into the issue report:
* https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump - https://mediasoup.org/support/#crashes-in-mediasoup-get-a-core-dump
## Pull Request Process ## Pull Request Process
When creating a Pull Request for mediasoup, ensure that you run the following commands to verify that the code in your PR conforms to the code syntax of the project and does not break existing funtionality: When creating a Pull Request for mediasoup:
* `npm run lint`: Check JavaScript and C++ linting rules. - Ensure that changes/additions done in TypeScript files (in `node/src` folder) are also applied to the Rust layer (in `rust` folder), and vice-versa.
* `npm run typescript:build`: Compile TypeScript code (under `src/` folder) into JavaScript code (under `lib/` folder). - Test units must be added for both Node.js and Rust.
* `npm run test`: Run JavaScript and C++ test units. - Changes/additions in C++ code may need tests in `worker/test` folder.
The full list of `npm` scripts (and `make` tasks) is available in the [doc/Building.md](/doc/Building.md) file. Once all changes are done, run the following commands to verify that the code in your PR conforms to the code syntax of the project, it does not break existing funtionality and tests pass:
Once all these commands succeed, wait for the Travis CI checks to complete and verify they run successfully (otherwise the PR won't be accepted). - `npm run lint`: Check TypeScript and C++ linting rules. Formating errors can be automatically fixed by running `npm run format`.
- `npm run typescript:build`: Compile TypeScript code (under `src` folder) into JavaScript code (under `lib` folder).
- `npm run test`: Run JavaScript and C++ test units.
- Instead, you can run `npm run release:check` which will run all those steps.
- `cargo fmt`, `cargo clippy` and `cargo test` to ensure that everything is good in Rust side.
The full list of `npm` scripts, `invoke` tasks and `cargo` commands is available in the [doc/Building.md](/doc/Building.md) file.
## Coding Style ## Coding Style
In adition to automatic checks performed by commands above, we also enforce other minor things related to coding style: In adition to automatic checks performed by commands above, we also enforce other minor things related to coding style:
### Comments in JavaScript and C++ ### Comments in TypeScript and C++
We use `//` for inline comments in both JavaScript and C++ source files. We use `//` for inline comments in both JavaScript and C++ source files.
* Comments must start with upercase letter. - Comments must start with upercase letter.
* Comments must not exceed 80 columns (split into different lines if necessary). - Comments must not exceed 80 columns (split into different lines if necessary).
* Comments must end with a dot. - Comments must end with a dot.
Example (good): Example (good):
```js ```ts
// Calculate foo based on bar value. // Calculate foo based on bar value.
const foo = bar / 2; const foo = bar / 2;
``` ```
Example (bad): Example (bad):
```js ```ts
// calculate foo based on bar value // calculate foo based on bar value
const foo = bar / 2; const foo = bar / 2;
``` ```
When adding inline documentation for methods or functions, we use `/** */` syntax. Example: When adding inline documentation for methods or functions, we use `/** */` syntax. Example:
```js ```ts
/** /**
* Calculates current score for foo and bar. * Calculates current score for foo and bar.
*/ */
function calculateScore(): number function calculateScore(): number {
{ // [...]
// [...]
} }
``` ```
...@@ -10,58 +10,51 @@ ...@@ -10,58 +10,51 @@
[![][codeql-shield-mediasoup]][codeql-mediasoup] [![][codeql-shield-mediasoup]][codeql-mediasoup]
[![][opencollective-shield-mediasoup]][opencollective-mediasoup] [![][opencollective-shield-mediasoup]][opencollective-mediasoup]
## Website and Documentation ## Website and Documentation
* [mediasoup.org][mediasoup-website] - [mediasoup.org][mediasoup-website]
## Support Forum ## Support Forum
* [mediasoup.discourse.group][mediasoup-discourse] - [mediasoup.discourse.group][mediasoup-discourse]
## Design Goals ## Design Goals
mediasoup and its client side libraries are designed to accomplish with the following goals: mediasoup and its client side libraries are designed to accomplish with the following goals:
* Be a [SFU](https://webrtcglossary.com/sfu/) (Selective Forwarding Unit). - Be a [SFU](https://webrtcglossary.com/sfu) (Selective Forwarding Unit).
* Support both WebRTC and plain RTP input and output. - Support both WebRTC and plain RTP input and output.
* Be a Node.js module/Rust crate in server side. - Be a Node.js module or Rust crate in server side.
* Be a tiny JavaScript and C++ libraries in client side. - Be a tiny TypeScript and C++ libraries in client side.
* Be minimalist: just handle the media layer. - Be minimalist: just handle the media layer.
* Be signaling agnostic: do not mandate any signaling protocol. - Be signaling agnostic: do not mandate any signaling protocol.
* Be super low level API. - Be super low level API.
* Support all existing WebRTC endpoints. - Support all existing WebRTC endpoints.
* Enable integration with well known multimedia libraries/tools. - Enable integration with well known multimedia libraries/tools.
## Architecture ## Architecture
![][mediasoup-architecture] ![][mediasoup-architecture]
## Use Cases ## Use Cases
mediasoup and its client side libraries provide a super low level API. They are intended to enable different use cases and scenarios, without any constraint or assumption. Some of these use cases are: mediasoup and its client side libraries provide a super low level API. They are intended to enable different use cases and scenarios, without any constraint or assumption. Some of these use cases are:
* Group video chat applications. - Group video chat applications.
* One-to-many (or few-to-many) broadcasting applications in real-time. - One-to-many (or few-to-many) broadcasting applications in real-time.
* RTP streaming. - RTP streaming.
## Features ## Features
* ECMAScript 6/Idiomatic Rust low level API. - ECMAScript 6/Idiomatic Rust low level API.
* Multi-stream: multiple audio/video streams over a single ICE + DTLS transport. - Multi-stream: multiple audio/video streams over a single ICE + DTLS transport.
* IPv6 ready. - IPv6 ready.
* ICE / DTLS / RTP / RTCP over UDP and TCP. - ICE / DTLS / RTP / RTCP over UDP and TCP.
* Simulcast and SVC support. - Simulcast and SVC support.
* Congestion control. - Congestion control.
* Sender and receiver bandwidth estimation with spatial/temporal layers distribution algorithm. - Sender and receiver bandwidth estimation with spatial/temporal layers distribution algorithm.
* Data message exchange (via WebRTC DataChannels, SCTP over plain UDP, and direct termination in Node.js/Rust). - Data message exchange (via WebRTC DataChannels, SCTP over plain UDP, and direct termination in Node.js/Rust).
* Extremely powerful (media worker thread/subprocess coded in C++ on top of [libuv](https://libuv.org)). - Extremely powerful (media worker thread/subprocess coded in C++ on top of [libuv](https://libuv.org)).
## Demo Online ## Demo Online
...@@ -69,31 +62,24 @@ mediasoup and its client side libraries provide a super low level API. They are ...@@ -69,31 +62,24 @@ mediasoup and its client side libraries provide a super low level API. They are
Try it at [v3demo.mediasoup.org](https://v3demo.mediasoup.org) ([source code](https://github.com/versatica/mediasoup-demo)). Try it at [v3demo.mediasoup.org](https://v3demo.mediasoup.org) ([source code](https://github.com/versatica/mediasoup-demo)).
## Authors ## Authors
* Iñaki Baz Castillo [[website](https://inakibaz.me)|[github](https://github.com/ibc/)] - Iñaki Baz Castillo [[website](https://inakibaz.me)|[github](https://github.com/ibc/)]
* José Luis Millán [[github](https://github.com/jmillan/)] - José Luis Millán [[github](https://github.com/jmillan/)]
* Nazar Mokynskyi [[github](https://github.com/nazar-pc/)] - Nazar Mokynskyi [[github](https://github.com/nazar-pc/)]
## Social ## Social
* Twitter: [@mediasoup_sfu](https://twitter.com/mediasoup_sfu) - Twitter: [@mediasoup_sfu](https://twitter.com/mediasoup_sfu)
## Sponsor ## Sponsor
You can support mediasoup by [sponsoring][sponsor] it. Thanks! You can support mediasoup by [sponsoring][sponsor] it. Thanks!
## License ## License
[ISC](./LICENSE) [ISC](./LICENSE)
[mediasoup-banner]: /art/mediasoup-banner.png [mediasoup-banner]: /art/mediasoup-banner.png
[mediasoup-website]: https://mediasoup.org [mediasoup-website]: https://mediasoup.org
[mediasoup-discourse]: https://mediasoup.discourse.group [mediasoup-discourse]: https://mediasoup.discourse.group
......
{ {
"compileOnSave": true, "compileOnSave": true,
"compilerOptions": "compilerOptions": {
{ "lib": ["es2021"],
"lib": [ "es2021" ],
"target": "esnext", "target": "esnext",
"module": "commonjs", "module": "commonjs",
"moduleResolution": "node", "moduleResolution": "node",
...@@ -11,11 +10,11 @@ ...@@ -11,11 +10,11 @@
"declaration": true, "declaration": true,
"declarationMap": true "declarationMap": true
}, },
"include": [ "src" ], "include": ["src"],
"watchOptions": { "watchOptions": {
"watchFile": "useFsEvents", "watchFile": "useFsEvents",
"watchDirectory": "useFsEvents", "watchDirectory": "useFsEvents",
"fallbackPolling": "dynamicPriority", "fallbackPolling": "dynamicPriority",
"synchronousWatchDirectory": true "synchronousWatchDirectory": true
} }
} }
...@@ -346,21 +346,14 @@ function cleanWorkerArtifacts() { ...@@ -346,21 +346,14 @@ function cleanWorkerArtifacts() {
function lintNode() { function lintNode() {
logInfo('lintNode()'); logInfo('lintNode()');
const paths = [ executeCmd('prettier . --check');
'npm-scripts.mjs',
'.eslintrc.js',
'node/src',
'worker/scripts/clang-format.mjs',
];
// Ensure there are no rules that are unnecessary or conflict with Prettier // Ensure there are no rules that are unnecessary or conflict with Prettier
// rules. // rules.
executeCmd('eslint-config-prettier .eslintrc.js'); executeCmd('eslint-config-prettier .eslintrc.js');
executeCmd( executeCmd(
`eslint -c .eslintrc.js --ignore-path .eslintignore --max-warnings 0 ${paths.join( 'eslint -c .eslintrc.js --ignore-path .eslintignore --max-warnings 0 .',
' ',
)}`,
); );
} }
...@@ -375,14 +368,7 @@ function lintWorker() { ...@@ -375,14 +368,7 @@ function lintWorker() {
function formatNode() { function formatNode() {
logInfo('formatNode()'); logInfo('formatNode()');
const paths = [ executeCmd('prettier . --write');
'npm-scripts.mjs',
'.eslintrc.js',
'node/src',
'worker/scripts/clang-format.mjs',
];
executeCmd(`prettier ${paths.join(' ')} --write`);
} }
function flatcNode() { function flatcNode() {
......
差异被折叠。
{ {
"name": "mediasoup", "name": "mediasoup",
"version": "3.13.15", "version": "3.13.15",
"description": "Cutting Edge WebRTC Video Conferencing", "description": "Cutting Edge WebRTC Video Conferencing",
"contributors": [ "contributors": [
"Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)", "Iñaki Baz Castillo <ibc@aliax.net> (https://inakibaz.me)",
"José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)", "José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",
"Nazar Mokynskyi (https://github.com/nazar-pc)" "Nazar Mokynskyi (https://github.com/nazar-pc)"
], ],
"license": "ISC", "license": "ISC",
"homepage": "https://mediasoup.org", "homepage": "https://mediasoup.org",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/versatica/mediasoup.git" "url": "https://github.com/versatica/mediasoup.git"
}, },
"funding": { "funding": {
"type": "opencollective", "type": "opencollective",
"url": "https://opencollective.com/mediasoup" "url": "https://opencollective.com/mediasoup"
}, },
"main": "node/lib/index.js", "main": "node/lib/index.js",
"types": "node/lib/index.d.ts", "types": "node/lib/index.d.ts",
"files": [ "files": [
"node/lib", "node/lib",
"worker/deps/libwebrtc", "worker/deps/libwebrtc",
"worker/fbs", "worker/fbs",
"worker/fuzzer/include", "worker/fuzzer/include",
"worker/fuzzer/src", "worker/fuzzer/src",
"worker/include", "worker/include",
"worker/src", "worker/src",
"worker/scripts/*.json", "worker/scripts/*.json",
"worker/scripts/*.mjs", "worker/scripts/*.mjs",
"worker/scripts/*.py", "worker/scripts/*.py",
"worker/scripts/*.sh", "worker/scripts/*.sh",
"worker/subprojects/*.wrap", "worker/subprojects/*.wrap",
"worker/test/include", "worker/test/include",
"worker/test/src", "worker/test/src",
"worker/meson.build", "worker/meson.build",
"worker/meson_options.txt", "worker/meson_options.txt",
"worker/tasks.py", "worker/tasks.py",
"npm-scripts.mjs" "npm-scripts.mjs"
], ],
"engines": { "engines": {
"node": ">=16" "node": ">=16"
}, },
"keywords": [ "keywords": [
"webrtc", "webrtc",
"ortc", "ortc",
"sfu", "sfu",
"nodejs" "nodejs"
], ],
"scripts": { "scripts": {
"prepare": "node npm-scripts.mjs prepare", "prepare": "node npm-scripts.mjs prepare",
"postinstall": "node npm-scripts.mjs postinstall", "postinstall": "node npm-scripts.mjs postinstall",
"typescript:build": "node npm-scripts.mjs typescript:build", "typescript:build": "node npm-scripts.mjs typescript:build",
"typescript:watch": "node npm-scripts.mjs typescript:watch", "typescript:watch": "node npm-scripts.mjs typescript:watch",
"worker:build": "node npm-scripts.mjs worker:build", "worker:build": "node npm-scripts.mjs worker:build",
"worker:prebuild": "node npm-scripts.mjs worker:prebuild", "worker:prebuild": "node npm-scripts.mjs worker:prebuild",
"lint": "npm run lint:node && npm run lint:worker", "lint": "npm run lint:node && npm run lint:worker",
"lint:node": "node npm-scripts.mjs lint:node", "lint:node": "node npm-scripts.mjs lint:node",
"lint:worker": "node npm-scripts.mjs lint:worker", "lint:worker": "node npm-scripts.mjs lint:worker",
"format": "npm run format:node && npm run format:worker", "format": "npm run format:node && npm run format:worker",
"format:node": "node npm-scripts.mjs format:node", "format:node": "node npm-scripts.mjs format:node",
"format:worker": "node npm-scripts.mjs format:worker", "format:worker": "node npm-scripts.mjs format:worker",
"flatc": "npm run flatc:node && npm run flatc:worker", "flatc": "npm run flatc:node && npm run flatc:worker",
"flatc:node": "node npm-scripts.mjs flatc:node", "flatc:node": "node npm-scripts.mjs flatc:node",
"flatc:worker": "node npm-scripts.mjs flatc:worker", "flatc:worker": "node npm-scripts.mjs flatc:worker",
"test": "npm run test:node && npm run test:worker", "test": "npm run test:node && npm run test:worker",
"test:node": "node npm-scripts.mjs test:node", "test:node": "node npm-scripts.mjs test:node",
"test:worker": "node npm-scripts.mjs test:worker", "test:worker": "node npm-scripts.mjs test:worker",
"coverage:node": "node npm-scripts.mjs coverage:node", "coverage:node": "node npm-scripts.mjs coverage:node",
"release:check": "node npm-scripts.mjs release:check", "release:check": "node npm-scripts.mjs release:check",
"release": "node npm-scripts.mjs release", "release": "node npm-scripts.mjs release",
"release:upload-mac-arm-prebuilt-worker": "node npm-scripts.mjs release:upload-mac-arm-prebuilt-worker" "release:upload-mac-arm-prebuilt-worker": "node npm-scripts.mjs release:upload-mac-arm-prebuilt-worker"
}, },
"jest": { "jest": {
"verbose": true, "verbose": true,
"testEnvironment": "node", "testEnvironment": "node",
"testRegex": "node/src/test/test-.*\\.ts", "testRegex": "node/src/test/test-.*\\.ts",
"transform": { "transform": {
"^.*\\.ts$": [ "^.*\\.ts$": [
"ts-jest", "ts-jest",
{ {
"diagnostics": { "diagnostics": {
"ignoreCodes": [ "ignoreCodes": [
"TS151001" "TS151001"
] ]
} }
} }
] ]
}, },
"coveragePathIgnorePatterns": [ "coveragePathIgnorePatterns": [
"node/src/fbs", "node/src/fbs",
"node/src/test" "node/src/test"
], ],
"cacheDirectory": ".cache/jest", "cacheDirectory": ".cache/jest",
"modulePathIgnorePatterns": [ "modulePathIgnorePatterns": [
"worker", "worker",
"rust", "rust",
"target" "target"
] ]
}, },
"dependencies": { "dependencies": {
"debug": "^4.3.4", "debug": "^4.3.4",
"flatbuffers": "^23.5.26", "flatbuffers": "^23.5.26",
"h264-profile-level-id": "^2.0.0", "h264-profile-level-id": "^2.0.0",
"node-fetch": "^3.3.2", "node-fetch": "^3.3.2",
"supports-color": "^9.4.0", "supports-color": "^9.4.0",
"tar": "^6.2.0" "tar": "^6.2.0"
}, },
"devDependencies": { "devDependencies": {
"@octokit/rest": "^20.0.2", "@octokit/rest": "^20.0.2",
"@types/debug": "^4.1.12", "@types/debug": "^4.1.12",
"@types/jest": "^29.5.11", "@types/jest": "^29.5.11",
"@types/node": "^20.10.7", "@types/node": "^20.10.7",
"@typescript-eslint/eslint-plugin": "^6.18.0", "@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0", "@typescript-eslint/parser": "^6.18.0",
"eslint": "^8.56.0", "eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0", "eslint-config-prettier": "^9.1.0",
"eslint-plugin-jest": "^27.6.1", "eslint-plugin-jest": "^27.6.1",
"eslint-plugin-prettier": "^5.1.2", "eslint-plugin-prettier": "^5.1.2",
"jest": "^29.7.0", "jest": "^29.7.0",
"marked": "^11.1.1", "marked": "^11.1.1",
"open-cli": "^7.2.0", "open-cli": "^7.2.0",
"pick-port": "^1.0.1", "pick-port": "^1.0.1",
"prettier": "^3.1.1", "prettier": "^3.1.1",
"sctp": "^1.0.0", "sctp": "^1.0.0",
"ts-jest": "^29.1.1", "ts-jest": "^29.1.1",
"typescript": "^5.3.3" "typescript": "^5.3.3"
} }
} }
...@@ -47,15 +47,15 @@ DisableFormat: false ...@@ -47,15 +47,15 @@ DisableFormat: false
ExperimentalAutoDetectBinPacking: true ExperimentalAutoDetectBinPacking: true
FixNamespaceComments: true FixNamespaceComments: true
IncludeCategories: IncludeCategories:
- Regex: '"common.hpp"' - Regex: '"common.hpp"'
Priority: 1 Priority: 1
- Regex: '^"(Channel|PayloadChannel|FBS|RTC|Utils|handles)/' - Regex: '^"(Channel|PayloadChannel|FBS|RTC|Utils|handles)/'
Priority: 3 Priority: 3
- Regex: '"*"' - Regex: '"*"'
Priority: 2 Priority: 2
- Regex: '^<(flatbuffers|uv|openssl|srtp|usrsctp|libwebrtc)(.|/)' - Regex: '^<(flatbuffers|uv|openssl|srtp|usrsctp|libwebrtc)(.|/)'
Priority: 4 Priority: 4
- Regex: '<*>' - Regex: '<*>'
Priority: 5 Priority: 5
IncludeIsMainRegex: '$' IncludeIsMainRegex: '$'
IndentCaseLabels: true IndentCaseLabels: true
......
差异被折叠。
{ {
"name": "mediasoup-worker-dev-tools", "name": "mediasoup-worker-dev-tools",
"version": "0.0.1", "version": "0.0.1",
"description": "mediasoup worker dev tools", "description": "mediasoup worker dev tools",
"scripts": { "scripts": {
"lint": "node clang-format.mjs lint", "lint": "node clang-format.mjs lint",
"format": "node clang-format.mjs format" "format": "node clang-format.mjs format"
}, },
"dependencies": { "dependencies": {
"clang-format": "^1.8.0", "clang-format": "^1.8.0",
"clang-tools-prebuilt": "^0.1.4", "clang-tools-prebuilt": "^0.1.4",
"glob": "^10.3.10" "glob": "^10.3.10"
} }
} }
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论