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

Remove explicitly unimplemented importScripts #1556

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented Jan 19, 2024

We have no plans to ever implement importScripts() and having it defined but marked explicitly non-implemented is causing issues with using certain third-party libraries in workers. So let's just remove it entirely.

Refs: #1521

@jasnell
Copy link
Member Author

jasnell commented Jan 19, 2024

@hoodmane ... once this lands it'll be nice to see if we can remove the workaround you added to the pyodide stuff.

Copy link
Contributor

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

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

Thanks @jasnell!

@kentonv
Copy link
Member

kentonv commented Jan 19, 2024

Hmm given that we know there exist libraries out there that explicitly check for the existence of this and change behavior based on it, does this need a compat flag? If all such libraries end up broken as a result, then I don't think we need a compat flag, since we generally don't consider it a "breaking change" to break something that was already broken. But if there's some code out there which might work now (maybe my accident) and this causes it to change to non-working, then we need a flag...

@jasnell
Copy link
Member Author

jasnell commented Jan 19, 2024

Sadly I think this will require a compat flag :-(

We have no plans to ever implement `importScripts()` and having
it defined but marked explicitly non-implemented is causing issues
with using certain third-party libraries in workers. So let's just
remove it entirely.

Refs: #1521
@jasnell
Copy link
Member Author

jasnell commented Jan 21, 2024

Updated to add the compat flag.

@kentonv
Copy link
Member

kentonv commented Jan 21, 2024

Don't forget to update the docs.

@jasnell
Copy link
Member Author

jasnell commented Jan 22, 2024

Docs: cloudflare/cloudflare-docs#12618

@jasnell jasnell merged commit 4e41cd4 into main Jan 22, 2024
11 checks passed
jasnell added a commit to jasnell/cloudflare-docs that referenced this pull request Jan 22, 2024
@jasnell jasnell deleted the jsnell/remove-importscripts branch January 22, 2024 04:03
deadlypants1973 added a commit to cloudflare/cloudflare-docs that referenced this pull request Feb 29, 2024
* Document the workers no-importscripts compat flag

Refs: cloudflare/workerd#1556

* Update content/workers/_partials/_platform-compatibility-dates/no-importscripts.md

Co-authored-by: Kate Tungusova <[email protected]>

---------

Co-authored-by: Kate Tungusova <[email protected]>
mchenco pushed a commit to cloudflare/cloudflare-docs that referenced this pull request Mar 1, 2024
* Document the workers no-importscripts compat flag

Refs: cloudflare/workerd#1556

* Update content/workers/_partials/_platform-compatibility-dates/no-importscripts.md

Co-authored-by: Kate Tungusova <[email protected]>

---------

Co-authored-by: Kate Tungusova <[email protected]>
mchenco added a commit to cloudflare/cloudflare-docs that referenced this pull request Mar 1, 2024
* first draft

* added pricing calculator image

* added pricing tables

* few copy tweaks

* Update models

* Add conditional beta pill to model page title

* Make non-beta models float to top of model index

* Add weight to sort models

* Add redirects

* Changes from PR review

* Replace pricing calc image

* Apply suggestions from code review

* Apply suggestions from code review

K -> ,000

* Fix wrangler hyperdrive binding key (#13190)

* [R2] runtime API: TypeScript formatting audit (#13200)

* [R2] runtime API: TypeScript formatting audit

* more edits

* [SSL] Fix mTLS for Workers redirect after bindings reorg (#13211)

* Fix mtls for workers redirect after bidings reorg

* Remove 301 to add again

* Re-add 301 to push and retrigger build

* connect your domain (#12701)

* first draft

* updating quotes

* additional updates

* Apply suggestions from code review

Co-authored-by: abstergail <[email protected]>

* updates with some feedback

* updates

* removing product filter, so fundamentals glossary is for all terms

* updating index pages for better mobile experience

* updates

* updating redirects

* fixing link

* updating dns limitations on the proxy status page. updating how cloudflare works feedback

* moving what is cloudflare changes to another branch

* restoring original file

* merging an older commit in

* updates

* updating weights and links

* revisions

* Apply suggestions from code review

Co-authored-by: abstergail <[email protected]>

* couple more updates

* final edits

* Apply suggestions from code review

Co-authored-by: marciocloudflare <[email protected]>

* fixing meta titles

---------

Co-authored-by: abstergail <[email protected]>
Co-authored-by: marciocloudflare <[email protected]>

* Revert Workers external_link pages as redirect targets (#13214)

* [WAI] codeowner update (#13216)

* [WAI] codeowner update

* npm run build

---------

Co-authored-by: Kody Jackson <[email protected]>

* Update smart-placement.md (#12455)

* Minor corrections (#12995)

"Developer" -> "Develop"
"Workers" -> "Worker's"

* [D1] Update Wrangler commands (#12336)

* [D1] Update Wrangler commands

* Apply suggestions from code review

Co-authored-by: Kate Tungusova <[email protected]>

* Remove npx from d1 commands

* Apply suggestions from code review

---------

Co-authored-by: Kate Tungusova <[email protected]>

* Document the workers no-importscripts compat flag (#12618)

* Document the workers no-importscripts compat flag

Refs: cloudflare/workerd#1556

* Update content/workers/_partials/_platform-compatibility-dates/no-importscripts.md

Co-authored-by: Kate Tungusova <[email protected]>

---------

Co-authored-by: Kate Tungusova <[email protected]>

* Clarify subrequest billing (#12873)

We don't bill for subrequests, but old language left it a bit ambiguous. This simplifies.

* [Gateway] Update app types (#12948)

Co-authored-by: Kate Tungusova <[email protected]>

* Clarify pricing <> Service Bindings (#11669)

* Link to Workers Trace Events documentation from Trace Events Logpush (#12307)

Currently this page doesn't actually explain what fields are available in logs, if you use Workers Trace Events Logpush. This fixes by adding a link to this page.

* resolving comments

---------

Co-authored-by: Michelle Chen <[email protected]>
Co-authored-by: Kate Tungusova <[email protected]>
Co-authored-by: Kane Wang <[email protected]>
Co-authored-by: Rebecca Tamachiro <[email protected]>
Co-authored-by: jason-cf <[email protected]>
Co-authored-by: abstergail <[email protected]>
Co-authored-by: marciocloudflare <[email protected]>
Co-authored-by: Kody Jackson <[email protected]>
Co-authored-by: Matt Silverlock <[email protected]>
Co-authored-by: Jürg Gutknecht <[email protected]>
Co-authored-by: Kian <[email protected]>
Co-authored-by: James M Snell <[email protected]>
Co-authored-by: Brendan Irvine-Broque <[email protected]>
Co-authored-by: Max Phillips <[email protected]>
Co-authored-by: MC <[email protected]>
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.

3 participants