Skip to content

Add warning for Service Worker deprecation #22100

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

Merged
merged 1 commit into from
May 13, 2025

Conversation

harshil1712
Copy link
Contributor

Summary

Updates a warning for Service Worker examples.

Documentation checklist

Copy link
Contributor

hyperlint-ai bot commented Apr 30, 2025

Howdy and thanks for contributing to our repo. The Cloudflare team reviews new, external PRs within two (2) weeks. If it's been two weeks or longer without any movement, please tag the PR Assignees in a comment.

We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.


PR Change Summary

Updated documentation to include warnings regarding the deprecation of Service Workers and recommended migration to Module Workers.

  • Added caution notes about Service Workers being deprecated in multiple documentation files.
  • Recommended using Module Workers instead of Service Workers for new features.
  • Updated examples to reflect the changes in Service Worker usage.

Modified Files

  • src/content/docs/learning-paths/mtls/mtls-workers/index.mdx
  • src/content/docs/workers/configuration/sites/start-from-existing.mdx
  • src/content/docs/workers/examples/cache-using-fetch.mdx
  • src/content/docs/workers/observability/errors.mdx
  • src/content/docs/workers/observability/logs/workers-logs.mdx
  • src/content/docs/workers/reference/migrate-to-module-workers.mdx
  • src/content/docs/workers/runtime-apis/fetch.mdx
  • src/content/docs/workers/runtime-apis/streams/index.mdx
  • src/content/docs/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration.mdx

How can I customize these reviews?

Check out the Hyperlint AI Reviewer docs for more information on how to customize the review.

If you just want to ignore it on this PR, you can add the hyperlint-ignore label to the PR. Future changes won't trigger a Hyperlint review.

Note specifically for link checks, we only check the first 30 links in a file and we cache the results for several hours (for instance, if you just added a page, you might experience this). Our recommendation is to add hyperlint-ignore to the PR to ignore the link check for this PR.

Copy link
Contributor

Preview URL: https://75d3c337.preview.developers.cloudflare.com
Preview Branch URL: https://service-worker-callout.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/learning-paths/mtls/mtls-workers/ https://service-worker-callout.preview.developers.cloudflare.com/learning-paths/mtls/mtls-workers/
https://developers.cloudflare.com/workers/observability/errors/ https://service-worker-callout.preview.developers.cloudflare.com/workers/observability/errors/
https://developers.cloudflare.com/workers/runtime-apis/streams/ https://service-worker-callout.preview.developers.cloudflare.com/workers/runtime-apis/streams/
https://developers.cloudflare.com/workers/configuration/sites/start-from-existing/ https://service-worker-callout.preview.developers.cloudflare.com/workers/configuration/sites/start-from-existing/
https://developers.cloudflare.com/workers/examples/cache-using-fetch/ https://service-worker-callout.preview.developers.cloudflare.com/workers/examples/cache-using-fetch/
https://developers.cloudflare.com/workers/observability/logs/workers-logs/ https://service-worker-callout.preview.developers.cloudflare.com/workers/observability/logs/workers-logs/
https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ https://service-worker-callout.preview.developers.cloudflare.com/workers/reference/migrate-to-module-workers/
https://developers.cloudflare.com/workers/runtime-apis/fetch/ https://service-worker-callout.preview.developers.cloudflare.com/workers/runtime-apis/fetch/
https://developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/ https://service-worker-callout.preview.developers.cloudflare.com/workers/wrangler/migration/v1-to-v2/wrangler-legacy/configuration/

Copy link
Contributor

@kristianfreeman kristianfreeman left a comment

Choose a reason for hiding this comment

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

Warning might be a bit redundant here but no biggie: https://service-worker-callout.preview.developers.cloudflare.com/workers/reference/migrate-to-module-workers/

Is it worth breaking this out into a re-usable template, in case we have to update this later? I'm good w/ it merging as-is but worth asking @kodster28 and @KianNH maybe

@harshil1712 harshil1712 merged commit dcb5dca into production May 13, 2025
13 checks passed
@harshil1712 harshil1712 deleted the service-worker-callout branch May 13, 2025 11:59
Copy link
Contributor

@irvinebroque irvinebroque left a comment

Choose a reason for hiding this comment

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

Why do we still have service workers examples in our docs at all?

@harshil1712
Copy link
Contributor Author

@irvinebroque, we have deprecated Service Workers, but we still support them. We might have users still using them, and so we need examples to support them. We should remove the examples once we completely stop the supporting Service Workers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.