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

[backport] PR #6951 to 4.x #6967

Merged
merged 1 commit into from
Apr 18, 2016
Merged

[backport] PR #6951 to 4.x #6967

merged 1 commit into from
Apr 18, 2016

Conversation

elastic-jasper
Copy link
Contributor

Backport PR #6951

Commit 1:
[internal] Replace var with let in ui/public/utils (no rison)

This change was applied to any .js files under the src/ui/public/utils
directory except for the rison.js file. The rison code has block level
hoisting issues, but it seems safer to just not touch the file rather
than fix them.

This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.

For example:

var foo = 'bar'; becomes let foo = 'var';

This was accomplished by replacing:
find: var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=
replace: let $1$2=

---------

**Commit 1:**
[internal] Replace var with let in ui/public/utils (no rison)

This change was applied to any .js files under the src/ui/public/utils
directory except for the `rison.js` file. The rison code has block level
hoisting issues, but it seems safer to just not touch the file rather
than fix them.

This was an automatic replacement from var to let for any variable
declaration that doubles as the initial assignment. Ultimately we want
most of these to be converted to const, but this commit is so large that
it warrants breaking each step of automation up into its own commit.

For example:

`var foo = 'bar';` becomes `let foo = 'var';`

This was accomplished by replacing:
find: `var ([a-zA-Z_$][0-9a-zA-Z_$]*)(\s+)=`
replace: `let $1$2=`

* Original sha: ec0707f
* Authored by Court Ewing <court@epixa.com> on 2016-04-15T21:20:57Z
@epixa epixa force-pushed the jasper/backport/6951/4.x branch from 7a635ee to a9e3cfe Compare April 18, 2016 14:35
@epixa
Copy link
Contributor

epixa commented Apr 18, 2016

jenkins, test it

@epixa epixa merged commit c4110cd into 4.x Apr 18, 2016
@epixa epixa deleted the jasper/backport/6951/4.x branch April 18, 2016 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants