-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apollo-reporting-protobuf: check in generated code, regenerate manually
Today, the `marked` project pushed a minor release that broke Node 12 compatibility: markedjs/marked#2106 `marked` is a dep of `jsdoc` which is a dep of the protobufjs CLI. Unfortunately it turns out that the protobufjs CLI installs dependencies including `jsdoc` *at runtime*, *unversioned*. Yikes! See `setup` https://github.com/apollographql/protobuf.js/blob/master/cli/util.js I tried changing our fork to not do this and move the deps to be dev deps of this project (see `@apollo/[email protected]`) but that didn't work out on the first try. So instead, let's just not require the protobufjs CLI to work on Node 12, and also start saving time by not constantly regenerating the code in this package. Now code is only generated manually (`lerna run generate`) and checked in, and it can be done on the latest Node.
- Loading branch information
Showing
9 changed files
with
10,700 additions
and
480 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
* | ||
!src/**/* | ||
!dist/**/* | ||
dist/**/*.test.* | ||
!generated/**/* | ||
generated/**/*.test.* | ||
!package.json | ||
!README.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import * as protobuf from './protobuf'; | ||
export = protobuf; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
const protobuf = require('./protobuf'); | ||
const protobufJS = require('@apollo/protobufjs/minimal'); | ||
|
||
// Remove Long support. Our uint64s tend to be small (less | ||
// than 104 days). | ||
// XXX Just remove this in our fork? We already deleted | ||
// the generation of Long in protobuf.d.ts in the fork. | ||
// https://github.com/protobufjs/protobuf.js/issues/1253 | ||
protobufJS.util.Long = undefined; | ||
protobufJS.configure(); | ||
|
||
module.exports = protobuf; |
Oops, something went wrong.