Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
260 commits
Select commit Hold shift + click to select a range
8a85863
fix: Import Long types
ffflorian Feb 14, 2019
1f32910
npm audit fixes
lutzroeder Feb 28, 2019
892db94
allow file-level options everywhere in the file
alexander-fenster Mar 14, 2019
9450f4d
Add working rpcImpl with grpc node package
Mar 22, 2019
ea7b9c6
Remove useless config import
Mar 22, 2019
4af8523
Fixed descriptor README code problem
jroper Apr 10, 2019
299f0ce
https://github.com/protobufjs/protobuf.js/issues/1200
timc88 Apr 16, 2019
0ffa2a3
Fix indentation to match existing styles.
timc88 Apr 17, 2019
b70eebd
fix: allow file-level options everywhere in the file
JustinBeckwith Apr 19, 2019
ca52447
fix: npm audit fixes
JustinBeckwith Apr 19, 2019
1d98cb8
fix: Import Long types
JustinBeckwith Apr 19, 2019
533cd3f
docs: fix descriptor README code problem
JustinBeckwith Apr 19, 2019
fcaea97
docs: Add working rpcImpl with grpc node package
JustinBeckwith Apr 19, 2019
2d047e2
docs: Add missing 'force-number' pbjs option
JustinBeckwith Apr 19, 2019
b5b6632
fix: run npm audit fix (#1208)
JustinBeckwith Apr 23, 2019
1299b81
Merge pull request #2 from protobufjs/master
timc88 Apr 29, 2019
c72c752
build: be more explicit about tested versions of nodejs (#1213)
JustinBeckwith Apr 29, 2019
b7ce052
Properly iterate and return method descriptors
phi2039 May 10, 2019
2e1d1ac
Revert generated files, since other pull requests do not appear to
timc88 May 15, 2019
d96bb7a
fix: properly iterate and return method descriptors
alexander-fenster May 21, 2019
49da065
Merge pull request #1205 from timc88/master
nicolasnoble May 24, 2019
f01e1d2
Fix spacing of root.js
murgatroid99 May 24, 2019
314b2db
Fix spacing in root.js again
murgatroid99 May 24, 2019
f61b4bc
fix loading bundled definitions when resolvePath is overridden
alexander-fenster May 24, 2019
41b9153
docs: fix stale links to API documentation (#1235)
jlisee Jun 3, 2019
7bacfc8
docs: fix typo (#1241)
Jason-Cooke Jun 10, 2019
fb5d62f
Fix minify build error in root.js
esilkensen Jun 22, 2019
de230ab
Merge pull request #1255 from esilkensen/bug/minify-const-token
nicolasnoble Jun 24, 2019
4d490eb
Use Object.hasOwnProperty instead of prototype (#1233)
mhamrah Jun 24, 2019
5f2f62b
Add support for buffer configuration. (#1257)
tinchoz49 Nov 21, 2019
2ac09c7
build: Move CI to GitHub Actions (#1354)
dcodeIO Feb 4, 2020
6fc37d9
Update readme.md => fix the json example
fabien-h Feb 19, 2020
e601f33
build: adds configuration file for tagging releases automatically (#1…
Mar 11, 2020
101aa1a
feat: add support for buffer configuration (#1372)
Mar 11, 2020
15ed8a0
fix(docs): update CHANGELOG to match format of release-please (#1376)
Mar 11, 2020
0f8008c
chore: update development dependencies, eliminating audit warnings (#…
Mar 12, 2020
42f49b4
feat: update dependencies / general cleanup (#1356)
dcodeIO Apr 17, 2020
81bfd96
build: run make (#1391)
Apr 17, 2020
1e63d18
build: configure for publication (#1392)
Apr 17, 2020
a311354
chore: release 6.9.0 (#1374)
release-please[bot] Apr 20, 2020
4ecfbce
chore: configure renovate
renovate[bot] Apr 20, 2020
192f5f1
fix: google.protobuf.Any type_url fixes (#1068)
nickpestov May 29, 2020
5564e7b
fix: updated isNode check (#1221) (#1363)
diegoblattner May 29, 2020
b013db0
chore(deps): update dependency chalk to v4 (#1394)
renovate[bot] May 29, 2020
c96533a
chore(deps): update dependency tape to v5 (#1395)
renovate[bot] May 29, 2020
66d191e
chore(deps): update dependency tmp to ^0.2.0 (#1396)
renovate[bot] May 30, 2020
b6204fa
chore(deps): update dependency espree to v7 (#1403)
renovate[bot] May 30, 2020
3d5a46a
chore(deps): update dependency eslint to v7 (#1404)
renovate[bot] May 30, 2020
1b20e17
chore(deps): update dependency git-semver-tags to v4 (#1405)
renovate[bot] May 30, 2020
1b8aa8f
chore(deps): update dependency gh-pages to v3 (#1416)
renovate[bot] May 30, 2020
ad3cffd
feat: add configurable Root.prototype.fetch
recih Jun 12, 2020
7fbc79f
fix: properly parse empty messages in options (#1429)
murgatroid99 Jun 17, 2020
6698d59
Don't imply --wrap es6 from --es6
webmaster128 Jun 18, 2020
cd4aeda
fix: allow Windows unc paths to be resolved and normalized (#1351)
TomWilloughby Jun 25, 2020
b6abd93
Merge pull request #1430 from webmaster128/allow-commonjs-es6
nicolasnoble Jun 26, 2020
7fd2e18
feat: better comment parse (#1419)
recih Jun 26, 2020
7a25398
feat: parsed options (#1256)
eyalpost Jul 10, 2020
b950877
fix: handling of map entries with omitted key or value (#1348)
tq-schifferm Jul 10, 2020
f2faa8c
fix: do not fail if no process (#1440)
alexander-fenster Jul 13, 2020
742b8dc
fix: fix util.global (#1441)
dcodeIO Jul 13, 2020
8fe584b
build: rebuild bundle (#1442)
alexander-fenster Jul 13, 2020
07e8185
chore: release 6.10.0 (#1424)
release-please[bot] Jul 13, 2020
4e75f6d
fix: make node detection a bit more forgiving (#1445)
dcodeIO Jul 15, 2020
c1f2d7b
build: regenerate dist (#1449)
alexander-fenster Jul 16, 2020
0fea8cd
chore: release 6.10.1 (#1448)
release-please[bot] Jul 16, 2020
f9f2c43
build(deps): bump lodash from 4.17.15 to 4.17.19 (#1450)
dependabot[bot] Jul 17, 2020
9f33784
fix: es6 export enum (#1446)
sapphi-red Jul 17, 2020
0748632
build(deps): bump elliptic from 6.5.2 to 6.5.3 (#1462)
dependabot[bot] Jul 31, 2020
2ddf3dc
chore(deps): update dependency tslint to v6 (#1466)
renovate[bot] Aug 1, 2020
9893e35
docs: fix homepage 404 in npm package (#1458)
chdsbd Aug 7, 2020
d871d97
test: rebuild tests for current runtime (#1476)
kpdecker Sep 18, 2020
75172cd
fix: utf8 -> utf16 decoding bug on surrogate pairs (#1486)
turbio Oct 9, 2020
7b1efdb
Update readme.md => fix the json example (#1360)
alexander-fenster Oct 9, 2020
b6b845b
docs: fix JSON formatting
alexander-fenster Oct 9, 2020
80451da
docs: fix JSON formatting
alexander-fenster Oct 10, 2020
b77a0cd
chore(deps): update dependency escodegen to v2
renovate-bot Oct 10, 2020
4549383
chore(deps): update dependency escodegen to v2
alexander-fenster Oct 10, 2020
ade223d
chore(deps): update dependency browserify to v17 (#1496)
renovate[bot] Oct 11, 2020
3d29969
fix: make parsedOptions appear in method JSON representation (#1506)
alexander-fenster Nov 13, 2020
aea41b8
chore: release 6.10.2 (#1454)
release-please[bot] Nov 16, 2020
08855f6
build(deps): bump bl from 1.2.2 to 1.2.3 (#1510)
dependabot[bot] Dec 1, 2020
e8860ab
chore(deps): update dependency gulp-sourcemaps to v3 (#1508)
renovate[bot] Dec 1, 2020
52d4f00
build: use action for publishing (#1518)
Dec 7, 2020
b4cae07
fix!: encoding of empty Buffers (#1514)
vicb Dec 7, 2020
da34f43
feat!: move command line tool to a new package named protobufjs-cli (…
Jan 16, 2021
7f46dbe
fix: typo in pbjs help text (#1552)
MikeRalphson Mar 12, 2021
95b5681
deps(security): address elliptic security warning (#1564)
Mar 13, 2021
40a6b35
docs: fix pbjs link in README (#1578)
senthilkumarkj Apr 9, 2021
d01394a
feat: add --no-service option for pbjs static target (#1577)
mdouglass Apr 14, 2021
94e9ef0
deps: set @types/node to >= (#1575)
indutny Apr 14, 2021
6c4d307
feat: proto3 optional support (#1584)
alexander-fenster Apr 15, 2021
90afe44
fix: fromObject should not initialize oneof members (#1597)
alexander-fenster Apr 29, 2021
af1b449
fix: allow for an optional semicolon where there is an optional comma…
jeffory-orrok Apr 29, 2021
57fc524
Fix typo in roots.js (#1608)
eltociear May 3, 2021
9011aac
fix: handling properly fields with leading and trailing comments afte…
ykolbin May 8, 2021
6e713ba
feat: add null-defaults option (#1611)
sloonz May 8, 2021
f5b893c
fix: support for options with `repeated_value: [ "foo", "bar" ]` (#1574)
doochik May 14, 2021
d13d5d5
feat: add getTypeUrl method to generated code (#1463)
May 21, 2021
fa01883
fix(deps): use eslint 8.x (#1728)
alexander-fenster May 19, 2022
bac61b8
fix(deps): patch minimatch vulnerability (#1704)
richgerrard May 20, 2022
d9934af
build: simplify release configuration (#1732)
May 20, 2022
3357ef7
fix: do not let setProperty change the prototype (#1731)
alexander-fenster May 20, 2022
2cdbba3
build: run tests if ci label added (#1734)
May 20, 2022
64811d5
feat: prepare initial publication of cli (#1752)
Jul 7, 2022
a1d6029
fix: proper relative path to protobufjs in cli (#1753)
maitbayev Jul 7, 2022
1d3c02a
fix: scope variable for map field to avoid redeclaration (#1717) (#1718)
steinybot Jul 7, 2022
b1746a8
feat: support parsing of complex options (#1744)
NikhilVerma Jul 7, 2022
e2f33a0
fix: update minimal.js to evade override mistake (#1742)
erights Jul 7, 2022
8aad1dd
feat: allow message.getTypeUrl provide custom typeUrlPrefix (#1762)
kairlec Jul 7, 2022
50370dd
fix!: drop support for Node 4, 6, 8, 10 (#1764)
alexander-fenster Jul 7, 2022
dadc65e
fix(deps): update dependency long to v5 (#1751)
renovate[bot] Jul 7, 2022
e33a84a
fix: replace deprecated String.prototype.substr() (#1701)
CommanderRoot Jul 7, 2022
d9144de
fix: proto3 optional scalars should default to null in reflection API…
dae Jul 8, 2022
7558ef0
feat: add alt-comment CLI option (#1692)
ngg Jul 8, 2022
23e54cd
build: regen dist folder (#1767)
alexander-fenster Jul 8, 2022
c54d9bc
build: use manifest releaser for release please (#1768)
Jul 8, 2022
ad29f4a
build: correct the release type (#1770)
Jul 8, 2022
e8745f7
chore: release master (#1771)
github-actions[bot] Jul 8, 2022
420a254
chore(deps): update dependency gh-pages to v4 (#1749)
renovate[bot] Jul 8, 2022
c41ba50
chore(deps): update dependency espree to v9 (#1748)
renovate[bot] Jul 8, 2022
8303a64
fix(deps): update dependency glob to v8 (#1750)
renovate[bot] Jul 8, 2022
6f0806d
build: remove dist folder from source control (#1766)
alexander-fenster Jul 8, 2022
d7f501c
fix: extensions broke oneof (#1789)
menduz Aug 11, 2022
bb6b1d4
feat: valuesOptions for enums (#1358)
batsuev Aug 17, 2022
0f4af83
fix: remove unused `@types/long` (#1785)
SimenB Aug 17, 2022
d87978b
fix(types): update type deps (#1776)
thw0rted Aug 17, 2022
f36d4e4
fix: support for nested messages and enums within group blocks (#1790)
JoshuaWise Aug 17, 2022
ef24ae4
feat: accept unknown enum values in fromObject (#1793)
alexander-fenster Aug 26, 2022
48457c4
chore: release master (#1772)
github-actions[bot] Aug 26, 2022
7120e93
fix: generate valid js code for aliased enum values (#1801)
alexander-fenster Sep 9, 2022
7c27b5a
fix: add import long to the generated .d.ts (#1802)
alexander-fenster Sep 9, 2022
6254efb
chore: release master (#1804)
github-actions[bot] Sep 10, 2022
67fe592
Update CDN (RawGit EOL) (#1806)
basgroot Sep 12, 2022
119d90a
fix(types): nested object can be a oneof (#1812)
alexander-fenster Sep 22, 2022
d026849
chore: release master (#1813)
github-actions[bot] Sep 22, 2022
57fe6f5
chore(deps): update dependency jsdoc to v4 (#1833)
renovate[bot] Jan 24, 2023
82f55e6
build(deps): bump json5 from 2.2.1 to 2.2.3 (#1848)
dependabot[bot] Jan 24, 2023
e7a3489
fix: error should be thrown (#1817)
binsee Jan 24, 2023
ea7b9a6
build(deps): bump decode-uri-component from 0.2.0 to 0.2.2 (#1837)
dependabot[bot] Jan 24, 2023
32f2d6a
feat(cli): generate static files at the granularity of proto messages…
vpluschen Jan 24, 2023
0099ddc
chore: release master (#1852)
github-actions[bot] Jan 24, 2023
4489fa7
Revert "fix: error should be thrown (#1817)" (#1864)
alexander-fenster Feb 2, 2023
64e8936
fix: use ES5 style function syntax (#1830)
acode-x Feb 2, 2023
dce9a2e
fix: use bundled filename to fix common pb includes (#1860)
gitjuba Feb 2, 2023
e42eea4
fix(cli): fix relative path to Google pb files (#1859)
gitjuba Feb 2, 2023
644d588
chore: release master (#1865)
github-actions[bot] Feb 2, 2023
14f0536
fix: do not allow to extend same field twice to prevent the error (#1…
ThePlenkov Feb 7, 2023
e721d04
chore: release master (#1867)
github-actions[bot] Feb 7, 2023
8817ee6
fix: type names can be split into multiple tokens (#1877)
alexander-fenster Mar 27, 2023
56b1e64
chore: release master (#1879)
github-actions[bot] Mar 27, 2023
e66379f
fix: do not let setProperty change the prototype (#1899)
alexander-fenster Jun 23, 2023
42e5a9c
chore: release master (#1900)
github-actions[bot] Jun 23, 2023
f2a8620
fix: possible infinite loop when parsing option (#1923)
alexander-fenster Aug 21, 2023
eaf9f0a
fix: crash in comment parsing (#1890)
Aug 21, 2023
e93286e
fix: deprecation warning for new Buffer (#1905)
panther7 Aug 21, 2023
4436cc7
chore: release master (#1925)
github-actions[bot] Aug 22, 2023
af3ff83
fix: report missing import properly in loadSync (#1960)
alexander-fenster Jan 16, 2024
2f846fe
chore: release master (#1962)
github-actions[bot] Jan 16, 2024
2d58011
feat: add handling for extension range options (#1990)
mkruskal-google May 10, 2024
722b635
chore: release master (#1991)
github-actions[bot] May 10, 2024
11393ea
chore: Renovate README.md (#1995)
dcodeIO May 28, 2024
d1d2c0c
fix(types): reserved field in IType can contain reserved names (#2001)
mkruskal-google Jun 5, 2024
a71ef76
chore: release master (#2002)
github-actions[bot] Jun 7, 2024
0f9d477
fix(docs): Update readme to correct command for creating types (#1939)
romanbalayan Jun 12, 2024
0a0cdb6
chore: release master (#2005)
github-actions[bot] Jun 12, 2024
28e8d92
Fix multi-line typedefs generating "let" statements
Jul 24, 2024
b38a668
Fixes optional handling for class-level comments (JS) and interfaces …
Jul 27, 2022
358d336
Hide the fix for PB3 optional type declarations behind the flag --pb3…
martin-traverse Oct 18, 2022
94556f9
Do not use null-defaults to decide type signature for pb3-optionals (…
martin-traverse Oct 18, 2022
2bd0b43
New implementation that explicitly respects the optional keyword
martin-traverse Jul 24, 2024
4793755
Fix options list in pbjs
martin-traverse Jul 24, 2024
f2a69a5
Add tests for handling optional fields in both proto2 and proto3 syntax
martin-traverse Jul 24, 2024
996e445
Explicit handling of proto3 syntax in the parser and static generator
martin-traverse Jul 24, 2024
aa61793
Only look up proto syntax once per type in the static generator
martin-traverse Jul 24, 2024
f2ed6e0
Fix lint warnings
martin-traverse Jul 25, 2024
856af47
Use field options in proto3 instead of adding an extra property
martin-traverse Jul 25, 2024
ccd640e
Do not require repeated or map fields in the object properties (i.e. …
martin-traverse Jul 25, 2024
09f577a
Do not generate doc comments for virtual oneOfs
martin-traverse Jul 25, 2024
6204b2d
Address codestyle comment (braces for if/else)
martin-traverse Jul 26, 2024
31f85e9
Address comment for default syntax
martin-traverse Jul 26, 2024
ed5980c
Change config flag to --null-semantics and update comments
martin-traverse Jul 26, 2024
bee997d
Update PBJS and README for new --null-semantics flag
martin-traverse Jul 26, 2024
dee3083
Update tests for --null-semantics flag
martin-traverse Jul 26, 2024
50255d0
Fix one lint warning
martin-traverse Jul 26, 2024
623477b
Include tests for interface / message types under --null-semantics
martin-traverse Jul 26, 2024
d5700a5
Implement propagation of interface / message types under --null-seman…
martin-traverse Jul 26, 2024
9bcc006
Update CLI options help and README
martin-traverse Jul 26, 2024
fda51db
Allow for other syntax options than "proto2" or "proto3"
martin-traverse Jul 26, 2024
8e0027a
Make parentIsInterface default to false in toJsType()
Jul 26, 2024
94bfbbc
Allow undefined values (but not nulls) for implicit presence fields i…
martin-traverse Jul 26, 2024
258679c
Update tests for proto3 to let implicit members be optional but not n…
martin-traverse Jul 26, 2024
c478e1f
Add braces to if/else clauses for readability on all code touched by …
Jul 29, 2024
59569c1
Merge pull request #2011 from martin-traverse/fix/typescript_optional…
danielbankhead Aug 13, 2024
7be19d3
Merge pull request #2010 from LavissaWoW/typedef-fix
danielbankhead Aug 16, 2024
01c96b5
chore: release master
github-actions[bot] Aug 16, 2024
5b502e1
Merge pull request #2017 from protobufjs/release-please--branches--ma…
danielbankhead Aug 16, 2024
28e3334
fix: include
d-goog Aug 22, 2024
0e4da8b
feat: Add `prepublishOnly` script
d-goog Aug 22, 2024
4c02c5c
Merge pull request #2023 from protobufjs/fix-missing-dist
danielbankhead Aug 22, 2024
3d2e2f9
chore: release master
github-actions[bot] Aug 22, 2024
19e1fef
Merge pull request #2024 from protobufjs/release-please--branches--ma…
danielbankhead Aug 22, 2024
b4b5ca4
feat: api_converters_editions tests added and run successfully"
sofisl Aug 23, 2024
d8eb1b4
remove logging
sofisl Aug 26, 2024
65d3ed1
feat: add feature resolution for protobuf editions
sofisl Sep 10, 2024
0a7bbd1
cleanup PR
sofisl Sep 10, 2024
68e4480
see diff
sofisl Sep 10, 2024
759cc45
fix broken tests
sofisl Sep 10, 2024
8dabd5e
add tests
sofisl Sep 10, 2024
68b5339
feat: add feature resolution and tests
sofisl Sep 14, 2024
dae1b3e
undo lockfile update
sofisl Sep 14, 2024
f204288
add comment
sofisl Sep 14, 2024
f0491be
cleanup
sofisl Sep 14, 2024
d9c2ec4
remove only
sofisl Sep 16, 2024
b802c42
save for now
sofisl Sep 17, 2024
73590cc
undo bundle changes
sofisl Sep 17, 2024
a70c6a4
revert package-lock changes
sofisl Sep 17, 2024
a9ffc8a
feat: add feature resolution
sofisl Sep 19, 2024
43a703a
revert package-lock updates/
sofisl Sep 19, 2024
2fabe04
cleanup
sofisl Sep 19, 2024
1bd72ff
chore: run lint
sofisl Sep 19, 2024
5d35287
Merge branch 'master' into protobufEditionsWork
sofisl Sep 19, 2024
225fddb
typo
sofisl Sep 19, 2024
840907e
Merge branch 'protobufEditionsWork' of github.com:protobufjs/protobuf…
sofisl Sep 19, 2024
43183bd
typo
sofisl Sep 19, 2024
c4c486d
Update api_enum.js
sofisl Sep 20, 2024
1ca7586
respond to comments
sofisl Sep 24, 2024
e73bb3c
chore: add grammar tests
sofisl Sep 24, 2024
e1abb31
run lint
sofisl Sep 24, 2024
10dae84
address comments
sofisl Sep 24, 2024
087a33e
remove comment
sofisl Sep 24, 2024
608009b
respond to comments
sofisl Sep 26, 2024
062caa5
fix test
sofisl Sep 26, 2024
c7cee06
add default feature resolution at the end
sofisl Oct 2, 2024
da2df8a
run lint
sofisl Oct 2, 2024
c11ddf4
Update object.js
sofisl Oct 2, 2024
d2d47d9
fix: change tree traversal order and feature resolution algorithm
sofisl Oct 4, 2024
2d81627
resolve conflicts
sofisl Oct 4, 2024
b57bde7
run lint
sofisl Oct 4, 2024
da2663a
Update feature_resolution_editions.js
sofisl Oct 4, 2024
caad500
tests: added and broke up tests
sofisl Oct 8, 2024
1f1d33c
chore: remove specific overwriting
sofisl Oct 8, 2024
4ca95c3
chore: respond to test comments
sofisl Oct 9, 2024
a9eebac
simplify tests
sofisl Oct 9, 2024
6f7d540
chore: respond to comments
sofisl Oct 14, 2024
530d59a
chore: respond to comments
sofisl Oct 15, 2024
23c8ab9
respond to comments
sofisl Oct 16, 2024
547afa2
Merge pull request #2029 from protobufjs/protobufEditionsWork
sofisl Oct 16, 2024
f2ccb99
fix: remove eval usage so that chrome extension MV3 can run properly …
AntiMoron Dec 30, 2024
0b3870e
Merge branch 'protobufjs:master' into master
theonereece Feb 14, 2025
d6d366c
chore: release master
github-actions[bot] Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin/* text eol=lf
dist/* binary
13 changes: 13 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
on:
push:
branches:
- master
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
command: manifest
package-name: release-please-action
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Test"
on:
push:
branches:
- master
pull_request:
types: [assigned, opened, synchronize, reopened, labeled]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12"
- name: "Install dependencies"
run: npm install
- name: "Lint sources"
run: npm run lint:sources -- --max-warnings 0
- name: "Lint types"
run: npm run lint:types
test:
runs-on: ubuntu-latest
strategy:
matrix:
node_version: ["12", "14", "16", "18"]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node_version }}
- name: "Install dependencies"
run: npm install
- name: "Test sources"
run: npm run test:sources
- name: "Test types"
run: npm run test:types
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12"
- name: "Install dependencies"
run: npm install
- name: "Run benchmark"
run: npm run bench
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
.nyc_output
.vscode
*.log
npm-debug.*
node_modules/
cli/node_modules/
cli/package-lock.json
docs/
coverage/
sandbox/
.nyc_output
dist/
.gitpod.yml
1 change: 1 addition & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{".":"8.0.0","cli":"2.0.0"}
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .vscode/settings.json

This file was deleted.

2,162 changes: 1,259 additions & 903 deletions CHANGELOG.md

Large diffs are not rendered by default.

322 changes: 85 additions & 237 deletions README.md

Large diffs are not rendered by default.

24 changes: 12 additions & 12 deletions bench/data/static_pbjs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*eslint-disable block-scoped-var, no-redeclare, no-control-regex, no-prototype-builtins*/
/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("../../minimal");
Expand All @@ -24,13 +24,13 @@ $root.Test = (function() {
Test.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.string != null && message.hasOwnProperty("string"))
if (message.string != null && Object.hasOwnProperty.call(message, "string"))
writer.uint32(10).string(message.string);
if (message.uint32 != null && message.hasOwnProperty("uint32"))
if (message.uint32 != null && Object.hasOwnProperty.call(message, "uint32"))
writer.uint32(16).uint32(message.uint32);
if (message.inner != null && message.hasOwnProperty("inner"))
if (message.inner != null && Object.hasOwnProperty.call(message, "inner"))
$root.Test.Inner.encode(message.inner, writer.uint32(26).fork()).ldelim();
if (message.float != null && message.hasOwnProperty("float"))
if (message.float != null && Object.hasOwnProperty.call(message, "float"))
writer.uint32(37).float(message.float);
return writer;
};
Expand Down Expand Up @@ -78,11 +78,11 @@ $root.Test = (function() {
Inner.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.int32 != null && message.hasOwnProperty("int32"))
if (message.int32 != null && Object.hasOwnProperty.call(message, "int32"))
writer.uint32(8).int32(message.int32);
if (message.innerInner != null && message.hasOwnProperty("innerInner"))
if (message.innerInner != null && Object.hasOwnProperty.call(message, "innerInner"))
$root.Test.Inner.InnerInner.encode(message.innerInner, writer.uint32(18).fork()).ldelim();
if (message.outer != null && message.hasOwnProperty("outer"))
if (message.outer != null && Object.hasOwnProperty.call(message, "outer"))
$root.Outer.encode(message.outer, writer.uint32(26).fork()).ldelim();
return writer;
};
Expand Down Expand Up @@ -127,11 +127,11 @@ $root.Test = (function() {
InnerInner.encode = function encode(message, writer) {
if (!writer)
writer = $Writer.create();
if (message.long != null && message.hasOwnProperty("long"))
if (message.long != null && Object.hasOwnProperty.call(message, "long"))
writer.uint32(8).int64(message.long);
if (message["enum"] != null && message.hasOwnProperty("enum"))
if (message["enum"] != null && Object.hasOwnProperty.call(message, "enum"))
writer.uint32(16).int32(message["enum"]);
if (message.sint32 != null && message.hasOwnProperty("sint32"))
if (message.sint32 != null && Object.hasOwnProperty.call(message, "sint32"))
writer.uint32(24).sint32(message.sint32);
return writer;
};
Expand Down Expand Up @@ -201,7 +201,7 @@ $root.Outer = (function() {
writer.bool(message.bool[i]);
writer.ldelim();
}
if (message.double != null && message.hasOwnProperty("double"))
if (message.double != null && Object.hasOwnProperty.call(message, "double"))
writer.uint32(17).double(message.double);
return writer;
};
Expand Down
4 changes: 2 additions & 2 deletions bench/prof.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,14 @@ function setupBrowser() {
switch (process.argv[2]) {
case "encode-browser":
setupBrowser();
// eslint-disable-line no-fallthrough
// eslint-disable-next-line no-fallthrough
case "encode":
for (var i = 0; i < count; ++i)
Test.encode(data).finish();
break;
case "decode-browser":
setupBrowser();
// eslint-disable-line no-fallthrough
// eslint-disable-next-line no-fallthrough
case "decode":
var buf = Test.encode(data).finish();
for (var j = 0; j < count; ++j)
Expand Down
6 changes: 0 additions & 6 deletions bin/pbjs

This file was deleted.

6 changes: 0 additions & 6 deletions bin/pbts

This file was deleted.

125 changes: 125 additions & 0 deletions cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
# Changelog

## [2.0.0](https://github.com/ortoo/protobuf.js/compare/protobufjs-cli-v1.1.4...protobufjs-cli-v2.0.0) (2025-02-14)


### ⚠ BREAKING CHANGES

* drop support for Node 4, 6, 8, 10 ([#1764](https://github.com/ortoo/protobuf.js/issues/1764))
* move command line tool to a new package named protobufjs-cli ([#1234](https://github.com/ortoo/protobuf.js/issues/1234))

### Features

* add --no-service option for pbjs static target ([#1577](https://github.com/ortoo/protobuf.js/issues/1577)) ([d01394a](https://github.com/ortoo/protobuf.js/commit/d01394a1463062824c066b653aad53c449752202))
* add alt-comment CLI option ([#1692](https://github.com/ortoo/protobuf.js/issues/1692)) ([7558ef0](https://github.com/ortoo/protobuf.js/commit/7558ef0f93177978272f68f1710144a26b63e525))
* add feature resolution ([a9ffc8a](https://github.com/ortoo/protobuf.js/commit/a9ffc8a7b593209642fc9d89e884ac6c4e746494))
* add getTypeUrl method to generated code ([#1463](https://github.com/ortoo/protobuf.js/issues/1463)) ([d13d5d5](https://github.com/ortoo/protobuf.js/commit/d13d5d5688052e366aa2e9169f50dfca376b32cf))
* add null-defaults option ([#1611](https://github.com/ortoo/protobuf.js/issues/1611)) ([6e713ba](https://github.com/ortoo/protobuf.js/commit/6e713baf54bd987ae52cbf92a4f2742c70201dc0))
* add support for buffer configuration ([#1372](https://github.com/ortoo/protobuf.js/issues/1372)) ([101aa1a](https://github.com/ortoo/protobuf.js/commit/101aa1a4f148516fdc83a74f54a229f06e24a5de))
* allow message.getTypeUrl provide custom typeUrlPrefix ([#1762](https://github.com/ortoo/protobuf.js/issues/1762)) ([8aad1dd](https://github.com/ortoo/protobuf.js/commit/8aad1dd994b1fc1f23bd71adf3a81b7a5616b210))
* api_converters_editions tests added and run successfully" ([b4b5ca4](https://github.com/ortoo/protobuf.js/commit/b4b5ca468fcde2082d65a72b508f18d07d75245c))
* **cli:** generate static files at the granularity of proto messages ([#1840](https://github.com/ortoo/protobuf.js/issues/1840)) ([32f2d6a](https://github.com/ortoo/protobuf.js/commit/32f2d6a68b27997bd0f7619998695a9fa7a4fd70))
* move command line tool to a new package named protobufjs-cli ([#1234](https://github.com/ortoo/protobuf.js/issues/1234)) ([da34f43](https://github.com/ortoo/protobuf.js/commit/da34f43ccd51ad97017e139f137521782f5ef119))
* prepare initial publication of cli ([#1752](https://github.com/ortoo/protobuf.js/issues/1752)) ([64811d5](https://github.com/ortoo/protobuf.js/commit/64811d5878c31e4a86a39da5fec6aea35da22fcd))
* proto3 optional support ([#1584](https://github.com/ortoo/protobuf.js/issues/1584)) ([6c4d307](https://github.com/ortoo/protobuf.js/commit/6c4d30716a9a756dcdc21d64f9c9d069315fc5b1))
* update dependencies / general cleanup ([#1356](https://github.com/ortoo/protobuf.js/issues/1356)) ([42f49b4](https://github.com/ortoo/protobuf.js/commit/42f49b43f692c24c2bc1ae081b4d1ad9fa173cd7))


### Bug Fixes

* add import long to the generated .d.ts ([#1802](https://github.com/ortoo/protobuf.js/issues/1802)) ([7c27b5a](https://github.com/ortoo/protobuf.js/commit/7c27b5ad5d161c9f3711aa053ca704f8e1224e90))
* **cli:** fix relative path to Google pb files ([#1859](https://github.com/ortoo/protobuf.js/issues/1859)) ([e42eea4](https://github.com/ortoo/protobuf.js/commit/e42eea4868b11f4a07934804a56683321ed191e2))
* **deps:** patch minimatch vulnerability ([#1704](https://github.com/ortoo/protobuf.js/issues/1704)) ([bac61b8](https://github.com/ortoo/protobuf.js/commit/bac61b8c2757804bbb9c5fa0f8bc6a7bcf0bb374))
* **deps:** update dependency glob to v8 ([#1750](https://github.com/ortoo/protobuf.js/issues/1750)) ([8303a64](https://github.com/ortoo/protobuf.js/commit/8303a648bc12dcea5aa8e7efa042de39011857f9))
* drop support for Node 4, 6, 8, 10 ([#1764](https://github.com/ortoo/protobuf.js/issues/1764)) ([50370dd](https://github.com/ortoo/protobuf.js/commit/50370dd7747a0986e83ddbe51c54b97033af5ead))
* es6 export enum ([#1446](https://github.com/ortoo/protobuf.js/issues/1446)) ([9f33784](https://github.com/ortoo/protobuf.js/commit/9f33784350b1efc2e774bbfc087cbd2c47828748))
* fromObject should not initialize oneof members ([#1597](https://github.com/ortoo/protobuf.js/issues/1597)) ([90afe44](https://github.com/ortoo/protobuf.js/commit/90afe4412de8070b0c0681e5905a6e0213072a85))
* handle nullability for optional fields ([59569c1](https://github.com/ortoo/protobuf.js/commit/59569c12c85c1c7b783ace9a71775b1d05a08e9c))
* include ([28e3334](https://github.com/ortoo/protobuf.js/commit/28e333415d3c85687810e164125997d17baba0bd))
* possible infinite loop when parsing option ([#1923](https://github.com/ortoo/protobuf.js/issues/1923)) ([f2a8620](https://github.com/ortoo/protobuf.js/commit/f2a86201799af5842e1339c22950abbb3db00f51))
* proper relative path to protobufjs in cli ([#1753](https://github.com/ortoo/protobuf.js/issues/1753)) ([a1d6029](https://github.com/ortoo/protobuf.js/commit/a1d60292ecb22fcf89c493c562ae07ab10ef49c9))
* remove unused `@types/long` ([#1785](https://github.com/ortoo/protobuf.js/issues/1785)) ([0f4af83](https://github.com/ortoo/protobuf.js/commit/0f4af83e4ed3cef1ec035c2833e0b06cab0bd87f))
* **types:** update type deps ([#1776](https://github.com/ortoo/protobuf.js/issues/1776)) ([d87978b](https://github.com/ortoo/protobuf.js/commit/d87978b8eb2a176676c58379a89206b94a6d926a))
* typo in pbjs help text ([#1552](https://github.com/ortoo/protobuf.js/issues/1552)) ([7f46dbe](https://github.com/ortoo/protobuf.js/commit/7f46dbeb538a6277035a896e1ab5e1a070e28681))

## [1.1.4](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.1.3...protobufjs-cli-v1.1.4) (2024-08-22)


### Bug Fixes

* include ([28e3334](https://github.com/protobufjs/protobuf.js/commit/28e333415d3c85687810e164125997d17baba0bd))

## [1.1.3](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.1.2...protobufjs-cli-v1.1.3) (2024-08-16)


### Bug Fixes

* handle nullability for optional fields ([59569c1](https://github.com/protobufjs/protobuf.js/commit/59569c12c85c1c7b783ace9a71775b1d05a08e9c))

## [1.1.2](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.1.1...protobufjs-cli-v1.1.2) (2023-08-21)


### Bug Fixes

* possible infinite loop when parsing option ([#1923](https://github.com/protobufjs/protobuf.js/issues/1923)) ([f2a8620](https://github.com/protobufjs/protobuf.js/commit/f2a86201799af5842e1339c22950abbb3db00f51))

## [1.1.1](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.1.0...protobufjs-cli-v1.1.1) (2023-02-02)


### Bug Fixes

* **cli:** fix relative path to Google pb files ([#1859](https://github.com/protobufjs/protobuf.js/issues/1859)) ([e42eea4](https://github.com/protobufjs/protobuf.js/commit/e42eea4868b11f4a07934804a56683321ed191e2))

## [1.1.0](https://github.com/protobufjs/protobuf.js/compare/protobufjs-cli-v1.0.2...protobufjs-cli-v1.1.0) (2023-01-24)


### Features

* **cli:** generate static files at the granularity of proto messages ([#1840](https://github.com/protobufjs/protobuf.js/issues/1840)) ([32f2d6a](https://github.com/protobufjs/protobuf.js/commit/32f2d6a68b27997bd0f7619998695a9fa7a4fd70))

## [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)


### ⚠ BREAKING CHANGES

* drop support for Node 4, 6, 8, 10 (#1764)
* move command line tool to a new package named protobufjs-cli (#1234)

### Features

* add --no-service option for pbjs static target ([#1577](https://github.com/protobufjs/protobuf.js/issues/1577)) ([d01394a](https://github.com/protobufjs/protobuf.js/commit/d01394a1463062824c066b653aad53c449752202))
* add alt-comment CLI option ([#1692](https://github.com/protobufjs/protobuf.js/issues/1692)) ([7558ef0](https://github.com/protobufjs/protobuf.js/commit/7558ef0f93177978272f68f1710144a26b63e525))
* add getTypeUrl method to generated code ([#1463](https://github.com/protobufjs/protobuf.js/issues/1463)) ([d13d5d5](https://github.com/protobufjs/protobuf.js/commit/d13d5d5688052e366aa2e9169f50dfca376b32cf))
* add null-defaults option ([#1611](https://github.com/protobufjs/protobuf.js/issues/1611)) ([6e713ba](https://github.com/protobufjs/protobuf.js/commit/6e713baf54bd987ae52cbf92a4f2742c70201dc0))
* add support for buffer configuration ([#1372](https://github.com/protobufjs/protobuf.js/issues/1372)) ([101aa1a](https://github.com/protobufjs/protobuf.js/commit/101aa1a4f148516fdc83a74f54a229f06e24a5de))
* allow message.getTypeUrl provide custom typeUrlPrefix ([#1762](https://github.com/protobufjs/protobuf.js/issues/1762)) ([8aad1dd](https://github.com/protobufjs/protobuf.js/commit/8aad1dd994b1fc1f23bd71adf3a81b7a5616b210))
* move command line tool to a new package named protobufjs-cli ([#1234](https://github.com/protobufjs/protobuf.js/issues/1234)) ([da34f43](https://github.com/protobufjs/protobuf.js/commit/da34f43ccd51ad97017e139f137521782f5ef119))
* prepare initial publication of cli ([#1752](https://github.com/protobufjs/protobuf.js/issues/1752)) ([64811d5](https://github.com/protobufjs/protobuf.js/commit/64811d5878c31e4a86a39da5fec6aea35da22fcd))
* proto3 optional support ([#1584](https://github.com/protobufjs/protobuf.js/issues/1584)) ([6c4d307](https://github.com/protobufjs/protobuf.js/commit/6c4d30716a9a756dcdc21d64f9c9d069315fc5b1))
* update dependencies / general cleanup ([#1356](https://github.com/protobufjs/protobuf.js/issues/1356)) ([42f49b4](https://github.com/protobufjs/protobuf.js/commit/42f49b43f692c24c2bc1ae081b4d1ad9fa173cd7))


### Bug Fixes

* **deps:** patch minimatch vulnerability ([#1704](https://github.com/protobufjs/protobuf.js/issues/1704)) ([bac61b8](https://github.com/protobufjs/protobuf.js/commit/bac61b8c2757804bbb9c5fa0f8bc6a7bcf0bb374))
* drop support for Node 4, 6, 8, 10 ([#1764](https://github.com/protobufjs/protobuf.js/issues/1764)) ([50370dd](https://github.com/protobufjs/protobuf.js/commit/50370dd7747a0986e83ddbe51c54b97033af5ead))
* es6 export enum ([#1446](https://github.com/protobufjs/protobuf.js/issues/1446)) ([9f33784](https://github.com/protobufjs/protobuf.js/commit/9f33784350b1efc2e774bbfc087cbd2c47828748))
* fromObject should not initialize oneof members ([#1597](https://github.com/protobufjs/protobuf.js/issues/1597)) ([90afe44](https://github.com/protobufjs/protobuf.js/commit/90afe4412de8070b0c0681e5905a6e0213072a85))
* proper relative path to protobufjs in cli ([#1753](https://github.com/protobufjs/protobuf.js/issues/1753)) ([a1d6029](https://github.com/protobufjs/protobuf.js/commit/a1d60292ecb22fcf89c493c562ae07ab10ef49c9))
* typo in pbjs help text ([#1552](https://github.com/protobufjs/protobuf.js/issues/1552)) ([7f46dbe](https://github.com/protobufjs/protobuf.js/commit/7f46dbeb538a6277035a896e1ab5e1a070e28681))
Loading