Skip to content

Commit

Permalink
reset to latest protobufjs-cli (1.0.2)
Browse files Browse the repository at this point in the history
  • Loading branch information
buu700 committed Jan 6, 2023
1 parent 43c4ba9 commit 390ae75
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## [1.0.2](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.0.1...protobufjs-cli-v1.0.2) (2022-09-09)


### Bug Fixes

* add import long to the generated .d.ts ([#1802](https://github.com/protobufjs/protobuf.js/issues/1802)) ([7c27b5a](https://github.com/protobufjs/protobuf.js/commit/7c27b5ad5d161c9f3711aa053ca704f8e1224e90))

## [1.0.1](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.0.0...protobufjs-cli-v1.0.1) (2022-08-26)


### Bug Fixes

* **deps:** update dependency glob to v8 ([#1750](https://github.com/protobufjs/protobuf.js/issues/1750)) ([8303a64](https://github.com/protobufjs/protobuf.js/commit/8303a648bc12dcea5aa8e7efa042de39011857f9))
* remove unused `@types/long` ([#1785](https://github.com/protobufjs/protobuf.js/issues/1785)) ([0f4af83](https://github.com/protobufjs/protobuf.js/commit/0f4af83e4ed3cef1ec035c2833e0b06cab0bd87f))
* **types:** update type deps ([#1776](https://github.com/protobufjs/protobuf.js/issues/1776)) ([d87978b](https://github.com/protobufjs/protobuf.js/commit/d87978b8eb2a176676c58379a89206b94a6d926a))

## [1.0.0](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v0.1.0...protobufjs-cli-v1.0.0) (2022-07-08)


Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "protobufjs-cli",
"description": "Translates between file formats and generates static code as well as TypeScript definitions.",
"version": "1.0.0",
"version": "1.0.2",
"author": "Daniel Wirtz <dcode+protobufjs@dcode.io>",
"repository": {
"type": "git",
Expand All @@ -26,7 +26,7 @@
"espree": "^9.0.0",
"estraverse": "^5.1.0",
"glob": "^8.0.0",
"jsdoc": "3.5.5",
"jsdoc": "^3.6.3",
"minimist": "^1.2.0",
"semver": "^7.1.2",
"tmp": "^0.2.1",
Expand Down
9 changes: 3 additions & 6 deletions pbts.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ exports.main = function(args, callback) {
var output = [];
if (argv.main)
output.push(
"// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run types'.",
"// DO NOT EDIT! This is a generated file. Edit the JSDoc in src/*.js instead and run 'npm run build:types'.",
""
);
if (argv.global)
Expand All @@ -169,15 +169,12 @@ exports.main = function(args, callback) {
Object.keys(imports).forEach(function(key) {
output.push("import * as " + key + " from \"" + imports[key] + "\";");
});

output.push("import Long = require(\"long\");");
}

output = output.join("\n") + "\n" + out.join("");

// https://github.com/protobufjs/protobuf.js/issues/1306#issuecomment-549204730
output = output
.replace(/\[ 'object' \]\./g, 'Record')
.replace(/\[ 'Array' \]\./g, 'Array');

try {
if (argv.out)
fs.writeFileSync(argv.out, output, { encoding: "utf8" });
Expand Down

0 comments on commit 390ae75

Please sign in to comment.