Socket
Socket
Sign inDemoInstall

@grpc/proto-loader

Package Overview
Dependencies
Maintainers
3
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc/proto-loader - npm Package Compare versions

Comparing version 0.5.4 to 0.5.5

22

build/src/index.js

@@ -223,13 +223,13 @@ "use strict";

// Load Google's well-known proto files that aren't exposed by Protobuf.js.
{
// Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp,
// and wrappers. compiler/plugin is excluded in Protobuf.js and here.
const wellKnownProtos = ['api', 'descriptor', 'source_context', 'type'];
const sourceDir = path.join(path.dirname(require.resolve('protobufjs')), 'google', 'protobuf');
for (const proto of wellKnownProtos) {
const file = path.join(sourceDir, `${proto}.proto`);
const descriptor = Protobuf.loadSync(file).toJSON();
Protobuf.common(proto, descriptor.nested.google.nested);
}
}
// Protobuf.js exposes: any, duration, empty, field_mask, struct, timestamp,
// and wrappers. compiler/plugin is excluded in Protobuf.js and here.
// Using constant strings for compatibility with tools like Webpack
const apiDescriptor = require('protobufjs/google/protobuf/api.json');
const descriptorDescriptor = require('protobufjs/google/protobuf/descriptor.json');
const sourceContextDescriptor = require('protobufjs/google/protobuf/source_context.json');
const typeDescriptor = require('protobufjs/google/protobuf/type.json');
Protobuf.common('api', apiDescriptor.nested.google.nested.protobuf.nested);
Protobuf.common('descriptor', descriptorDescriptor.nested.google.nested.protobuf.nested);
Protobuf.common('source_context', sourceContextDescriptor.nested.google.nested.protobuf.nested);
Protobuf.common('type', typeDescriptor.nested.google.nested.protobuf.nested);
//# sourceMappingURL=index.js.map
{
"name": "@grpc/proto-loader",
"version": "0.5.4",
"version": "0.5.5",
"author": "Google Inc.",

@@ -17,3 +17,3 @@ "contributors": [

"build": "npm run compile",
"clean": "gts clean",
"clean": "node -e 'require(\"rimraf\")(\"./build\", () => {})'",
"compile": "tsc -p .",

@@ -51,2 +51,3 @@ "format": "clang-format -i -style=\"{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}\" src/*.ts test/*.ts",

"gts": "^1.1.0",
"rimraf": "^3.0.2",
"typescript": "~3.3.3333"

@@ -53,0 +54,0 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc