Skip to content

Commit 63e3d11

Browse files
committed
fix(build): repair postprocessor, generate full artifacts, untrack lib output
The build:postprocess sed matched only the generator's old single-line `var global = Function('return this')();`. The current protoc-gen-js emits a multi-line IIFE whose last resort is that same call, so the pattern silently stopped matching and the dynamic-function fallback shipped in published bindings -- it was present in all 12 generated files. Building a function from a string is blocked under strict CSP, which is where these bindings run. Replace the one-liner with tools/postprocess-lib.js, which rewrites the call itself rather than the surrounding block (covering both the legacy and current shapes) and then fails the build if any dynamic-function fallback survives. This also drops the `sed -i ''` invocation, which is BSD-only and fails on the GNU sed in CI and on Linux developer machines. prepare ran only build:js, so Git-based installs got JavaScript but no lib/proto.json -- that is produced by build:json and is present in published packages. Point prepare at the full build so both artifact sets exist. lib/ is gitignored generated output, but lib/messages-ripple_pb.js and its .d.ts were committed, creating a second stale-prone source of truth. Untrack both; they are regenerated by the build. lib/.keep stays.
1 parent 8cf9687 commit 63e3d11

4 files changed

Lines changed: 63 additions & 1606 deletions

File tree

lib/messages-ripple_pb.d.ts

Lines changed: 0 additions & 179 deletions
This file was deleted.

0 commit comments

Comments
 (0)