-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add @mcap/support, @mcap/nodejs, and @mcap/browser libraries #868
Merged
Merged
Changes from 25 commits
Commits
Show all changes
32 commits
Select commit
Hold shift + click to select a range
38e9c9d
[TypeScript] @mcap/support (#838)
jhurliman 9730d35
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes 6f49dfa
WIP
jtbandes 9c3fb14
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes 73cf644
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes 3dacc7b
update src from studio/packages/mcap-support
jtbandes 9c09f13
wheeeee
jtbandes 40f8d27
typedoc updates
jtbandes 4ee79d3
fix cspell
jtbandes 16a2a9f
fixes
jtbandes 695bab9
release instructions cleanup
jtbandes 4d12176
cleanup, update validate script to use parseChannel
jtbandes 5589b01
cleanup & fixes
jtbandes 145d6d4
fix conformance-lint
jtbandes 7dcef38
remove links which are broken in typedoc rendered output
jtbandes 5651518
Use @foxglove/protobufjs fork
jtbandes 6912dee
Merge remote-tracking branch 'origin/main' into jacob/support-lib
jtbandes 69c8b72
update from latest studio code
jtbandes 7a583ca
add @mcap/browser package with BlobReadable
jtbandes 5d89e9c
Extra protobuf time/duration modifications so they can live in studio…
jtbandes 811f45e
exports & comments
jtbandes 80b98d6
readme update
jtbandes 350e423
update comment to remove RosDatatypes reference
jtbandes c95de40
update (disabled) publish workflow
jtbandes d6b5b39
more CI & package.json updates
jtbandes 11c2385
Merge remote-tracking branch 'origin/main' into jacob/platform-libs
jtbandes fb90670
remove parseChannel stuff
jtbandes 8fdfa66
lint & yarn fixes
jtbandes 7f4f110
update readmes
jtbandes 2d602c1
cleanup
jtbandes 718bfd5
prepare for publishing
jtbandes b3467d1
yarn dedupe
jtbandes File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,23 +6,32 @@ | |
"typescript/benchmarks", | ||
"typescript/core", | ||
"typescript/examples/*", | ||
"typescript/support", | ||
"typescript/nodejs", | ||
"typescript/browser", | ||
"website" | ||
] | ||
}, | ||
"scripts": { | ||
"prettier": "prettier --write .", | ||
"prettier:check": "prettier --check .", | ||
"docs:swift:start": "swift package --disable-sandbox preview-documentation --target MCAP", | ||
"typedoc": "typedoc --out __docs__/typescript typescript/core/src/index.ts --tsconfig typescript/core/tsconfig.json", | ||
"typedoc": "yarn typescript:build && typedoc --out __docs__/typescript --options typescript/typedoc.json", | ||
"start": "yarn workspace website start", | ||
"spellcheck": "cspell --relative '**'", | ||
"typescript:test": "yarn jest --config typescript/jest.config.json", | ||
"typescript:build": "yarn workspace @mcap/core build && yarn workspace @mcap/support build && yarn workspace @mcap/nodejs build && yarn workspace @mcap/browser build", | ||
"typescript:clean": "yarn workspace @mcap/core build --clean && yarn workspace @mcap/support build --clean && yarn workspace @mcap/nodejs build --clean && yarn workspace @mcap/browser build --clean", | ||
"test:conformance:generate-inputs": "yarn workspace @foxglove/mcap-conformance generate-inputs --data-dir \"$(pwd)/tests/conformance/data\"", | ||
"test:conformance": "yarn workspace @foxglove/mcap-conformance run-tests --data-dir \"$(pwd)/tests/conformance/data\"" | ||
}, | ||
"packageManager": "[email protected]", | ||
"devDependencies": { | ||
"cspell": "^6.26.3", | ||
"jest": "29.4.3", | ||
"prettier": "^2.8.4", | ||
"ts-jest": "29.0.5", | ||
"ts-node": "10.9.1", | ||
"typedoc": "^0.23.25" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Development guide | ||
|
||
Install dependencies: | ||
|
||
``` | ||
corepack enable | ||
yarn install | ||
``` | ||
|
||
Run lint/tests: | ||
|
||
``` | ||
yarn workspace @mcap/core lint | ||
yarn workspace @mcap/core test | ||
``` | ||
|
||
Read and validate an MCAP file: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-example-validate validate file.mcap | ||
``` | ||
|
||
Run benchmarks: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-benchmarks bench | ||
``` | ||
|
||
Run benchmarks with Chrome debugger attached to use profiling tools: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-benchmarks bench:debug | ||
``` | ||
|
||
## Releasing to NPM | ||
|
||
- Check out the version of the code you want to release | ||
- Update package.json in `typescript/{pkg}/package.json` with the new version. | ||
- Make a PR with your changes to package.json | ||
- Wait for the PR to pass CI and merge | ||
- Checkout main and tag the merged commit with `releases/typescript/{pkg}/v#.#.#` (replace #.#.# with the version you used in package.json) | ||
- Push the new tag to the repo with `git push origin releases/typescript/{pkg}/v#.#.#` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,10 @@ | ||
# TypeScript libraries for MCAP | ||
|
||
Install dependencies: | ||
[MCAP](https://mcap.dev/) is a modular container format and logging library for pub/sub messages with arbitrary message serialization. It is primarily intended for use in robotics applications, and works well under various workloads, resource constraints, and durability requirements. | ||
|
||
``` | ||
corepack enable | ||
yarn install | ||
``` | ||
The following NPM packages are provided for use with JavaScript and TypeScript: | ||
|
||
Run lint/tests: | ||
|
||
``` | ||
yarn workspace @mcap/core lint | ||
yarn workspace @mcap/core test | ||
``` | ||
|
||
Read and validate an MCAP file: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-example-validate validate file.mcap | ||
``` | ||
|
||
Run benchmarks: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-benchmarks bench | ||
``` | ||
|
||
Run benchmarks with Chrome debugger attached to use profiling tools: | ||
|
||
``` | ||
yarn workspace @foxglove/mcap-benchmarks bench:debug | ||
``` | ||
- **@mcap/core** – low-level readers and writers | ||
- **@mcap/support** – support for well-known compression formats and encodings | ||
- **@mcap/nodejs** – support for Node.js environment | ||
- **@mcap/browser** – support for browser environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* eslint-env node */ | ||
module.exports = { | ||
env: { es2020: true }, | ||
ignorePatterns: ["dist"], | ||
extends: ["plugin:@foxglove/base", "plugin:@foxglove/jest", "plugin:import/recommended"], | ||
overrides: [ | ||
{ | ||
files: ["*.ts", "*.tsx"], | ||
extends: ["plugin:@foxglove/typescript"], | ||
parserOptions: { | ||
project: "../*/tsconfig.json", | ||
tsconfigRootDir: __dirname, | ||
// Enable typescript-eslint to use `src` files for type information across project references | ||
// <https://github.com/typescript-eslint/typescript-eslint/issues/2094> | ||
EXPERIMENTAL_useSourceOfProjectReferenceRedirect: true, | ||
}, | ||
}, | ||
], | ||
rules: { | ||
"no-warning-comments": ["error", { terms: ["fixme"], location: "anywhere" }], | ||
}, | ||
settings: { | ||
"import/resolver": { | ||
typescript: true, | ||
node: true, | ||
}, | ||
}, | ||
}; |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
don't tag references have to be preceded by
refs/tags/
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can for disambiguation, but it's not required