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

@fastly/js-compute

Package Overview
Dependencies
Maintainers
24
Versions
128
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fastly/js-compute - npm Package Compare versions

Comparing version 0.5.1 to 0.5.2

11

CHANGELOG.md

@@ -0,1 +1,10 @@

## 0.5.2
### Fixes
- Explicitly declare void as the return type for functions which return nothing - this allows our package to work with typescript's `strict:true` option ([#253](https://github.com/fastly/js-compute-runtime/pull/253))
- Declare ambient types for our npm package instead of exports as we do not yet export anythink from the package ([#252](https://github.com/fastly/js-compute-runtime/pull/252))
## 0.5.1

@@ -29,3 +38,3 @@

// Fastly edge locations immediately and some edge locations may continue returning the previous contents associated with the key.
const hello = await store.lookup('hello')
const hello = await store.get('hello')

@@ -32,0 +41,0 @@ // Read the contents of the `hello` key into a string

198

index.d.ts

@@ -1,15 +0,15 @@

export declare var self: typeof globalThis;
export interface EventMap {
declare var self: typeof globalThis;
interface EventMap {
"fetch": FetchEvent;
}
export interface EventListenerMap {
interface EventListenerMap {
"fetch": FetchEventListener;
}
export interface FetchEventListener {
interface FetchEventListener {
(this: typeof globalThis, event: FetchEvent): any
}
export declare var onfetch: FetchEventListener;
declare var onfetch: FetchEventListener;

@@ -21,3 +21,3 @@ /**

*/
export declare function addEventListener<K extends keyof EventMap>(type: K, listener: EventListenerMap[K]): void;
declare function addEventListener<K extends keyof EventMap>(type: K, listener: EventListenerMap[K]): void;

@@ -27,3 +27,3 @@ /**

*/
export declare interface FetchEvent {
declare interface FetchEvent {
/**

@@ -87,3 +87,3 @@ * Information about the downstream client that made the request

*/
export declare type CacheOverrideMode = "none" | "pass" | "override";
declare type CacheOverrideMode = "none" | "pass" | "override";

@@ -93,3 +93,3 @@ /**

*/
export declare interface CacheOverrideInit {
declare interface CacheOverrideInit {
/**

@@ -131,7 +131,7 @@ * Override the caching behavior of this request to use the given Time to Live (TTL), in seconds.

*/
export declare interface CacheOverride extends CacheOverrideInit {
declare interface CacheOverride extends CacheOverrideInit {
mode: CacheOverrideMode;
}
export declare var CacheOverride: {
declare var CacheOverride: {
prototype: CacheOverride;

@@ -144,3 +144,3 @@ new(mode: CacheOverrideMode, init?: CacheOverrideInit): CacheOverride;

*/
export declare interface ClientInfo {
declare interface ClientInfo {
/**

@@ -158,3 +158,3 @@ * A string representation of the IPv4 or IPv6 address of the downstream client.

*/
export declare class Dictionary {
declare class Dictionary {
/**

@@ -178,3 +178,3 @@ * Creates a new Dictionary object, and opens an edge dictionary to query

*/
export declare interface Geolocation {
declare interface Geolocation {
/**

@@ -305,3 +305,3 @@ * The name of the organization associated with as_number.

*/
export declare class Env {
declare class Env {
constructor();

@@ -325,3 +325,3 @@

*/
export declare class ObjectStore {
declare class ObjectStore {
/**

@@ -364,3 +364,3 @@ * Creates a new JavaScript ObjectStore object which interacts with the Fastly Object-store named `name`.

*/
export declare interface ObjectStoreEntry {
declare interface ObjectStoreEntry {
/**

@@ -395,3 +395,3 @@ * A ReadableStream with the contents of the entry.

*/
export declare class URL {
declare class URL {
constructor(url: string, base?: string | URL);

@@ -444,3 +444,3 @@

export declare class URLSearchParams {
declare class URLSearchParams {
constructor(

@@ -489,8 +489,8 @@ init?:

*/
export declare interface Console {
log(message: any);
debug(message: any);
info(message: any);
warn(message: any);
error(message: any);
declare interface Console {
log(message: any): void;
debug(message: any): void;
info(message: any): void;
warn(message: any): void;
error(message: any): void;
}

@@ -501,3 +501,3 @@

*/
export declare var console: Console;
declare var console: Console;

@@ -509,3 +509,3 @@ /**

*/
export declare class TextEncoder {
declare class TextEncoder {
constructor();

@@ -524,3 +524,3 @@ encode(input?: string): Uint8Array;

*/
export declare class TextDecoder {
declare class TextDecoder {
constructor();

@@ -537,7 +537,7 @@ decode(input?: ArrayBuffer | ArrayBufferView): string;

*/
export declare interface Logger {
declare interface Logger {
/**
* Send the given message, converted to a string, to this Logger instance's endpoint
*/
log(message: any);
log(message: any): void;
}

@@ -548,3 +548,3 @@

*/
export declare interface Fastly {
declare interface Fastly {
set baseURL(base: URL | null | undefined);

@@ -575,3 +575,3 @@ get baseURL(): URL | null;

*/
enableDebugLogging(enabled: boolean);
enableDebugLogging(enabled: boolean): void;

@@ -602,7 +602,7 @@ /**

*/
export declare var fastly: Fastly;
declare var fastly: Fastly;
type CompressionStreamFormat = "deflate" | "deflate-raw" | "gzip"
export interface CompressionStream {
interface CompressionStream {
readonly readable: ReadableStream<Uint8Array>;

@@ -612,3 +612,3 @@ readonly writable: WritableStream<Uint8Array>;

export declare var CompressionStream: {
declare var CompressionStream: {
prototype: CompressionStream;

@@ -620,3 +620,3 @@ new(format: CompressionStreamFormat): CompressionStream;

export interface DecompressionStream {
interface DecompressionStream {
readonly readable: ReadableStream<Uint8Array>;

@@ -626,3 +626,3 @@ readonly writable: WritableStream<Uint8Array>;

export declare var DecompressionStream: {
declare var DecompressionStream: {
prototype: DecompressionStream;

@@ -664,3 +664,3 @@ new(format: DecompressionStreamFormat): DecompressionStream;

*/
export declare type BodyInit = ReadableStream | ArrayBufferView | ArrayBuffer | URLSearchParams | string;
declare type BodyInit = ReadableStream | ArrayBufferView | ArrayBuffer | URLSearchParams | string;

@@ -672,3 +672,3 @@ /**

*/
export declare interface Body {
declare interface Body {
readonly body: ReadableStream<Uint8Array> | null;

@@ -689,3 +689,3 @@ readonly bodyUsed: boolean;

*/
export declare type RequestInfo = Request | string;
declare type RequestInfo = Request | string;

@@ -699,3 +699,3 @@ /**

*/
export declare interface RequestInit {
declare interface RequestInit {
/** A BodyInit object or null to set request's body. */

@@ -740,3 +740,3 @@ body?: BodyInit | null;

*/
export interface Request extends Body {
interface Request extends Body {
// /** Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching. */

@@ -772,6 +772,6 @@ // readonly cache: RequestCache;

backend: string;
setCacheOverride(override: CacheOverride);
setCacheOverride(override: CacheOverride): void;
}
export declare var Request: {
declare var Request: {
prototype: Request;

@@ -785,3 +785,3 @@ new(input: RequestInfo | URL, init?: RequestInit): Request;

*/
export declare interface ResponseInit {
declare interface ResponseInit {
headers?: HeadersInit;

@@ -799,3 +799,3 @@ status?: number;

*/
export interface Response extends Body {
interface Response extends Body {
readonly headers: Headers;

@@ -811,3 +811,3 @@ readonly ok: boolean;

export declare var Response: {
declare var Response: {
prototype: Response;

@@ -824,31 +824,31 @@ new(body?: BodyInit | null, init?: ResponseInit): Response;

export interface UnderlyingSinkAbortCallback {
interface UnderlyingSinkAbortCallback {
(reason?: any): void | PromiseLike<void>;
}
export interface UnderlyingSinkCloseCallback {
interface UnderlyingSinkCloseCallback {
(): void | PromiseLike<void>;
}
export interface UnderlyingSinkStartCallback {
interface UnderlyingSinkStartCallback {
(controller: WritableStreamDefaultController): any;
}
export interface UnderlyingSinkWriteCallback<W> {
interface UnderlyingSinkWriteCallback<W> {
(chunk: W, controller: WritableStreamDefaultController): void | PromiseLike<void>;
}
export interface UnderlyingSourceCancelCallback {
interface UnderlyingSourceCancelCallback {
(reason?: any): void | PromiseLike<void>;
}
export interface UnderlyingSourcePullCallback<R> {
interface UnderlyingSourcePullCallback<R> {
(controller: ReadableStreamController<R>): void | PromiseLike<void>;
}
export interface UnderlyingSourceStartCallback<R> {
interface UnderlyingSourceStartCallback<R> {
(controller: ReadableStreamController<R>): any;
}
export interface UnderlyingSink<W = any> {
interface UnderlyingSink<W = any> {
abort?: UnderlyingSinkAbortCallback;

@@ -861,3 +861,3 @@ close?: UnderlyingSinkCloseCallback;

export interface UnderlyingSource<R = any> {
interface UnderlyingSource<R = any> {
autoAllocateChunkSize?: number;

@@ -872,3 +872,3 @@ cancel?: UnderlyingSourceCancelCallback;

export interface StreamPipeOptions {
interface StreamPipeOptions {
preventAbort?: boolean;

@@ -897,7 +897,7 @@ preventCancel?: boolean;

export interface QueuingStrategySize<T = any> {
interface QueuingStrategySize<T = any> {
(chunk: T): number;
}
export interface QueuingStrategy<T = any> {
interface QueuingStrategy<T = any> {
highWaterMark?: number;

@@ -907,3 +907,3 @@ size?: QueuingStrategySize<T>;

export interface QueuingStrategyInit {
interface QueuingStrategyInit {
/**

@@ -917,3 +917,3 @@ * Creates a new ByteLengthQueuingStrategy with the provided high water mark.

export interface ReadableStreamDefaultReadDoneResult {
interface ReadableStreamDefaultReadDoneResult {
done: true;

@@ -923,3 +923,3 @@ value?: undefined;

export interface ReadableStreamDefaultReadValueResult<T> {
interface ReadableStreamDefaultReadValueResult<T> {
done: false;

@@ -931,3 +931,3 @@ value: T;

export interface ReadableWritablePair<R = any, W = any> {
interface ReadableWritablePair<R = any, W = any> {
readable: ReadableStream<R>;

@@ -943,3 +943,3 @@ /**

/** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */
export interface ReadableStream<R = any> {
interface ReadableStream<R = any> {
readonly locked: boolean;

@@ -958,3 +958,3 @@ cancel(reason?: any): Promise<void>;

*/
export declare var ReadableStream: {
declare var ReadableStream: {
prototype: ReadableStream;

@@ -964,3 +964,3 @@ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;

export interface ReadableStreamDefaultController<R = any> {
interface ReadableStreamDefaultController<R = any> {
readonly desiredSize: number | null;

@@ -972,3 +972,3 @@ close(): void;

export declare var ReadableStreamDefaultController: {
declare var ReadableStreamDefaultController: {
prototype: ReadableStreamDefaultController;

@@ -978,3 +978,3 @@ new(): ReadableStreamDefaultController;

export interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
interface ReadableStreamDefaultReader<R = any> extends ReadableStreamGenericReader {
read(): Promise<ReadableStreamDefaultReadResult<R>>;

@@ -984,3 +984,3 @@ releaseLock(): void;

export declare var ReadableStreamDefaultReader: {
declare var ReadableStreamDefaultReader: {
prototype: ReadableStreamDefaultReader;

@@ -990,3 +990,3 @@ new <R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;

export interface ReadableStreamGenericReader {
interface ReadableStreamGenericReader {
readonly closed: Promise<undefined>;

@@ -997,3 +997,3 @@ cancel(reason?: any): Promise<void>;

/** This Streams API interface provides a standard abstraction for writing streaming data to a destination, known as a sink. This object comes with built-in backpressure and queuing. */
export interface WritableStream<W = any> {
interface WritableStream<W = any> {
readonly locked: boolean;

@@ -1009,3 +1009,3 @@ abort(reason?: any): Promise<void>;

*/
export declare var WritableStream: {
declare var WritableStream: {
prototype: WritableStream;

@@ -1016,7 +1016,7 @@ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;

/** This Streams API interface represents a controller allowing control of a WritableStream's state. When constructing a WritableStream, the underlying sink is given a corresponding WritableStreamDefaultController instance to manipulate. */
export interface WritableStreamDefaultController {
interface WritableStreamDefaultController {
error(e?: any): void;
}
export declare var WritableStreamDefaultController: {
declare var WritableStreamDefaultController: {
prototype: WritableStreamDefaultController;

@@ -1027,3 +1027,3 @@ new(): WritableStreamDefaultController;

/** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */
export interface WritableStreamDefaultWriter<W = any> {
interface WritableStreamDefaultWriter<W = any> {
readonly closed: Promise<undefined>;

@@ -1038,3 +1038,3 @@ readonly desiredSize: number | null;

export declare var WritableStreamDefaultWriter: {
declare var WritableStreamDefaultWriter: {
prototype: WritableStreamDefaultWriter;

@@ -1044,3 +1044,3 @@ new <W = any>(stream: WritableStream<W>): WritableStreamDefaultWriter<W>;

export interface TransformStream<I = any, O = any> {
interface TransformStream<I = any, O = any> {
readonly readable: ReadableStream<O>;

@@ -1056,3 +1056,3 @@ readonly writable: WritableStream<I>;

export declare var TransformStream: {
declare var TransformStream: {
prototype: TransformStream;

@@ -1062,3 +1062,3 @@ new <I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;

export interface TransformStreamDefaultController<O = any> {
interface TransformStreamDefaultController<O = any> {
readonly desiredSize: number | null;

@@ -1070,3 +1070,3 @@ enqueue(chunk?: O): void;

export declare var TransformStreamDefaultController: {
declare var TransformStreamDefaultController: {
prototype: TransformStreamDefaultController;

@@ -1076,3 +1076,3 @@ new(): TransformStreamDefaultController;

export interface Transformer<I = any, O = any> {
interface Transformer<I = any, O = any> {
flush?: TransformerFlushCallback<O>;

@@ -1085,11 +1085,11 @@ readableType?: undefined;

export interface TransformerFlushCallback<O> {
interface TransformerFlushCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
export interface TransformerStartCallback<O> {
interface TransformerStartCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
export interface TransformerTransformCallback<I, O> {
interface TransformerTransformCallback<I, O> {
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;

@@ -1105,3 +1105,3 @@ }

*/
export interface Headers {
interface Headers {
append(name: string, value: string): void;

@@ -1120,3 +1120,3 @@ delete(name: string): void;

export declare var Headers: {
declare var Headers: {
prototype: Headers;

@@ -1134,3 +1134,3 @@ new(init?: HeadersInit): Headers;

*/
export declare function atob(data: string): string;
declare function atob(data: string): string;

@@ -1144,3 +1144,3 @@ /**

*/
export declare function btoa(data: string): string;
declare function btoa(data: string): string;

@@ -1161,13 +1161,13 @@ /**

*/
export declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
declare function fetch(input: RequestInfo, init?: RequestInit): Promise<Response>;
export interface VoidFunction {
interface VoidFunction {
(): void;
}
export declare function queueMicrotask(callback: VoidFunction): void;
declare function queueMicrotask(callback: VoidFunction): void;
export declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
export interface StructuredSerializeOptions {
interface StructuredSerializeOptions {
transfer?: Transferable[];

@@ -1179,3 +1179,3 @@ }

export interface WorkerLocation {
interface WorkerLocation {
readonly hash: string;

@@ -1193,3 +1193,3 @@ readonly host: string;

export declare var WorkerLocation: {
declare var WorkerLocation: {
prototype: WorkerLocation;

@@ -1199,6 +1199,6 @@ new(): WorkerLocation;

export declare var location: WorkerLocation;
declare var location: WorkerLocation;
/** Basic cryptography features available in the current context. It allows access to a cryptographically strong random number generator and to cryptographic primitives. */
export interface Crypto {
interface Crypto {
// /** Available only in secure contexts. */

@@ -1211,3 +1211,3 @@ // readonly subtle: SubtleCrypto;

export declare var Crypto: {
declare var Crypto: {
prototype: Crypto;

@@ -1217,2 +1217,2 @@ new(): Crypto;

export declare var crypto: Crypto;
declare var crypto: Crypto;
{
"name": "@fastly/js-compute",
"version": "0.5.1",
"js-compute-runtime-version": "0.4.0",
"version": "0.5.2",
"js-compute-runtime-version": "0.5.0",
"engines": {

@@ -6,0 +6,0 @@ "node": "^16 || ^18"

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

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

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

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

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

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

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

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