Skip to content

Commit

Permalink
main - c733ca5 build: update dependency @octokit/graphql to v8.2.0 (#…
Browse files Browse the repository at this point in the history
…2567)
  • Loading branch information
angular-robot committed Feb 4, 2025
1 parent ff2616f commit 09c3850
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 119 deletions.
7 changes: 3 additions & 4 deletions bundles/chunk-SR7KIYOV.mjs → bundles/chunk-UNKXKASI.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10211,7 +10211,7 @@ function withDefaults2(oldEndpoint, newDefaults) {
}
var request = withDefaults2(endpoint, defaults_default);

// node_modules/@octokit/core/node_modules/@octokit/graphql/dist-bundle/index.js
// node_modules/@octokit/graphql/dist-bundle/index.js
var VERSION3 = "0.0.0-development";
function _buildMessageForResponseErrors(data) {
return `Request failed due to following response errors:
Expand Down Expand Up @@ -13860,8 +13860,7 @@ async function assertPassingReleasePrechecks(config, newVersion, builtPackagesWi
export {
require_dist,
addDryRunFlag,
getUserAgent,
request,
GraphqlResponseError,
GithubClient,
AuthenticatedGithubClient,
isGithubApiError,
Expand Down Expand Up @@ -13916,4 +13915,4 @@ export {
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
//# sourceMappingURL=chunk-SR7KIYOV.mjs.map
//# sourceMappingURL=chunk-UNKXKASI.mjs.map

Large diffs are not rendered by default.

110 changes: 3 additions & 107 deletions bundles/cli.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
GITHUB_TOKEN_GENERATE_URL,
GitClient,
GitCommandError,
GraphqlResponseError,
ReleaseNotesLevel,
ScopeRequirement,
actionLabels,
Expand All @@ -29,22 +30,20 @@ import {
getLtsNpmDistTagOfMajor,
getNextBranchName,
getRepositoryGitUrl,
getUserAgent,
getVersionInfoForBranch,
getYarnPathFromNpmGlobalBinaries,
isGithubApiError,
isVersionBranch,
isVersionPublishedToNpm,
managedLabels,
mergeLabels,
request,
require_dist,
require_dist2,
require_semver,
requiresLabels,
resolveYarnScriptForProject,
targetLabels
} from "./chunk-SR7KIYOV.mjs";
} from "./chunk-UNKXKASI.mjs";
import {
ChildProcess,
ConfigValidationError,
Expand Down Expand Up @@ -33808,109 +33807,6 @@ var import_typed_graphqlify3 = __toESM(require_dist());

// bazel-out/k8-fastbuild/bin/ng-dev/utils/github.js
var import_typed_graphqlify2 = __toESM(require_dist());

// node_modules/@octokit/graphql/dist-bundle/index.js
var VERSION = "0.0.0-development";
function _buildMessageForResponseErrors(data) {
return `Request failed due to following response errors:
` + data.errors.map((e) => ` - ${e.message}`).join("\n");
}
var GraphqlResponseError = class extends Error {
constructor(request2, headers, response) {
super(_buildMessageForResponseErrors(response));
this.request = request2;
this.headers = headers;
this.response = response;
this.errors = response.errors;
this.data = response.data;
if (Error.captureStackTrace) {
Error.captureStackTrace(this, this.constructor);
}
}
name = "GraphqlResponseError";
errors;
data;
};
var NON_VARIABLE_OPTIONS = [
"method",
"baseUrl",
"url",
"headers",
"request",
"query",
"mediaType"
];
var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
function graphql(request2, query, options) {
if (options) {
if (typeof query === "string" && "query" in options) {
return Promise.reject(
new Error(`[@octokit/graphql] "query" cannot be used as variable name`)
);
}
for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key))
continue;
return Promise.reject(
new Error(
`[@octokit/graphql] "${key}" cannot be used as variable name`
)
);
}
}
const parsedOptions = typeof query === "string" ? Object.assign({ query }, options) : query;
const requestOptions = Object.keys(
parsedOptions
).reduce((result, key) => {
if (NON_VARIABLE_OPTIONS.includes(key)) {
result[key] = parsedOptions[key];
return result;
}
if (!result.variables) {
result.variables = {};
}
result.variables[key] = parsedOptions[key];
return result;
}, {});
const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;
if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {
requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, "/api/graphql");
}
return request2(requestOptions).then((response) => {
if (response.data.errors) {
const headers = {};
for (const key of Object.keys(response.headers)) {
headers[key] = response.headers[key];
}
throw new GraphqlResponseError(
requestOptions,
headers,
response.data
);
}
return response.data.data;
});
}
function withDefaults(request2, newDefaults) {
const newRequest = request2.defaults(newDefaults);
const newApi = (query, options) => {
return graphql(newRequest, query, options);
};
return Object.assign(newApi, {
defaults: withDefaults.bind(null, newRequest),
endpoint: newRequest.endpoint
});
}
var graphql2 = withDefaults(request, {
headers: {
"user-agent": `octokit-graphql.js/${VERSION} ${getUserAgent()}`
},
method: "POST",
url: "/graphql"
});

// bazel-out/k8-fastbuild/bin/ng-dev/utils/github.js
async function getPr(prSchema, prNumber, git) {
var _a2;
const { owner, name } = git.remoteConfig;
Expand Down Expand Up @@ -37720,7 +37616,7 @@ import * as fs3 from "fs";
import lockfile from "@yarnpkg/lockfile";
async function verifyNgDevToolIsUpToDate(workspacePath) {
var _a2, _b2, _c2;
const localVersion = `0.0.0-be0b37a11ec2ff7d71e7b6174f3b84fb3a1c0ee5`;
const localVersion = `0.0.0-c733ca57b2e7aa390554b4be97a945b3ecc011f6`;
const workspacePackageJsonFile = path6.join(workspacePath, workspaceRelativePackageJsonPath);
const workspaceDirLockFile = path6.join(workspacePath, workspaceRelativeYarnLockFilePath);
try {
Expand Down
6 changes: 3 additions & 3 deletions bundles/cli.mjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundles/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import {
requiresLabels,
resolveYarnScriptForProject,
targetLabels
} from "./chunk-SR7KIYOV.mjs";
} from "./chunk-UNKXKASI.mjs";
import {
ConfigValidationError,
DEFAULT_LOG_LEVEL,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@angular/ng-dev",
"version": "0.0.0-be0b37a11ec2ff7d71e7b6174f3b84fb3a1c0ee5",
"version": "0.0.0-c733ca57b2e7aa390554b4be97a945b3ecc011f6",
"type": "module",
"private": true,
"bin": "./bundles/cli.mjs",
Expand Down
2 changes: 1 addition & 1 deletion utils/version-check.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion utils/version-check.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { Log } from './logging.js';
*/
export async function verifyNgDevToolIsUpToDate(workspacePath) {
// The placeholder will be replaced by the `pkg_npm` substitutions.
const localVersion = `0.0.0-be0b37a11ec2ff7d71e7b6174f3b84fb3a1c0ee5`;
const localVersion = `0.0.0-c733ca57b2e7aa390554b4be97a945b3ecc011f6`;
const workspacePackageJsonFile = path.join(workspacePath, workspaceRelativePackageJsonPath);
const workspaceDirLockFile = path.join(workspacePath, workspaceRelativeYarnLockFilePath);
try {
Expand Down

0 comments on commit 09c3850

Please sign in to comment.