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

Pure ESM #1

Open
wants to merge 1 commit into
base: new-major-release/v5
Choose a base branch
from

Conversation

PowerKiKi
Copy link

I am trying to remove all references to non-ESM.

For that I used dpdm, and ran something like:

dpdm src/main.ts | grep -F -C 10 'node_modules/highcharts/highcharts.js'

However this should not be merged as-is, because there are tow issues left to solve:

First, import('highcharts-custom-events') now fails to compile. If I understand correctly because that plugin is not ESM. If that's the case, maybe we could decide that non-ESM, non Highcarts v12 compatible plugins are not supported. And find another plugin to use in our demo. But I might be missing something too... @karolkolodziej, any opinion on that ?

Second, maybe even more annoying is that we have a runtime error when importing some modules, such as map and 3d, as demonstrated in highcharts/highcharts#21840 :-/

Any inputs are welcome...

@@ -21,7 +21,7 @@
"peerDependencies": {
"@angular/common": ">=19.0.0",
"@angular/core": ">=19.0.0",
"highcharts": ">=9.0.0"
"highcharts": ">=12.0.0"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PowerKiKi , I have adapt the support for version 12, I think we can keep old version as well. unless you know a breaking change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since v12 modules no longer require initialization. That is a breaking change for us. Supporting only v12 allow us to simplify our code. We no longer need to identify the version and conditionally call module.default(Highcharts).

And since it's been historically relatively painless to upgrade Highcharts, I don't see why users wouldn't upgrade at the same time as they upgrade highcharts-angular. It is a rather low-effort for them, and avoid us supporting old things.

I am not able to find an official old version support policy. So in the absence of such, I can only assume that only the latest version of Highchart is supported. That would mean v11 is EOL.

@karolkolodziej, are you able to share something regarding which versions of Highcharts should be supported ?

const results: ModuleFactory[] = await Promise.all(
partialConfig?.modules ? [...this.globalModules(), ...partialConfig.modules()] : this.globalModules()
);
if (version < 120000) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PowerKiKi , i think we can keep support for version 11, I dont see a big breaking change in highcharts 12.0.0 that will let us force dev using this package to upgrade version v5 .

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

Successfully merging this pull request may close these issues.

2 participants