Skip to content

Commit 5a2bef5

Browse files
authored
feat: Updated protoc to 3.20.3 (#7)
`protoc-gen-js` was removed in more recent version of Protocol Buffers. Ref: protocolbuffers/protobuf-javascript#127 Closes #4 Signed-off-by: dankeboy36 <[email protected]> Signed-off-by: dankeboy36 <[email protected]>
1 parent ae3bc8c commit 5a2bef5

File tree

3 files changed

+10
-11
lines changed

3 files changed

+10
-11
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Protocol Buffers for Node
2-
A wrapper in Node for the compiled protoc from https://github.com/google/protobuf.
2+
A wrapper in Node for the compiled protoc from https://github.com/protocolbuffers/protobuf.
33

44
## Version
5-
It's currently using Protocol Buffers `v3.11.2`.
5+
It's currently using Protocol Buffers `v3.20.3`.
66

77
## Platforms
88
Google only provides binary files for Windows, Linux and OSX in x86_64 and x86_32.

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ exports.closure = function(files, options, callback) {
4949
* Converts .proto files to .js files that can be used in Google Closure
5050
* Compiler.
5151
* The generated .js files require the files in
52-
* https://github.com/google/protobuf/tree/master/js.
52+
* https://github.com/protocolbuffers/protobuf/tree/v3.20.3/js.
5353
* @param {?Array<string>} files the proto files.
5454
* @param {?function(?Error, ?Array<Vinyl>)} callback the callback method.
5555
*/

scripts/postinstall.js

+7-8
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,14 @@ var unzip = require("unzipper");
55
var mkdirp = require("mkdirp");
66
var protoc = require("../protoc.js");
77

8-
const protoVersion = "3.11.2";
8+
const protoVersion = "3.20.3";
99

1010
var releases = {
11-
"win32_x86_32": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-win32.zip`,
12-
"win32_x86_64": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-win32.zip`,
13-
"linux_x86_32": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-linux-x86_32.zip`,
14-
"linux_x86_64": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-linux-x86_64.zip`,
15-
"darwin_x86_32": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-osx-x86_32.zip`,
16-
"darwin_x86_64": `https://github.com/google/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-osx-x86_64.zip`
11+
"win32_x86_32": `https://github.com/protocolbuffers/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-win32.zip`,
12+
"win32_x86_64": `https://github.com/protocolbuffers/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-win32.zip`,
13+
"linux_x86_32": `https://github.com/protocolbuffers/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-linux-x86_32.zip`,
14+
"linux_x86_64": `https://github.com/protocolbuffers/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-linux-x86_64.zip`,
15+
"darwin_x86_64": `https://github.com/protocolbuffers/protobuf/releases/download/v${protoVersion}/protoc-${protoVersion}-osx-x86_64.zip`
1716
};
1817

1918
var platform = process.platform;
@@ -44,5 +43,5 @@ if (releases[release]) {
4443
});
4544
});
4645
} else {
47-
throw new Error("Unsupported platform. Was not able to find a proper protoc version.");
46+
throw new Error(`Unsupported platform: ${release}. Was not able to find a proper protoc version.`);
4847
}

0 commit comments

Comments
 (0)