Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ECMAScript target version mismatch with cicd env #626

Open
AlgoDoggo opened this issue Aug 20, 2022 · 1 comment
Open

ECMAScript target version mismatch with cicd env #626

AlgoDoggo opened this issue Aug 20, 2022 · 1 comment
Labels
new-bug Bug report that needs triage Team Lamprey

Comments

@AlgoDoggo
Copy link
Contributor

Subject of the issue

Our unit-tests with Circleci run in node12 which supports es2019. Our tsconfig target is es2020.

Steps to reproduce

  1. make a function that uses optional chaining
  2. build
  3. check the /dist folder, you'll see the optional chaining won't be downcompiled, as it's es2020 syntax.

Expected behaviour

Optional chaining, non-nullish coalescing operator and others are all features of es2020. They're essential to write modern js. We should either bump the node version in cicd to 14 - 12 being past its end of life anyway - or set a es2019 target in our tsconfig.

Actual behaviour

Any function using es2020 features unsupported by node12 will fail in testing.

@AlgoDoggo AlgoDoggo added the new-bug Bug report that needs triage label Aug 20, 2022
@AlgoDoggo
Copy link
Contributor Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new-bug Bug report that needs triage Team Lamprey
Projects
None yet
Development

No branches or pull requests

3 participants
@winder @AlgoDoggo and others