@thi.ng/bencode 2.0.7 → 2.1.2

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/CHANGELOG.md CHANGED
@@ -1,69 +1,116 @@
1
1
  # Change Log
2
2
 
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
+
3
6
  All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
+
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
11
+
12
+ ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@2.1.0) (2021-11-17)
5
13
 
6
- ## [2.0.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@2.0.6...@thi.ng/bencode@2.0.7) (2021-11-03)
14
+ #### 🚀 Features
7
15
 
8
- **Note:** Version bump only for package @thi.ng/bencode
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
9
21
 
22
+ #### ♻️ Refactoring
10
23
 
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
11
30
 
31
+ ### [2.0.8](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@2.0.8) (2021-11-10)
12
32
 
33
+ #### ♻️ Refactoring
13
34
 
14
- # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@1.0.5...@thi.ng/bencode@2.0.0) (2021-10-12)
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
15
36
 
37
+ ### [2.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@2.0.1) (2021-10-13)
16
38
 
17
- ### Build System
39
+ #### ♻️ Refactoring
18
40
 
19
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
41
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
42
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
43
+ - add .js suffix for all relative imports
20
44
 
45
+ # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@2.0.0) (2021-10-12)
21
46
 
22
- ### BREAKING CHANGES
47
+ #### 🛑 Breaking changes
23
48
 
24
- * discontinue CommonJS & UMD versions
49
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
50
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
51
+ - only ESM modules will be published from now on
52
+ - CJS obsolete due to ESM support in recent versions of node:
53
+ - i.e. launch NodeJS via:
54
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
55
+ - in the node REPL use `await import(...)` instead of `require()`
56
+ - UMD obsolete due to widespread browser support for ESM
57
+ Also:
58
+ - normalize/restructure/reorg all package.json files
59
+ - cleanup all build scripts, remove obsolete
60
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
25
61
 
26
- - only ESM modules will be published from now on
27
- - CJS obsolete due to ESM support in recent versions of node:
28
- - i.e. launch NodeJS via:
29
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
30
- - in the node REPL use `await import(...)` instead of `require()`
31
- - UMD obsolete due to widespread browser support for ESM
62
+ #### ♻️ Refactoring
32
63
 
33
- Also:
34
- - normalize/restructure/reorg all package.json files
35
- - cleanup all build scripts, remove obsolete
36
- - switch from mocha to @thi.ng/testament for all tests
64
+ - update defmulti impls ([c807c38](https://github.com/thi-ng/umbrella/commit/c807c38))
65
+ - restructure/split source files ([fa3b4b6](https://github.com/thi-ng/umbrella/commit/fa3b4b6))
66
+ - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
67
+ - largely related to recent updates/restructuring of these packages:
68
+ - api
69
+ - defmulti
70
+ - errors
71
+ - logger
72
+ - update imports (transducers) ([e2db0dd](https://github.com/thi-ng/umbrella/commit/e2db0dd))
73
+ - update imports ([7b00120](https://github.com/thi-ng/umbrella/commit/7b00120))
74
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
75
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
37
76
 
77
+ ### [0.3.43](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@0.3.43) (2020-12-07)
38
78
 
79
+ #### ♻️ Refactoring
39
80
 
81
+ - update type-only imports ([ad267a2](https://github.com/thi-ng/umbrella/commit/ad267a2))
40
82
 
83
+ ## [0.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@0.3.0) (2019-07-07)
41
84
 
85
+ #### 🚀 Features
42
86
 
43
- ## [1.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@1.0.4...@thi.ng/bencode@1.0.5) (2021-09-03)
87
+ - enable TS strict compiler flags (refactor) ([1be1a14](https://github.com/thi-ng/umbrella/commit/1be1a14))
44
88
 
45
- **Note:** Version bump only for package @thi.ng/bencode
89
+ #### ♻️ Refactoring
46
90
 
47
- # [0.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@0.2.17...@thi.ng/bencode@0.3.0) (2019-07-07)
91
+ - TS strictNullChecks ([9d0b1f1](https://github.com/thi-ng/umbrella/commit/9d0b1f1))
48
92
 
49
- ### Features
93
+ ### [0.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@0.2.1) (2019-02-20)
50
94
 
51
- - **bencode:** enable TS strict compiler flags (refactor) ([1be1a14](https://github.com/thi-ng/umbrella/commit/1be1a14))
95
+ #### 🩹 Bug fixes
52
96
 
53
- ## [0.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@0.2.0...@thi.ng/bencode@0.2.1) (2019-02-20)
97
+ - string list val decoding, add tests, update readme ([9f2b8ae](https://github.com/thi-ng/umbrella/commit/9f2b8ae))
54
98
 
55
- ### Bug Fixes
99
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@0.2.0) (2019-02-15)
56
100
 
57
- - **bencode:** string list val decoding, add tests, update readme ([9f2b8ae](https://github.com/thi-ng/umbrella/commit/9f2b8ae))
101
+ #### 🚀 Features
58
102
 
59
- # [0.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/bencode@0.1.1...@thi.ng/bencode@0.2.0) (2019-02-15)
103
+ - add decode(), fix string length handling ([c1bbc6f](https://github.com/thi-ng/umbrella/commit/c1bbc6f))
104
+ - add decode() w/ opt utf8 string decoding
105
+ - use utf8Length() for string encoding
60
106
 
61
- ### Features
107
+ #### ♻️ Refactoring
62
108
 
63
- - **bencode:** add decode(), fix string length handling ([c1bbc6f](https://github.com/thi-ng/umbrella/commit/c1bbc6f))
109
+ - update to use [@thi.ng/arrays](https://github.com/thi-ng/umbrella/tree/main/packages/arrays) ([83260ed](https://github.com/thi-ng/umbrella/commit/83260ed))
64
110
 
65
- # 0.1.0 (2019-02-05)
111
+ ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/bencode@0.1.0) (2019-02-05)
66
112
 
67
- ### Features
113
+ #### 🚀 Features
68
114
 
69
- - **bencode:** re-import updated bencode pkg ([cf7dc3a](https://github.com/thi-ng/umbrella/commit/cf7dc3a))
115
+ - re-import updated bencode pkg ([cf7dc3a](https://github.com/thi-ng/umbrella/commit/cf7dc3a))
116
+ - re-import updated bencode pkg ([f2612a6](https://github.com/thi-ng/umbrella/commit/f2612a6))
package/README.md CHANGED
@@ -77,7 +77,7 @@ node --experimental-repl-await
77
77
  > const bencode = await import("@thi.ng/bencode");
78
78
  ```
79
79
 
80
- Package sizes (gzipped, pre-treeshake): ESM: 1.23 KB
80
+ Package sizes (gzipped, pre-treeshake): ESM: 1.22 KB
81
81
 
82
82
  ## Dependencies
83
83
 
package/decode.js CHANGED
@@ -128,7 +128,7 @@ const readFloat = (iter) => {
128
128
  const readBytes = (iter, len) => {
129
129
  let i;
130
130
  let buf = [];
131
- while (--len >= 0 && !(i = iter.next()).done) {
131
+ while (len-- > 0 && !(i = iter.next()).done) {
132
132
  buf.push(i.value);
133
133
  }
134
134
  return len < 0 ? buf : illegalState(`expected string, reached EOF`);
package/package.json CHANGED
@@ -1,78 +1,83 @@
1
1
  {
2
- "name": "@thi.ng/bencode",
3
- "version": "2.0.7",
4
- "description": "Bencode binary encoder / decoder with optional UTF8 encoding & floating point support",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
2
+ "name": "@thi.ng/bencode",
3
+ "version": "2.1.2",
4
+ "description": "Bencode binary encoder / decoder with optional UTF8 encoding & floating point support",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/bencode#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
12
18
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/bencode#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/arrays": "^2.1.2",
38
+ "@thi.ng/checks": "^3.1.2",
39
+ "@thi.ng/defmulti": "^2.1.2",
40
+ "@thi.ng/errors": "^2.1.2",
41
+ "@thi.ng/transducers": "^8.1.2",
42
+ "@thi.ng/transducers-binary": "^2.1.2"
43
+ },
44
+ "devDependencies": {
45
+ "@microsoft/api-extractor": "^7.18.19",
46
+ "@thi.ng/testament": "^0.2.2",
47
+ "rimraf": "^3.0.2",
48
+ "tools": "^0.0.1",
49
+ "typedoc": "^0.22.9",
50
+ "typescript": "^4.5.2"
51
+ },
52
+ "keywords": [
53
+ "array",
54
+ "bencode",
55
+ "binary",
56
+ "encode",
57
+ "fileformat",
58
+ "transducer",
59
+ "typescript"
60
+ ],
61
+ "publishConfig": {
62
+ "access": "public"
63
+ },
64
+ "engines": {
65
+ "node": ">=12.7"
66
+ },
67
+ "files": [
68
+ "*.js",
69
+ "*.d.ts"
70
+ ],
71
+ "exports": {
72
+ ".": {
73
+ "import": "./index.js"
35
74
  },
36
- "dependencies": {
37
- "@thi.ng/arrays": "^2.0.7",
38
- "@thi.ng/checks": "^3.0.6",
39
- "@thi.ng/defmulti": "^2.0.7",
40
- "@thi.ng/errors": "^2.0.6",
41
- "@thi.ng/transducers": "^8.0.7",
42
- "@thi.ng/transducers-binary": "^2.0.7"
75
+ "./decode": {
76
+ "import": "./decode.js"
43
77
  },
44
- "devDependencies": {
45
- "@thi.ng/testament": "^0.1.6"
46
- },
47
- "keywords": [
48
- "array",
49
- "bencode",
50
- "binary",
51
- "encode",
52
- "fileformat",
53
- "transducer",
54
- "typescript"
55
- ],
56
- "publishConfig": {
57
- "access": "public"
58
- },
59
- "engines": {
60
- "node": ">=12.7"
61
- },
62
- "files": [
63
- "*.js",
64
- "*.d.ts"
65
- ],
66
- "exports": {
67
- ".": {
68
- "import": "./index.js"
69
- },
70
- "./decode": {
71
- "import": "./decode.js"
72
- },
73
- "./encode": {
74
- "import": "./encode.js"
75
- }
76
- },
77
- "gitHead": "852cd2450617c86d15d18477dc634f17f04202eb"
78
- }
78
+ "./encode": {
79
+ "import": "./encode.js"
80
+ }
81
+ },
82
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
83
+ }