byte-codec 1.1.11 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# byte-codec
|
|
2
2
|
|
|
3
|
-
[](https://github.com/ExaDev/byte-codec) [](https://www.npmjs.com/package/byte-codec) [](https://github.com/ExaDev/documents.js/tree/main/packages/byte-codec) [](https://www.npmjs.com/package/byte-codec) [](https://www.npmjs.com/package/byte-codec) [](https://github.com/ExaDev/documents.js/actions)
|
|
4
4
|
|
|
5
|
-
> Generic byte-level primitives (ByteWriter, ByteReader, CRC-32, deflate/inflate) and PNG/JPEG image encoding/decoding with zero PDF knowledge — the shared utility package for the [documents.js family](
|
|
5
|
+
> Generic byte-level primitives (ByteWriter, ByteReader, CRC-32, deflate/inflate) and PNG/JPEG image encoding/decoding with zero PDF knowledge — the shared utility package for the [documents.js family](../../README.md).
|
|
6
6
|
|
|
7
|
-
Extracted from [pdf-codec](
|
|
7
|
+
Extracted from [pdf-codec](../pdf-codec/README.md), where these utilities lived as a directory-isolated subgraph under `src/bytes/` + `src/image/` with no PDF imports. Both pdf-codec and documents.js consume them from this neutral home rather than one fetching byte utilities from a backend.
|
|
8
8
|
|
|
9
|
-
byte-codec has no internal dependencies in the documents.js family — its only external dependency is [`fflate`](https://github.com/101arrowz/fflate) for raw DEFLATE/zlib compression. Both [pdf-codec](
|
|
9
|
+
byte-codec has no internal dependencies in the documents.js family — its only external dependency is [`fflate`](https://github.com/101arrowz/fflate) for raw DEFLATE/zlib compression. Both [pdf-codec](../pdf-codec/README.md) and [documents.js](https://github.com/ExaDev/documents.js) depend on it:
|
|
10
10
|
|
|
11
11
|
```mermaid
|
|
12
12
|
graph TD
|
|
@@ -17,8 +17,8 @@ graph TD
|
|
|
17
17
|
bytecodec --> pdfcodec
|
|
18
18
|
bytecodec --> documents
|
|
19
19
|
|
|
20
|
-
click bytecodec "https://github.com/ExaDev/byte-codec" "byte-codec"
|
|
21
|
-
click pdfcodec "https://github.com/ExaDev/pdf-codec" "pdf-codec"
|
|
20
|
+
click bytecodec "https://github.com/ExaDev/documents.js/tree/main/packages/byte-codec" "byte-codec"
|
|
21
|
+
click pdfcodec "https://github.com/ExaDev/documents.js/tree/main/packages/pdf-codec" "pdf-codec"
|
|
22
22
|
click documents "https://github.com/ExaDev/documents.js" "documents.js"
|
|
23
23
|
|
|
24
24
|
style bytecodec fill:#f9a825,stroke:#333,stroke-width:3px
|
|
@@ -55,9 +55,9 @@ To run a single test file, pass its path to vitest directly, e.g. `pnpm exec vit
|
|
|
55
55
|
|
|
56
56
|
## Conventions
|
|
57
57
|
|
|
58
|
-
- Worker-isomorphic (see the [family-wide convention](
|
|
58
|
+
- Worker-isomorphic (see the [family-wide convention](../../README.md#conventions)): runtime `src/` must not import `node:*`, a bare Node builtin, or use the `Buffer` global — enforced by a `no-restricted-imports`/`no-restricted-globals` ESLint rule and exercised in CI by running the test suite inside an actual `workerd` isolate (`pnpm test:workers`). Test files under `src/**/*.test.ts` are exempt and may use Node APIs for fixtures.
|
|
59
59
|
- Only `src/index.ts` may be named `index.*` — a custom ESLint rule (`local/no-non-barrel-index`) rejects any other module using an `index` basename, since that would be a hidden entry point the `exports` map in `package.json` doesn't advertise.
|
|
60
|
-
- Releases are fully automated: a push to `main` runs `semantic-release` in CI, which determines the version from Conventional Commit messages
|
|
60
|
+
- Releases are fully automated: a push to `main` runs `semantic-release` in CI, which determines the version from Conventional Commit messages and publishes to npm via OIDC trusted publishing (no local `NPM_TOKEN` needed). There is no manual publish step. This does not extend to the [npm alias](#npm-alias) below — see that section.
|
|
61
61
|
|
|
62
62
|
## Install
|
|
63
63
|
|
|
@@ -67,12 +67,14 @@ pnpm add byte-codec
|
|
|
67
67
|
npm install byte-codec
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
## npm
|
|
70
|
+
## npm alias
|
|
71
71
|
|
|
72
|
-
This package also
|
|
72
|
+
This package also published under an alternate name from the pre-monorepo pipeline:
|
|
73
73
|
|
|
74
74
|
- [document-bytes](https://www.npmjs.com/package/document-bytes)
|
|
75
75
|
|
|
76
|
+
**Frozen since the monorepo migration** — see the [root README's release note](../../README.md#releases): the alias republish step was dropped along with GitHub Packages mirroring and SBOM/provenance signing, and nothing today keeps this name in sync with `byte-codec`'s own releases. Tracked in [ExaDev/documents.js#727](https://github.com/ExaDev/documents.js/issues/727).
|
|
77
|
+
|
|
76
78
|
## License
|
|
77
79
|
|
|
78
80
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "byte-codec",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.12",
|
|
4
4
|
"description": "Generic byte-level primitives (ByteWriter, ByteReader, CRC-32, deflate/inflate) and PNG/JPEG image encoding/decoding with zero PDF knowledge — the shared utility package for the documents.js family.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|