Skip to content

Commit 7d3ae01

Browse files
committed
build: release v3.2.2
1 parent 18ea5a4 commit 7d3ae01

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

dist/client.cjs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,13 @@ function base64url(input) {
480480
var CUSTOM_LONG_AVRO_TYPE = import_avro_js2.default.types.LongType.using({
481481
fromBuffer: (buf) => {
482482
const big = buf.readBigInt64LE();
483-
if (big > Number.MAX_SAFE_INTEGER) {
483+
if (big < Number.MIN_SAFE_INTEGER || big > Number.MAX_SAFE_INTEGER) {
484484
return big;
485485
}
486486
return Number(BigInt.asIntN(64, big));
487487
},
488488
toBuffer: (n) => {
489-
const buf = Buffer.alloc(8);
489+
const buf = Buffer.allocUnsafe(8);
490490
if (n instanceof BigInt) {
491491
buf.writeBigInt64LE(n);
492492
} else {
@@ -498,7 +498,7 @@ var CUSTOM_LONG_AVRO_TYPE = import_avro_js2.default.types.LongType.using({
498498
toJSON: Number,
499499
isValid: (n) => {
500500
const type = typeof n;
501-
return type === "bigint" || type === "number";
501+
return type === "number" && n % 1 === 0 || type === "bigint";
502502
},
503503
compare: (n1, n2) => {
504504
return n1 === n2 ? 0 : n1 < n2 ? -1 : 1;

dist/client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,13 @@ function base64url(input) {
447447
var CUSTOM_LONG_AVRO_TYPE = avro2.types.LongType.using({
448448
fromBuffer: (buf) => {
449449
const big = buf.readBigInt64LE();
450-
if (big > Number.MAX_SAFE_INTEGER) {
450+
if (big < Number.MIN_SAFE_INTEGER || big > Number.MAX_SAFE_INTEGER) {
451451
return big;
452452
}
453453
return Number(BigInt.asIntN(64, big));
454454
},
455455
toBuffer: (n) => {
456-
const buf = Buffer.alloc(8);
456+
const buf = Buffer.allocUnsafe(8);
457457
if (n instanceof BigInt) {
458458
buf.writeBigInt64LE(n);
459459
} else {
@@ -465,7 +465,7 @@ var CUSTOM_LONG_AVRO_TYPE = avro2.types.LongType.using({
465465
toJSON: Number,
466466
isValid: (n) => {
467467
const type = typeof n;
468-
return type === "bigint" || type === "number";
468+
return type === "number" && n % 1 === 0 || type === "bigint";
469469
},
470470
compare: (n1, n2) => {
471471
return n1 === n2 ? 0 : n1 < n2 ? -1 : 1;

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "salesforce-pubsub-api-client",
3-
"version": "3.2.1",
3+
"version": "3.2.2",
44
"type": "module",
55
"description": "A node client for the Salesforce Pub/Sub API",
66
"author": "pozil",
@@ -22,22 +22,22 @@
2222
"prepublishOnly": "npm run build"
2323
},
2424
"dependencies": {
25-
"@grpc/grpc-js": "^1.9.9",
25+
"@grpc/grpc-js": "^1.9.12",
2626
"@grpc/proto-loader": "^0.7.10",
2727
"avro-js": "^1.11.3",
2828
"certifi": "^14.5.15",
2929
"dotenv": "^16.3.1",
3030
"jsforce": "^1.11.1",
31-
"undici": "^5.27.2"
31+
"undici": "^6.0.1"
3232
},
3333
"devDependencies": {
3434
"@chialab/esbuild-plugin-meta-url": "^0.17.7",
35-
"eslint": "^8.53.0",
35+
"eslint": "^8.55.0",
3636
"husky": "^8.0.3",
37-
"lint-staged": "^15.1.0",
37+
"lint-staged": "^15.2.0",
3838
"prettier": "^3.1.0",
39-
"tsup": "^7.2.0",
40-
"typescript": "^5.2.2"
39+
"tsup": "^8.0.1",
40+
"typescript": "^5.3.3"
4141
},
4242
"lint-staged": {
4343
"**/src/*.{css,html,js,json,md,yaml,yml}": [

tsup.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import metaUrlPlugin from '@chialab/esbuild-plugin-meta-url';
44
export default defineConfig({
55
entry: ['src/client.js'],
66
format: ['cjs', 'esm'],
7-
target: 'node16',
7+
target: 'node18',
88
clean: true,
99
esbuildPlugins: [
1010
metaUrlPlugin()

0 commit comments

Comments
 (0)