Skip to content

Commit b00dc80

Browse files
committed
Update some TODOs for a 2.0 release
1 parent f738d73 commit b00dc80

File tree

7 files changed

+20
-5
lines changed

7 files changed

+20
-5
lines changed

archive/archive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Copyright(c) 2011 Google Inc.
1010
*/
1111

12-
// TODO: When up-revving to a major new version, remove this module.
12+
// TODO(2.0): When up-revving to a major new version, remove this module.
1313

1414
import { UnarchiveAppendEvent, UnarchiveErrorEvent, UnarchiveEvent, UnarchiveEventType,
1515
UnarchiveExtractEvent, UnarchiveFinishEvent, UnarchiveInfoEvent,

archive/compress.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
import { ZipCompressionMethod, getConnectedPort } from './common.js';
1212

13-
// NOTE: THIS IS A VERY HACKY WORK-IN-PROGRESS! THE API IS NOT FROZEN! USE AT YOUR OWN RISK!
13+
// TODO(2.0): Remove this comment.
14+
// NOTE: THIS IS A WORK-IN-PROGRESS! THE API IS NOT FROZEN! USE AT YOUR OWN RISK!
1415

1516
/**
1617
* @typedef FileInfo An object that is sent to the implementation to represent a file to zip.
@@ -52,8 +53,8 @@ export const CompressStatus = {
5253

5354
/**
5455
* A thing that zips files.
55-
* NOTE: THIS IS A VERY HACKY WORK-IN-PROGRESS! THE API IS NOT FROZEN! USE AT YOUR OWN RISK!
56-
* TODO: Make a streaming / event-driven API.
56+
* NOTE: THIS IS A WORK-IN-PROGRESS! THE API IS NOT FROZEN! USE AT YOUR OWN RISK!
57+
* TODO(2.0): Add semantic onXXX methods for an event-driven API.
5758
*/
5859
export class Zipper {
5960
/**

archive/decompress.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { getConnectedPort } from './common.js';
1515
import { findMimeType } from '../file/sniffer.js';
1616

1717
// Exported as a convenience (and also because this module used to contain these).
18-
// TODO(bitjs): Remove this export in a future release?
18+
// TODO(2.0): Remove this export, since they have moved to events.js.
1919
export {
2020
UnarchiveAppendEvent,
2121
UnarchiveErrorEvent,
@@ -288,6 +288,8 @@ export class Untarrer extends Unarchiver {
288288
getScriptFileName() { return './untar.js'; };
289289
}
290290

291+
// TODO(2.0): When up-revving to a major new version, remove the string type for options.
292+
291293
/**
292294
* Factory method that creates an unarchiver based on the byte signature found
293295
* in the ArrayBuffer.

archive/events.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
* Copyright(c) 2023 Google Inc.
77
*/
88

9+
// TODO(2.0): Consider deprecating the Event subclasses here and:
10+
// 1) Make @typedef structures in jsdoc for all the payloads
11+
// 2) Use CustomEvent for payload event propagation
12+
// 3) Add semantic methods to the archivers (onExtract, onProgress) like the image parsers.
13+
// 4) Move everything into common.js ?
14+
915
/**
1016
* The UnarchiveEvent types.
1117
*/

build/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ Assuming you have cloned the repository in /path/to/bitjs:
2020
Various library files will be output to /path/to/bitjs/. For example, the
2121
/path/to/bitjs/image/webp-shim/ directory will now contain update webp-shim-module.js and
2222
webp-shim-module.wasm files.
23+
24+
# TODO(2.0): Remove this.

build/image/webp-shim/src/webp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
* Copyright(c) 2020 Google Inc.
1010
*/
1111

12+
// TODO(2.0): Remove this. It seems unnecessary given WebP is universally supported now.
13+
1214
#include <stdio.h>
1315
#include <stdlib.h>
1416
#include "emscripten.h"

image/webp-shim/webp-shim.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
* Copyright(c) 2020 Google Inc.
77
*/
88

9+
// TODO(2.0): Remove this. It seems unnecessary given WebP is universally supported now.
10+
911
const url = import.meta.url;
1012
if (!url.endsWith('/webp-shim.js')) {
1113
throw 'webp-shim must be loaded as webp-shim.js';

0 commit comments

Comments
 (0)