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

0.25.0 upgrade guide #2319

Closed
kedashoe opened this Issue Oct 9, 2017 · 11 comments

Comments

Projects
None yet
8 participants
@kedashoe
Contributor

kedashoe commented Oct 9, 2017

v0.24.1...v0.25.0

Added:

  • #2309 πŸ†• applyTo (thrush combinator)

Removed:

  • #2313 ❌ intersectionWith

Deprecated:

Changes:

  • import R from 'ramda' must now be import * as R from 'ramda'
  • #2195 fixed a performance problem in omit and fixed an unrecognized bug (see #2330 for details)
  • #2229 transducer support for tap
  • #2232 fix Set and Map equality
  • #2254 refactor library to use es6 modules and support treeshaking
  • #2305 implement prop using path
  • #2311 fix arity of function returned by flip

Many thanks to all the contributors supporting this release, especially to those helping with numerous improvements to tests and documentation πŸŽ‰

@martinkadlec0

This comment has been minimized.

Show comment
Hide comment
@martinkadlec0

martinkadlec0 Oct 9, 2017

"refactor library to use es6 modules and support treeshaking" πŸ‘

martinkadlec0 commented Oct 9, 2017

"refactor library to use es6 modules and support treeshaking" πŸ‘

@tycho01

This comment has been minimized.

Show comment
Hide comment
@tycho01

tycho01 Oct 10, 2017

Contributor

implement prop using path

Love this one too! No more errors on null objects for prop.

Contributor

tycho01 commented Oct 10, 2017

implement prop using path

Love this one too! No more errors on null objects for prop.

@CrossEye

This comment has been minimized.

Show comment
Hide comment
@CrossEye

CrossEye Oct 11, 2017

Member

@kedashoe:

Should we add this?

  • #2195 fixed a performance problem in omit and fixed an unrecognized bug (see #2330 for details)
Member

CrossEye commented Oct 11, 2017

@kedashoe:

Should we add this?

  • #2195 fixed a performance problem in omit and fixed an unrecognized bug (see #2330 for details)
@kedashoe

This comment has been minimized.

Show comment
Hide comment
@kedashoe

kedashoe Oct 11, 2017

Contributor

done!

Contributor

kedashoe commented Oct 11, 2017

done!

@benweier

This comment has been minimized.

Show comment
Hide comment
@benweier

benweier Oct 13, 2017

What's the correct way to import ramda in to my webpack browser bundle now?

0.24.1

import {equals} from 'ramda'; // πŸ‘

0.25.0

import {equals} from 'ramda'; // πŸ‘Ž Error while running ESLint: Cannot find module 'project/node_modules/ramda/webpack.config.browser.js'.
import r from 'ramda'; // πŸ‘Ž No default export found in module. (import/default)

I understand the build task now creates "es" and "src" folders but using the module path..

import equals from 'ramda/es/equals'; // πŸ‘

.. isn't really supportive of tree-shaking if I can't import the whole library and rely on dead code being eliminated automatically.

benweier commented Oct 13, 2017

What's the correct way to import ramda in to my webpack browser bundle now?

0.24.1

import {equals} from 'ramda'; // πŸ‘

0.25.0

import {equals} from 'ramda'; // πŸ‘Ž Error while running ESLint: Cannot find module 'project/node_modules/ramda/webpack.config.browser.js'.
import r from 'ramda'; // πŸ‘Ž No default export found in module. (import/default)

I understand the build task now creates "es" and "src" folders but using the module path..

import equals from 'ramda/es/equals'; // πŸ‘

.. isn't really supportive of tree-shaking if I can't import the whole library and rely on dead code being eliminated automatically.

@CrossEye

This comment has been minimized.

Show comment
Hide comment
@CrossEye
Member

CrossEye commented Oct 13, 2017

ping @Andarist

@asaf-romano

This comment has been minimized.

Show comment
Hide comment
@asaf-romano

asaf-romano Oct 13, 2017

Member

Isn't that #2322 ?

Member

asaf-romano commented Oct 13, 2017

Isn't that #2322 ?

@asaf-romano

This comment has been minimized.

Show comment
Hide comment
@asaf-romano

asaf-romano Oct 13, 2017

Member

Tree shaking is supported through import * as R from "ramda".

Member

asaf-romano commented Oct 13, 2017

Tree shaking is supported through import * as R from "ramda".

@Andarist

This comment has been minimized.

Show comment
Hide comment
@Andarist

Andarist Oct 13, 2017

Contributor

@benweier

I have no idea why this import {equals} from 'ramda'; gives u issues with eslint - you would probably have to share repository with this behaviour introduced in it, because it doesn't seem right, but I'm pretty confident that this is some issue with eslint configuration - not with ramda, because importing named export from ramda like this is correct and should work without any issues.

As mentioned import * as R from 'ramda'; is correct way of importing ramda right now with es6 modules if you want to namespace those imports with R in your files.

Contributor

Andarist commented Oct 13, 2017

@benweier

I have no idea why this import {equals} from 'ramda'; gives u issues with eslint - you would probably have to share repository with this behaviour introduced in it, because it doesn't seem right, but I'm pretty confident that this is some issue with eslint configuration - not with ramda, because importing named export from ramda like this is correct and should work without any issues.

As mentioned import * as R from 'ramda'; is correct way of importing ramda right now with es6 modules if you want to namespace those imports with R in your files.

@benweier

This comment has been minimized.

Show comment
Hide comment
@benweier

benweier Oct 14, 2017

Thanks for the replies. I'll use import * as R moving forward

benweier commented Oct 14, 2017

Thanks for the replies. I'll use import * as R moving forward

@homura

This comment has been minimized.

Show comment
Hide comment
@homura

homura Nov 16, 2017

// 0.24.1
R.takeWhile(x => x !== 'd' , 'Ramda'); //=> [ 'R', 'a', 'm' ]

// 0.25.0
R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram'

The slice method in takeWhile has changed in new version

homura commented Nov 16, 2017

// 0.24.1
R.takeWhile(x => x !== 'd' , 'Ramda'); //=> [ 'R', 'a', 'm' ]

// 0.25.0
R.takeWhile(x => x !== 'd' , 'Ramda'); //=> 'Ram'

The slice method in takeWhile has changed in new version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment