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

5.4.0 Causes Angular 8 Compilation Errors #929

Closed
jpspringall opened this issue Sep 6, 2021 · 5 comments
Closed

5.4.0 Causes Angular 8 Compilation Errors #929

jpspringall opened this issue Sep 6, 2021 · 5 comments

Comments

@jpspringall
Copy link
Contributor

jpspringall commented Sep 6, 2021

Hi,
For a couple reasons we are tied to Angular 8.x
This ties us to TypeScript 3.5.3

As part of the 5.4.0 release
in the file: lib\index.ts the crypto util is exported:

However it is exported using the shorthand:
export * as crypto from './crypto';

This syntax was introduced as part Typescript 3.8

So is causing us a compilation issue with one of our libraries:
ERROR: ../../node_modules/@okta/okta-auth-js/lib/index.d.ts(24,10): error TS1005: 'from' expected.
../../node_modules/@okta/okta-auth-js/lib/index.d.ts(24,13): error TS1005: ';' expected.
../../node_modules/@okta/okta-auth-js/lib/index.d.ts(24,20): error TS1005: ';' expected.
../../node_modules/@okta/okta-auth-js/lib/index.d.ts(24,25): error TS1005: ';' expected.

I was wondering if it would be possible to revert to the non shorthand version:
import * as crypto from "./crypto";
export { crypto };

I do have a PR ready to go, if people are happy for the change to go in.

Cheers

James

@jpspringall jpspringall changed the title 5.4.0 Breaks Angular 8 Support 5.4.0 Causes Angular 8 Compilation Errors Sep 6, 2021
@oleksandrpravosudko-okta
Copy link
Contributor

oleksandrpravosudko-okta commented Sep 6, 2021

Thanks for reporting this @jpspringall.

We might want to generate(e.g. downlevel-dts) types for older TS versions for this SDK.
I will bring this up in a team meeting to see if it is feasible to implement.

Internal Ref: OKTA-426046

@jpspringall
Copy link
Contributor Author

Thanks @oleksandrpravosudko-okta,

Once it's been discussed could you let me know the outcome?

Cheers

James

@oleksandrpravosudko-okta
Copy link
Contributor

@jpspringall it was decided to postpone implementing support of type definitions for older TS versions for now.

@shuowu went ahead and created a PR to replace the offending syntax: #931

Thanks for catching this.

@jpspringall
Copy link
Contributor Author

Thank you sir

@shuowu
Copy link
Contributor

shuowu commented Sep 8, 2021

@jpspringall The fix has been released in 5.4.3. Closing this issue.

@shuowu shuowu closed this as completed Sep 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants