strtok3 10.0.0 → 10.1.0-beta.0

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 CHANGED
@@ -35,6 +35,8 @@ npm install strtok3
35
35
  Starting with version 7, the module has migrated from [CommonJS](https://en.wikipedia.org/wiki/CommonJS) to [pure ECMAScript Module (ESM)](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
36
36
  The distributed JavaScript codebase is compliant with the [ECMAScript 2020 (11th Edition)](https://en.wikipedia.org/wiki/ECMAScript_version_history#11th_Edition_%E2%80%93_ECMAScript_2020) standard.
37
37
 
38
+ For TypeScript CommonJs backward compatibility, you can use [load-esm](https://github.com/Borewit/load-esm).
39
+
38
40
  > [!NOTE]
39
41
  > This module requires a [Node.js ≥ 16](https://nodejs.org/en/about/previous-releases) engine.
40
42
  > It can also be used in a browser environment when bundled with a module bundler.
@@ -19,9 +19,6 @@ export class BufferTokenizer extends AbstractTokenizer {
19
19
  */
20
20
  async readBuffer(uint8Array, options) {
21
21
  if (options?.position) {
22
- if (options.position < this.position) {
23
- throw new Error('`options.position` must be equal or greater than `tokenizer.position`');
24
- }
25
22
  this.position = options.position;
26
23
  }
27
24
  const bytesRead = await this.peekBuffer(uint8Array, options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strtok3",
3
- "version": "10.0.0",
3
+ "version": "10.1.0-beta.0",
4
4
  "description": "A promise based streaming tokenizer",
5
5
  "author": {
6
6
  "name": "Borewit",
@@ -55,13 +55,13 @@
55
55
  "@types/chai": "^5.0.1",
56
56
  "@types/chai-as-promised": "^8.0.1",
57
57
  "@types/debug": "^4.1.12",
58
- "@types/mocha": "^10.0.9",
59
- "@types/node": "^22.9.0",
60
- "c8": "^10.1.2",
58
+ "@types/mocha": "^10.0.10",
59
+ "@types/node": "^22.10.5",
60
+ "c8": "^10.1.3",
61
61
  "chai": "^5.1.2",
62
62
  "chai-as-promised": "^8.0.1",
63
63
  "del-cli": "^6.0.0",
64
- "mocha": "^10.8.2",
64
+ "mocha": "^11.0.1",
65
65
  "remark-cli": "^12.0.1",
66
66
  "remark-preset-lint-recommended": "^7.0.0",
67
67
  "token-types": "^6.0.0",
@@ -71,7 +71,7 @@
71
71
  },
72
72
  "dependencies": {
73
73
  "@tokenizer/token": "^0.3.0",
74
- "peek-readable": "^5.3.1"
74
+ "peek-readable": "^5.4.0-beta.0"
75
75
  },
76
76
  "keywords": [
77
77
  "tokenizer",
@@ -87,5 +87,5 @@
87
87
  "stream",
88
88
  "streaming"
89
89
  ],
90
- "packageManager": "yarn@4.3.1"
90
+ "packageManager": "yarn@4.6.0"
91
91
  }