diff --git a/.changeset/changeset-github.cjs b/.changeset/changeset-github.cjs new file mode 100644 index 0000000000..3b9f3c3e7a --- /dev/null +++ b/.changeset/changeset-github.cjs @@ -0,0 +1,1790 @@ +"use strict"; +var __create = Object.create; +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; +}; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// node_modules/dotenv/lib/main.js +var require_main = __commonJS({ + "node_modules/dotenv/lib/main.js"(exports2, module2) { + var fs = require("fs"); + var path = require("path"); + function log(message) { + console.log(`[dotenv][DEBUG] ${message}`); + } + var NEWLINE = "\n"; + var RE_INI_KEY_VAL = /^\s*([\w.-]+)\s*=\s*(.*)?\s*$/; + var RE_NEWLINES = /\\n/g; + var NEWLINES_MATCH = /\n|\r|\r\n/; + function parse(src, options) { + const debug = Boolean(options && options.debug); + const obj = {}; + src.toString().split(NEWLINES_MATCH).forEach(function(line, idx) { + const keyValueArr = line.match(RE_INI_KEY_VAL); + if (keyValueArr != null) { + const key = keyValueArr[1]; + let val = keyValueArr[2] || ""; + const end = val.length - 1; + const isDoubleQuoted = val[0] === '"' && val[end] === '"'; + const isSingleQuoted = val[0] === "'" && val[end] === "'"; + if (isSingleQuoted || isDoubleQuoted) { + val = val.substring(1, end); + if (isDoubleQuoted) { + val = val.replace(RE_NEWLINES, NEWLINE); + } + } else { + val = val.trim(); + } + obj[key] = val; + } else if (debug) { + log(`did not match key and value when parsing line ${idx + 1}: ${line}`); + } + }); + return obj; + } + function config2(options) { + let dotenvPath = path.resolve(process.cwd(), ".env"); + let encoding = "utf8"; + let debug = false; + if (options) { + if (options.path != null) { + dotenvPath = options.path; + } + if (options.encoding != null) { + encoding = options.encoding; + } + if (options.debug != null) { + debug = true; + } + } + try { + const parsed = parse(fs.readFileSync(dotenvPath, { encoding }), { debug }); + Object.keys(parsed).forEach(function(key) { + if (!Object.prototype.hasOwnProperty.call(process.env, key)) { + process.env[key] = parsed[key]; + } else if (debug) { + log(`"${key}" is already defined in \`process.env\` and will not be overwritten`); + } + }); + return { parsed }; + } catch (e) { + return { error: e }; + } + } + module2.exports.config = config2; + module2.exports.parse = parse; + } +}); + +// node_modules/node-fetch/lib/index.js +var require_lib = __commonJS({ + "node_modules/node-fetch/lib/index.js"(exports2, module2) { + "use strict"; + Object.defineProperty(exports2, "__esModule", { value: true }); + function _interopDefault(ex) { + return ex && typeof ex === "object" && "default" in ex ? ex["default"] : ex; + } + var Stream = _interopDefault(require("stream")); + var http = _interopDefault(require("http")); + var Url = _interopDefault(require("url")); + var https = _interopDefault(require("https")); + var zlib = _interopDefault(require("zlib")); + var Readable = Stream.Readable; + var BUFFER = /* @__PURE__ */ Symbol("buffer"); + var TYPE = /* @__PURE__ */ Symbol("type"); + var Blob = class _Blob { + constructor() { + this[TYPE] = ""; + const blobParts = arguments[0]; + const options = arguments[1]; + const buffers = []; + let size = 0; + if (blobParts) { + const a = blobParts; + const length = Number(a.length); + for (let i = 0; i < length; i++) { + const element = a[i]; + let buffer; + if (element instanceof Buffer) { + buffer = element; + } else if (ArrayBuffer.isView(element)) { + buffer = Buffer.from(element.buffer, element.byteOffset, element.byteLength); + } else if (element instanceof ArrayBuffer) { + buffer = Buffer.from(element); + } else if (element instanceof _Blob) { + buffer = element[BUFFER]; + } else { + buffer = Buffer.from(typeof element === "string" ? element : String(element)); + } + size += buffer.length; + buffers.push(buffer); + } + } + this[BUFFER] = Buffer.concat(buffers); + let type = options && options.type !== void 0 && String(options.type).toLowerCase(); + if (type && !/[^\u0020-\u007E]/.test(type)) { + this[TYPE] = type; + } + } + get size() { + return this[BUFFER].length; + } + get type() { + return this[TYPE]; + } + text() { + return Promise.resolve(this[BUFFER].toString()); + } + arrayBuffer() { + const buf = this[BUFFER]; + const ab = buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + return Promise.resolve(ab); + } + stream() { + const readable = new Readable(); + readable._read = function() { + }; + readable.push(this[BUFFER]); + readable.push(null); + return readable; + } + toString() { + return "[object Blob]"; + } + slice() { + const size = this.size; + const start = arguments[0]; + const end = arguments[1]; + let relativeStart, relativeEnd; + if (start === void 0) { + relativeStart = 0; + } else if (start < 0) { + relativeStart = Math.max(size + start, 0); + } else { + relativeStart = Math.min(start, size); + } + if (end === void 0) { + relativeEnd = size; + } else if (end < 0) { + relativeEnd = Math.max(size + end, 0); + } else { + relativeEnd = Math.min(end, size); + } + const span = Math.max(relativeEnd - relativeStart, 0); + const buffer = this[BUFFER]; + const slicedBuffer = buffer.slice(relativeStart, relativeStart + span); + const blob = new _Blob([], { type: arguments[2] }); + blob[BUFFER] = slicedBuffer; + return blob; + } + }; + Object.defineProperties(Blob.prototype, { + size: { enumerable: true }, + type: { enumerable: true }, + slice: { enumerable: true } + }); + Object.defineProperty(Blob.prototype, Symbol.toStringTag, { + value: "Blob", + writable: false, + enumerable: false, + configurable: true + }); + function FetchError(message, type, systemError) { + Error.call(this, message); + this.message = message; + this.type = type; + if (systemError) { + this.code = this.errno = systemError.code; + } + Error.captureStackTrace(this, this.constructor); + } + FetchError.prototype = Object.create(Error.prototype); + FetchError.prototype.constructor = FetchError; + FetchError.prototype.name = "FetchError"; + var convert; + try { + convert = require("encoding").convert; + } catch (e) { + } + var INTERNALS = /* @__PURE__ */ Symbol("Body internals"); + var PassThrough = Stream.PassThrough; + function Body(body) { + var _this = this; + var _ref = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, _ref$size = _ref.size; + let size = _ref$size === void 0 ? 0 : _ref$size; + var _ref$timeout = _ref.timeout; + let timeout = _ref$timeout === void 0 ? 0 : _ref$timeout; + if (body == null) { + body = null; + } else if (isURLSearchParams(body)) { + body = Buffer.from(body.toString()); + } else if (isBlob(body)) ; + else if (Buffer.isBuffer(body)) ; + else if (Object.prototype.toString.call(body) === "[object ArrayBuffer]") { + body = Buffer.from(body); + } else if (ArrayBuffer.isView(body)) { + body = Buffer.from(body.buffer, body.byteOffset, body.byteLength); + } else if (body instanceof Stream) ; + else { + body = Buffer.from(String(body)); + } + this[INTERNALS] = { + body, + disturbed: false, + error: null + }; + this.size = size; + this.timeout = timeout; + if (body instanceof Stream) { + body.on("error", function(err) { + const error = err.name === "AbortError" ? err : new FetchError(`Invalid response body while trying to fetch ${_this.url}: ${err.message}`, "system", err); + _this[INTERNALS].error = error; + }); + } + } + Body.prototype = { + get body() { + return this[INTERNALS].body; + }, + get bodyUsed() { + return this[INTERNALS].disturbed; + }, + /** + * Decode response as ArrayBuffer + * + * @return Promise + */ + arrayBuffer() { + return consumeBody.call(this).then(function(buf) { + return buf.buffer.slice(buf.byteOffset, buf.byteOffset + buf.byteLength); + }); + }, + /** + * Return raw response as Blob + * + * @return Promise + */ + blob() { + let ct = this.headers && this.headers.get("content-type") || ""; + return consumeBody.call(this).then(function(buf) { + return Object.assign( + // Prevent copying + new Blob([], { + type: ct.toLowerCase() + }), + { + [BUFFER]: buf + } + ); + }); + }, + /** + * Decode response as json + * + * @return Promise + */ + json() { + var _this2 = this; + return consumeBody.call(this).then(function(buffer) { + try { + return JSON.parse(buffer.toString()); + } catch (err) { + return Body.Promise.reject(new FetchError(`invalid json response body at ${_this2.url} reason: ${err.message}`, "invalid-json")); + } + }); + }, + /** + * Decode response as text + * + * @return Promise + */ + text() { + return consumeBody.call(this).then(function(buffer) { + return buffer.toString(); + }); + }, + /** + * Decode response as buffer (non-spec api) + * + * @return Promise + */ + buffer() { + return consumeBody.call(this); + }, + /** + * Decode response as text, while automatically detecting the encoding and + * trying to decode to UTF-8 (non-spec api) + * + * @return Promise + */ + textConverted() { + var _this3 = this; + return consumeBody.call(this).then(function(buffer) { + return convertBody(buffer, _this3.headers); + }); + } + }; + Object.defineProperties(Body.prototype, { + body: { enumerable: true }, + bodyUsed: { enumerable: true }, + arrayBuffer: { enumerable: true }, + blob: { enumerable: true }, + json: { enumerable: true }, + text: { enumerable: true } + }); + Body.mixIn = function(proto) { + for (const name of Object.getOwnPropertyNames(Body.prototype)) { + if (!(name in proto)) { + const desc = Object.getOwnPropertyDescriptor(Body.prototype, name); + Object.defineProperty(proto, name, desc); + } + } + }; + function consumeBody() { + var _this4 = this; + if (this[INTERNALS].disturbed) { + return Body.Promise.reject(new TypeError(`body used already for: ${this.url}`)); + } + this[INTERNALS].disturbed = true; + if (this[INTERNALS].error) { + return Body.Promise.reject(this[INTERNALS].error); + } + let body = this.body; + if (body === null) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + if (isBlob(body)) { + body = body.stream(); + } + if (Buffer.isBuffer(body)) { + return Body.Promise.resolve(body); + } + if (!(body instanceof Stream)) { + return Body.Promise.resolve(Buffer.alloc(0)); + } + let accum = []; + let accumBytes = 0; + let abort = false; + return new Body.Promise(function(resolve, reject) { + let resTimeout; + if (_this4.timeout) { + resTimeout = setTimeout(function() { + abort = true; + reject(new FetchError(`Response timeout while trying to fetch ${_this4.url} (over ${_this4.timeout}ms)`, "body-timeout")); + }, _this4.timeout); + } + body.on("error", function(err) { + if (err.name === "AbortError") { + abort = true; + reject(err); + } else { + reject(new FetchError(`Invalid response body while trying to fetch ${_this4.url}: ${err.message}`, "system", err)); + } + }); + body.on("data", function(chunk) { + if (abort || chunk === null) { + return; + } + if (_this4.size && accumBytes + chunk.length > _this4.size) { + abort = true; + reject(new FetchError(`content size at ${_this4.url} over limit: ${_this4.size}`, "max-size")); + return; + } + accumBytes += chunk.length; + accum.push(chunk); + }); + body.on("end", function() { + if (abort) { + return; + } + clearTimeout(resTimeout); + try { + resolve(Buffer.concat(accum, accumBytes)); + } catch (err) { + reject(new FetchError(`Could not create Buffer from response body for ${_this4.url}: ${err.message}`, "system", err)); + } + }); + }); + } + function convertBody(buffer, headers) { + if (typeof convert !== "function") { + throw new Error("The package `encoding` must be installed to use the textConverted() function"); + } + const ct = headers.get("content-type"); + let charset = "utf-8"; + let res, str; + if (ct) { + res = /charset=([^;]*)/i.exec(ct); + } + str = buffer.slice(0, 1024).toString(); + if (!res && str) { + res = / 0 && arguments[0] !== void 0 ? arguments[0] : void 0; + this[MAP] = /* @__PURE__ */ Object.create(null); + if (init instanceof _Headers) { + const rawHeaders = init.raw(); + const headerNames = Object.keys(rawHeaders); + for (const headerName of headerNames) { + for (const value of rawHeaders[headerName]) { + this.append(headerName, value); + } + } + return; + } + if (init == null) ; + else if (typeof init === "object") { + const method = init[Symbol.iterator]; + if (method != null) { + if (typeof method !== "function") { + throw new TypeError("Header pairs must be iterable"); + } + const pairs = []; + for (const pair of init) { + if (typeof pair !== "object" || typeof pair[Symbol.iterator] !== "function") { + throw new TypeError("Each header pair must be iterable"); + } + pairs.push(Array.from(pair)); + } + for (const pair of pairs) { + if (pair.length !== 2) { + throw new TypeError("Each header pair must be a name/value tuple"); + } + this.append(pair[0], pair[1]); + } + } else { + for (const key of Object.keys(init)) { + const value = init[key]; + this.append(key, value); + } + } + } else { + throw new TypeError("Provided initializer must be an object"); + } + } + /** + * Return combined header value given name + * + * @param String name Header name + * @return Mixed + */ + get(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key === void 0) { + return null; + } + return this[MAP][key].join(", "); + } + /** + * Iterate over all headers + * + * @param Function callback Executed for each item with parameters (value, name, thisArg) + * @param Boolean thisArg `this` context for callback function + * @return Void + */ + forEach(callback) { + let thisArg = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : void 0; + let pairs = getHeaders(this); + let i = 0; + while (i < pairs.length) { + var _pairs$i = pairs[i]; + const name = _pairs$i[0], value = _pairs$i[1]; + callback.call(thisArg, value, name, this); + pairs = getHeaders(this); + i++; + } + } + /** + * Overwrite header values given name + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + set(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + this[MAP][key !== void 0 ? key : name] = [value]; + } + /** + * Append a value onto existing header + * + * @param String name Header name + * @param String value Header value + * @return Void + */ + append(name, value) { + name = `${name}`; + value = `${value}`; + validateName(name); + validateValue(value); + const key = find(this[MAP], name); + if (key !== void 0) { + this[MAP][key].push(value); + } else { + this[MAP][name] = [value]; + } + } + /** + * Check for header name existence + * + * @param String name Header name + * @return Boolean + */ + has(name) { + name = `${name}`; + validateName(name); + return find(this[MAP], name) !== void 0; + } + /** + * Delete all header values given name + * + * @param String name Header name + * @return Void + */ + delete(name) { + name = `${name}`; + validateName(name); + const key = find(this[MAP], name); + if (key !== void 0) { + delete this[MAP][key]; + } + } + /** + * Return raw headers (non-spec api) + * + * @return Object + */ + raw() { + return this[MAP]; + } + /** + * Get an iterator on keys. + * + * @return Iterator + */ + keys() { + return createHeadersIterator(this, "key"); + } + /** + * Get an iterator on values. + * + * @return Iterator + */ + values() { + return createHeadersIterator(this, "value"); + } + /** + * Get an iterator on entries. + * + * This is the default iterator of the Headers object. + * + * @return Iterator + */ + [Symbol.iterator]() { + return createHeadersIterator(this, "key+value"); + } + }; + Headers.prototype.entries = Headers.prototype[Symbol.iterator]; + Object.defineProperty(Headers.prototype, Symbol.toStringTag, { + value: "Headers", + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperties(Headers.prototype, { + get: { enumerable: true }, + forEach: { enumerable: true }, + set: { enumerable: true }, + append: { enumerable: true }, + has: { enumerable: true }, + delete: { enumerable: true }, + keys: { enumerable: true }, + values: { enumerable: true }, + entries: { enumerable: true } + }); + function getHeaders(headers) { + let kind = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "key+value"; + const keys = Object.keys(headers[MAP]).sort(); + return keys.map(kind === "key" ? function(k) { + return k.toLowerCase(); + } : kind === "value" ? function(k) { + return headers[MAP][k].join(", "); + } : function(k) { + return [k.toLowerCase(), headers[MAP][k].join(", ")]; + }); + } + var INTERNAL = /* @__PURE__ */ Symbol("internal"); + function createHeadersIterator(target, kind) { + const iterator = Object.create(HeadersIteratorPrototype); + iterator[INTERNAL] = { + target, + kind, + index: 0 + }; + return iterator; + } + var HeadersIteratorPrototype = Object.setPrototypeOf({ + next() { + if (!this || Object.getPrototypeOf(this) !== HeadersIteratorPrototype) { + throw new TypeError("Value of `this` is not a HeadersIterator"); + } + var _INTERNAL = this[INTERNAL]; + const target = _INTERNAL.target, kind = _INTERNAL.kind, index = _INTERNAL.index; + const values = getHeaders(target, kind); + const len = values.length; + if (index >= len) { + return { + value: void 0, + done: true + }; + } + this[INTERNAL].index = index + 1; + return { + value: values[index], + done: false + }; + } + }, Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()))); + Object.defineProperty(HeadersIteratorPrototype, Symbol.toStringTag, { + value: "HeadersIterator", + writable: false, + enumerable: false, + configurable: true + }); + function exportNodeCompatibleHeaders(headers) { + const obj = Object.assign({ __proto__: null }, headers[MAP]); + const hostHeaderKey = find(headers[MAP], "Host"); + if (hostHeaderKey !== void 0) { + obj[hostHeaderKey] = obj[hostHeaderKey][0]; + } + return obj; + } + function createHeadersLenient(obj) { + const headers = new Headers(); + for (const name of Object.keys(obj)) { + if (invalidTokenRegex.test(name)) { + continue; + } + if (Array.isArray(obj[name])) { + for (const val of obj[name]) { + if (invalidHeaderCharRegex.test(val)) { + continue; + } + if (headers[MAP][name] === void 0) { + headers[MAP][name] = [val]; + } else { + headers[MAP][name].push(val); + } + } + } else if (!invalidHeaderCharRegex.test(obj[name])) { + headers[MAP][name] = [obj[name]]; + } + } + return headers; + } + var INTERNALS$1 = /* @__PURE__ */ Symbol("Response internals"); + var STATUS_CODES = http.STATUS_CODES; + var Response = class _Response { + constructor() { + let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null; + let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + Body.call(this, body, opts); + const status = opts.status || 200; + const headers = new Headers(opts.headers); + if (body != null && !headers.has("Content-Type")) { + const contentType = extractContentType(body); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + this[INTERNALS$1] = { + url: opts.url, + status, + statusText: opts.statusText || STATUS_CODES[status], + headers, + counter: opts.counter + }; + } + get url() { + return this[INTERNALS$1].url || ""; + } + get status() { + return this[INTERNALS$1].status; + } + /** + * Convenience property representing if the request ended normally + */ + get ok() { + return this[INTERNALS$1].status >= 200 && this[INTERNALS$1].status < 300; + } + get redirected() { + return this[INTERNALS$1].counter > 0; + } + get statusText() { + return this[INTERNALS$1].statusText; + } + get headers() { + return this[INTERNALS$1].headers; + } + /** + * Clone this response + * + * @return Response + */ + clone() { + return new _Response(clone(this), { + url: this.url, + status: this.status, + statusText: this.statusText, + headers: this.headers, + ok: this.ok, + redirected: this.redirected + }); + } + }; + Body.mixIn(Response.prototype); + Object.defineProperties(Response.prototype, { + url: { enumerable: true }, + status: { enumerable: true }, + ok: { enumerable: true }, + redirected: { enumerable: true }, + statusText: { enumerable: true }, + headers: { enumerable: true }, + clone: { enumerable: true } + }); + Object.defineProperty(Response.prototype, Symbol.toStringTag, { + value: "Response", + writable: false, + enumerable: false, + configurable: true + }); + var INTERNALS$2 = /* @__PURE__ */ Symbol("Request internals"); + var parse_url = Url.parse; + var format_url = Url.format; + var streamDestructionSupported = "destroy" in Stream.Readable.prototype; + function isRequest(input) { + return typeof input === "object" && typeof input[INTERNALS$2] === "object"; + } + function isAbortSignal(signal) { + const proto = signal && typeof signal === "object" && Object.getPrototypeOf(signal); + return !!(proto && proto.constructor.name === "AbortSignal"); + } + var Request = class _Request { + constructor(input) { + let init = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}; + let parsedURL; + if (!isRequest(input)) { + if (input && input.href) { + parsedURL = parse_url(input.href); + } else { + parsedURL = parse_url(`${input}`); + } + input = {}; + } else { + parsedURL = parse_url(input.url); + } + let method = init.method || input.method || "GET"; + method = method.toUpperCase(); + if ((init.body != null || isRequest(input) && input.body !== null) && (method === "GET" || method === "HEAD")) { + throw new TypeError("Request with GET/HEAD method cannot have body"); + } + let inputBody = init.body != null ? init.body : isRequest(input) && input.body !== null ? clone(input) : null; + Body.call(this, inputBody, { + timeout: init.timeout || input.timeout || 0, + size: init.size || input.size || 0 + }); + const headers = new Headers(init.headers || input.headers || {}); + if (inputBody != null && !headers.has("Content-Type")) { + const contentType = extractContentType(inputBody); + if (contentType) { + headers.append("Content-Type", contentType); + } + } + let signal = isRequest(input) ? input.signal : null; + if ("signal" in init) signal = init.signal; + if (signal != null && !isAbortSignal(signal)) { + throw new TypeError("Expected signal to be an instanceof AbortSignal"); + } + this[INTERNALS$2] = { + method, + redirect: init.redirect || input.redirect || "follow", + headers, + parsedURL, + signal + }; + this.follow = init.follow !== void 0 ? init.follow : input.follow !== void 0 ? input.follow : 20; + this.compress = init.compress !== void 0 ? init.compress : input.compress !== void 0 ? input.compress : true; + this.counter = init.counter || input.counter || 0; + this.agent = init.agent || input.agent; + } + get method() { + return this[INTERNALS$2].method; + } + get url() { + return format_url(this[INTERNALS$2].parsedURL); + } + get headers() { + return this[INTERNALS$2].headers; + } + get redirect() { + return this[INTERNALS$2].redirect; + } + get signal() { + return this[INTERNALS$2].signal; + } + /** + * Clone this request + * + * @return Request + */ + clone() { + return new _Request(this); + } + }; + Body.mixIn(Request.prototype); + Object.defineProperty(Request.prototype, Symbol.toStringTag, { + value: "Request", + writable: false, + enumerable: false, + configurable: true + }); + Object.defineProperties(Request.prototype, { + method: { enumerable: true }, + url: { enumerable: true }, + headers: { enumerable: true }, + redirect: { enumerable: true }, + clone: { enumerable: true }, + signal: { enumerable: true } + }); + function getNodeRequestOptions(request) { + const parsedURL = request[INTERNALS$2].parsedURL; + const headers = new Headers(request[INTERNALS$2].headers); + if (!headers.has("Accept")) { + headers.set("Accept", "*/*"); + } + if (!parsedURL.protocol || !parsedURL.hostname) { + throw new TypeError("Only absolute URLs are supported"); + } + if (!/^https?:$/.test(parsedURL.protocol)) { + throw new TypeError("Only HTTP(S) protocols are supported"); + } + if (request.signal && request.body instanceof Stream.Readable && !streamDestructionSupported) { + throw new Error("Cancellation of streamed requests with AbortSignal is not supported in node < 8"); + } + let contentLengthValue = null; + if (request.body == null && /^(POST|PUT)$/i.test(request.method)) { + contentLengthValue = "0"; + } + if (request.body != null) { + const totalBytes = getTotalBytes(request); + if (typeof totalBytes === "number") { + contentLengthValue = String(totalBytes); + } + } + if (contentLengthValue) { + headers.set("Content-Length", contentLengthValue); + } + if (!headers.has("User-Agent")) { + headers.set("User-Agent", "node-fetch/1.0 (+https://github.com/bitinn/node-fetch)"); + } + if (request.compress && !headers.has("Accept-Encoding")) { + headers.set("Accept-Encoding", "gzip,deflate"); + } + let agent = request.agent; + if (typeof agent === "function") { + agent = agent(parsedURL); + } + if (!headers.has("Connection") && !agent) { + headers.set("Connection", "close"); + } + return Object.assign({}, parsedURL, { + method: request.method, + headers: exportNodeCompatibleHeaders(headers), + agent + }); + } + function AbortError(message) { + Error.call(this, message); + this.type = "aborted"; + this.message = message; + Error.captureStackTrace(this, this.constructor); + } + AbortError.prototype = Object.create(Error.prototype); + AbortError.prototype.constructor = AbortError; + AbortError.prototype.name = "AbortError"; + var PassThrough$1 = Stream.PassThrough; + var resolve_url = Url.resolve; + function fetch2(url, opts) { + if (!fetch2.Promise) { + throw new Error("native promise missing, set fetch.Promise to your favorite alternative"); + } + Body.Promise = fetch2.Promise; + return new fetch2.Promise(function(resolve, reject) { + const request = new Request(url, opts); + const options = getNodeRequestOptions(request); + const send = (options.protocol === "https:" ? https : http).request; + const signal = request.signal; + let response = null; + const abort = function abort2() { + let error = new AbortError("The user aborted a request."); + reject(error); + if (request.body && request.body instanceof Stream.Readable) { + request.body.destroy(error); + } + if (!response || !response.body) return; + response.body.emit("error", error); + }; + if (signal && signal.aborted) { + abort(); + return; + } + const abortAndFinalize = function abortAndFinalize2() { + abort(); + finalize(); + }; + const req = send(options); + let reqTimeout; + if (signal) { + signal.addEventListener("abort", abortAndFinalize); + } + function finalize() { + req.abort(); + if (signal) signal.removeEventListener("abort", abortAndFinalize); + clearTimeout(reqTimeout); + } + if (request.timeout) { + req.once("socket", function(socket) { + reqTimeout = setTimeout(function() { + reject(new FetchError(`network timeout at: ${request.url}`, "request-timeout")); + finalize(); + }, request.timeout); + }); + } + req.on("error", function(err) { + reject(new FetchError(`request to ${request.url} failed, reason: ${err.message}`, "system", err)); + finalize(); + }); + req.on("response", function(res) { + clearTimeout(reqTimeout); + const headers = createHeadersLenient(res.headers); + if (fetch2.isRedirect(res.statusCode)) { + const location = headers.get("Location"); + const locationURL = location === null ? null : resolve_url(request.url, location); + switch (request.redirect) { + case "error": + reject(new FetchError(`redirect mode is set to error: ${request.url}`, "no-redirect")); + finalize(); + return; + case "manual": + if (locationURL !== null) { + try { + headers.set("Location", locationURL); + } catch (err) { + reject(err); + } + } + break; + case "follow": + if (locationURL === null) { + break; + } + if (request.counter >= request.follow) { + reject(new FetchError(`maximum redirect reached at: ${request.url}`, "max-redirect")); + finalize(); + return; + } + const requestOpts = { + headers: new Headers(request.headers), + follow: request.follow, + counter: request.counter + 1, + agent: request.agent, + compress: request.compress, + method: request.method, + body: request.body, + signal: request.signal, + timeout: request.timeout + }; + if (res.statusCode !== 303 && request.body && getTotalBytes(request) === null) { + reject(new FetchError("Cannot follow redirect with body being a readable stream", "unsupported-redirect")); + finalize(); + return; + } + if (res.statusCode === 303 || (res.statusCode === 301 || res.statusCode === 302) && request.method === "POST") { + requestOpts.method = "GET"; + requestOpts.body = void 0; + requestOpts.headers.delete("content-length"); + } + resolve(fetch2(new Request(locationURL, requestOpts))); + finalize(); + return; + } + } + res.once("end", function() { + if (signal) signal.removeEventListener("abort", abortAndFinalize); + }); + let body = res.pipe(new PassThrough$1()); + const response_options = { + url: request.url, + status: res.statusCode, + statusText: res.statusMessage, + headers, + size: request.size, + timeout: request.timeout, + counter: request.counter + }; + const codings = headers.get("Content-Encoding"); + if (!request.compress || request.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) { + response = new Response(body, response_options); + resolve(response); + return; + } + const zlibOptions = { + flush: zlib.Z_SYNC_FLUSH, + finishFlush: zlib.Z_SYNC_FLUSH + }; + if (codings == "gzip" || codings == "x-gzip") { + body = body.pipe(zlib.createGunzip(zlibOptions)); + response = new Response(body, response_options); + resolve(response); + return; + } + if (codings == "deflate" || codings == "x-deflate") { + const raw = res.pipe(new PassThrough$1()); + raw.once("data", function(chunk) { + if ((chunk[0] & 15) === 8) { + body = body.pipe(zlib.createInflate()); + } else { + body = body.pipe(zlib.createInflateRaw()); + } + response = new Response(body, response_options); + resolve(response); + }); + return; + } + if (codings == "br" && typeof zlib.createBrotliDecompress === "function") { + body = body.pipe(zlib.createBrotliDecompress()); + response = new Response(body, response_options); + resolve(response); + return; + } + response = new Response(body, response_options); + resolve(response); + }); + writeToStream(req, request); + }); + } + fetch2.isRedirect = function(code) { + return code === 301 || code === 302 || code === 303 || code === 307 || code === 308; + }; + fetch2.Promise = global.Promise; + module2.exports = exports2 = fetch2; + Object.defineProperty(exports2, "__esModule", { value: true }); + exports2.default = exports2; + exports2.Headers = Headers; + exports2.Request = Request; + exports2.Response = Response; + exports2.FetchError = FetchError; + } +}); + +// node_modules/dataloader/index.js +var require_dataloader = __commonJS({ + "node_modules/dataloader/index.js"(exports2, module2) { + function _classCallCheck(instance, Constructor) { + if (!(instance instanceof Constructor)) { + throw new TypeError("Cannot call a class as a function"); + } + } + var DataLoader2 = (function() { + function DataLoader3(batchLoadFn, options) { + _classCallCheck(this, DataLoader3); + if (typeof batchLoadFn !== "function") { + throw new TypeError("DataLoader must be constructed with a function which accepts " + ("Array and returns Promise>, but got: " + batchLoadFn + ".")); + } + this._batchLoadFn = batchLoadFn; + this._options = options; + this._promiseCache = getValidCacheMap(options); + this._queue = []; + } + DataLoader3.prototype.load = function load(key) { + var _this = this; + if (key === null || key === void 0) { + throw new TypeError("The loader.load() function must be called with a value," + ("but got: " + String(key) + ".")); + } + var options = this._options; + var shouldBatch = !options || options.batch !== false; + var shouldCache = !options || options.cache !== false; + var cacheKeyFn = options && options.cacheKeyFn; + var cacheKey = cacheKeyFn ? cacheKeyFn(key) : key; + if (shouldCache) { + var cachedPromise = this._promiseCache.get(cacheKey); + if (cachedPromise) { + return cachedPromise; + } + } + var promise = new Promise(function(resolve, reject) { + _this._queue.push({ key, resolve, reject }); + if (_this._queue.length === 1) { + if (shouldBatch) { + enqueuePostPromiseJob(function() { + return dispatchQueue(_this); + }); + } else { + dispatchQueue(_this); + } + } + }); + if (shouldCache) { + this._promiseCache.set(cacheKey, promise); + } + return promise; + }; + DataLoader3.prototype.loadMany = function loadMany(keys) { + var _this2 = this; + if (!Array.isArray(keys)) { + throw new TypeError("The loader.loadMany() function must be called with Array " + ("but got: " + keys + ".")); + } + return Promise.all(keys.map(function(key) { + return _this2.load(key); + })); + }; + DataLoader3.prototype.clear = function clear(key) { + var cacheKeyFn = this._options && this._options.cacheKeyFn; + var cacheKey = cacheKeyFn ? cacheKeyFn(key) : key; + this._promiseCache.delete(cacheKey); + return this; + }; + DataLoader3.prototype.clearAll = function clearAll() { + this._promiseCache.clear(); + return this; + }; + DataLoader3.prototype.prime = function prime(key, value) { + var cacheKeyFn = this._options && this._options.cacheKeyFn; + var cacheKey = cacheKeyFn ? cacheKeyFn(key) : key; + if (this._promiseCache.get(cacheKey) === void 0) { + var promise = value instanceof Error ? Promise.reject(value) : Promise.resolve(value); + this._promiseCache.set(cacheKey, promise); + } + return this; + }; + return DataLoader3; + })(); + var enqueuePostPromiseJob = typeof process === "object" && typeof process.nextTick === "function" ? function(fn) { + if (!resolvedPromise) { + resolvedPromise = Promise.resolve(); + } + resolvedPromise.then(function() { + return process.nextTick(fn); + }); + } : setImmediate || setTimeout; + var resolvedPromise; + function dispatchQueue(loader) { + var queue = loader._queue; + loader._queue = []; + var maxBatchSize = loader._options && loader._options.maxBatchSize; + if (maxBatchSize && maxBatchSize > 0 && maxBatchSize < queue.length) { + for (var i = 0; i < queue.length / maxBatchSize; i++) { + dispatchQueueBatch(loader, queue.slice(i * maxBatchSize, (i + 1) * maxBatchSize)); + } + } else { + dispatchQueueBatch(loader, queue); + } + } + function dispatchQueueBatch(loader, queue) { + var keys = queue.map(function(_ref) { + var key = _ref.key; + return key; + }); + var batchLoadFn = loader._batchLoadFn; + var batchPromise = batchLoadFn(keys); + if (!batchPromise || typeof batchPromise.then !== "function") { + return failedDispatch(loader, queue, new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did " + ("not return a Promise: " + String(batchPromise) + "."))); + } + batchPromise.then(function(values) { + if (!Array.isArray(values)) { + throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did " + ("not return a Promise of an Array: " + String(values) + ".")); + } + if (values.length !== keys.length) { + throw new TypeError("DataLoader must be constructed with a function which accepts Array and returns Promise>, but the function did not return a Promise of an Array of the same length as the Array of keys." + ("\n\nKeys:\n" + String(keys)) + ("\n\nValues:\n" + String(values))); + } + queue.forEach(function(_ref2, index) { + var resolve = _ref2.resolve, reject = _ref2.reject; + var value = values[index]; + if (value instanceof Error) { + reject(value); + } else { + resolve(value); + } + }); + }).catch(function(error) { + return failedDispatch(loader, queue, error); + }); + } + function failedDispatch(loader, queue, error) { + queue.forEach(function(_ref3) { + var key = _ref3.key, reject = _ref3.reject; + loader.clear(key); + reject(error); + }); + } + function getValidCacheMap(options) { + var cacheMap = options && options.cacheMap; + if (!cacheMap) { + return /* @__PURE__ */ new Map(); + } + var cacheFunctions = ["get", "set", "delete", "clear"]; + var missingFunctions = cacheFunctions.filter(function(fnName) { + return cacheMap && typeof cacheMap[fnName] !== "function"; + }); + if (missingFunctions.length !== 0) { + throw new TypeError("Custom cacheMap missing methods: " + missingFunctions.join(", ")); + } + return cacheMap; + } + module2.exports = DataLoader2; + } +}); + +// packages/changelog-github/src/index.ts +var index_exports = {}; +__export(index_exports, { + default: () => index_default +}); +module.exports = __toCommonJS(index_exports); +var import_dotenv = __toESM(require_main()); + +// packages/get-github-info/src/index.ts +var import_node_fetch = __toESM(require_lib()); +var import_dataloader = __toESM(require_dataloader()); +function readEnv() { + const GITHUB_GRAPHQL_URL = process.env.GITHUB_GRAPHQL_URL || "https://api.github.com/graphql"; + const GITHUB_SERVER_URL = process.env.GITHUB_SERVER_URL || "https://github.com"; + const GITHUB_TOKEN = process.env.GITHUB_TOKEN; + return { GITHUB_GRAPHQL_URL, GITHUB_SERVER_URL, GITHUB_TOKEN }; +} +var validRepoNameRegex = /^[\w.-]+\/[\w.-]+$/; +function makeQuery(repos) { + return ` + query { + ${Object.keys(repos).map( + (repo, i) => `a${i}: repository( + owner: ${JSON.stringify(repo.split("/")[0])} + name: ${JSON.stringify(repo.split("/")[1])} + ) { + ${repos[repo].map( + (data) => data.kind === "commit" ? `a${data.commit}: object(expression: ${JSON.stringify( + data.commit + )}) { + ... on Commit { + commitUrl + associatedPullRequests(first: 50) { + nodes { + number + url + mergedAt + author { + login + url + } + } + } + author { + user { + login + url + } + } + }}` : `pr__${data.pull}: pullRequest(number: ${data.pull}) { + url + author { + login + url + } + mergeCommit { + commitUrl + abbreviatedOid + } + }` + ).join("\n")} + }` + ).join("\n")} + } + `; +} +var DEFAULT_BATCH_SIZE = 100; +var configuredBatchSize; +function setBatchSize(size) { + configuredBatchSize = size; +} +function getBatchSize() { + if (configuredBatchSize !== void 0 && configuredBatchSize > 0) { + return configuredBatchSize; + } + const envVal = process.env.CHANGESET_GITHUB_BATCH_SIZE; + if (envVal) { + const parsed = parseInt(envVal, 10); + if (!isNaN(parsed) && parsed > 0) { + return parsed; + } + } + return DEFAULT_BATCH_SIZE; +} +async function fetchBatch(requests, env) { + let repos = {}; + requests.forEach(({ repo, ...data2 }) => { + if (repos[repo] === void 0) { + repos[repo] = []; + } + repos[repo].push(data2); + }); + let fetchResponse; + try { + fetchResponse = await (0, import_node_fetch.default)(env.GITHUB_GRAPHQL_URL, { + method: "POST", + headers: { + Authorization: `Token ${env.GITHUB_TOKEN}` + }, + body: JSON.stringify({ query: makeQuery(repos) }) + }); + } catch (e) { + throw new Error( + `An error occurred when fetching data from GitHub +${e.message}` + ); + } + let data; + try { + data = await fetchResponse.json(); + } catch (e) { + throw new Error(`Failed to parse data from GitHub +${e.message}`); + } + if (data.errors) { + throw new Error( + `Fetched data from GitHub returned errors +${JSON.stringify( + data.errors, + null, + 2 + )}` + ); + } + if (!data.data) { + throw new Error( + `Fetched data from GitHub has missing data +${JSON.stringify(data)}` + ); + } + let cleanedData = {}; + Object.keys(repos).forEach((repo, index) => { + let output = { + commit: {}, + pull: {} + }; + cleanedData[repo] = output; + Object.entries(data.data[`a${index}`]).forEach(([field, value]) => { + if (field[0] === "a") { + output.commit[field.substring(1)] = value; + } else { + output.pull[field.replace("pr__", "")] = value; + } + }); + }); + return requests.map( + ({ repo, ...data2 }) => cleanedData[repo][data2.kind][data2.kind === "pull" ? data2.pull : data2.commit] + ); +} +var GHDataLoader = new import_dataloader.default( + async (requests) => { + const { GITHUB_GRAPHQL_URL, GITHUB_SERVER_URL, GITHUB_TOKEN } = readEnv(); + if (!GITHUB_TOKEN) { + throw new Error( + `Please create a GitHub personal access token at ${GITHUB_SERVER_URL}/settings/tokens/new?scopes=read:user,repo:status&description=changesets-${(/* @__PURE__ */ new Date()).toISOString().substring( + 0, + 10 + )} with \`read:user\` and \`repo:status\` permissions and add it as the GITHUB_TOKEN environment variable` + ); + } + const batchSize = getBatchSize(); + const totalBatches = Math.ceil(requests.length / batchSize); + const results = new Array(requests.length); + if (totalBatches > 1) { + console.log( + `Fetching GitHub info for ${requests.length} items in ${totalBatches} batches (batch size: ${batchSize})` + ); + } + for (let offset = 0; offset < requests.length; offset += batchSize) { + const batchNum = Math.floor(offset / batchSize) + 1; + if (totalBatches > 1) { + console.log(`Fetching batch ${batchNum}/${totalBatches}...`); + } + const batch = requests.slice(offset, offset + batchSize); + const batchResults = await fetchBatch(batch, { + GITHUB_GRAPHQL_URL, + GITHUB_TOKEN + }); + for (let i = 0; i < batchResults.length; i++) { + results[offset + i] = batchResults[i]; + } + } + return results; + }, + { + cacheKeyFn: (request) => request.kind === "commit" ? `commit:${request.repo}:${request.commit}` : `pull:${request.repo}:${request.pull}` + } +); +async function getInfo(request) { + if (!request.commit) { + throw new Error("Please pass a commit SHA to getInfo"); + } + if (!request.repo) { + throw new Error( + "Please pass a GitHub repository in the form of userOrOrg/repoName to getInfo" + ); + } + if (!validRepoNameRegex.test(request.repo)) { + throw new Error( + `Please pass a valid GitHub repository in the form of userOrOrg/repoName to getInfo (it has to match the "${validRepoNameRegex.source}" pattern)` + ); + } + const data = await GHDataLoader.load({ kind: "commit", ...request }); + let user = null; + if (data.author && data.author.user) { + user = data.author.user; + } + let associatedPullRequest = data.associatedPullRequests && data.associatedPullRequests.nodes && data.associatedPullRequests.nodes.length ? data.associatedPullRequests.nodes.sort((a, b) => { + if (a.mergedAt === null && b.mergedAt === null) { + return 0; + } + if (a.mergedAt === null) { + return 1; + } + if (b.mergedAt === null) { + return -1; + } + a = new Date(a.mergedAt); + b = new Date(b.mergedAt); + return a > b ? 1 : a < b ? -1 : 0; + })[0] : null; + if (associatedPullRequest) { + user = associatedPullRequest.author; + } + return { + user: user ? user.login : null, + pull: associatedPullRequest ? associatedPullRequest.number : null, + links: { + commit: `[\`${request.commit.slice(0, 7)}\`](${data.commitUrl})`, + pull: associatedPullRequest ? `[#${associatedPullRequest.number}](${associatedPullRequest.url})` : null, + user: user ? `[@${user.login}](${user.url})` : null + } + }; +} +async function getInfoFromPullRequest(request) { + if (request.pull === void 0) { + throw new Error("Please pass a pull request number"); + } + if (!request.repo) { + throw new Error( + "Please pass a GitHub repository in the form of userOrOrg/repoName to getInfo" + ); + } + if (!validRepoNameRegex.test(request.repo)) { + throw new Error( + `Please pass a valid GitHub repository in the form of userOrOrg/repoName to getInfo (it has to match the "${validRepoNameRegex.source}" pattern)` + ); + } + const data = await GHDataLoader.load({ kind: "pull", ...request }); + let user = data?.author; + let commit = data?.mergeCommit; + return { + user: user ? user.login : null, + commit: commit ? commit.abbreviatedOid : null, + links: { + commit: commit ? `[\`${commit.abbreviatedOid.slice(0, 7)}\`](${commit.commitUrl})` : null, + pull: `[#${request.pull}](${data.url})`, + user: user ? `[@${user.login}](${user.url})` : null + } + }; +} + +// packages/changelog-github/src/index.ts +(0, import_dotenv.config)(); +function linkifyIssueRefs(line, { serverUrl, repo }) { + return line.replace( + /\[.*?\]\(.*?\)|\B#([1-9]\d*)\b/g, + (match, issue) => ( + // PRs and issues are the same thing on GitHub (to some extent, of course) + // this relies on GitHub redirecting from /issues/1234 to /pull/1234 when necessary + issue ? `[#${issue}](${serverUrl}/${repo}/issues/${issue})` : match + ) + ); +} +function readEnv2() { + const GITHUB_SERVER_URL = process.env.GITHUB_SERVER_URL || "https://github.com"; + return { GITHUB_SERVER_URL }; +} +var changelogFunctions = { + getDependencyReleaseLine: async (changesets, dependenciesUpdated, options) => { + if (!options.repo) { + throw new Error( + 'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]' + ); + } + if (options.batchSize) { + setBatchSize(options.batchSize); + } + if (dependenciesUpdated.length === 0) return ""; + const changesetLink = `- Updated dependencies [${(await Promise.all( + changesets.map(async (cs) => { + if (cs.commit) { + let { links } = await getInfo({ + repo: options.repo, + commit: cs.commit + }); + return links.commit; + } + }) + )).filter((_) => _).join(", ")}]:`; + const updatedDepenenciesList = dependenciesUpdated.map( + (dependency) => ` - ${dependency.name}@${dependency.newVersion}` + ); + return [changesetLink, ...updatedDepenenciesList].join("\n"); + }, + getReleaseLine: async (changeset, type, options) => { + const { GITHUB_SERVER_URL } = readEnv2(); + if (!options || !options.repo) { + throw new Error( + 'Please provide a repo to this changelog generator like this:\n"changelog": ["@changesets/changelog-github", { "repo": "org/repo" }]' + ); + } + if (options.batchSize) { + setBatchSize(options.batchSize); + } + let prFromSummary; + let commitFromSummary; + let usersFromSummary = []; + const replacedChangelog = changeset.summary.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => { + let num = Number(pr); + if (!isNaN(num)) prFromSummary = num; + return ""; + }).replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => { + commitFromSummary = commit; + return ""; + }).replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => { + usersFromSummary.push(user); + return ""; + }).trim(); + const [firstLine, ...futureLines] = replacedChangelog.split("\n").map((l) => l.trimEnd()); + const links = await (async () => { + if (prFromSummary !== void 0) { + let { links: links2 } = await getInfoFromPullRequest({ + repo: options.repo, + pull: prFromSummary + }); + if (commitFromSummary) { + const shortCommitId = commitFromSummary.slice(0, 7); + links2 = { + ...links2, + commit: `[\`${shortCommitId}\`](${GITHUB_SERVER_URL}/${options.repo}/commit/${commitFromSummary})` + }; + } + return links2; + } + const commitToFetchFrom = commitFromSummary || changeset.commit; + if (commitToFetchFrom) { + let { links: links2 } = await getInfo({ + repo: options.repo, + commit: commitToFetchFrom + }); + return links2; + } + return { + commit: null, + pull: null, + user: null + }; + })(); + const users = usersFromSummary.length ? usersFromSummary.map( + (userFromSummary) => `[@${userFromSummary}](${GITHUB_SERVER_URL}/${userFromSummary})` + ).join(", ") : links.user; + const prefix = [ + links.pull === null ? "" : ` ${links.pull}`, + links.commit === null ? "" : ` ${links.commit}`, + users === null ? "" : ` Thanks ${users}!` + ].join(""); + return ` + +-${prefix ? `${prefix} -` : ""} ${linkifyIssueRefs(firstLine, { + serverUrl: GITHUB_SERVER_URL, + repo: options.repo + })} +${futureLines.map( + (l) => ` ${linkifyIssueRefs(l, { + serverUrl: GITHUB_SERVER_URL, + repo: options.repo + })}` + ).join("\n")}`; + } +}; +var index_default = changelogFunctions; diff --git a/.changeset/config.json b/.changeset/config.json index 5d9d916f1c..a9a8a7618e 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,7 +1,7 @@ { "$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json", "changelog": [ - "@changesets/changelog-github", + "./changeset-github.cjs", { "repo": "vercel/workflow" }