This PR makes the Nylas SDK a dual package supporting both CommonJS and ES Module syntax. Now, the SDK's distribution package will include 3 directories:
lib/cjs: for CommonJS
lib/esm: for ES Modules
lib/types: for the TypeScript declaration files
Furthermore we've also upgraded the tsconfig to target es2021 as it's the newest ECMAScript version that is fully supported by the minimum Node version supported by the SDK (v16).
License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.
Description
This PR makes the Nylas SDK a dual package supporting both CommonJS and ES Module syntax. Now, the SDK's distribution package will include 3 directories:
Furthermore we've also upgraded the tsconfig to target es2021 as it's the newest ECMAScript version that is fully supported by the minimum Node version supported by the SDK (v16).
License
I confirm that this contribution is made under the terms of the MIT license and that I have the authority necessary to make this contribution on behalf of its copyright owner.