Skip to content

Commit 952fc98

Browse files
committed
change imports and package info
1 parent 4c0a21f commit 952fc98

20 files changed

+64
-62
lines changed

README.md

+16-16
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
<h1><p align="center"><img alt="protobuf.js" src="https://github.com/protobufjs/protobuf.js/raw/master/pbjs.svg" height="100" /><br/>protobuf.js</p></h1>
1+
<h1><p align="center"><img alt="protobuf.js" src="https://github.com/uncollapseco/protobuf.js/raw/master/pbjs.svg" height="100" /><br/>protobuf.js</p></h1>
22
<p align="center">
3-
<a href="https://github.com/protobufjs/protobuf.js/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/protobufjs/protobuf.js/test.yml?branch=master&label=build&logo=github" alt=""></a>
4-
<a href="https://github.com/protobufjs/protobuf.js/actions/workflows/release.yaml"><img src="https://img.shields.io/github/actions/workflow/status/protobufjs/protobuf.js/release.yaml?branch=master&label=release&logo=github" alt=""></a>
3+
<a href="https://github.com/uncollapseco/protobuf.js/actions/workflows/test.yml"><img src="https://img.shields.io/github/actions/workflow/status/uncollapseco/protobuf.js/test.yml?branch=master&label=build&logo=github" alt=""></a>
4+
<a href="https://github.com/uncollapseco/protobuf.js/actions/workflows/release.yaml"><img src="https://img.shields.io/github/actions/workflow/status/uncollapseco/protobuf.js/release.yaml?branch=master&label=release&logo=github" alt=""></a>
55
<a href="https://npmjs.org/package/@tanglechat/protobufjs"><img src="https://img.shields.io/npm/v/@tanglechat/protobufjs.svg?logo=npm" alt=""></a>
66
<a href="https://npmjs.org/package/@tanglechat/protobufjs"><img src="https://img.shields.io/npm/dm/@tanglechat/protobufjs.svg?label=downloads&logo=npm" alt=""></a>
77
<a href="https://www.jsdelivr.com/package/npm/@tanglechat/protobufjs"><img src="https://img.shields.io/jsdelivr/npm/hm/@tanglechat/protobufjs?label=requests&logo=jsdelivr" alt=""></a>
@@ -197,7 +197,7 @@ For reference, the following diagram aims to display relationships between the d
197197

198198
<p align="center"><img alt="Toolset Diagram" src="https://protobufjs.github.io/protobuf.js/toolset.svg" /></p>
199199

200-
> In other words: `verify` indicates that calling `create` or `encode` directly on the plain object will [result in a valid message respectively] succeed. `fromObject`, on the other hand, does conversion from a broader range of plain objects to create valid messages. ([ref](https://github.com/protobufjs/protobuf.js/issues/748#issuecomment-291925749))
200+
> In other words: `verify` indicates that calling `create` or `encode` directly on the plain object will [result in a valid message respectively] succeed. `fromObject`, on the other hand, does conversion from a broader range of plain objects to create valid messages. ([ref](https://github.com/uncollapseco/protobuf.js/issues/748#issuecomment-291925749))
201201
202202
Examples
203203
--------
@@ -469,13 +469,13 @@ greeter.sayHello({ name: 'you' })
469469
});
470470
```
471471

472-
There is also an [example for streaming RPC](https://github.com/protobufjs/protobuf.js/blob/master/examples/streaming-rpc.js).
472+
There is also an [example for streaming RPC](https://github.com/uncollapseco/protobuf.js/blob/master/examples/streaming-rpc.js).
473473

474474
Note that the service API is meant for clients. Implementing a server-side endpoint pretty much always requires transport channel (i.e. http, websocket, etc.) specific code with the only common denominator being that it decodes and encodes messages.
475475

476476
### Usage with TypeScript
477477

478-
The library ships with its own [type definitions](https://github.com/protobufjs/protobuf.js/blob/master/index.d.ts) and modern editors like [Visual Studio Code](https://code.visualstudio.com/) will automatically detect and use them for code completion.
478+
The library ships with its own [type definitions](https://github.com/uncollapseco/protobuf.js/blob/master/index.d.ts) and modern editors like [Visual Studio Code](https://code.visualstudio.com/) will automatically detect and use them for code completion.
479479

480480
The npm package depends on [@types/node](https://www.npmjs.com/package/@types/node) because of `Buffer` and [@types/long](https://www.npmjs.com/package/@types/long) because of `Long`. If you are not building for node and/or not using long.js, it should be safe to exclude them manually.
481481

@@ -484,7 +484,7 @@ The npm package depends on [@types/node](https://www.npmjs.com/package/@types/no
484484
The API shown above works pretty much the same with TypeScript. However, because everything is typed, accessing fields on instances of dynamically generated message classes requires either using bracket-notation (i.e. `message["awesomeField"]`) or explicit casts. Alternatively, it is possible to use a [typings file generated for its static counterpart](#pbts-for-typescript).
485485

486486
```ts
487-
import { load } from "protobufjs"; // respectively "./node_modules/protobufjs"
487+
import { load } from "@tanglechat/protobufjs"; // respectively "./node_modules/protobufjs"
488488

489489
load("awesome.proto", function(err, root) {
490490
if (err)
@@ -524,7 +524,7 @@ The library also includes an early implementation of [decorators](https://www.ty
524524
**Note** that decorators are an experimental feature in TypeScript and that declaration order is important depending on the JS target. For example, `@Field.d(2, AwesomeArrayMessage)` requires that `AwesomeArrayMessage` has been defined earlier when targeting `ES5`.
525525

526526
```ts
527-
import { Message, Type, Field, OneOf } from "protobufjs/light"; // respectively "./node_modules/protobufjs/light.js"
527+
import { Message, Type, Field, OneOf } from "@tanglechat/protobufjs/light"; // respectively "./node_modules/protobufjs/light.js"
528528

529529
export class AwesomeSubMessage extends Message<AwesomeSubMessage> {
530530

@@ -592,8 +592,8 @@ Additional documentation
592592

593593
#### protobuf.js
594594
* [API Documentation](https://protobufjs.github.io/protobuf.js)
595-
* [CHANGELOG](https://github.com/protobufjs/protobuf.js/blob/master/CHANGELOG.md)
596-
* [Frequently asked questions](https://github.com/protobufjs/protobuf.js/wiki) on our wiki
595+
* [CHANGELOG](https://github.com/uncollapseco/protobuf.js/blob/master/CHANGELOG.md)
596+
* [Frequently asked questions](https://github.com/uncollapseco/protobuf.js/wiki) on our wiki
597597

598598
#### Community
599599
* [Questions and answers](http://stackoverflow.com/search?tab=newest&q=protobuf.js) on StackOverflow
@@ -653,13 +653,13 @@ These results are achieved by
653653
* using node-specific functionality where beneficial and, of course
654654
* avoiding unnecessary operations through splitting up [the toolset](#toolset).
655655

656-
You can also run [the benchmark](https://github.com/protobufjs/protobuf.js/blob/master/bench/index.js) ...
656+
You can also run [the benchmark](https://github.com/uncollapseco/protobuf.js/blob/master/bench/index.js) ...
657657

658658
```
659659
$> npm run bench
660660
```
661661

662-
and [the profiler](https://github.com/protobufjs/protobuf.js/blob/master/bench/prof.js) yourself (the latter requires a recent version of node):
662+
and [the profiler](https://github.com/uncollapseco/protobuf.js/blob/master/bench/prof.js) yourself (the latter requires a recent version of node):
663663

664664
```
665665
$> npm run prof <encode|decode|encode-browser|decode-browser> [iterations=10000000]
@@ -673,18 +673,18 @@ Compatibility
673673
* Works in all modern and not-so-modern browsers except IE8.
674674
* Because the internals of this package do not rely on `google/protobuf/descriptor.proto`, options are parsed and presented literally.
675675
* If typed arrays are not supported by the environment, plain arrays will be used instead.
676-
* Support for pre-ES5 environments (except IE8) can be achieved by [using a polyfill](https://github.com/protobufjs/protobuf.js/blob/master/lib/polyfill.js).
676+
* Support for pre-ES5 environments (except IE8) can be achieved by [using a polyfill](https://github.com/uncollapseco/protobuf.js/blob/master/lib/polyfill.js).
677677
* Support for [Content Security Policy](https://w3c.github.io/webappsec-csp/)-restricted environments (like Chrome extensions without unsafe-eval) can be achieved by generating and using static code instead.
678678
* If a proper way to work with 64 bit values (uint64, int64 etc.) is required, just install [long.js](https://github.com/dcodeIO/long.js) alongside this library. All 64 bit numbers will then be returned as a `Long` instance instead of a possibly unsafe JavaScript number ([see](https://github.com/dcodeIO/long.js)).
679-
* For descriptor.proto interoperability, see [ext/descriptor](https://github.com/protobufjs/protobuf.js/tree/master/ext/descriptor)
679+
* For descriptor.proto interoperability, see [ext/descriptor](https://github.com/uncollapseco/protobuf.js/tree/master/ext/descriptor)
680680

681681
Building
682682
--------
683683

684684
To build the library or its components yourself, clone it from GitHub and install the development dependencies:
685685

686686
```
687-
$> git clone https://github.com/protobufjs/protobuf.js.git
687+
$> git clone https://github.com/uncollapseco/protobuf.js.git
688688
$> cd protobuf.js
689689
$> npm install
690690
```
@@ -722,6 +722,6 @@ By default, protobuf.js integrates into any browserify build-process without req
722722
protobuf.configure();
723723
```
724724

725-
* If you have any special requirements, there is [the bundler](https://github.com/protobufjs/protobuf.js/blob/master/scripts/bundle.js) for reference.
725+
* If you have any special requirements, there is [the bundler](https://github.com/uncollapseco/protobuf.js/blob/master/scripts/bundle.js) for reference.
726726

727727
**License:** [BSD 3-Clause License](https://opensource.org/licenses/BSD-3-Clause)

cli/README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
protobufjs-cli
22
==============
3-
[![npm](https://img.shields.io/npm/v/protobufjs-cli.svg)](https://www.npmjs.com/package/protobufjs-cli)
3+
[![npm](https://img.shields.io/npm/v/@tanglechat/protobufjs-cli.svg)](https://www.npmjs.com/package/@tanglechat/protobufjs-cli)
44

5-
Command line interface (CLI) for [protobuf.js](https://github.com/dcodeIO/protobuf.js).
5+
Command line interface (CLI) for [protobuf.js](https://github.com/uncollapseco/protobuf.js). Forked for bigint support.
66

77
This can be used to translate between file formats and to generate static code as well as TypeScript definitions.
88

@@ -165,7 +165,7 @@ There is no significant difference performance-wise as the code generated static
165165
Both utilities can be used programmatically by providing command line arguments and a callback to their respective `main` functions:
166166

167167
```js
168-
var pbjs = require("protobufjs-cli/pbjs"); // or require("protobufjs-cli").pbjs / .pbts
168+
var pbjs = require("@tanglechat/protobufjs-cli/pbjs"); // or require("protobufjs-cli").pbjs / .pbts
169169

170170
pbjs.main([ "--target", "json-module", "path/to/myproto.proto" ], function(err, output) {
171171
if (err)

cli/package-lock.json

+11-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cli/package.json

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
{
22
"name": "@tanglechat/protobufjs-cli",
33
"description": "Translates between file formats and generates static code as well as TypeScript definitions.",
4-
"version": "1.1.4",
5-
"author": "Daniel Wirtz <[email protected]>",
4+
"version": "1.1.5",
5+
"author": "Folf <[email protected]>",
6+
"contributors": ["Daniel Wirtz <[email protected]>"],
67
"repository": {
78
"type": "git",
8-
"url": "https://github.com/protobufjs/protobuf.js.git"
9+
"url": "https://github.com/uncollapseco/protobuf.js.git"
910
},
1011
"engines": {
1112
"node": ">=12.0.0"
@@ -33,6 +34,6 @@
3334
"uglify-js": "^3.7.7"
3435
},
3536
"devDependencies": {
36-
"protobufjs": "file:.."
37+
"@tanglechat/protobufjs": "file:.."
3738
}
3839
}

cli/pbjs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var path = require("path"),
66
pkg = require("./package.json"),
77
util = require("./util"),
88
glob = require("glob"),
9-
protobuf = require("protobufjs");
9+
protobuf = require("@tanglechat/protobufjs");
1010

1111
var targets = util.requireAll("./targets");
1212

cli/pbts.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ exports.main = function(args, callback) {
159159

160160
// Build an object of imports and paths
161161
var imports = {
162-
$protobuf: "protobufjs"
162+
$protobuf: "@tanglechat/protobufjs"
163163
};
164164
importArray.forEach(function(importItem) {
165165
imports[getImportName(importItem)] = importItem;

cli/targets/json-module.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = json_module;
33

44
var util = require("../util");
55

6-
var protobuf = require("protobufjs");
6+
var protobuf = require("@tanglechat/protobufjs");
77

88
json_module.description = "JSON representation as a module";
99

@@ -27,7 +27,7 @@ function json_module(root, options, callback) {
2727
}
2828
var json = jsonSafeProp(JSON.stringify(root.nested, null, 2).trim());
2929
output.push(".addJSON(" + json + ");");
30-
output = util.wrap(output.join(""), protobuf.util.merge({ dependency: "protobufjs/light" }, options));
30+
output = util.wrap(output.join(""), protobuf.util.merge({ dependency: "@tanglechat/protobufjs/light" }, options));
3131
process.nextTick(function() {
3232
callback(null, output);
3333
});

cli/targets/proto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module.exports = proto_target;
33

44
proto_target.private = true;
55

6-
var protobuf = require("protobufjs");
6+
var protobuf = require("@tanglechat/protobufjs");
77

88
var Namespace = protobuf.Namespace,
99
Enum = protobuf.Enum,

cli/targets/proto2.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
module.exports = proto2_target;
33

4-
var protobuf = require("protobufjs");
4+
var protobuf = require("@tanglechat/protobufjs");
55

66
proto2_target.description = "Protocol Buffers, Version 2";
77

cli/targets/proto3.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
module.exports = proto3_target;
33

4-
var protobuf = require("protobufjs");
4+
var protobuf = require("@tanglechat/protobufjs");
55

66
proto3_target.description = "Protocol Buffers, Version 3";
77

cli/targets/static-module.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module.exports = static_module_target;
77
// - AMD and global scope depend on the full library for now.
88

99
var util = require("../util"),
10-
protobuf = require("protobufjs");
10+
protobuf = require("@tanglechat/protobufjs");
1111

1212
static_module_target.description = "Static code without reflection as a module";
1313

cli/targets/static.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var UglifyJS = require("uglify-js"),
55
espree = require("espree"),
66
escodegen = require("escodegen"),
77
estraverse = require("estraverse"),
8-
protobuf = require("protobufjs");
8+
protobuf = require("@tanglechat/protobufjs");
99

1010
var Type = protobuf.Type,
1111
Service = protobuf.Service,

cli/util.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use strict";
22
var fs = require("fs"),
33
path = require("path"),
4-
protobuf = require("protobufjs");
4+
protobuf = require("@tanglechat/protobufjs");
55

66
function basenameCompare(a, b) {
77
var aa = String(a).replace(/\.\w+$/, "").split(/(-?\d*\.?\d+)/g),
@@ -110,7 +110,7 @@ exports.wrap = function(OUTPUT, options) {
110110
// otherwise fetch the custom one
111111
wrap = fs.readFileSync(path.resolve(process.cwd(), name)).toString("utf8");
112112
}
113-
wrap = wrap.replace(/\$DEPENDENCY/g, JSON.stringify(options.dependency || "protobufjs"));
113+
wrap = wrap.replace(/\$DEPENDENCY/g, JSON.stringify(options.dependency || "@tanglechat/protobufjs"));
114114
wrap = wrap.replace(/( *)\$OUTPUT;/, function($0, $1) {
115115
return $1.length ? OUTPUT.replace(/^/mg, $1) : OUTPUT;
116116
});

examples/reader-writer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// protobuf wire format.
33

44
/*eslint-disable strict, no-console*/
5-
var protobuf = require("../runtime"); // require("protobufjs/runtime");
5+
var protobuf = require("../runtime"); // require("@tanglechat/protobufjs/runtime");
66

77
// writing
88
var buffer = protobuf.Writer.create()

examples/traverse-types.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// for each message type within.
33

44
/*eslint-disable strict, no-console*/
5-
var protobuf = require(".."); // require("protobufjs");
5+
var protobuf = require(".."); // require("@tanglechat/protobufjs");
66

77
// traverse-types.proto
88
var proto = "syntax=\"proto3\";\

ext/descriptor/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Usage
77
-----
88

99
```js
10-
var protobuf = require("protobufjs"), // requires the full library
11-
descriptor = require("protobufjs/ext/descriptor");
10+
var protobuf = require("@tanglechat/protobufjs"), // requires the full library
11+
descriptor = require("@tanglechat/protobufjs/ext/descriptor");
1212

1313
var root = ...;
1414

package-lock.json

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
{
22
"name": "@tanglechat/protobufjs",
3-
"version": "7.5.1",
3+
"version": "7.5.3",
44
"versionScheme": "~",
5-
"description": "Protocol Buffers for JavaScript (& TypeScript).",
6-
"author": "Daniel Wirtz <[email protected]>",
5+
"description": "Protocol Buffers for JavaScript (& TypeScript). Forked for bigint support.",
6+
"author": "Folf <[email protected]>",
7+
"contributors": ["Daniel Wirtz <[email protected]>"],
78
"license": "BSD-3-Clause",
8-
"repository": "protobufjs/protobuf.js",
9-
"bugs": "https://github.com/protobufjs/protobuf.js/issues",
9+
"repository": "uncollapseco/protobuf.js",
10+
"bugs": "https://github.com/uncollapseco/protobuf.js/issues",
1011
"homepage": "https://protobufjs.github.io/protobuf.js/",
1112
"engines": {
1213
"node": ">=12.0.0"

0 commit comments

Comments
 (0)