Skip to content

Make the version strategy of caniuse-lite incremental #16790

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

Closed
1 of 15 tasks
studioTeaTwo opened this issue Jan 29, 2020 · 3 comments
Closed
1 of 15 tasks

Make the version strategy of caniuse-lite incremental #16790

studioTeaTwo opened this issue Jan 29, 2020 · 3 comments

Comments

@studioTeaTwo
Copy link

studioTeaTwo commented Jan 29, 2020

🚀 Feature request

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • xi18n
  • run
  • config
  • help
  • version
  • doc

Description

I manage so that browserslist doesn't have isEs5SupportNeeded to trun off differential loading. But the result is not stable.

caniuse-lite has its own data in json file in npm package. Both build-angular and browserslist have caniuse-lite.
Since dependencies of browserslist is incremental like caniuse-lite "^1.0.30001017" and caniuse-lite of build-angular is fixed, the judgment result of BuildBrowserFeatures can change even if the source code of the repository is the same.
Modern browsers are updated frequently, so Angular-cli may not be updated in time.

For example:

[email protected] includes "caniuse-lite": "1.0.30001019".
This version don't have the information of android chrome 79.
last 2 versions on the browserslist can return 79-78.
BuildBrowserFeatures.isFeatureSupported('es6-module') returns false, because featureStatus for android chrome 79 is undefined.

Describe the solution you'd like

The package.json of @angular-devkit/build-angular changes version dependencies of caniuse-lite incrementally like "^1.0.0".

Describe alternatives you've considered

Make the caniuse-lite included in the browserlist exactly match the caniuse-lite of the build-angular.

  1. Point the version of caniuse-lite in resolutions.
  2. Remove caniuse-lite in package.json, use dependiecies of package.json in browserlist.

Or, change the logic of BuildBrowserFeatures.isFeatureSupported.
It may be better to find the lowest supported version and judge the version with an inequality sign. If using caniuse-api, it can be easily. But impact on polyfill creation, etc. cannot be fully determined.

@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Jan 29, 2020
@dgp1130
Copy link
Collaborator

dgp1130 commented Jan 30, 2020

Should be reasonable to pin to ^1.0.30001019, that way it can update without needing to update Angular.

@dgp1130 dgp1130 removed the needs: discussion On the agenda for team meeting to determine next steps label Jan 30, 2020
@ngbot ngbot bot modified the milestone: Backlog Jan 30, 2020
@alan-agius4 alan-agius4 modified the milestones: Backlog, v9-candidates Jan 30, 2020
@alan-agius4 alan-agius4 added needs: discussion On the agenda for team meeting to determine next steps and removed needs: discussion On the agenda for team meeting to determine next steps labels Feb 4, 2020
@alan-agius4 alan-agius4 added the needs: discussion On the agenda for team meeting to determine next steps label Feb 5, 2020
@dgp1130
Copy link
Collaborator

dgp1130 commented Feb 6, 2020

Updating this appears to cause some breakages, need to identify where they are coming from to verify that this can be properly unpinned.

In not, then we could update the dependency with each Angular minor release, so users would still get weekly updates. That's more of a fallback we aren't able to unpin this like we want to.

@dgp1130 dgp1130 added needs: investigation Requires some digging to determine if action is needed and removed needs: discussion On the agenda for team meeting to determine next steps labels Feb 6, 2020
@clydin clydin modified the milestones: v9-candidates, Backlog Feb 10, 2020
@kyliau kyliau closed this as completed in 21a25ee Mar 5, 2020
kyliau pushed a commit that referenced this issue Mar 5, 2020
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants