Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

Releases: mjackson/remix-the-web

route-pattern v0.3.0

16 Jul 17:44
c89d627
Compare
Choose a tag to compare

No changes.

headers v0.12.0

18 Jul 20:31
c89d627
Compare
Choose a tag to compare
  • Renamed package from @mjackson/headers to @remix-run/headers

route-pattern v0.2.0

14 Jul 19:51
46a08d6
Compare
Choose a tag to compare

No changes.

fetch-proxy v0.4.0

11 Jul 21:11
Compare
Choose a tag to compare
  • Forward all additional options to the proxied request object

route-pattern v0.1.0

25 Jun 17:59
Compare
Choose a tag to compare

No changes.

multipart-parser v0.10.1

13 Jun 19:24
Compare
Choose a tag to compare
  • Add doc comments on custom error classes

multipart-parser v0.10.0

13 Jun 17:33
Compare
Choose a tag to compare

This release represents a major refactoring and simplification of this library from a async/promise-based architecture to a generator that suspends the parser as parts are found.

This is a reversion to the generator-based interface used before v0.8 when I switched to a promise interface to get around deadlock issues with consuming part streams inside a yield suspension point. The deadlock occurred when trying to read part.body inside a yield, because the parser was suspended and wouldn't emit any more bytes to the stream while the consumer was waiting for the stream to complete.

With this release, I realized that instead of getting rid of the generator, which is actually a fantastic interface for a streaming parser, I should've gotten rid of the part.body stream instead and replaced it with a part.content property that contains all the content for that part. This gives us a better parser interface and also makes error handling simpler when e.g. the parser's maxFileSize is exceeded. This also makes the parser easier to use because you don't have to e.g. await part.text() anymore, and you have access to part.size up front.

  • BREAKING CHANGE: parseMultipart and parseMultipartRequest are now generators that yield MultipartPart objects as they are parsed
  • BREAKING CHANGE: parseMultipart no longer parses streams, use parseMultipartStream instead
  • BREAKING CHANGE: parser.parse() is removed
  • BREAKING CHANGE: part.body, part.bodyUsed are removed
  • BREAKING CHANGE: part.arrayBuffer, part.bytes, part.text are now sync getters instead of async methods
  • BREAKING CHANGE: Default maxFileSize is now 2MiB, same as PHP's default upload_max_filesize

New APIs:

  • parseMultipartStream(stream, options) is a generator that parses a stream of data
  • parser.write(chunk) and parser.finish() are low-level APIs for running the parser directly
  • part.content is a Uint8Array[] of all content in that part
  • part.isText is true if the part originates from a text field
  • part.size is the total size of the content in bytes

If you're upgrading, check the README for current usage recommendations. Here's a high-level taste of the before/after of this release.

import { parseMultipartRequest } from '@mjackson/multipart-parser';

// before
await parseMultipartRequest(request, async (part) => {
  let buffer = await part.arrayBuffer();
  // ...
});

// after
for await (let part of parseMultipartRequest(request)) {
  let buffer = part.arrayBuffer;
  // ...
}

form-data-parser v0.9.1

13 Jun 19:24
Compare
Choose a tag to compare
  • Export FormDataParserError and MaxFilesExceededError
  • Re-export MultipartParseError, MaxHeaderSizeExceededError, and MaxFileSizeExceededError from multipart parser

form-data-parser v0.9.0

13 Jun 18:03
Compare
Choose a tag to compare

This release updates to multipart-parser 0.10.0 and removes the restrictions on checking the size and/or sliceing FileUpload objects.

  • FileUpload is now a normal subclass of File with all the same functionality (instead of just implementing the same interface)
  • Add maxFiles option to parseFormData to allow limiting the number of files uploaded in a single request
let formData = await parseFormData(request, { maxFiles: 5 });
let file = formData.get('file-upload');
let size = file.size; // This is ok now!

multipart-parser v0.9.0

10 Jun 22:49
Compare
Choose a tag to compare
  • Add /src to npm package, so "go to definition" goes to the actual source
  • Use one set of types for all built files, instead of separate types for ESM and CJS
  • Build using esbuild directly instead of tsup