Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@sketch-hq/sketch-file-format-marina
Advanced tools
> FlatBuffers Schema for Binary Marina Files.
FlatBuffers Schema for Binary Marina Files.
No special tooling is required to work on the schema, simply make your edits to the src/schema.fbs
file, and push your changes in a Pull Request.
If your change should result in a new version of the schema being released, then you may need to add a changeset file. Read the Release Process section below for more on this.
nvm use
yarn
brew install flatbuffers
yarn build
. The output folder is: dest
.The file schema.fbs
in this repo is a FlatBuffers schema. Using this schema and the flatc
tool we can generate type safe APIs in a range of languages for reading and writing binary files that conform to the schema.
In this way we can increase our confidence that different parts of our infrastructure can create and consume compatible binary files, as long as they use APIs generated from the same version of the schema or an evolution of the schema that has followed the rules described in the Compatibility Across Versions section below.
The schema in this repo sits upstream of any pieces of infrastructure that implement it. New schema versions can be released at any time - it will be the responsibility of downstream projects to coordinate standardization on new schema versions.
FlatBuffers binaries are designed to facilitate forwards and backwards compatibility. Read the docs for more information but this is achieved by taking into account the following constraints:
As an illustration, given two schema versions v1
and v2
:
v1 file | v2 file | |
---|---|---|
Reading file using API generated from v1 | Fully compatible | - Any new fields present in the v2 file data are ignored by the v1 code- Any fields newly deprecated in v2 and missing from the v2 file data are returned as their default values to the v1 code |
Reading file using API generated from v2 | - Any new fields defined in v2 and missing from the v1 file data are returned as their default values- Attemping to read deprecated fields is a compile-time error in v2 , even if they may be present in the v1 file | Fully compatible |
Note: "default values" here means
0
for scalars and some form ofnull
for other types (table and struct references).
A GitHub Action will run the build process for Pull Requests and merges to the main branch, so there's no requirement to be able to run the build locally.
However, if you do decide to build locally, you'll need to install the flat buffers cli, as stated before. Then, you can run:
yarn build
This will generate the APIs in C++, Swift and TypeScript and the tool executables into the dest
folder.
This repository uses Atlassian Changesets to manage the release process. Read the docs for more information, but the top-level summary is:
Upon release the following actions take place:
@sketch-hq/sketch-presentation-file-format
build/vX.X.X
where X.X.X
is the semver. This allows projects, like Sketch, that manage dependencies via Git submodules to easily access build output via a Git commitYou need to add a changeset file to your Pull Request when it contains changes to the schema, or changes that result in different build output. A changeset is not required when making changes to other parts of the repo (e.g. documentation changes etc.).
Add a YAML file to the .changeset
folder, with the following contents:
---
"@sketch-hq/sketch-presentation-file-format": <bump-type>
---
A description of the change.
The <bump-type>
should be replaced with one of patch
, minor
or major
according to meanings documented in the semver spec.
Alternatively, if you have Yarn installed you may invoke
yarn changeset
to add the changeset file using a CLI wizard.
FAQs
The npm package @sketch-hq/sketch-file-format-marina receives a total of 0 weekly downloads. As such, @sketch-hq/sketch-file-format-marina popularity was classified as not popular.
We found that @sketch-hq/sketch-file-format-marina demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.