Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@definitelytyped/definitions-parser

Package Overview
Dependencies
Maintainers
7
Versions
537
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@definitelytyped/definitions-parser - npm Package Compare versions

Comparing version 0.0.190 to 0.0.191

10

CHANGELOG.md
# @definitelytyped/definitions-parser
## 0.0.191
### Patch Changes
- 5d83a8ed: Fix command execution, paths on Windows
- Updated dependencies [5d83a8ed]
- Updated dependencies [5d83a8ed]
- @definitelytyped/utils@0.0.185
- @definitelytyped/header-parser@0.0.187
## 0.0.190

@@ -4,0 +14,0 @@

18

dist/get-affected-packages.js

@@ -14,3 +14,3 @@ "use strict";

// No ... prefix; we only want packages that were actually edited.
const changedPackageDirectories = await (0, utils_1.execAndThrowErrors)(`pnpm ls -r --depth -1 --parseable --filter '@types/**[${settings_1.sourceRemote}/${settings_1.sourceBranch}]'`, definitelyTypedPath);
const changedPackageDirectories = await (0, utils_1.execAndThrowErrors)("pnpm", ["ls", "-r", "--depth", "-1", "--parseable", "--filter", `@types/**[${settings_1.sourceRemote}/${settings_1.sourceBranch}]`], definitelyTypedPath);
const git = (0, git_1.gitChanges)(diffs);

@@ -25,3 +25,3 @@ if ("errors" in git) {

// Start the filter off with all packages that were touched along with those that depend on them.
const filters = [`--filter '...@types/**[${settings_1.sourceRemote}/${settings_1.sourceBranch}]'`];
const filters = ["--filter", `...@types/**[${settings_1.sourceRemote}/${settings_1.sourceBranch}]`];
// For packages that have been deleted, they won't appear in the graph anymore; look for packages

@@ -34,3 +34,3 @@ // that still depend on the package (but via npm) and manually add them.

(d.version === "*" || (0, semver_1.satisfies)((0, packages_1.formatTypingVersion)(d.version), version))) {
filters.push(`--filter '...${dep.name}'`);
filters.push("--filter", `...${dep.name}`);
break;

@@ -43,3 +43,3 @@ }

for (let i = 0; i < filters.length; i += 100) {
allDependentDirectories.push(await (0, utils_1.execAndThrowErrors)(`pnpm ls -r --depth -1 --parseable ${filters.slice(i, i + 100).join(" ")}`, definitelyTypedPath));
allDependentDirectories.push(await (0, utils_1.execAndThrowErrors)("pnpm", ["ls", "-r", "--depth", "-1", "--parseable", ...filters.slice(i, i + 100)], definitelyTypedPath));
}

@@ -61,3 +61,3 @@ return getAffectedPackagesWorker(allPackages, changedPackageDirectories, addedPackageDirectories, allDependentDirectories, definitelyTypedPath);

async function tryGetTypingsData(d) {
const dep = (0, packages_1.getDependencyFromFile)(d + "/index.d.ts");
const dep = (0, packages_1.getDependencyFromFile)((0, utils_1.normalizeSlashes)(d + "/index.d.ts"));
if (!dep)

@@ -73,4 +73,10 @@ return undefined;

function getDirectoryName(dt) {
return (line) => line && line !== dt ? (0, utils_1.assertDefined)((0, utils_1.withoutStart)(line, dt + "/"), line + " is missing prefix " + dt) : undefined;
dt = (0, utils_1.normalizeSlashes)(dt);
return (line) => {
line = (0, utils_1.normalizeSlashes)(line);
return line && line !== dt
? (0, utils_1.assertDefined)((0, utils_1.withoutStart)(line, dt + "/"), line + " is missing prefix " + dt)
: undefined;
};
}
//# sourceMappingURL=get-affected-packages.js.map

@@ -18,3 +18,3 @@ "use strict";

}
const { error, stderr, stdout } = await (0, utils_1.exec)("git diff --name-only", options.definitelyTypedPath);
const { error, stderr, stdout } = await (0, utils_1.exec)("git", ["diff", "--name-only"], options.definitelyTypedPath);
if (error) {

@@ -21,0 +21,0 @@ throw new Error(error.message + ": " + error.cmd);

@@ -47,3 +47,3 @@ "use strict";

try {
await run(`git rev-parse --verify ${settings_1.sourceBranch}`);
await run("git", ["rev-parse", "--verify", settings_1.sourceBranch]);
// If this succeeds, we got the full clone.

@@ -53,9 +53,9 @@ }

// This is a shallow clone.
await run(`git fetch ${settings_1.sourceRemote} ${settings_1.sourceBranch}`);
await run(`git branch ${settings_1.sourceBranch} FETCH_HEAD`);
await run("git", ["fetch", settings_1.sourceRemote, settings_1.sourceBranch]);
await run("git", ["branch", settings_1.sourceBranch, "FETCH_HEAD"]);
}
let diff = (await run(`git diff ${settings_1.sourceBranch} --name-status`)).trim();
let diff = (await run("git", ["diff", settings_1.sourceBranch, "--name-status"])).trim();
if (diff === "") {
// We are probably already on master, so compare to the last commit.
diff = (await run(`git diff ${settings_1.sourceBranch}~1 --name-status`)).trim();
diff = (await run("git", ["diff", `${settings_1.sourceBranch}~1`, "--name-status"])).trim();
}

@@ -66,5 +66,5 @@ return diff.split("\n").map((line) => {

});
async function run(cmd) {
log(`Running: ${cmd}`);
const stdout = await (0, utils_1.execAndThrowErrors)(cmd, definitelyTypedPath);
async function run(cmd, args) {
log(`Running: ${cmd} ${args.join(" ")}`);
const stdout = await (0, utils_1.execAndThrowErrors)(cmd, args, definitelyTypedPath);
log(stdout);

@@ -71,0 +71,0 @@ return stdout;

{
"name": "@definitelytyped/definitions-parser",
"version": "0.0.190",
"version": "0.0.191",
"description": "Reads the DefinitelyTyped repository and provides an API for querying its metadata",

@@ -23,5 +23,5 @@ "homepage": "https://github.com/microsoft/DefinitelyTyped-tools/tree/master/packages/definitions-parser#readme",

"semver": "^7.3.7",
"@definitelytyped/header-parser": "0.0.186",
"@definitelytyped/header-parser": "0.0.187",
"@definitelytyped/typescript-versions": "0.0.180",
"@definitelytyped/utils": "0.0.184"
"@definitelytyped/utils": "0.0.185"
},

@@ -28,0 +28,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc