Skip to content

Commit

Permalink
build: compile via ncc
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Jan 24, 2024
1 parent 4ebf506 commit 608d45f
Show file tree
Hide file tree
Showing 19 changed files with 39 additions and 40 deletions.
19 changes: 12 additions & 7 deletions packages/next/src/compiled/@edge-runtime/cookies/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// Type definitions for cookie 0.5
// Project: https://github.com/jshttp/cookie
// Definitions by: Pine Mizune <https://github.com/pine>
// Piotr Błażejewicz <https://github.com/peterblazejewicz>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

/**
* Basic HTTP cookie parser and serializer for HTTP servers.
*/
Expand Down Expand Up @@ -62,6 +56,17 @@ interface CookieSerializeOptions {
* point to the same date and time.
*/
maxAge?: number | undefined;
/**
* Specifies the `boolean` value for the [`Partitioned` `Set-Cookie`](rfc-cutler-httpbis-partitioned-cookies)
* attribute. When truthy, the `Partitioned` attribute is set, otherwise it is not. By default, the
* `Partitioned` attribute is not set.
*
* **note** This is an attribute that has not yet been fully standardized, and may change in the future.
* This also means many clients may ignore this attribute until they understand it.
*
* More information about can be found in [the proposal](https://github.com/privacycg/CHIPS)
*/
partitioned?: boolean | undefined;
/**
* Specifies the value for the {@link https://tools.ietf.org/html/rfc6265#section-5.2.4|`Path` `Set-Cookie` attribute}.
* By default, the path is considered the "default path".
Expand Down Expand Up @@ -193,4 +198,4 @@ declare function parseCookie(cookie: string): Map<string, string>;
/** Parse a `Set-Cookie` header value */
declare function parseSetCookie(setCookie: string): undefined | ResponseCookie;

export { CookieListItem, RequestCookie, RequestCookies, ResponseCookie, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie };
export { type CookieListItem, type RequestCookie, RequestCookies, type ResponseCookie, ResponseCookies, parseCookie, parseSetCookie, stringifyCookie };
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"@edge-runtime/cookies","version":"4.0.2","main":"./index.js","license":"MPL-2.0"}
{"name":"@edge-runtime/cookies","version":"4.0.3","main":"./index.js","license":"MPL-2.0"}
1 change: 1 addition & 0 deletions packages/next/src/compiled/@edge-runtime/ponyfill/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function edge() {
File,
FormData,
Headers,
performance,
PromiseRejectionEvent,
ReadableStream,
ReadableStreamBYOBReader,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"@edge-runtime/ponyfill","version":"2.4.1","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"}
{"name":"@edge-runtime/ponyfill","version":"2.4.2","main":"./index.js","types":"./index.d.ts","license":"MPL-2.0"}

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

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

Empty file.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ declare namespace Event$1 {
declare const EventTargetConstructor: typeof EventTarget
declare const EventConstructor: typeof Event


declare class FetchEvent {
request: Request
response: Response | null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,4 @@ declare const FileConstructor: typeof File
declare const FormDataConstructor: typeof FormData
declare const WebSocketConstructor: typeof WebSocket

export { FileConstructor as File, FormDataConstructor as FormData, Headers, Request, RequestInfo, RequestInit, Response, WebSocketConstructor as WebSocket, fetchImplementation as fetch };
export { FileConstructor as File, FormDataConstructor as FormData, Headers, Request, type RequestInfo, type RequestInit, Response, WebSocketConstructor as WebSocket, fetchImplementation as fetch };

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions packages/next/src/compiled/@edge-runtime/primitives/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ export { AbortController, AbortSignal, DOMException } from './abort-controller.d
export { Blob } from './blob.d.js';
export { console } from './console.d.js';
export { Crypto, CryptoKey, SubtleCrypto, crypto } from './crypto.d.js';
export { TextDecoder, TextEncoder, atob, btoa } from './encoding.d.js';
export { Event, EventTarget, FetchEvent, PromiseRejectionEvent } from './events.d.js';
export { File, FormData, Headers, Request, RequestInfo, RequestInit, Response, WebSocket, fetch } from './fetch.d.js';
export { structuredClone } from './structured-clone.d.js';
export { URL, URLPattern, URLSearchParams } from './url.d.js';
export { setInterval, setTimeout } from './timers.d.js';

declare const TextEncoderConstructor: typeof TextEncoder
declare const TextDecoderConstructor: typeof TextDecoder


declare const _atob: typeof atob
declare const _btoa: typeof btoa

/**
* The type of `ReadableStreamBYOBReader` is not included in Typescript so we
* are declaring it inline to not have to worry about bundling.
Expand All @@ -18,7 +24,7 @@ declare class ReadableStreamBYOBReader {
get closed(): Promise<undefined>
cancel(reason?: any): Promise<void>
read<T extends ArrayBufferView>(
view: T
view: T,
): Promise<{ done: false; value: T } | { done: true; value: T | undefined }>
releaseLock(): void
}
Expand All @@ -33,4 +39,6 @@ declare const WritableStreamDefaultWriterConstructor: typeof WritableStreamDefau
declare const TextDecoderStreamConstructor: typeof TextDecoderStream
declare const TextEncoderStreamConstructor: typeof TextEncoderStream

export { ReadableStreamConstructor as ReadableStream, ReadableStreamBYOBReaderConstructor as ReadableStreamBYOBReader, ReadableStreamDefaultReaderConstructor as ReadableStreamDefaultReader, TextDecoderStreamConstructor as TextDecoderStream, TextEncoderStreamConstructor as TextEncoderStream, TransformStreamConstructor as TransformStream, WritableStreamConstructor as WritableStream, WritableStreamDefaultWriterConstructor as WritableStreamDefaultWriter };
declare const performanceConstructor: typeof performance

export { ReadableStreamConstructor as ReadableStream, ReadableStreamBYOBReaderConstructor as ReadableStreamBYOBReader, ReadableStreamDefaultReaderConstructor as ReadableStreamDefaultReader, TextDecoderConstructor as TextDecoder, TextDecoderStreamConstructor as TextDecoderStream, TextEncoderConstructor as TextEncoder, TextEncoderStreamConstructor as TextEncoderStream, TransformStreamConstructor as TransformStream, WritableStreamConstructor as WritableStream, WritableStreamDefaultWriterConstructor as WritableStreamDefaultWriter, _atob as atob, _btoa as btoa, performanceConstructor as performance };
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import * as __index from './index';
* ```
*/
declare function load(
scopedContext: Record<string, unknown>
scopedContext: Record<string, unknown>,
): typeof __index

export { load };
11 changes: 3 additions & 8 deletions packages/next/src/compiled/@edge-runtime/primitives/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,14 @@ function requireWithFakeGlobalScope(params) {
__name(requireWithFakeGlobalScope, "requireWithFakeGlobalScope");
function load(scopedContext = {}) {
const context = {};
const encodingImpl = requireWithFakeGlobalScope({
context,
id: "encoding.js",
sourceCode: require("./encoding.js.text.js"),
scopedContext
});
assign(context, {
TextDecoder,
TextEncoder,
TextEncoderStream: import_web.TextEncoderStream,
TextDecoderStream: import_web.TextDecoderStream,
atob: encodingImpl.atob,
btoa: encodingImpl.btoa
atob,
btoa,
performance
});
const consoleImpl = requireWithFakeGlobalScope({
context,
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"name":"@edge-runtime/primitives","version":"4.0.2","main":"./index.js","license":"MPL-2.0"}
{"name":"@edge-runtime/primitives","version":"4.0.6","main":"./index.js","license":"MPL-2.0"}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare const _setTimeout: typeof Number
declare const _setInterval: typeof Number
declare const _setTimeout: (callback: () => void, ms?: number) => number
declare const _setInterval: (callback: () => void, ms?: number) => number

export { _setInterval as setInterval, _setTimeout as setTimeout };
2 changes: 1 addition & 1 deletion packages/next/src/compiled/edge-runtime/index.js

Large diffs are not rendered by default.

0 comments on commit 608d45f

Please sign in to comment.