@fastly/js-compute
Advanced tools
Comparing version 0.2.1 to 0.2.2
@@ -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 @@ |
@@ -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; |
@@ -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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
73384689
72
4253
3