Gmousse / dataframe-js

No Maintenance Intended
https://gmousse.gitbooks.io/dataframe-js/
MIT License
460 stars 38 forks source link

[FEATURE] add core-js 3 support #88

Closed Wildhammer closed 5 years ago

Wildhammer commented 5 years ago

Is your feature request related to a problem? Please describe. If for whatever reason npm resolves core-js to version 3, dataframe-js won't work since babel/polyfill(which now is deprecated) dependency of dataframe uses core-js 2.

Describe the solution you'd like dataframe-js requires a new update with support for core-js 3

Describe alternatives you've considered My current workaround in my tsconfig.json path resolver(I have an Angular project):

        "core-js/es7/reflect": [
            "../node_modules/core-js/proposals/reflect-metadata"
        ],
        "core-js/modules/es6.*": [
            "../node_modules/core-js/modules/es.*"
        ],
        "core-js/modules/es7.*": [
            "../node_modules/core-js/modules/es.*"
        ],
        "core-js/modules/es6.regexp.*": [
            "../node_modules/core-js/es/regexp"
        ],
        "core-js/modules/web.dom.iterable": [
            "../node_modules/core-js/web"
        ]

Great library btw, don't want to switch to an alternative

Gmousse commented 5 years ago

Hi, thank you for the suggestion. I will look as soon as possible in order to upgrade dependencies.

kbrown commented 5 years ago

We have core-js 3.x in our project. This breaks dataframe-js unless we declare "core-js": "^2.5.7" explicitly as a dependency of dataframe-js.

"dependencies": {
    "@babel/polyfill": "~7.2.5",
    "core-js": "^2.5.7",
    "d3-dsv": "~1.0.10",
    "d3-request": "~1.0.6"
},
Wildhammer commented 5 years ago

@kbrown we had the same situation, that lead me to path resolving workaround.

Gmousse commented 5 years ago

Hi @kbrown, I will publish a quick fix this night.

Gmousse commented 5 years ago

@Wildhammer @kbrown Could you have a try with the branch hotfix/1.4.2 and give me feedbacks about the fix ?

Add "git+https://github.com/Gmousse/dataframe-js.git#hotfix/1.4.2" in your package.json instead of the current package version

If it's okay I publish it fast as possible.

Wildhammer commented 5 years ago

I don't have an isolate way of testing this in my project(I have other dependencies that use core-js 2 which using the path resolve I've gotten them to work). The dependency in package.json is still core-js 2, how is this version different than 1.4.1? I did test my code against your branch though, still works(with the path resolving in place).

Gmousse commented 5 years ago

I have just added explicitly the core-js 2 dependency as @kbrown said. NPM should now resolves correctly the dependency. I need more time (tomorrow) in order to test core-js 3 (I don't need to break things for other users).

Gmousse commented 5 years ago

Ok the fix works as expected @kbrown, I have published the fix. You can now update dataframe-js to the 1.4.2 version.

@Wildhammer I will work on a more stable fix (with core-js 3) tomorrow.

kbrown commented 5 years ago

@Gmousse sorry for the delay in me testing. Thanks for fixing so quickly.

Gmousse commented 5 years ago

Hi @kbrown @Wildhammer

Could you try this branch git+https://github.com/Gmousse/dataframe-js.git#release/1.4.3 ?

This branch introduces core-js 3 as a dependency, and I need feedbacks.

PS: Try this without your previous fixes please.

kbrown commented 5 years ago

@Gmousse 1.4.3 works for me. Thank you. Works in storybook and react app.

Gmousse commented 5 years ago

It's published. Thank you !