@cucumber/messages
Advanced tools
Comparing version 13.2.1 to 14.0.0
@@ -13,2 +13,3 @@ { | ||
"react", | ||
"import", | ||
"node", | ||
@@ -20,2 +21,3 @@ "@typescript-eslint" | ||
"plugin:react/recommended", | ||
"plugin:import/typescript", | ||
"plugin:@typescript-eslint/eslint-recommended", | ||
@@ -26,2 +28,3 @@ "plugin:@typescript-eslint/recommended", | ||
"rules": { | ||
"import/no-cycle": "error", | ||
"node/no-extraneous-import": "error", | ||
@@ -28,0 +31,0 @@ "@typescript-eslint/ban-ts-ignore": "off", |
{ | ||
"name": "@cucumber/messages", | ||
"version": "13.2.1", | ||
"version": "14.0.0", | ||
"description": "Protocol Buffer messages for Cucumber's inter-process communication", | ||
@@ -18,3 +18,3 @@ "main": "dist/src/index.js", | ||
"coverage": "nyc --reporter=html --reporter=text mocha", | ||
"pbjs": "pbjs --target static-module --wrap commonjs messages.proto --out src/messages.js", | ||
"pbjs": "pbjs --force-number --target static-module --wrap commonjs messages.proto --out src/messages.js", | ||
"pbts": "pbts src/messages.js > src/messages.d.ts", | ||
@@ -27,21 +27,22 @@ "build": "tsc && make src/messages.js && make src/messages.d.ts && copyfiles src/messages.js src/messages.d.ts dist", | ||
"protobufjs": "^6.10.2", | ||
"uuid": "^8.3.1" | ||
"uuid": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^8.0.4", | ||
"@types/node": "^14.14.8", | ||
"@typescript-eslint/eslint-plugin": "^4.8.1", | ||
"@typescript-eslint/parser": "^4.8.1", | ||
"copyfiles": "^2.4.0", | ||
"core-js": "^3.7.0", | ||
"eslint": "^7.13.0", | ||
"eslint-config-prettier": "^6.15.0", | ||
"@types/mocha": "^8.2.0", | ||
"@types/node": "^14.14.25", | ||
"@typescript-eslint/eslint-plugin": "^4.14.2", | ||
"@typescript-eslint/parser": "^4.14.2", | ||
"copyfiles": "^2.4.1", | ||
"core-js": "^3.8.3", | ||
"eslint": "^7.19.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-react": "^7.22.0", | ||
"mocha": "^8.2.1", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.1.2", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.5" | ||
"prettier": "^2.2.1", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
@@ -48,0 +49,0 @@ "bugs": { |
@@ -1,5 +0,1 @@ | ||
import MessageToBinaryStream from './MessageToBinaryStream'; | ||
import MessageToNdjsonStream from './MessageToNdjsonStream'; | ||
import BinaryToMessageStream from './BinaryToMessageStream'; | ||
import NdjsonToMessageStream from './NdjsonToMessageStream'; | ||
import * as TimeConversion from './TimeConversion'; | ||
@@ -10,2 +6,2 @@ import * as IdGenerator from './IdGenerator'; | ||
import { version } from '../package.json'; | ||
export { messages, MessageToBinaryStream, MessageToNdjsonStream, BinaryToMessageStream, NdjsonToMessageStream, TimeConversion, IdGenerator, version, }; | ||
export { messages, TimeConversion, IdGenerator, version }; |
@@ -21,15 +21,5 @@ "use strict"; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.version = exports.IdGenerator = exports.TimeConversion = exports.NdjsonToMessageStream = exports.BinaryToMessageStream = exports.MessageToNdjsonStream = exports.MessageToBinaryStream = exports.messages = void 0; | ||
var MessageToBinaryStream_1 = __importDefault(require("./MessageToBinaryStream")); | ||
exports.MessageToBinaryStream = MessageToBinaryStream_1.default; | ||
var MessageToNdjsonStream_1 = __importDefault(require("./MessageToNdjsonStream")); | ||
exports.MessageToNdjsonStream = MessageToNdjsonStream_1.default; | ||
var BinaryToMessageStream_1 = __importDefault(require("./BinaryToMessageStream")); | ||
exports.BinaryToMessageStream = BinaryToMessageStream_1.default; | ||
var NdjsonToMessageStream_1 = __importDefault(require("./NdjsonToMessageStream")); | ||
exports.NdjsonToMessageStream = NdjsonToMessageStream_1.default; | ||
exports.version = exports.IdGenerator = exports.TimeConversion = exports.messages = void 0; | ||
var $protobuf = __importStar(require("protobufjs")); | ||
var TimeConversion = __importStar(require("./TimeConversion")); | ||
@@ -44,2 +34,4 @@ exports.TimeConversion = TimeConversion; | ||
Object.defineProperty(exports, "version", { enumerable: true, get: function () { return package_json_1.version; } }); | ||
$protobuf.util.Long = undefined; | ||
$protobuf.configure(); | ||
//# sourceMappingURL=index.js.map |
/// <reference types="node" /> | ||
import { Transform, TransformCallback } from 'stream'; | ||
import { messages } from './index'; | ||
import { io } from './messages'; | ||
import messages = io.cucumber.messages; | ||
/** | ||
@@ -5,0 +6,0 @@ * Transforms a stream of message objects to binary |
@@ -17,3 +17,4 @@ "use strict"; | ||
var stream_1 = require("stream"); | ||
var index_1 = require("./index"); | ||
var messages_1 = require("./messages"); | ||
var messages = messages_1.io.cucumber.messages; | ||
/** | ||
@@ -28,3 +29,3 @@ * Transforms a stream of message objects to binary | ||
MessageToBinaryStream.prototype._transform = function (message, encoding, callback) { | ||
var chunk = index_1.messages.Envelope.encodeDelimited(message).finish(); | ||
var chunk = messages.Envelope.encodeDelimited(message).finish(); | ||
this.push(chunk); | ||
@@ -31,0 +32,0 @@ callback(); |
/// <reference types="node" /> | ||
import { Transform, TransformCallback } from 'stream'; | ||
import { messages } from './index'; | ||
import { io } from './messages'; | ||
import messages = io.cucumber.messages; | ||
/** | ||
@@ -5,0 +6,0 @@ * Transforms a stream of message objects to NDJSON |
@@ -1,2 +0,3 @@ | ||
import { messages } from './index'; | ||
import { io } from './messages'; | ||
import messages = io.cucumber.messages; | ||
export declare function millisecondsSinceEpochToTimestamp(millisecondsSinceEpoch: number): messages.ITimestamp; | ||
@@ -3,0 +4,0 @@ export declare function millisecondsToDuration(durationInMilliseconds: number): messages.IDuration; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.addDurations = exports.durationToMilliseconds = exports.timestampToMillisecondsSinceEpoch = exports.millisecondsToDuration = exports.millisecondsSinceEpochToTimestamp = void 0; | ||
var index_1 = require("./index"); | ||
var messages_1 = require("./messages"); | ||
var messages = messages_1.io.cucumber.messages; | ||
var MILLISECONDS_PER_SECOND = 1e3; | ||
@@ -9,7 +10,7 @@ var NANOSECONDS_PER_MILLISECOND = 1e6; | ||
function millisecondsSinceEpochToTimestamp(millisecondsSinceEpoch) { | ||
return new index_1.messages.Timestamp(toSecondsAndNanos(millisecondsSinceEpoch)); | ||
return new messages.Timestamp(toSecondsAndNanos(millisecondsSinceEpoch)); | ||
} | ||
exports.millisecondsSinceEpochToTimestamp = millisecondsSinceEpochToTimestamp; | ||
function millisecondsToDuration(durationInMilliseconds) { | ||
return new index_1.messages.Duration(toSecondsAndNanos(durationInMilliseconds)); | ||
return new messages.Duration(toSecondsAndNanos(durationInMilliseconds)); | ||
} | ||
@@ -34,3 +35,3 @@ exports.millisecondsToDuration = millisecondsToDuration; | ||
} | ||
return new index_1.messages.Duration({ seconds: seconds, nanos: nanos }); | ||
return new messages.Duration({ seconds: seconds, nanos: nanos }); | ||
} | ||
@@ -37,0 +38,0 @@ exports.addDurations = addDurations; |
@@ -7,10 +7,11 @@ "use strict"; | ||
var src_1 = require("../src"); | ||
var stream_1 = require("../src/stream"); | ||
var verifyStreamContract_1 = __importDefault(require("./verifyStreamContract")); | ||
describe('BinaryStream', function () { | ||
var makeToMessageStream = function () { | ||
return new src_1.BinaryToMessageStream(src_1.messages.Envelope.decodeDelimited.bind(src_1.messages.Envelope)); | ||
return new stream_1.BinaryToMessageStream(src_1.messages.Envelope.decodeDelimited.bind(src_1.messages.Envelope)); | ||
}; | ||
var makeFromMessageStream = function () { return new src_1.MessageToBinaryStream(); }; | ||
var makeFromMessageStream = function () { return new stream_1.MessageToBinaryStream(); }; | ||
verifyStreamContract_1.default(makeFromMessageStream, makeToMessageStream); | ||
}); | ||
//# sourceMappingURL=BinaryStreamTest.js.map |
@@ -43,2 +43,3 @@ "use strict"; | ||
var src_1 = require("../src"); | ||
var stream_1 = require("../src/stream"); | ||
var assert_1 = __importDefault(require("assert")); | ||
@@ -52,3 +53,3 @@ var NdjsonToMessageStream_1 = __importDefault(require("../src/NdjsonToMessageStream")); | ||
}; | ||
var makeFromMessageStream = function () { return new src_1.MessageToNdjsonStream(); }; | ||
var makeFromMessageStream = function () { return new stream_1.MessageToNdjsonStream(); }; | ||
verifyStreamContract_1.default(makeFromMessageStream, makeToMessageStream); | ||
@@ -77,3 +78,3 @@ it('converts a buffer stream written byte by byte', function (cb) { | ||
it('converts messages to JSON with enums as strings', function (cb) { | ||
var stream = new src_1.MessageToNdjsonStream(); | ||
var stream = new stream_1.MessageToNdjsonStream(); | ||
stream.on('data', function (json) { | ||
@@ -99,3 +100,3 @@ var ob = JSON.parse(json); | ||
it('converts messages to JSON with undefined arrays omitted', function (cb) { | ||
var stream = new src_1.MessageToNdjsonStream(); | ||
var stream = new stream_1.MessageToNdjsonStream(); | ||
stream.on('data', function (json) { | ||
@@ -113,3 +114,3 @@ var ob = JSON.parse(json); | ||
it('converts messages to JSON with undefined strings omitted', function (cb) { | ||
var stream = new src_1.MessageToNdjsonStream(); | ||
var stream = new stream_1.MessageToNdjsonStream(); | ||
stream.on('data', function (json) { | ||
@@ -125,3 +126,3 @@ var ob = JSON.parse(json); | ||
it('converts messages to JSON with undefined numbers omitted', function (cb) { | ||
var stream = new src_1.MessageToNdjsonStream(); | ||
var stream = new stream_1.MessageToNdjsonStream(); | ||
stream.on('data', function (json) { | ||
@@ -128,0 +129,0 @@ var ob = JSON.parse(json); |
{ | ||
"name": "@cucumber/messages", | ||
"version": "13.2.1", | ||
"version": "14.0.0", | ||
"description": "Protocol Buffer messages for Cucumber's inter-process communication", | ||
@@ -18,3 +18,3 @@ "main": "dist/src/index.js", | ||
"coverage": "nyc --reporter=html --reporter=text mocha", | ||
"pbjs": "pbjs --target static-module --wrap commonjs messages.proto --out src/messages.js", | ||
"pbjs": "pbjs --force-number --target static-module --wrap commonjs messages.proto --out src/messages.js", | ||
"pbts": "pbts src/messages.js > src/messages.d.ts", | ||
@@ -27,21 +27,22 @@ "build": "tsc && make src/messages.js && make src/messages.d.ts && copyfiles src/messages.js src/messages.d.ts dist", | ||
"protobufjs": "^6.10.2", | ||
"uuid": "^8.3.1" | ||
"uuid": "^8.3.2" | ||
}, | ||
"devDependencies": { | ||
"@types/mocha": "^8.0.4", | ||
"@types/node": "^14.14.8", | ||
"@typescript-eslint/eslint-plugin": "^4.8.1", | ||
"@typescript-eslint/parser": "^4.8.1", | ||
"copyfiles": "^2.4.0", | ||
"core-js": "^3.7.0", | ||
"eslint": "^7.13.0", | ||
"eslint-config-prettier": "^6.15.0", | ||
"@types/mocha": "^8.2.0", | ||
"@types/node": "^14.14.25", | ||
"@typescript-eslint/eslint-plugin": "^4.14.2", | ||
"@typescript-eslint/parser": "^4.14.2", | ||
"copyfiles": "^2.4.1", | ||
"core-js": "^3.8.3", | ||
"eslint": "^7.19.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.1.4", | ||
"eslint-plugin-react": "^7.21.5", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-react": "^7.22.0", | ||
"mocha": "^8.2.1", | ||
"nyc": "^15.1.0", | ||
"prettier": "^2.1.2", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.5" | ||
"prettier": "^2.2.1", | ||
"ts-node": "^9.1.1", | ||
"typescript": "^4.1.3" | ||
}, | ||
@@ -48,0 +49,0 @@ "bugs": { |
@@ -1,5 +0,2 @@ | ||
import MessageToBinaryStream from './MessageToBinaryStream' | ||
import MessageToNdjsonStream from './MessageToNdjsonStream' | ||
import BinaryToMessageStream from './BinaryToMessageStream' | ||
import NdjsonToMessageStream from './NdjsonToMessageStream' | ||
import * as $protobuf from 'protobufjs' | ||
import * as TimeConversion from './TimeConversion' | ||
@@ -11,11 +8,5 @@ import * as IdGenerator from './IdGenerator' | ||
export { | ||
messages, | ||
MessageToBinaryStream, | ||
MessageToNdjsonStream, | ||
BinaryToMessageStream, | ||
NdjsonToMessageStream, | ||
TimeConversion, | ||
IdGenerator, | ||
version, | ||
} | ||
$protobuf.util.Long = undefined | ||
$protobuf.configure() | ||
export { messages, TimeConversion, IdGenerator, version } |
import { Transform, TransformCallback } from 'stream' | ||
import { messages } from './index' | ||
import { io } from './messages' | ||
import messages = io.cucumber.messages | ||
@@ -4,0 +5,0 @@ /** |
import { Transform, TransformCallback } from 'stream' | ||
import { messages } from './index' | ||
import { io } from './messages' | ||
import messages = io.cucumber.messages | ||
@@ -4,0 +5,0 @@ /** |
@@ -1,2 +0,3 @@ | ||
import { messages } from './index' | ||
import { io } from './messages' | ||
import messages = io.cucumber.messages | ||
@@ -3,0 +4,0 @@ const MILLISECONDS_PER_SECOND = 1e3 |
@@ -1,2 +0,3 @@ | ||
import { BinaryToMessageStream, messages, MessageToBinaryStream } from '../src' | ||
import { messages } from '../src' | ||
import { BinaryToMessageStream, MessageToBinaryStream } from '../src/stream' | ||
import verifyStreamContract from './verifyStreamContract' | ||
@@ -3,0 +4,0 @@ |
@@ -1,2 +0,3 @@ | ||
import { messages, MessageToNdjsonStream } from '../src' | ||
import { messages } from '../src' | ||
import { MessageToNdjsonStream } from '../src/stream' | ||
import assert from 'assert' | ||
@@ -3,0 +4,0 @@ import NdjsonToMessageStream from '../src/NdjsonToMessageStream' |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
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
1266077
79
20045
17
Updateduuid@^8.3.2