Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Mendoza decoder in TypeScript.
$ npm install mendoza
// or
$ yarn add mendoza
Basic example:
import {applyPatch} from "mendoza"
let left = {…};
let patch = […];
let right = applyPatch(left, patch);
Incremental patcher:
import {incremental} from "mendoza"
const {Value, rebaseValue, wrap, unwrap, getType, applyPatch} = incremental
// Create an empty initial version:
const ROOT = wrap(null, null);
// Input of patches:
let patches = […];
// `origin` can be whatever you want to identify where a change comes from:
let origin = 0;
// Reference to the latest version:
let value = ROOT;
// Rebasing is for maintaing history across deleted versions:
let rebaseTarget;
for (let patch of patches) {
// Apply the patch:
let newValue = applyPatch(value, patch, origin);
// Rebase if needed:
if (rebaseTarget) {
newValue = rebaseValue(rebaseTarget, newValue);
}
// If the document was deleted, store the previous version so we can rebase:
if (getType(newValue) === "null") {
rebaseTarget = value;
} else {
rebaseTarget = null;
}
value = newValue;
origin++;
}
// Return the final full object:
console.log(unwrap(value));
MIT © Sanity.io
Run the "CI & Release" workflow. Make sure to select the main branch and check "Release new version".
Semantic release will only release on configured branches, so it is safe to run release on any branch.
FAQs
Mendoza, differ for structured documents
The npm package mendoza receives a total of 96,177 weekly downloads. As such, mendoza popularity was classified as popular.
We found that mendoza demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 47 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.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.