Skip to content

Commit ae14d75

Browse files
committed
Merge remote-tracking branch 'origin/main' into 1.30-releases
2 parents 13a9790 + 6c64d91 commit ae14d75

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

packages/bson-transpilers/test/run-yaml.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,8 @@ fs.readdirSync(testpath).map((file) => {
9898
continue;
9999
}
100100
if (test.output && output === 'object') { // Can't import libraries from YAML, so un-stringify it first
101-
const expected = executeJavascript(test.output.object);
102101
it(`${input}: ${test.input[input]} => runnable object`, () => {
102+
const expected = executeJavascript(test.output.object);
103103
const actual = transpiler[input].object.compile(test.input[input]);
104104
if (expected && typeof expected === 'object' && '_bsontype' in expected) {
105105
expect(actual._bsontype).to.equal(expected._bsontype);

packages/bson-transpilers/test/yaml/bson-methods.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ tests:
382382
object: new Long(419430400, 0)
383383
Decimal128-methods:
384384
- input:
385-
javascript: new Decimal128(Buffer.from('5')).toString()
385+
javascript: new Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0')).toString()
386386
output:
387387
python: str(Decimal128('5.3E-6175'))
388388
java: Decimal128.parse("5.3E-6175").toString()

packages/bson-transpilers/test/yaml/bson.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ tests:
363363
Decimal128:
364364
- description: 'buffer arg'
365365
input:
366-
javascript: Decimal128(Buffer.from('5'))
366+
javascript: Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'))
367367
output:
368368
shell: new NumberDecimal(5.3E-6175)
369369
python: Decimal128('5.3E-6175')
@@ -383,14 +383,14 @@ tests:
383383
object: Decimal128.fromString('5')
384384
- description: 'NEW'
385385
input:
386-
javascript: new Decimal128(Buffer.from('5'))
386+
javascript: new Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'))
387387
shell: new NumberDecimal('5.3E-6175')
388388
output:
389389
shell: new NumberDecimal(5.3E-6175)
390390
python: Decimal128('5.3E-6175')
391391
java: Decimal128.parse("5.3E-6175")
392392
csharp: Decimal128.Parse("5.3E-6175")
393-
object: new Decimal128(Buffer.from('5'))
393+
object: new Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0'))
394394
- description: 'number arg'
395395
input:
396396
shell: NumberDecimal(5)

packages/bson-transpilers/test/yaml/error-misc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ tests:
218218
errorCode: E_BSONTRANSPILERS_ATTRIBUTE
219219
- description: Decimal128 with invalidMethod
220220
input:
221-
javascript: new Decimal128(Buffer.from('5')).invalidMethod()
221+
javascript: new Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0')).invalidMethod()
222222
python: Decimal128('1').invalidMethod()
223223
errorCode: E_BSONTRANSPILERS_ATTRIBUTE
224224
- description: Timestamp with invalidMethod

packages/bson-transpilers/test/yaml/imports.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ tests:
296296
- description: Single import NumberDecimal
297297
input:
298298
shell: "{x: NumberDecimal(1)}"
299-
javascript: "{x: Decimal128(1)}"
299+
javascript: "{x: Decimal128.fromString('1')}"
300300
python: "{'x': Decimal128('1')}"
301301
output:
302302
java: |-
@@ -368,7 +368,7 @@ tests:
368368
12: undefined, 100: Code('1', {x: 1}), '100a': Code('!'), 101: ObjectId(),
369369
103: DBRef('c', ObjectId()), 104: Double(1), 105: Int32(1), 106: Long(1, 100),
370370
107: MinKey(), 108: MaxKey(), 110: Timestamp(1, 100), 111: BSONSymbol('1'), 112:
371-
Decimal128([1]), '201a': new Date()}"
371+
Decimal128('1'), '201a': new Date()}"
372372
output:
373373
java: |-
374374
import java.util.regex.Pattern;

packages/bson-transpilers/test/yaml/partial.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ tests:
401401
csharp: 429496729601L >>
402402
shell: new NumberLong(429496729601) >>
403403
- input:
404-
javascript: new Decimal128(Buffer.from('5')).toString
404+
javascript: new Decimal128(Buffer.from('5\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0')).toString
405405
output:
406406
javascript: ''
407407
python: str

packages/ssh-tunnel/src/index.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createServer, Server as HttpServer, Agent as HttpAgent } from 'http';
44
import { promisify } from 'util';
55
import { readFileSync } from 'fs';
66
import path from 'path';
7-
import { AddressInfo, Socket } from 'net';
7+
import { Socket } from 'net';
88
import fetch from 'node-fetch';
99
import { expect } from 'chai';
1010
import { SocksClient } from 'socks';

0 commit comments

Comments
 (0)