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

fix(service-worker): throw when using the unsupported `versionedFiles` option in config #33903

Closed

Conversation

@gkalpak
Copy link
Member

gkalpak commented Nov 18, 2019

In 5d5c94d, the deprecated versionedFiles option from the SW asset-group configuration in ngsw-config.json. As a result, the option would be silently ignored and the runtime behavior of the SW would change (i.e. some files might not be cached and available offline any more). This change could be easily go unnoticed by the developer.

This commit ensures this does not happen by throwing a build-time error, when detecting the unsupported versionedFiles option with an error message prompting the user to use the files option instead.

Jira issue: FW-1727

@gkalpak gkalpak added this to the v9-blockers milestone Nov 18, 2019
@gkalpak gkalpak requested a review from angular/fw-service-worker as a code owner Nov 18, 2019
@googlebot googlebot added the cla: yes label Nov 18, 2019
@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Nov 18, 2019

gkalpak added 2 commits Nov 18, 2019
…` option in config

In 5d5c94d, the deprecated `versionedFiles` option from the SW
asset-group configuration in `ngsw-config.json`. As a result, the
option would be silently ignored and the runtime behavior of the SW
would change (i.e. some files might not be cached and available offline
any more). This change could be easily go unnoticed by the developer.

This commit ensures this does not happen by throwing a build-time error,
when detecting the unsupported `versionedFiles` option with an error
message prompting the user to use the `files` option instead.

Jira issue: [FW-1727](https://angular-team.atlassian.net/browse/FW-1727)
@gkalpak gkalpak force-pushed the gkalpak:fix-sw-throw-on-versionedFiles branch from 14b6a48 to afa097a Nov 18, 2019
@mary-poppins

This comment has been minimized.

Copy link

mary-poppins commented Nov 18, 2019

Copy link
Member

IgorMinar left a comment

thanks!

done();
})
.catch(err => done.fail(err));

This comment has been minimized.

Copy link
@IgorMinar

IgorMinar Nov 21, 2019

Member

nice cleanup. thanks!

@alxhub alxhub closed this in 4d03ec0 Nov 21, 2019
alxhub added a commit that referenced this pull request Nov 21, 2019
…` option in config (#33903)

In 5d5c94d, the deprecated `versionedFiles` option from the SW
asset-group configuration in `ngsw-config.json`. As a result, the
option would be silently ignored and the runtime behavior of the SW
would change (i.e. some files might not be cached and available offline
any more). This change could be easily go unnoticed by the developer.

This commit ensures this does not happen by throwing a build-time error,
when detecting the unsupported `versionedFiles` option with an error
message prompting the user to use the `files` option instead.

Jira issue: [FW-1727](https://angular-team.atlassian.net/browse/FW-1727)

PR Close #33903
alxhub added a commit that referenced this pull request Nov 21, 2019
…` option in config (#33903)

In 5d5c94d, the deprecated `versionedFiles` option from the SW
asset-group configuration in `ngsw-config.json`. As a result, the
option would be silently ignored and the runtime behavior of the SW
would change (i.e. some files might not be cached and available offline
any more). This change could be easily go unnoticed by the developer.

This commit ensures this does not happen by throwing a build-time error,
when detecting the unsupported `versionedFiles` option with an error
message prompting the user to use the `files` option instead.

Jira issue: [FW-1727](https://angular-team.atlassian.net/browse/FW-1727)

PR Close #33903
@gkalpak gkalpak deleted the gkalpak:fix-sw-throw-on-versionedFiles branch Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.