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

@fastly/js-compute

Package Overview
Dependencies
Maintainers
44
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.2.1 to 0.2.2

reference-docs/interfaces/crypto.html

25

CHANGELOG.md

@@ -0,1 +1,26 @@

## 0.2.2 (2022-02-03)
### Added
- Add full support for TransformStreams
- Support directly piping Request/Response bodies to other Requests/Responses instead of manually copying every chunk
- Add support for the `queueMicrotask` global function
- Add support for the `structuredClone` global function
- Add support for the `location` global object as an instance of `WorkerLocation`
- Support Big{Ui,I}nt64Array in crypto.getRandomValues
- Enable class static blocks syntax
- Returned the exit code from the JS Compute Runtime, by passing it up through our CLI
### Changed
- Increase max supported header size from 4096 bytes to 69000 bytes
- Update to SpiderMonkey 96 beta
### Fixed
- Avoid waiting for async tasks that weren't passed to `FetchEvent#waitUntil`
- Significantly improve spec-compliance of Request and Response builtins
### Changed
## 0.2.1 (2021-11-10)

@@ -2,0 +27,0 @@

96

index.d.ts

@@ -529,3 +529,4 @@ /**

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

@@ -831,2 +832,50 @@ * Body for Fetch HTTP Requests and Responses

interface TransformStream<I = any, O = any> {
readonly readable: ReadableStream<O>;
readonly writable: WritableStream<I>;
}
/**
* The TransformStream class as [specified by WHATWG](https://streams.spec.whatwg.org/#ts-class)
*
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/TransformStream | TransformStream on MDN}
*/
declare var TransformStream: {
prototype: TransformStream;
new<I = any, O = any>(transformer?: Transformer<I, O>, writableStrategy?: QueuingStrategy<I>, readableStrategy?: QueuingStrategy<O>): TransformStream<I, O>;
};
interface TransformStreamDefaultController<O = any> {
readonly desiredSize: number | null;
enqueue(chunk?: O): void;
error(reason?: any): void;
terminate(): void;
}
declare var TransformStreamDefaultController: {
prototype: TransformStreamDefaultController;
new(): TransformStreamDefaultController;
};
interface Transformer<I = any, O = any> {
flush?: TransformerFlushCallback<O>;
readableType?: undefined;
start?: TransformerStartCallback<O>;
transform?: TransformerTransformCallback<I, O>;
writableType?: undefined;
}
interface TransformerFlushCallback<O> {
(controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
interface TransformerStartCallback<O> {
(controller: TransformStreamDefaultController<O>): any;
}
interface TransformerTransformCallback<I, O> {
(chunk: I, controller: TransformStreamDefaultController<O>): void | PromiseLike<void>;
}
declare type HeadersInit = Headers | string[][] | { [key: string]: string };

@@ -874,1 +923,46 @@

): Promise<Response>;
interface VoidFunction {
(): void;
}
declare function queueMicrotask(callback: VoidFunction): void;
declare function structuredClone(value: any, options?: StructuredSerializeOptions): any;
interface StructuredSerializeOptions {
transfer?: Transferable[];
}
type Transferable = ArrayBuffer;
interface WorkerLocation {
readonly href: string;
readonly protocol: string;
readonly host: string;
readonly hostname: string;
readonly origin: string;
readonly port: string;
readonly pathname: string;
readonly search: string;
readonly hash: string;
toString(): string;
}
declare var WorkerLocation: {
prototype: WorkerLocation;
new(): WorkerLocation;
};
declare var location: WorkerLocation;
interface Crypto {
getRandomValues<T extends ArrayBufferView | null>(array: T): T;
}
declare var Crypto: {
prototype: Crypto;
new(): Crypto;
};
declare var crypto: Crypto;

3

js-compute-runtime-cli.js

@@ -53,5 +53,6 @@ #!/usr/bin/env node

spawnSync(binaryPath, process.argv.slice(2), {
const result = spawnSync(binaryPath, process.argv.slice(2), {
stdio: "inherit",
});
process.exitCode = result.status;
console.log(" ");
{
"name": "@fastly/js-compute",
"version": "0.2.1",
"js-compute-runtime-version": "0.2.2",
"version": "0.2.2",
"js-compute-runtime-version": "0.2.3",
"license": "SEE LICENSE IN LICENSE",

@@ -27,5 +27,5 @@ "main": "js-compute-runtime-cli.js",

"devDependencies": {
"typedoc": "^0.20.36",
"typescript": "^4.2"
"typescript": "^4.2",
"typedoc": "^0.20.36"
}
}

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 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

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