53 Commits

Author SHA1 Message Date
AntiMoron
f2ccb99922
fix: remove eval usage so that chrome extension MV3 can run properly (#1941) 2024-12-29 22:30:38 -08:00
Mason Clayton
75172cd11b
fix: utf8 -> utf16 decoding bug on surrogate pairs (#1486)
* fix utf8 -> utf16 decoding bug on surrogate pairs

This fixes https://github.com/protobufjs/protobuf.js/issues/1473

The custom utf8 -> utf16 decoder appears to be subtly flawed. From my reading it appears the chunking mechanism doesn't account for surrogate pairs at the end of a chunk causing variable size chunks. A larger chunk followed by a smaller chunk leaves behind garbage that'll be included in the latter chunk.

It looks like the chunking mechanism was added to prevent stack overflows when calling `formCharCode` with too many args. From some benchmarking it appears putting utf16 code units in an array and spreading that into `fromCharCode` wasn't helping performance much anyway. I simplified it significantly.

Here's a repro of the existing encoding bug in a fuzzing suite
https://repl.it/@turbio/oh-no-our-strings#decoder.js

* fix lint

* add test case for surrogate pair bug

Co-authored-by: Alexander Fenster <fenster@google.com>
2020-10-09 15:54:17 -07:00
Tom Willoughby
cd4aeda803
fix: allow Windows unc paths to be resolved and normalized (#1351)
* Add unc paths to isAbsolute regex

* Allow unc paths to be resolved and normalized

* Remove trailing whitespace
2020-06-25 09:56:45 -07:00
renovate[bot]
c96533a1b8
chore(deps): update dependency tape to v5 (#1395)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-29 16:52:22 -07:00
renovate[bot]
b013db0d0b
chore(deps): update dependency chalk to v4 (#1394)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-29 16:32:36 -07:00
dcodeIO
812b38ddab Other: Move global handling to util, see #995 2018-04-06 13:34:13 +02:00
dcodeIO
c5518c3bac Fixed an issue with codegen typings, see #819 2017-06-09 22:56:47 +02:00
dcodeIO
66d149e92f Ported utf8 chunking mechanism to base64 as well, fixes #800 2017-06-09 11:32:35 +02:00
dcodeIO
7445da0f8c Other: aspromise performance pass 2017-04-24 12:39:47 +02:00
dcodeIO
3f8b74ba67 Other: codegen 2 performance pass, #653 might benefit 2017-04-24 00:26:28 +02:00
dcodeIO
17c2797592 New: Upgrade to codegen 2 2017-04-23 14:51:58 +02:00
dcodeIO
c97b618112 Breaking: Everything uses interfaces now instead of typedefs (SomethingProperties is now ISomething) 2017-04-15 19:29:31 +02:00
dcodeIO
23f26defa7 Other: TypeScript generics improvements 2017-04-12 15:33:54 +02:00
dcodeIO
7a6f98b5e7 Breaking: Initial implementation of TypeScript decorators; Breaking: Refactored protobuf.Class away; Breaking: TypeScript definitions now have (a lot of) generics; Breaking: Removed deprecated features; Other: tsd-jsdoc now has limited generics support 2017-04-10 17:17:27 +02:00
dcodeIO
7a0b5b1cab Other: Added float benchmark and updated dist files 2017-04-02 13:31:15 +02:00
dcodeIO
fef924e5f7 Other: Use @protobufjs/float; Other: Rebuilt dist files for 6.7.0 2017-04-01 16:13:48 +02:00
dcodeIO
3c14ef42b3 New: Created a micromodule from (currently still bundled) float support 2017-04-01 15:40:07 +02:00
dcodeIO
ca0dce2d7f Other: Updated deps, ts fixes and regenerated dist files 2017-03-31 15:47:20 +02:00
dcodeIO
e4a6b6f81f Other: Make sure that util.Long is overridden by AMD loaders only if present, see #730 2017-03-27 17:15:25 +02:00
dcodeIO
29ce6cae0c CLI: Moved tsd-jsdoc to future cli package, see #716 2017-03-27 16:20:04 +02:00
dcodeIO
8de21e1a94 CLI: $Properties are just a type that's satisfied, not implemented, by classes, see #723 2017-03-27 00:45:58 +02:00
dcodeIO
c04d4a5ab8 New: Implemented stubs for long.js / node buffers to be used where either one isn't wanted, see #718 2017-03-23 23:15:08 +01:00
dcodeIO
3ead13e83e Other: Added tslint 2017-03-09 03:58:54 +01:00
dcodeIO
50e82fa775 Properly handle multiple ../.. in path.normalize, see #688 2017-02-23 17:43:33 +01:00
David Fox
37536e5fa7 Use ?: instead of |undefined in .d.ts files 2017-02-22 19:34:22 -06:00
dcodeIO
d246024f4c Other: Minor optimizations to dependencies, build process and tsd 2017-02-03 18:27:51 +01:00
dcodeIO
579068a45e Other: Updated test cases to use new buffer util 2017-01-28 04:57:04 +01:00
dcodeIO
0be01a1491 Fixed: Support node 4.2.0 to 4.4.7 buffers + travis case, see #665; Other: Added fetch test cases + some test cleanup 2017-01-28 04:36:59 +01:00
dcodeIO
942011d648 Other: Updated dist files and changelog for 6.6.2 2017-01-27 17:12:14 +01:00
dcodeIO
276a594771 New: Initial attempt on a backwards compatible fetch implementation with binary support, see #661 2017-01-27 01:31:45 +01:00
dcodeIO
b6cf228a82 Fixed: Use custom prelude in order to exclude any module loader code from source (for webpack), see #658 2017-01-26 17:41:08 +01:00
dcodeIO
73721f1207 Other: Moved checks whether a test case is applicable to parent case 2017-01-25 19:46:26 +01:00
dcodeIO
3fcd88c3f9 Other: Added eventemitter tests and updated micromodule dependencies (so far) 2017-01-25 19:19:05 +01:00
dcodeIO
2db4305ca6 Other: Added lib/path tests and updated a few dependencies 2017-01-25 16:30:58 +01:00
dcodeIO
2b12fb7db9 Other: Moved micro modules to lib so they can have their own tests etc.; Fixed: Make sure to check optional inner messages for null when encoding, see #658 2017-01-25 04:39:43 +01:00
dcodeIO
bcadffecb3 New: Instead of protobuf.parse.keepCase, fall back to protobuf.parse.defaults holding all possible defaults, see #608 2017-01-03 15:06:04 +01:00
dcodeIO
751a90f509 Other: Added a tape adapter to assert message equality accross browsers 2017-01-03 03:02:07 +01:00
dcodeIO
407223b5ce CLI: Static code no longer uses IE8 support utility 2017-01-02 14:13:48 +01:00
dcodeIO
3c77553551 CLI: Added support for TypeScript enums to pbts 2017-01-02 01:02:17 +01:00
dcodeIO
65637ffce2 CLI: Do not wrap main definition as a module and export directly instead; CLI: Generate prettier definitions with --no-comments 2016-12-31 01:08:14 +01:00
dcodeIO
c5160217ea Other: Minor tsd-jsdoc refactor 2016-12-30 23:34:40 +01:00
dcodeIO
20d8a2dd93 CLI: Added variable arguments support to tsd-jsdoc 2016-12-30 21:45:55 +01:00
dcodeIO
a7d23240a2 New: Attempt to improve TypeScript support by using explicit exports 2016-12-30 16:33:11 +01:00
dcodeIO
7eb3d45637 Respect optional properties when writing interfaces in tsd-jsdoc, fixes #598 2016-12-30 13:11:21 +01:00
dcodeIO
0b0de2458a Breaking: Relicensed the library and its components to BSD-3-Clause to match the official implementation (again); New: Replaced the ieee754 implementation for old browsers with a faster, use-case specific one + simple test case 2016-12-20 22:40:47 +01:00
dcodeIO
3ad8108eab Prevent NRE and properly annotate verify signature in tsd-jsdoc, fixed #572 2016-12-18 16:33:25 +01:00
dcodeIO
7003c56b1a 6.2.1 2016-12-16 17:10:38 +01:00
dcodeIO
fc383d0721 Better TypeScript definition support for @property-annotated objects [ci skip] 2016-12-16 16:36:42 +01:00
dcodeIO
75f4b6cb63 Moved extend implementation to its own micromodule, might help with #560; tsd-jsdoc progress 2016-12-15 12:57:11 +01:00
dcodeIO
a83425049c Fix d.ts whitespace on empty lines, added tsd-jsdoc LICENSE [ci skip] 2016-12-15 02:51:48 +01:00