Socket
Socket
Sign inDemoInstall

danger

Package Overview
Dependencies
Maintainers
3
Versions
320
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

danger - npm Package Compare versions

Comparing version 11.1.2 to 11.1.3

2

distribution/api/fetch.js

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

var secure = url.toString().startsWith("https");
init.agent = secure ? new https_proxy_agent_1.default(proxy) : new http_proxy_agent_1.default(proxy);
init.agent = secure ? (0, https_proxy_agent_1.default)(proxy) : (0, http_proxy_agent_1.default)(proxy);
}

@@ -168,0 +168,0 @@ return retryableFetch(url, init).then(function (response) { return __awaiter(_this, void 0, void 0, function () {

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

get: function () {
return this.env.CI_PROJECT_PATH;
return this.env.CI_MERGE_REQUEST_PROJECT_PATH || this.env.CI_PROJECT_PATH;
},

@@ -44,0 +44,0 @@ enumerable: false,

@@ -57,2 +57,3 @@ #! /usr/bin/env node

var path_1 = require("path");
var crypto_1 = require("crypto");
var d = (0, debug_1.debug)("runner");

@@ -120,3 +121,4 @@ // Given the nature of this command, it can be tricky to test, so I use a command like this:

if (foundDSL) {
var resultsPath = (0, path_1.join)((0, os_1.tmpdir)(), "danger-results.json");
var filename = "danger-results-".concat((0, crypto_1.randomBytes)(4).toString("hex"), ".json");
var resultsPath = (0, path_1.join)((0, os_1.tmpdir)(), filename);
d("Writing results into ".concat(resultsPath));

@@ -123,0 +125,0 @@ (0, fs_1.writeFileSync)(resultsPath, JSON.stringify(results, null, 2), "utf8");

@@ -91,4 +91,4 @@ "use strict";

// For projects not using Jest
var checkSeparateTestsFolder = function (src, tests) { return "\n// Request changes to ".concat(src, " also include changes to tests.\nconst allFiles = danger.git.modified_files.concat(danger.git.created_files)\nconst hasAppChanges = allFiles.some(p => includes(p, '").concat(src, "/'))\nconst hasTestChanges = allFiles.some(p => includes(p, '").concat(tests, "/'))\n\nif (hasAppChanges && !hasTestChanges) {\n warn('This PR does not include changes to tests, even though it affects app code.');\n}\n"); };
var checkSeparateTestsFolder = function (src, tests) { return "\n// Request changes to ".concat(src, " also include changes to tests.\nconst allFiles = danger.git.modified_files.concat(danger.git.created_files)\nconst hasAppChanges = allFiles.some(p => p.includes('").concat(src, "/'))\nconst hasTestChanges = allFiles.some(p => p.includes('").concat(tests, "/'))\n\nif (hasAppChanges && !hasTestChanges) {\n warn('This PR does not include changes to tests, even though it affects app code.');\n}\n"); };
exports.checkSeparateTestsFolder = checkSeparateTestsFolder;
//# sourceMappingURL=default-dangerfile.js.map

@@ -58,2 +58,3 @@ "use strict";

var os_1 = require("os");
var crypto_1 = require("crypto");
var d = (0, debug_1.debug)("runDangerSubprocess");

@@ -93,3 +94,4 @@ // If a sub-process passes this to stdout then danger-js will pass

if (exec.options.passURLForDSL) {
var resultsPath = (0, path_1.join)((0, os_1.tmpdir)(), "danger-dsl.json");
var filename = "danger-dsl-".concat((0, crypto_1.randomBytes)(4).toString("hex"), ".json");
var resultsPath = (0, path_1.join)((0, os_1.tmpdir)(), filename);
(0, fs_1.writeFileSync)(resultsPath, dslJSONString, "utf8");

@@ -96,0 +98,0 @@ var url = "danger://dsl/".concat(resultsPath);

@@ -6,3 +6,3 @@ //

import { Octokit as GitHub } from "@octokit/rest"
import { Gitlab } from "gitlab"
import { Gitlab } from "@gitbeaker/node"
import { File } from "parse-diff"

@@ -9,0 +9,0 @@

@@ -1,2 +0,2 @@

import { Gitlab } from "gitlab";
import { Gitlab } from "@gitbeaker/node";
import { RepoMetaData } from "./BitBucketServerDSL";

@@ -3,0 +3,0 @@ export interface GitLabJSONDSL {

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

if (proxy) {
agent = new https_proxy_agent_1.default(proxy);
agent = (0, https_proxy_agent_1.default)(proxy);
}

@@ -449,0 +449,0 @@ return _this.fetch(url, {

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

if (proxy) {
agent = new https_proxy_agent_1.default(proxy);
agent = (0, https_proxy_agent_1.default)(proxy);
}

@@ -459,0 +459,0 @@ return _this.fetch(url, {

@@ -23,3 +23,96 @@ import { RepoMetaData } from "../../dsl/BitBucketServerDSL";

get mergeRequestURL(): string;
get apiInstance(): import("gitlab/dist/infrastructure").Mapper<typeof import("gitlab/dist/services"), "Groups" | "GroupAccessRequests" | "GroupBadges" | "GroupCustomAttributes" | "GroupIssueBoards" | "GroupMembers" | "GroupMilestones" | "GroupProjects" | "GroupVariables" | "Epics" | "EpicIssues" | "EpicNotes" | "EpicDiscussions" | "Users" | "UserCustomAttributes" | "UserEmails" | "UserImpersonationTokens" | "UserKeys" | "UserGPGKeys" | "Branches" | "Commits" | "CommitDiscussions" | "ContainerRegistry" | "DeployKeys" | "Deployments" | "Environments" | "Issues" | "IssueAwardEmojis" | "IssueNotes" | "IssueDiscussions" | "Jobs" | "Labels" | "MergeRequests" | "MergeRequestAwardEmojis" | "MergeRequestDiscussions" | "MergeRequestNotes" | "Pipelines" | "PipelineSchedules" | "PipelineScheduleVariables" | "Projects" | "ProjectAccessRequests" | "ProjectBadges" | "ProjectCustomAttributes" | "ProjectImportExport" | "ProjectIssueBoards" | "ProjectHooks" | "ProjectMembers" | "ProjectMilestones" | "ProjectSnippets" | "ProjectSnippetNotes" | "ProjectSnippetDiscussions" | "ProjectSnippetAwardEmojis" | "ProtectedBranches" | "ProtectedTags" | "ProjectVariables" | "PushRules" | "Releases" | "ReleaseLinks" | "Repositories" | "RepositoryFiles" | "Runners" | "Services" | "Tags" | "Triggers" | "Todos" | "ApplicationSettings" | "BroadcastMessages" | "Events" | "FeatureFlags" | "GeoNodes" | "GitignoreTemplates" | "GitLabCIYMLTemplates" | "Keys" | "Licence" | "LicenceTemplates" | "Lint" | "Namespaces" | "NotificationSettings" | "Markdown" | "PagesDomains" | "Search" | "SidekiqMetrics" | "Snippets" | "SystemHooks" | "Version" | "Wikis">;
get apiInstance(): {
Groups: import("@gitbeaker/core").Groups;
GroupAccessRequests: import("@gitbeaker/core").GroupAccessRequests;
GroupBadges: import("@gitbeaker/core").GroupBadges;
GroupCustomAttributes: import("@gitbeaker/core").GroupCustomAttributes;
GroupIssueBoards: import("@gitbeaker/core").GroupIssueBoards;
GroupMembers: import("@gitbeaker/core").GroupMembers;
GroupMilestones: import("@gitbeaker/core").GroupMilestones;
GroupProjects: import("@gitbeaker/core").GroupProjects;
GroupVariables: import("@gitbeaker/core").GroupVariables;
GroupLabels: import("@gitbeaker/core").GroupLabels;
GroupDeployTokens: import("@gitbeaker/core").GroupDeployTokens;
Epics: import("@gitbeaker/core").Epics;
EpicIssues: import("@gitbeaker/core").EpicIssues;
EpicNotes: import("@gitbeaker/core").EpicNotes;
EpicDiscussions: import("@gitbeaker/core").EpicDiscussions;
Users: import("@gitbeaker/core").Users;
UserCustomAttributes: import("@gitbeaker/core").UserCustomAttributes;
UserEmails: import("@gitbeaker/core").UserEmails;
UserImpersonationTokens: import("@gitbeaker/core").UserImpersonationTokens;
UserKeys: import("@gitbeaker/core").UserKeys;
UserGPGKeys: import("@gitbeaker/core").UserGPGKeys;
Branches: import("@gitbeaker/core").Branches;
Commits: import("@gitbeaker/core").Commits;
CommitDiscussions: import("@gitbeaker/core").CommitDiscussions;
ContainerRegistry: import("@gitbeaker/core").ContainerRegistry;
DeployKeys: import("@gitbeaker/core").DeployKeys;
Deployments: import("@gitbeaker/core").Deployments;
Environments: import("@gitbeaker/core").Environments;
Issues: import("@gitbeaker/core").Issues;
IssuesStatistics: import("@gitbeaker/core").IssuesStatistics;
IssueAwardEmojis: import("@gitbeaker/core").IssueAwardEmojis;
IssueNotes: import("@gitbeaker/core").IssueNotes;
IssueDiscussions: import("@gitbeaker/core").IssueDiscussions;
Jobs: import("@gitbeaker/core").Jobs;
Labels: import("@gitbeaker/core").Labels;
MergeRequests: import("@gitbeaker/core").MergeRequests;
MergeRequestAwardEmojis: import("@gitbeaker/core").MergeRequestAwardEmojis;
MergeRequestDiscussions: import("@gitbeaker/core").MergeRequestDiscussions;
MergeRequestNotes: import("@gitbeaker/core").MergeRequestNotes;
Packages: import("@gitbeaker/core").Packages;
Pipelines: import("@gitbeaker/core").Pipelines;
PipelineSchedules: import("@gitbeaker/core").PipelineSchedules;
PipelineScheduleVariables: import("@gitbeaker/core").PipelineScheduleVariables;
Projects: import("@gitbeaker/core").Projects;
ProjectAccessRequests: import("@gitbeaker/core").ProjectAccessRequests;
ProjectBadges: import("@gitbeaker/core").ProjectBadges;
ProjectCustomAttributes: import("@gitbeaker/core").ProjectCustomAttributes;
ProjectImportExport: import("@gitbeaker/core").ProjectImportExport;
ProjectIssueBoards: import("@gitbeaker/core").ProjectIssueBoards;
ProjectHooks: import("@gitbeaker/core").ProjectHooks;
ProjectMembers: import("@gitbeaker/core").ProjectMembers;
ProjectMilestones: import("@gitbeaker/core").ProjectMilestones;
ProjectSnippets: import("@gitbeaker/core").ProjectSnippets;
ProjectSnippetNotes: import("@gitbeaker/core").ProjectSnippetNotes;
ProjectSnippetDiscussions: import("@gitbeaker/core").ProjectSnippetDiscussions;
ProjectSnippetAwardEmojis: import("@gitbeaker/core").ProjectSnippetAwardEmojis;
ProtectedBranches: import("@gitbeaker/core").ProtectedBranches;
ProtectedTags: import("@gitbeaker/core").ProtectedTags;
ProjectVariables: import("@gitbeaker/core").ProjectVariables;
ProjectDeployTokens: import("@gitbeaker/core").ProjectDeployTokens;
PushRules: import("@gitbeaker/core").PushRules;
Releases: import("@gitbeaker/core").Releases;
ReleaseLinks: import("@gitbeaker/core").ReleaseLinks;
Repositories: import("@gitbeaker/core").Repositories;
RepositoryFiles: import("@gitbeaker/core").RepositoryFiles;
Runners: import("@gitbeaker/core").Runners;
Services: import("@gitbeaker/core").Services;
Tags: import("@gitbeaker/core").Tags;
Todos: import("@gitbeaker/core").Todos;
Triggers: import("@gitbeaker/core").Triggers;
VulnerabilityFindings: import("@gitbeaker/core").VulnerabilityFindings;
ApplicationSettings: import("@gitbeaker/core").ApplicationSettings;
BroadcastMessages: import("@gitbeaker/core").BroadcastMessages;
Events: import("@gitbeaker/core").Events;
FeatureFlags: import("@gitbeaker/core").FeatureFlags;
GeoNodes: import("@gitbeaker/core").GeoNodes;
GitignoreTemplates: import("@gitbeaker/core").GitignoreTemplates;
GitLabCIYMLTemplates: import("@gitbeaker/core").GitLabCIYMLTemplates;
Keys: import("@gitbeaker/core").Keys;
License: import("@gitbeaker/core").License;
LicenceTemplates: import("@gitbeaker/core").LicenceTemplates;
Lint: import("@gitbeaker/core").Lint;
Namespaces: import("@gitbeaker/core").Namespaces;
NotificationSettings: import("@gitbeaker/core").NotificationSettings;
Markdown: import("@gitbeaker/core").Markdown;
PagesDomains: import("@gitbeaker/core").PagesDomains;
Search: import("@gitbeaker/core").Search;
SidekiqMetrics: import("@gitbeaker/core").SidekiqMetrics;
Snippets: import("@gitbeaker/core").Snippets;
SystemHooks: import("@gitbeaker/core").SystemHooks;
Version: import("@gitbeaker/core").Version;
Wikis: import("@gitbeaker/core").Wikis;
};
getUser: () => Promise<GitLabUserProfile>;

@@ -26,0 +119,0 @@ getMergeRequestInfo: () => Promise<GitLabMR>;

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

var fetch_1 = require("../../api/fetch");
var gitlab_1 = require("gitlab");
var node_1 = require("@gitbeaker/node");
var debug_1 = require("../../debug");

@@ -121,3 +121,3 @@ function getGitLabAPICredentialsFromEnv(env) {

return [4 /*yield*/, this.api.MergeRequests.approvals(this.repoMetadata.repoSlug, {
mergerequestIId: Number(this.repoMetadata.pullRequestID),
mergerequestIid: Number(this.repoMetadata.pullRequestID),
})];

@@ -166,3 +166,3 @@ case 1:

api = this.api.MergeRequestNotes;
return [4 /*yield*/, api.all(this.repoMetadata.repoSlug, this.repoMetadata.pullRequestID)];
return [4 /*yield*/, api.all(this.repoMetadata.repoSlug, this.repoMetadata.pullRequestID, {})];
case 1:

@@ -388,3 +388,3 @@ notes = (_a.sent());

this.fetch = fetch_1.api;
this.api = new gitlab_1.Gitlab(repoCredentials);
this.api = new node_1.Gitlab(repoCredentials);
this.hostURL = repoCredentials.host;

@@ -391,0 +391,0 @@ }

{
"name": "danger",
"version": "11.1.2",
"version": "11.1.3",
"description": "Unit tests for Team Culture",

@@ -102,3 +102,2 @@ "main": "distribution/danger.js",

"@types/get-stdin": "^5.0.1",
"@types/http-proxy-agent": "^2.0.1",
"@types/jest": "^24.0.11",

@@ -112,3 +111,2 @@ "@types/json5": "^0.0.30",

"@types/micromatch": "^3.1.0",
"@types/nock": "^10.0.3",
"@types/node": "^10.11.3",

@@ -135,3 +133,3 @@ "@types/node-fetch": "^2.5.12",

"madge": "^5.0.1",
"nock": "^10.0.6",
"nock": "^13.2.0",
"pkg": "^5.4.0",

@@ -156,5 +154,6 @@ "prettier": "^2.5.1",

"get-stdin": "^6.0.0",
"@gitbeaker/node": "^21.3.0",
"gitlab": "^10.0.1",
"http-proxy-agent": "^2.1.0",
"https-proxy-agent": "^2.2.1",
"http-proxy-agent": "^5.0.0",
"https-proxy-agent": "^5.0.1",
"hyperlinker": "^1.0.0",

@@ -161,0 +160,0 @@ "json5": "^2.1.0",

Sorry, the diff of this file is too big to display

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

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

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