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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摝 Update dependency fetch-mock to v8 #25564

Merged
merged 2 commits into from Dec 2, 2019

Conversation

renovate-bot
Copy link
Contributor

@renovate-bot renovate-bot commented Nov 12, 2019

This PR contains the following updates:

Package Type Update Change
fetch-mock (source) devDependencies major 7.7.3 -> 8.0.0

Release Notes

wheresrhys/fetch-mock

v8.0.0

Compare Source

  • implements ES modules
  • hopefully resolves problems with babel-core clashes
  • adds typescript types
  • removes the UNMATCHED and MATCHED constants, and no longer exports fetchMock as a property, as well as the default, export
  • only includes the whatwg-url polyfill in nodejs

Renovate configuration

馃搮 Schedule: At any time (no schedule defined).

馃殾 Automerge: Disabled by config. Please merge this manually once you are satisfied.

鈾伙笍 Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "rebase!".

馃敃 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

Newsflash: Renovate has joined WhiteSource, and is now free for all use. Learn more or view updated terms and privacy policies.

@renovate-bot renovate-bot changed the title 馃摝 Update dependency fetch-mock to v8 馃摝 Update dependency fetch-mock to v8 Nov 14, 2019
@rsimha
Copy link
Contributor

rsimha commented Nov 22, 2019

Seems like this is a breaking change because fetch-mock has changed from js to mjs.

https://travis-ci.org/ampproject/amphtml/jobs/611045026#L471

20 11 2019 17:16:47.183:ERROR [framework.browserify]: SyntaxError: 'import' and 'export' may appear only with 'sourceType: module' (3518:0) while parsing /home/travis/build/ampproject/amphtml/node_modules/fetch-mock/esm/client.mjs while parsing file: /home/travis/build/ampproject/amphtml/node_modules/fetch-mock/esm/client.mjs

/cc @ampproject/wg-ads and @taymonbeal, since fetch-mock is primarily used in test-amp-a4a.js and test-a4a-integration.js

@rsimha rsimha requested review from taymonbeal and lannka and removed request for estherkim November 22, 2019 22:57
@taymonbeal
Copy link
Member

That's actually a different fetch-mock that's now deprecated. The third-party fetch-mock that's being upgraded here is depended on directly by describes.js and is used by other code.

I don't understand why this error is happening; it looks like some kind of problem with Browserify? Why doesn't Browserify just consume the module?

(Also, I've switched teams at Google and no longer work on this codebase.)

@rsimha
Copy link
Contributor

rsimha commented Nov 25, 2019

That's actually a different fetch-mock that's now deprecated. The third-party fetch-mock that's being upgraded here is depended on directly by describes.js and is used by other code.

Aha, that explains the difference in usage.

I don't understand why this error is happening; it looks like some kind of problem with Browserify? Why doesn't Browserify just consume the module?

The fetch-mock package has become esm by default with v8. Importing the es5 alternative in describes.js still works. I've done this in 6ee6fdb.

(Also, I've switched teams at Google and no longer work on this codebase.)

Thanks for checking in here, and for the useful tip. 馃憤

@rsimha rsimha requested review from jridgewell and removed request for taymonbeal and lannka November 25, 2019 19:00
@rsimha
Copy link
Contributor

rsimha commented Nov 25, 2019

Adding @jridgewell to review the change to describes.js.

@forking-renovate
Copy link

PR has been edited

馃懛 This PR has received other commits, so Renovate will stop updating it to avoid conflicts or other problems. If you wish to abandon your changes and have Renovate start over you may click the "rebase" checkbox in the PR body/description.

@rsimha rsimha merged commit ee8c9ef into ampproject:master Dec 2, 2019
@renovate-bot renovate-bot deleted the renovate/fetch-mock-8.x branch December 2, 2019 18:47
@rsimha
Copy link
Contributor

rsimha commented Dec 2, 2019

For posterity, here's the usage documentation for fetch-mock v8: http://www.wheresrhys.co.uk/fetch-mock/#usageimporting

micajuine-ho pushed a commit to micajuine-ho/amphtml that referenced this pull request Dec 27, 2019
* 馃摝 Update dependency fetch-mock to v8

* Use es5 version of fetch-mock in describes.js


Co-authored-by: Raghu Simha <rsimha@amp.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants