Repository navigation
Move off @launchql/protobufjs to @constructive-io/protobufjs 7.6.6 #150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| import generate from '@babel/generator'; | ||
| import * as t from '@babel/types'; | ||
| import { parse,Root } from '@launchql/protobufjs'; | ||
| import { parse,Root } from '@constructive-io/protobufjs'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Valid JSON aliases block generation
Devin left this for you to triage: Confirmed: the rebased fork's applyJsonName now throws on json_name aliases that are JS reserved words (e.g. "default"); 7.2.6 accepted them. No CEL proto we ship uses such an alias, so this PR is safe to merge. If one ever needs it, relax the check in constructive-io/protobuf.js. Learn moreThe public generation entry point, write, calls parse before opening any output files. The old fork exposed an explicit Example: For Recommended fix: Preserve the fork’s safety checks for protobuf reflection and runtime code generation. Use or add a parsing mode that retains the declared Protobuf field name and exposes Was this helpful? React with 👍 or 👎 to provide feedback. |
||
| import { mkdirSync,readFileSync, writeFileSync } from 'fs'; | ||
| import {join } from 'path'; | ||
|
|
||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,6 @@ packages: | |
|
|
||
| # Install scripts: true runs them, false means reviewed and not needed. | ||
| allowBuilds: | ||
| '@launchql/protobufjs': false # postinstall only prints a version-scheme notice | ||
| '@constructive-io/protobufjs': false # postinstall only prints a version-scheme notice | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 bug · medium Contradictory
📋 Prompt for AI AgentsIn /home/tenki/repo, pnpm-workspace.yaml line 6 sets '@constructive-io/protobufjs': false claiming the postinstall "only prints a version-scheme notice", but packages/constructive-pnpm-policy/pnpm-policy.yaml line 45 allows the same package's postinstall citing "protobuf codegen postinstall". Inspect the published @constructive-io/protobufjs 7.6.6 package (node_modules after pnpm install, or |
||
| nx: false # prebuilt binary ships as an optional dep | ||
| unrs-resolver: false # prebuilt binary ships as an optional dep | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading to
@constructive-io/protobufjs@7.6.6changes howjson_nameis validated.The pinned 7.6.6 package rejects a
json_namethat is not an identifier, a reserved word,toJSON, or a name inObject.prototype. It throwsInvalid JSON field nameduring parsing. The 7.2.6 package accepted any string. For example,string value = 1 [json_name = "custom-name"];parsed under 7.2.6 and now throws. The.protocontract does not restrictjson_nameto identifiers, so this input is valid.Decide whether
cel-proto-parsermust keep accepting these field names. If it must, the dependency or the parser must preserve the 7.2.6 behavior. Add a test with a non-identifierjson_name, such ascustom-name, and a reserved-wordjson_name. The test must show the parser still accepts them. The PR description states that the fork retains the behavior. This change does not retain it.Source: Path instructions