vocdoni/dvote-js

Cannot move to ES2020 when using TS 4.3.2

marcvelmer opened this issue · 0 comments

For some (weird?) reason, there is a problem when using ES2020 as target in the TS config.

{
    "compilerOptions": {
        "module": "commonjs",
        "moduleResolution": "node",
        "resolveJsonModule": true,
        "pretty": true,
        "declaration": true,
        "sourceMap": true,
        "target": "es2020", <- FAILS!
        "outDir": "dist",
        "baseUrl": "src"
    },
    "include": [
        "src/**/*.ts"
    ],
    "exclude": [
        "node_modules",
        "src/protobuf/src",
        "src/protobuf/build/dart",
        "src/protobuf/build/go"
    ]
}

This is blocking because otherwise we cannot use Promise.allSettled() and it's needed for the new discovery process to work properly. I have bypassed the problem by targeting ES6 again, but it's something we need to review.

The error thrown can be seen here: https://github.com/vocdoni/dvote-js/runs/2885662878?check_suite_focus=true