Skip to content

Commit

Permalink
remove long custom definition (#4)
Browse files Browse the repository at this point in the history
* remove long custom definition
  • Loading branch information
PG Herveou authored Apr 2, 2020
1 parent 31abd47 commit 727fa4e
Show file tree
Hide file tree
Showing 17 changed files with 45 additions and 87 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
## [1.0.2](https://github.com/pgherveou/protobuf.js/releases/tag/1.0.2)

6 changes: 6 additions & 0 deletions cli/pbts.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ exports.main = function(args, callback) {
"// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run types'.",
""
);

output.push(
"import * as Long from \"long\";",
""
);

if (argv.global)
output.push(
"export as namespace " + argv.global + ";",
Expand Down
23 changes: 7 additions & 16 deletions dist/light/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/light/protobuf.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/light/protobuf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/light/protobuf.min.js.map

Large diffs are not rendered by default.

15 changes: 3 additions & 12 deletions dist/minimal/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/minimal/protobuf.js.map

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions dist/minimal/protobuf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/minimal/protobuf.min.js.map

Large diffs are not rendered by default.

23 changes: 7 additions & 16 deletions dist/protobuf.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/protobuf.js.map

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions dist/protobuf.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/protobuf.min.js.map

Large diffs are not rendered by default.

18 changes: 2 additions & 16 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run types'.

import * as Long from "long";

export as namespace protobuf;

/**
Expand Down Expand Up @@ -1818,22 +1820,6 @@ type Properties<T> = { [P in keyof T]?: T[P] };
export interface Buffer extends Uint8Array {
}

/**
* Any compatible Long instance.
* This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.
*/
export interface Long {

/** Low bits */
low: number;

/** High bits */
high: number;

/** Whether unsigned or not */
unsigned: boolean;
}

/**
* A OneOf getter as returned by {@link util.oneOfGetter}.
* @returns Set field name, if any
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pgherveou/protobufjs",
"version": "1.0.1",
"version": "1.0.2",
"versionScheme": "~",
"description": "Protocol Buffers for JavaScript (& TypeScript).",
"author": "Daniel Wirtz <[email protected]>",
Expand Down
9 changes: 0 additions & 9 deletions src/util/minimal.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,15 +157,6 @@ util.newBuffer = function newBuffer(sizeOrArray) {
*/
util.Array = typeof Uint8Array !== "undefined" ? Uint8Array /* istanbul ignore next */ : Array;

/**
* Any compatible Long instance.
* This is a minimal stand-alone definition of a Long instance. The actual type is that exported by long.js.
* @interface Long
* @property {number} low Low bits
* @property {number} high High bits
* @property {boolean} unsigned Whether unsigned or not
*/

/**
* Long.js's Long class if available.
* @type {Constructor<Long>}
Expand Down

0 comments on commit 727fa4e

Please sign in to comment.