nodejs-firestore icon indicating copy to clipboard operation
nodejs-firestore copied to clipboard

fix: Update `tsconfig.json` with ES2020 as target.

Open ehsannas opened this issue 6 months ago • 2 comments

The SDK has been using BigInt for a long time without explicitly having target: "es2020" in the tsconfig.json file. Based on my research, ES2016 did not include BigInt. I suspect that the omission of target in tsconfig.json had resulted in es2020 to be used implicitly.

Also note that Firebase Admin Node sdk uses es2020.

ehsannas avatar Jun 12 '25 19:06 ehsannas

@MarkDuckworth @sofisl Is this considered a breaking change? If so, are we allowed to make this change now?

@milaGGL FYI

In support of new data types, Firestore will need to use BigInt literals followed by n (things like const largeNumber: bigint = 12345678901234567890n;). And this will not work without the change to tsconfig.json.

ehsannas avatar Jun 12 '25 19:06 ehsannas

This can be considered a breaking change, yes. I'd recommend moving up to Node 18 as the library is due to move, see b/397525375. You are safe to do it this year as most other libraries moved to node 18 this year as well.

sofisl avatar Jun 26 '25 00:06 sofisl