@bufbuild/protoplugin
Advanced tools
Comparing version 2.0.0-alpha.2 to 2.0.0-alpha.3
@@ -1,4 +0,4 @@ | ||
import type { SupportedEdition } from "@bufbuild/protobuf"; | ||
import type { Schema } from "./ecmascript/schema.js"; | ||
import type { FileInfo } from "./ecmascript/generated-file.js"; | ||
import { type SupportedEdition } from "@bufbuild/protobuf"; | ||
import type { Schema } from "./schema.js"; | ||
import type { FileInfo } from "./generated-file.js"; | ||
import type { Plugin } from "./plugin.js"; | ||
@@ -5,0 +5,0 @@ interface PluginInit { |
@@ -18,7 +18,7 @@ "use strict"; | ||
const protobuf_1 = require("@bufbuild/protobuf"); | ||
const reflect_1 = require("@bufbuild/protobuf/reflect"); | ||
const protobuf_2 = require("@bufbuild/protobuf"); | ||
const wkt_1 = require("@bufbuild/protobuf/wkt"); | ||
const schema_js_1 = require("./ecmascript/schema.js"); | ||
const transpile_js_1 = require("./ecmascript/transpile.js"); | ||
const parameter_js_1 = require("./ecmascript/parameter.js"); | ||
const schema_js_1 = require("./schema.js"); | ||
const transpile_js_1 = require("./transpile.js"); | ||
const parameter_js_1 = require("./parameter.js"); | ||
/** | ||
@@ -37,4 +37,4 @@ * Create a new code generator plugin for ECMAScript. | ||
var _a, _b, _c; | ||
const minimumEdition = (_a = init.minimumEdition) !== null && _a !== void 0 ? _a : reflect_1.minimumEdition; | ||
const maximumEdition = (_b = init.maximumEdition) !== null && _b !== void 0 ? _b : reflect_1.maximumEdition; | ||
const minimumEdition = (_a = init.minimumEdition) !== null && _a !== void 0 ? _a : protobuf_2.minimumEdition; | ||
const maximumEdition = (_b = init.maximumEdition) !== null && _b !== void 0 ? _b : protobuf_2.maximumEdition; | ||
const parameter = (0, parameter_js_1.parseParameter)(req.parameter, init.parseOption); | ||
@@ -41,0 +41,0 @@ const schema = (0, schema_js_1.createSchema)(req, parameter, init.name, init.version, minimumEdition, maximumEdition); |
@@ -5,1 +5,8 @@ export type { Plugin } from "./plugin.js"; | ||
export { getComments, getDeclarationString, getPackageComments, getSyntaxComments, } from "./source-code-info.js"; | ||
export type { Target } from "./target.js"; | ||
export type { Schema } from "./schema.js"; | ||
export type { GeneratedFile, FileInfo } from "./generated-file.js"; | ||
export type { ImportSymbol } from "./import-symbol.js"; | ||
export { createImportSymbol } from "./import-symbol.js"; | ||
export type { Printable } from "./printable.js"; | ||
export { safeIdentifier } from "./safe-identifier.js"; |
@@ -16,3 +16,3 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.getSyntaxComments = exports.getPackageComments = exports.getDeclarationString = exports.getComments = exports.createEcmaScriptPlugin = exports.runNodeJs = void 0; | ||
exports.safeIdentifier = exports.createImportSymbol = exports.getSyntaxComments = exports.getPackageComments = exports.getDeclarationString = exports.getComments = exports.createEcmaScriptPlugin = exports.runNodeJs = void 0; | ||
var run_node_js_1 = require("./run-node.js"); | ||
@@ -27,1 +27,5 @@ Object.defineProperty(exports, "runNodeJs", { enumerable: true, get: function () { return run_node_js_1.runNodeJs; } }); | ||
Object.defineProperty(exports, "getSyntaxComments", { enumerable: true, get: function () { return source_code_info_js_1.getSyntaxComments; } }); | ||
var import_symbol_js_1 = require("./import-symbol.js"); | ||
Object.defineProperty(exports, "createImportSymbol", { enumerable: true, get: function () { return import_symbol_js_1.createImportSymbol; } }); | ||
var safe_identifier_js_1 = require("./safe-identifier.js"); | ||
Object.defineProperty(exports, "safeIdentifier", { enumerable: true, get: function () { return safe_identifier_js_1.safeIdentifier; } }); |
@@ -172,3 +172,3 @@ "use strict"; | ||
} | ||
return reflect_1.ScalarType[f.scalar].toLowerCase(); | ||
return protobuf_1.ScalarType[f.scalar].toLowerCase(); | ||
} | ||
@@ -191,3 +191,3 @@ switch (desc.fieldKind) { | ||
case "map": { | ||
const k = reflect_1.ScalarType[desc.mapKey].toLowerCase(); | ||
const k = protobuf_1.ScalarType[desc.mapKey].toLowerCase(); | ||
const v = typeName(desc); | ||
@@ -194,0 +194,0 @@ parts.push(`map<${k}, ${v}>`); |
@@ -1,4 +0,4 @@ | ||
import type { SupportedEdition } from "@bufbuild/protobuf"; | ||
import type { Schema } from "./ecmascript/schema.js"; | ||
import type { FileInfo } from "./ecmascript/generated-file.js"; | ||
import { type SupportedEdition } from "@bufbuild/protobuf"; | ||
import type { Schema } from "./schema.js"; | ||
import type { FileInfo } from "./generated-file.js"; | ||
import type { Plugin } from "./plugin.js"; | ||
@@ -5,0 +5,0 @@ interface PluginInit { |
@@ -15,7 +15,7 @@ // Copyright 2021-2024 Buf Technologies, Inc. | ||
import { create, protoInt64 } from "@bufbuild/protobuf"; | ||
import { minimumEdition as minimumEditionUpstream, maximumEdition as maximumEditionUpstream, } from "@bufbuild/protobuf/reflect"; | ||
import { minimumEdition as minimumEditionUpstream, maximumEdition as maximumEditionUpstream, } from "@bufbuild/protobuf"; | ||
import { CodeGeneratorResponse_Feature, CodeGeneratorResponseDesc, } from "@bufbuild/protobuf/wkt"; | ||
import { createSchema } from "./ecmascript/schema.js"; | ||
import { transpile } from "./ecmascript/transpile.js"; | ||
import { parseParameter } from "./ecmascript/parameter.js"; | ||
import { createSchema } from "./schema.js"; | ||
import { transpile } from "./transpile.js"; | ||
import { parseParameter } from "./parameter.js"; | ||
/** | ||
@@ -22,0 +22,0 @@ * Create a new code generator plugin for ECMAScript. |
@@ -5,1 +5,8 @@ export type { Plugin } from "./plugin.js"; | ||
export { getComments, getDeclarationString, getPackageComments, getSyntaxComments, } from "./source-code-info.js"; | ||
export type { Target } from "./target.js"; | ||
export type { Schema } from "./schema.js"; | ||
export type { GeneratedFile, FileInfo } from "./generated-file.js"; | ||
export type { ImportSymbol } from "./import-symbol.js"; | ||
export { createImportSymbol } from "./import-symbol.js"; | ||
export type { Printable } from "./printable.js"; | ||
export { safeIdentifier } from "./safe-identifier.js"; |
@@ -17,1 +17,3 @@ // Copyright 2021-2024 Buf Technologies, Inc. | ||
export { getComments, getDeclarationString, getPackageComments, getSyntaxComments, } from "./source-code-info.js"; | ||
export { createImportSymbol } from "./import-symbol.js"; | ||
export { safeIdentifier } from "./safe-identifier.js"; |
@@ -14,4 +14,4 @@ // Copyright 2021-2024 Buf Technologies, Inc. | ||
// limitations under the License. | ||
import { isFieldSet, } from "@bufbuild/protobuf"; | ||
import { protoCamelCase, reflect, ScalarType, } from "@bufbuild/protobuf/reflect"; | ||
import { isFieldSet, ScalarType, } from "@bufbuild/protobuf"; | ||
import { protoCamelCase, reflect } from "@bufbuild/protobuf/reflect"; | ||
import { Edition, FieldDescriptorProto_Label, FieldDescriptorProto_Type, FieldDescriptorProtoDesc, FieldOptions_JSType, FieldOptionsDesc, FeatureSetDesc, SourceCodeInfo_LocationDesc, FileDescriptorProtoDesc, DescriptorProtoDesc, EnumDescriptorProtoDesc, ServiceDescriptorProtoDesc, } from "@bufbuild/protobuf/wkt"; | ||
@@ -18,0 +18,0 @@ /** |
{ | ||
"name": "@bufbuild/protoplugin", | ||
"version": "2.0.0-alpha.2", | ||
"version": "2.0.0-alpha.3", | ||
"license": "(Apache-2.0 AND BSD-3-Clause)", | ||
@@ -25,17 +25,6 @@ "description": "Helps to create your own Protocol Buffers code generators.", | ||
"require": "./dist/cjs/index.js" | ||
}, | ||
"./ecmascript": { | ||
"import": "./dist/esm/ecmascript/index.js", | ||
"require": "./dist/cjs/ecmascript/index.js" | ||
} | ||
}, | ||
"typesVersions": { | ||
"*": { | ||
"ecmascript": [ | ||
"./dist/cjs/ecmascript/index.d.ts" | ||
] | ||
} | ||
}, | ||
"dependencies": { | ||
"@bufbuild/protobuf": "2.0.0-alpha.2", | ||
"@bufbuild/protobuf": "2.0.0-alpha.3", | ||
"@typescript/vfs": "^1.4.0", | ||
@@ -42,0 +31,0 @@ "typescript": "4.5.2" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
193853
79
4911
1
+ Added@bufbuild/protobuf@2.0.0-alpha.3(transitive)
- Removed@bufbuild/protobuf@2.0.0-alpha.2(transitive)