Skip to content

33206: Removed lib/web/es6-collections.js and replaced usages with native JS #33385

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

Conversation

anzin
Copy link
Contributor

@anzin anzin commented Jun 29, 2021

Description (*)

I've removed lib/web/es6-collections.js and replaced usages with native JS

Fixed Issues (if relevant)

  1. Fixes Eliminate es6-collections.js #33206

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Jun 29, 2021

Hi @anzin. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@ihor-sviziev
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev ihor-sviziev added Project: Platform Health Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Jun 30, 2021
@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests CE, Unit Tests, WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@magento run Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

Copy link
Contributor

@Den4ik Den4ik left a comment

Choose a reason for hiding this comment

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

✅ Looks ok for me

Failed tests is not related to changes

@ihor-sviziev
Copy link
Contributor

@sivaschenko @sidolov, could you provide some info on why the unit tests are failing w/o any errors in the results?

@andrewbess
Copy link
Contributor

@magento run Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@andrewbess
Copy link
Contributor

@magento run Unit Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@sivaschenko
Copy link
Member

@anzin @andrewbess if the WeakMap isn't supported by the library for js unit tests can you please take a look if this issue can be resolved by updating npm packages or (less preferable) adding an additional dependency to package.json

@ihor-sviziev
Copy link
Contributor

FYI here is a WIP PR for updating the js unit test library #33429.

@ihor-sviziev
Copy link
Contributor

ihor-sviziev commented Jul 6, 2021

I just ran the tests on the local machine with the newer js unit test library (see #33429) - we have more than 100 failing tests with a new version. It's definitely not easy to fix them altogether.
I think it's better to keep the old version for now.

@andrewbess
Copy link
Contributor

@mageno run Unit Tests

@andrewbess
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@Den4ik
Copy link
Contributor

Den4ik commented Jul 7, 2021

@anzin @andrewbess if the WeakMap isn't supported by the library for js unit tests can you please take a look if this issue can be resolved by updating npm packages or (less preferable) adding an additional dependency to package.json

I believe that we can use es6-collections polyfilll at js tests due to unsupport es6 by phantomjs.
Something like attached patch file
es6-collections-in-js-tests.tar.gz

@Den4ik Den4ik requested review from Den4ik and andrewbess July 7, 2021 21:02
@andrewbess andrewbess force-pushed the improvement/m2-33206-remove-es6-collections branch from b8e03e9 to 6946002 Compare July 7, 2021 21:08
@andrewbess
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2b, WebAPI Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ihor-sviziev
Copy link
Contributor

@magento run Functional Tests B2B

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@andrewbess andrewbess added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests and removed Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests labels Jul 8, 2021
@andrewbess
Copy link
Contributor

Hello @Den4ik @sivaschenko
All tests have been run successfully.
The ignoring of the eslint and jscs were added because the file added to tests is original es6-collections.js from the lib/web/ directory.
Please approve this changes.
Thank you in advance.

@andrewbess andrewbess requested a review from sivaschenko July 8, 2021 06:48
@sivaschenko sivaschenko merged commit 3252fea into magento:platform-health Jul 12, 2021
@m2-assistant
Copy link

m2-assistant bot commented Jul 12, 2021

Hi @anzin, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@Den4ik Den4ik mentioned this pull request Aug 12, 2021
5 tasks
@andrewbess andrewbess deleted the improvement/m2-33206-remove-es6-collections branch August 26, 2021 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Area: Lib/Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Component: Ui Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Progress: ready for testing Project: Platform Health Release Line: 2.4
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Eliminate es6-collections.js
6 participants