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

Pu/issue 130 #203

Merged
merged 18 commits into from Mar 13, 2020
Merged

Pu/issue 130 #203

merged 18 commits into from Mar 13, 2020

Conversation

izulin
Copy link
Collaborator

@izulin izulin commented Feb 24, 2020

Context

Abstracted string comparison using locale implementations. Passing some parameters from config there. Introduced more parameters (like: accentsSensitive, ignorePunctuation)

How has this been tested?

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature or improvement (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Additional language file or change to the existing one (translations)

Related issue(s):

  1. String comparison operators #130

Checklist:

  • My code follows the code style of this project,
  • My change requires a change to the documentation,
  • I described the modification in the CHANGELOG.md file.

@izulin
Copy link
Collaborator Author

izulin commented Feb 24, 2020

@wojciechczerniak I have run into some weird issue, where https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator is not behaving like promised. Further investigation is required, but I am initiating the discussion on whether code refactor is desired, and config parameters are done properly.

@wojciechczerniak
Copy link
Contributor

@wojciechczerniak I have run into some weird issue, where https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator is not behaving like promised. Further investigation is required, but I am initiating the discussion on whether code refactor is desired, and config parameters are done properly.

It might be a Node.js issue. Locales were optional and not a part of the default Node build before v13 nodejs/node@1a25e90

We may have to wait for #71

@izulin
Copy link
Collaborator Author

izulin commented Feb 25, 2020

@wojciechczerniak I have run into some weird issue, where https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Collator/Collator is not behaving like promised. Further investigation is required, but I am initiating the discussion on whether code refactor is desired, and config parameters are done properly.

It might be a Node.js issue. Locales were optional and not a part of the default Node build before v13 nodejs/node@1a25e90

We may have to wait for #71

Ok. I'll add tests, right now it seems to me that we can have control over accent-sensitivity and case-sensitivity, but not over the order of sorting (locale-dependent).

@wojciechczerniak
Copy link
Contributor

Looks like the #71 is now confirmed to work on v13. Have you chacked latest Node with localeCompare?

@izulin
Copy link
Collaborator Author

izulin commented Feb 27, 2020

Looks like the #71 is now confirmed to work on v13. Have you chacked latest Node with localeCompare?

ok, after update of node, it works as desired

@izulin
Copy link
Collaborator Author

izulin commented Feb 27, 2020

but remote config needs updating

@wojciechczerniak
Copy link
Contributor

We need to update
https://github.com/handsontable/hyperformula/blob/develop/.nvmrc
and
https://github.com/handsontable/hyperformula/tree/develop/.github/workflows

We should add this to basic requirements in docs/readme @scarletfog

@izulin
Copy link
Collaborator Author

izulin commented Feb 27, 2020

We need to update
https://github.com/handsontable/hyperformula/blob/develop/.nvmrc
and
https://github.com/handsontable/hyperformula/tree/develop/.github/workflows

We should add this to basic requirements in docs/readme @scarletfog

I don't know how to properly edit the latter one.

@wojciechczerniak
Copy link
Contributor

Ok

@budnix could you help with GH Actions? ☝️

@izulin
Copy link
Collaborator Author

izulin commented Mar 2, 2020

Ok

@budnix could you help with GH Actions? ☝️

bump

@wojciechczerniak
Copy link
Contributor

wojciechczerniak commented Mar 2, 2020

GH Actions have an issue that @swistak35 mentioned #71 (comment)

Also, an update has to be checked on Windows. An upgrade has failed for now #232

@wojciechczerniak
Copy link
Contributor

@izulin It looks that CI update to Node v13 is not a trivial task. There is no prebuilt package for non-LTS node versions, which takes too much time to build the required packages from the source.

With @swistach we've found a different approach to this problem. There is a snipped in Node docs how we can detect the ICU support https://nodejs.org/docs/latest-v13.x/api/intl.html#intl_detecting_internationalization_support

Then we can conditionally skip the test:

it('blah blah', () => {
   if (hasFullICU) {

   } else {
     console.warn('You're running tests without ICU support. String comparison may work differently. Please, use Node v13+.')
   }
}

This way our CI will skip the test, while locally it will pass as long as we work on the correct Node version. We can safely move forward with the development.

The test will just start to work after we update CI to the Node v14 LTS in April. WDYT?

@izulin
Copy link
Collaborator Author

izulin commented Mar 13, 2020

@izulin It looks that CI update to Node v13 is not a trivial task. There is no prebuilt package for non-LTS node versions, which takes too much time to build the required packages from the source.

With @swistach we've found a different approach to this problem. There is a snipped in Node docs how we can detect the ICU support https://nodejs.org/docs/latest-v13.x/api/intl.html#intl_detecting_internationalization_support

Then we can conditionally skip the test:

it('blah blah', () => {
   if (hasFullICU) {

   } else {
     console.warn('You're running tests without ICU support. String comparison may work differently. Please, use Node v13+.')
   }
}

This way our CI will skip the test, while locally it will pass as long as we work on the correct Node version. We can safely move forward with the development.

The test will just start to work after we update CI to the Node v14 LTS in April. WDYT?

Awesome!

Copy link
Contributor

@wojciechczerniak wojciechczerniak left a comment

Choose a reason for hiding this comment

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

LGTM 👍

src/StringHelper.ts Outdated Show resolved Hide resolved
Co-Authored-By: Wojciech Czerniak <wojciech.czerniak@gmail.com>
@wojciechczerniak wojciechczerniak mentioned this pull request Mar 13, 2020
@izulin izulin merged commit 6dca389 into develop Mar 13, 2020
@izulin izulin deleted the pu/issue-130 branch March 13, 2020 12:14
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.

None yet

2 participants