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

Deprecate jQuery.isArray #2961

Closed
markelog opened this Issue Feb 29, 2016 · 24 comments

Comments

Projects
None yet
8 participants
@markelog
Member

markelog commented Feb 29, 2016

Seems fulfilled with Array.isArray

@markelog markelog added this to the 3.1.0 milestone Feb 29, 2016

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Feb 29, 2016

Member

👍

Member

mgol commented Feb 29, 2016

👍

@markelog markelog added the Core label Mar 3, 2016

@tkdphoenix

This comment has been minimized.

Show comment
Hide comment
@tkdphoenix

tkdphoenix commented Mar 16, 2016

agreed

@FarSeeing

This comment has been minimized.

Show comment
Hide comment
@FarSeeing

FarSeeing Apr 18, 2016

Contributor

I guess it's worth moving Array.isArray into /var and re-use:

   raw     gz Compared to master @ 44cb97e0cfc8d3e62bef7c621bfeba6fe4f65d7c    
  +601   +147 dist/jquery.js                                                   
   -60    -12 dist/jquery.min.js
Contributor

FarSeeing commented Apr 18, 2016

I guess it's worth moving Array.isArray into /var and re-use:

   raw     gz Compared to master @ 44cb97e0cfc8d3e62bef7c621bfeba6fe4f65d7c    
  +601   +147 dist/jquery.js                                                   
   -60    -12 dist/jquery.min.js
@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 18, 2016

Member

Nice find, but with this ticket we would need to move it to deprecated.js module

Member

markelog commented Apr 18, 2016

Nice find, but with this ticket we would need to move it to deprecated.js module

@FarSeeing

This comment has been minimized.

Show comment
Hide comment
@FarSeeing

FarSeeing Apr 18, 2016

Contributor

That's a calculation with the following code in deprecated.js:

jQuery.extend( {
    isArray: isArray
} );
Contributor

FarSeeing commented Apr 18, 2016

That's a calculation with the following code in deprecated.js:

jQuery.extend( {
    isArray: isArray
} );
@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 18, 2016

Member

You mean gzip size will also change in identical manner if we move it to deprecated.js as if we moved it to /var?

Member

markelog commented Apr 18, 2016

You mean gzip size will also change in identical manner if we move it to deprecated.js as if we moved it to /var?

@FarSeeing

This comment has been minimized.

Show comment
Hide comment
@FarSeeing

FarSeeing Apr 18, 2016

Contributor

That's the result of having both /var file creation for storing variable and moving declaration to deprecated.js.

Contributor

FarSeeing commented Apr 18, 2016

That's the result of having both /var file creation for storing variable and moving declaration to deprecated.js.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Apr 18, 2016

Member

Deprecation would mean that we:

  1. Move jQuery.isArray to deprecated.js
  2. Change all internal uses from jQuery.isArray to Array.isArray

so we can't have the var-module containing the old code here.

Member

mgol commented Apr 18, 2016

Deprecation would mean that we:

  1. Move jQuery.isArray to deprecated.js
  2. Change all internal uses from jQuery.isArray to Array.isArray

so we can't have the var-module containing the old code here.

@FarSeeing

This comment has been minimized.

Show comment
Hide comment
@FarSeeing

FarSeeing Apr 18, 2016

Contributor

Right, but as other built-in methods (slice, concat, toString etc) isArray could be stored in /var.

Contributor

FarSeeing commented Apr 18, 2016

Right, but as other built-in methods (slice, concat, toString etc) isArray could be stored in /var.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Apr 18, 2016

Member

So you propose to put Array.isArray in a var-module, not jQuery.isArray? I understood it differently before.

Member

mgol commented Apr 18, 2016

So you propose to put Array.isArray in a var-module, not jQuery.isArray? I understood it differently before.

@FarSeeing

This comment has been minimized.

Show comment
Hide comment
@FarSeeing

FarSeeing Apr 18, 2016

Contributor

That's right. Sorry for not explaining that before.

Contributor

FarSeeing commented Apr 18, 2016

That's right. Sorry for not explaining that before.

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 18, 2016

Member

I wouldn't want size to influence our file hierarchy, it would be pretty confusing, also all deprecated modules should be stored in deprecated module, since it would also be confusing but now for users too who want to exclude or use deprecated stuff

Member

markelog commented Apr 18, 2016

I wouldn't want size to influence our file hierarchy, it would be pretty confusing, also all deprecated modules should be stored in deprecated module, since it would also be confusing but now for users too who want to exclude or use deprecated stuff

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Apr 18, 2016

Member

@markelog I agree to an extent but @FarSeeing only proposes to put Array.isArray in a var-module, not the soon-to-be-deprecated jQuery.isArray; see our last 2 comments.

Member

mgol commented Apr 18, 2016

@markelog I agree to an extent but @FarSeeing only proposes to put Array.isArray in a var-module, not the soon-to-be-deprecated jQuery.isArray; see our last 2 comments.

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 18, 2016

Member

Oh, i see, but i wouldn't do that too :), don't really see the point

Member

markelog commented Apr 18, 2016

Oh, i see, but i wouldn't do that too :), don't really see the point

@ShashankaNataraj

This comment has been minimized.

Show comment
Hide comment
@ShashankaNataraj

ShashankaNataraj Apr 24, 2016

Contributor

Guys, is there a possibility of me submitting a PR for this?

Contributor

ShashankaNataraj commented Apr 24, 2016

Guys, is there a possibility of me submitting a PR for this?

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Apr 24, 2016

Member

@ShashankaNataraj Sure! Do you know what needs to be done?

Member

mgol commented Apr 24, 2016

@ShashankaNataraj Sure! Do you know what needs to be done?

@markelog

This comment has been minimized.

Show comment
Hide comment
@markelog

markelog Apr 24, 2016

Member

I would wait until we would have discussion about this, it seems some team members feel "deprecation" process of core methods might be inappropriate.

Member

markelog commented Apr 24, 2016

I would wait until we would have discussion about this, it seems some team members feel "deprecation" process of core methods might be inappropriate.

@ShashankaNataraj

This comment has been minimized.

Show comment
Hide comment
@ShashankaNataraj

ShashankaNataraj Jul 11, 2016

Contributor

@mgol @markelog Correct me if Im wrong, tasks for this issue are:

  • Move jquery.isArray to deprecated.js
  • Change all usages of jQuery.isArray to Array.isArray
Contributor

ShashankaNataraj commented Jul 11, 2016

@mgol @markelog Correct me if Im wrong, tasks for this issue are:

  • Move jquery.isArray to deprecated.js
  • Change all usages of jQuery.isArray to Array.isArray
@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jul 11, 2016

Member

Also, the third item - its unit tests have to be moved to jQuery.isArray as
well.

Also, if this hasn't been mentioned before - each deprecation, apart from a
jQuery PR and an API site issue needs a jQuery Migrate issue to polyfill
the API and warn against using it.

Michał Gołębiowski

Member

mgol commented Jul 11, 2016

Also, the third item - its unit tests have to be moved to jQuery.isArray as
well.

Also, if this hasn't been mentioned before - each deprecation, apart from a
jQuery PR and an API site issue needs a jQuery Migrate issue to polyfill
the API and warn against using it.

Michał Gołębiowski

@ShashankaNataraj

This comment has been minimized.

Show comment
Hide comment
@ShashankaNataraj

ShashankaNataraj Jul 11, 2016

Contributor

@mgol Didnt get what you meant by

its unit tests have to be moved to jQuery.isArray as well.

I understand unit tests need to be modified but jQuery.isArray tests need to be removed right?

Actually I have been raising issues like this for every deprecation issue Im working on..

Raised one for this issue too.

Contributor

ShashankaNataraj commented Jul 11, 2016

@mgol Didnt get what you meant by

its unit tests have to be moved to jQuery.isArray as well.

I understand unit tests need to be modified but jQuery.isArray tests need to be removed right?

Actually I have been raising issues like this for every deprecation issue Im working on..

Raised one for this issue too.

@mgol

This comment has been minimized.

Show comment
Hide comment
@mgol

mgol Jul 14, 2016

Member

I understand unit tests need to be modified but jQuery.isArray tests need to be removed right?

Not removed but moved to test/unit/deprecated.js.

Actually I have been raising issues like this for every deprecation issue Im working on..

I've seen them, thanks for that! I meant that apart from the API issue we also need an issue at https://github.com/jquery/jquery-migrate/issues about a need to restore the API (because people may exclude the deprecated module) with a warning against using it.

Member

mgol commented Jul 14, 2016

I understand unit tests need to be modified but jQuery.isArray tests need to be removed right?

Not removed but moved to test/unit/deprecated.js.

Actually I have been raising issues like this for every deprecation issue Im working on..

I've seen them, thanks for that! I meant that apart from the API issue we also need an issue at https://github.com/jquery/jquery-migrate/issues about a need to restore the API (because people may exclude the deprecated module) with a warning against using it.

@kumarmj

This comment has been minimized.

Show comment
Hide comment
@kumarmj

kumarmj Aug 14, 2016

Contributor

@ShashankaNataraj seems not to be working on this. Can I please take this ?

Contributor

kumarmj commented Aug 14, 2016

@ShashankaNataraj seems not to be working on this. Can I please take this ?

@kumarmj

This comment has been minimized.

Show comment
Hide comment
@kumarmj

kumarmj Aug 14, 2016

Contributor

Correct me, for any changes

  • Move jquery.isArray to deprecated.js
  • Change all usages of jQuery.isArray to Array.isArray
  • Modify unit tests
  • Create a jquery-migrate issue for jQuery.isArray
Contributor

kumarmj commented Aug 14, 2016

Correct me, for any changes

  • Move jquery.isArray to deprecated.js
  • Change all usages of jQuery.isArray to Array.isArray
  • Modify unit tests
  • Create a jquery-migrate issue for jQuery.isArray

@dmethvin dmethvin referenced this issue Aug 14, 2016

Open

3.2/3.3 Deprecations #972

0 of 8 tasks complete

@mgol mgol closed this in 1b9575b Nov 30, 2016

@Bruce17 Bruce17 referenced this issue May 9, 2017

Closed

Replace $.isArray with Array.isArray #1199

2 of 2 tasks complete

erotte added a commit to erotte/jQuery-Autocomplete that referenced this issue Aug 24, 2017

migrate dprecated `$.isArray` to `Array.isArray`
`$.isArray` is deprecated in jQuery 3.2, so Array.isArray should be the way to go.

jquery/jquery#2961
https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/
@Rikk

This comment has been minimized.

Show comment
Hide comment
@Rikk

Rikk commented Dec 11, 2017

preetpalS added a commit to preetpalS/jQuery-Autocomplete that referenced this issue Jan 28, 2018

migrate dprecated `$.isArray` to `Array.isArray`
`$.isArray` is deprecated in jQuery 3.2, so Array.isArray should be the way to go.

jquery/jquery#2961
https://blog.jquery.com/2017/03/16/jquery-3-2-0-is-out/

@lock lock bot locked as resolved and limited conversation to collaborators Jun 17, 2018

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